var mh_ican_url = '';

function mh_loadICanItem( ) {
	if ( mh_ican_url != '' ) {
		var req = new JsHttpRequest( );
		
		req.onreadystatechange = function( ) {
			if ( req.readyState == 4 ) {
				var t = req;
				
				if ( t.responseJS.success ) {
					var text = '';
					
					if ( t.responseJS.ican_item.img_url != '' ) {
						text = '<table border="0" cellpadding="0" cellspacing="0">' + "\r\n" +
							'			<tbody>' + "\r\n" +
							'				<tr>' + "\r\n" +
							'					<td align="left" valign="top" style="padding-top: 3px; padding-bottom: 9px;"><img src="' + t.responseJS.ican_item.img_url + '" /></td>' + "\r\n" +
							'					<td align="left" valign="top">' + "\r\n" +
							t.responseJS.ican_item.text + "\r\n" +
							'					</td>' + "\r\n" +
							'				</tr>' + "\r\n" +
							'			</tbody>' + "\r\n" +
							'		</table>';
					} else {
						text = t.responseJS.ican_item.text;
					}
					
					$( '#ican_holder > div' ).fadeOut(
						500,
						function ( ) {
							$( '#ican_holder > div' ).html( text ).fadeIn(
								500,
								function ( ) {
									mh_ican_url = t.responseJS.ican_item.next_url;
								}
							);
						}
					);
				}
			}
		}
		
		req.open( null, mh_ican_url, true );
		req.send( );
		mh_ican_url = '';
	}
}
