function getPosition() {
var top = document.documentElement.scrollTop;
var left = document.documentElement.scrollLeft;
var height = document.documentElement.clientHeight;
var width = document.documentElement.clientWidth;
return {top:top,left:left,height:height,width:width};
} 

function showPop(){
		var width = 785; 
		var height = 600; 
		var obj = document.getElementById("pop");
		var bg_obj =document.getElementById("huibg");
		document.getElementsByTagName("html")[0].style.overflow='hidden';
		obj.style.display = "block";
		bg_obj.style.display = "block";
		obj.style.position = "absolute";
		obj.style.zindex = "100";		
		obj.style.width = width + "px";
		obj.style.height = height + "px";
		bg_obj.style.height =document.body.clientHeight;
		
		//document.getElementById("sad").style.backgroundColor="#ccc";//div bianan
		//document.getElementById("sad").style.opacity="0.5";//div50%，FF
		//document.getElementById("sad").filters.alpha.opacity="50";//div50%IE
		
		var Position = getPosition();//初始化值对象
		leftadd = (Position.width-width)/2;
		topadd = (Position.height-height)/2;
		
		obj.style.top = (Position.top + topadd) + "px";
		obj.style.left = (Position.left + leftadd) + "px";
		
			window.onscroll = function (){
			var Position = getPosition();
			
			obj.style.top = (Position.top + topadd) +"px";
			obj.style.left = (Position.left + leftadd) +"px";
			};

}

function hidePop(){
document.getElementsByTagName("html")[0].style.overflow='';
document.getElementById("huibg").style.display = "none";
document.getElementById("pop").style.display = "none";
//document.getElementById("sad").style.backgroundColor="";


}
