function imagesInit() {
	var images = document.getElementsByTagName( 'img' );
	for( var i =0;i<images.length;i++ ) {
		if( images[i].className == 'shadow' && navigator.appName == "Microsoft Internet Explorer" ) {
			imageReplace( images[i] );
		}
	}
}

function imageReplace( img ) {
	var newDiv = document.createElement( 'div' );
	linkCheck( img, newDiv );
	newDiv.className = 'img-shadow';
	newDiv.style.height = parseInt( img.height )+'px';
	newDiv.style.width = parseInt( img.width )+'px';
	if ( img.align == 'left' || img.align == 'right' ) {
		newDiv.style.cssFloat = img.align;
		newDiv.style.styleFloat = img.align;
	}
	img.parentNode.insertBefore( newDiv, img.nextSibling );
	newDiv.appendChild( img );
}

function linkCheck( img, divBox ) {
	if ( typeof img.parentNode.href == 'undefined' ) return;
	img.parentNode.className = 'no_icon';
	if ( navigator.userAgent.toLowerCase( ).indexOf( 'msie' ) !=-1 ) {
		divBox.oldlink = img.parentNode;
		divBox.onclick = linkClick;
		divBox.style.cursor = 'pointer';		
	}
}

function linkClick() {
	this.oldlink.click();
}
