function phShadow() {
	var spanList = document.getElementsByTagName("span");
	for(var i=0; i < spanList.length; i++) {
		if(spanList[i].className.match("mt-enclosure-image")){
			try{
				var imgTag = spanList[i].getElementsByTagName("img")[0];
				var w = imgTag.width + 8;
				var h = imgTag.height + 8;
				var l = 0;
				if(imgTag.className.match("mt-image-center")){
					if(navigator.appName == "Microsoft Internet Explorer")
						l = Math.floor((571 - imgTag.width)/2);
					else
						l = Math.ceil((571 - imgTag.width)/2);
				}else if(imgTag.className.match("mt-image-left")){
					cssFloat(spanList[i], "left");
					spanList[i].style.marginRight = "20px";
					imgTag.style.marginRight = "0";
				}else if(imgTag.className.match("mt-image-right")) {
					l = 20;
					cssFloat(spanList[i], "right");
					imgTag.style.marginLeft = "0";
					imgTag.style.borderLeft = "20px solid #fff";
				}else if(imgTag.className.match("mt-image-none")) {
					spanList[i].style.clear = "both";
				}
				cssFloat(imgTag, "none");
				l -= 2;
//				var inner = spanList[i].innerHTML;
//				var mytag = inner + "<div class='shadow_base' style='width:"+w+"px;height:"+h+"px;left:"+l+"px'><div class='shadow_top'></div><div class='shadow_left'></div></div>";
//				spanList[i].innerHTML = mytag;
				var shadow_base = document.createElement("div");
				var shadow_top = document.createElement("div");
				var shadow_left = document.createElement("div");
				shadow_base.className = "shadow_base";
				shadow_base.style.width = w+"px";
				shadow_base.style.height = h+"px";
				shadow_base.style.left = l+"px";
				shadow_top.className = "shadow_top";
				shadow_left.className = "shadow_left";
				spanList[i].appendChild(shadow_base);
				shadow_base.appendChild(shadow_top);
				shadow_base.appendChild(shadow_left);
			}catch(e){
			}
		}
	}
}

function cssFloat(obj, style)
{
	if(navigator.appName == "Microsoft Internet Explorer")
		obj.style.styleFloat = style;
	else
		obj.style.cssFloat = style;
}

if(window.addEventListener) {
	window.addEventListener("load", phShadow, false);
}
else if(window.attachEvent) {
	window.attachEvent("onload", phShadow);
}