// JavaScript Document
window.onload=function(){
	if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
		correctPNG();
		alphaBackgrounds();
	}
  setCenter(document.getElementsByTagName("table")[0]);
}
var setCenter=function(o){ //让容器居中。
	if(typeof o!="object")return;		//判断元素是不是对象，不存在直接不做处理
	var bd=o;
	with(bd.style){
		position="absolute";
		pTop=bd.parentNode.top?bd.parentNode.top:0;
		pLeft=bd.parentNode.left?bd.parentNode.left:0;
       // alert(bd.parentNode.tagName.toLowerCase());
        if(bd.parentNode.tagName.toLowerCase()=="body"){
            Pheight=Math.max(document.body.scrollHeight,document.documentElement.clientHeight);
            Pwidth=Math.max(document.body.scrollWidth,document.documentElement.clientWidth);
            //alert(Pheight+"++++"+Pwidth);
        }
        else
        {
            Pheight=bd.parentNode.clientHeight;
            Pwidth=bd.parentNode.clientWidth;
        }
		//alert(bd.parentNode.style.width.slice(0,-2)/2+"___"+bd.clientWidth)
		top=pTop+parseInt((Pheight-bd.clientHeight)/2)+"px";
		left=pLeft+parseInt((Pwidth-bd.clientWidth)/2)+"px";
	}
}


