// JavaScript Document
	function $(uid){return document.getElementById(uid)}
	function showbox(obj,w,h){			
		var winWidth;
		if(document.body.clientWidth>document.documentElement.clientWidth){
			winWidth=document.body.clientWidth;
		}else{
			winWidth=document.documentElement.clientWidth;
		}
		var winHeight;
		if(document.body.clientHeight>document.documentElement.clientHeight){
			winHeight=document.body.clientHeight;
		}else{
			winHeight=document.documentElement.clientHeight;
		}
		
		$(obj).style.display='block';
		$(obj).style.filter="alpha(opacity=80)";
		$(obj).style.opacity="0.8";
		$(obj).style.top=parseInt((document.documentElement.clientHeight-h)/2+document.documentElement.scrollTop)+'px';
		$(obj).style.left=parseInt((winWidth-w)/2)+'px';	
		
		
		  /*-------------------------Êó±êÍÏ¶¯---------------------*/ 
 var od = document.getElementById(obj); 
 var dx,dy,mx,my,mouseD;
 var odrag;
 var isIE = document.all ? true : false;
 document.onmousedown = function(e){
  var e = e ? e : event;
  if(e.button == (document.all ? 1 : 0))
  {
   mouseD = true;   
  }
 }
 document.onmouseup = function(){
  mouseD = false;
  odrag = "";
  if(isIE)
  {
   od.releaseCapture();
   od.filters.alpha.opacity = 90;
  }
  else
  {
   window.releaseEvents(od.MOUSEMOVE);
   od.style.opacity = 0.9;
  }  
 }
 
 
 //function readyMove(e){ 
 od.onmousedown = function(e){
  odrag = this;
  var e = e ? e : event;
  if(e.button == (document.all ? 1 : 0))
  {
   mx = e.clientX;
   my = e.clientY;
   od.style.left = od.offsetLeft + "px";
   od.style.top = od.offsetTop + "px";
   if(isIE)
   {
    od.setCapture();    
    od.filters.alpha.opacity = 60;
   }
   else
   {
    window.captureEvents(Event.MOUSEMOVE);
    od.style.opacity = 0.6;
   }
   
   //alert(mx);
   //alert(my);
   
  } 
 }
 document.onmousemove = function(e){
  var e = e ? e : event;
  
  //alert(mrx);
  //alert(e.button);  
  if(mouseD==true && odrag)
  {  
   var mrx = e.clientX - mx;
   var mry = e.clientY - my; 
   od.style.left = parseInt(od.style.left) +mrx + "px";
   od.style.top = parseInt(od.style.top) + mry + "px";   
   mx = e.clientX;
   my = e.clientY;
   
  }
 }
		
	
	
		window.onscroll=function(){
		//alert("1");
		$(obj).style.top=parseInt((document.documentElement.clientHeight-h)/2+document.documentElement.scrollTop)+'px';
	}
	}
	function closebox(obj){
		$(obj).style.display='none';
	}
