﻿function eyunWin(oname)
  {var o=document.createElement("div");
   o.setAttribute("id",oname+"Div");
   document.body.insertBefore(o, document.body.firstChild);
   o=document.getElementById(oname+"Div");
   o.style.cssText="box-shadow:4px 4px 3px #333333;-moz-box-shadow:4px 4px 3px #333333;-webkit-box-shadow:4px 4px 3px #333333;position:fixed;_position:absolute;bottom:0;filter:progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=135, color=#333333);top:50%;left:50%;_top:expression((document.documentElement.clientHeight/2 + document.documentElement.scrollTop - this.offsetHeight/2));_left:expression((document.documentElement.clientWidth/2 + document.documentElement.scrollLeft - this.offsetWidth/2));display:none;margin:0px;z-index:99999";
   var path="img/tip/";
   this.close=function(){o.style.display="none";if(typeof($("bg")))$("bg").style.display="none"};
   this.show=function(w,h,tit,txt){
   var s="";
   var thead="<div style='background-image:url("+path+"t.gif);width:"+w+"px;height:38px'><div style='background:url("+path+"t1.gif) no-repeat right top;width:"+(w-20)+"px;height:30px;color:#FFFFFF;font:13pt/150%;padding-top:8px;padding-left:20px;font-weight:bold'>"+tit+"</div></div>";
   var tfoot="<div style='background-image:url("+path+"b.gif);width:"+w+"px;height:29px'><div style='background:url("+path+"b1.gif) no-repeat left top;width:"+w+"px;height:29px;text-align:center'><span style='cursor:pointer;font-weight:blod;color:red' onclick='"+oname+".close()'>[关闭窗口]</span></div></div>";
   s=thead+"<div style='position:relative;'><div style='width:"+w+"px;height:"+h+"px;background-color:#FFFFFF;'>"+txt+"</div></div>"+tfoot;
   o.style.width=w+"px";
   o.style.height=(h+29+38)+"px";
   if(document.all && /msie 6.0/i.test(navigator.userAgent.toLowerCase()))//该死的IE6。。。。
     o.style.margin="0px";
   else
     {o.style.marginLeft=-w/2+"px";
      o.style.marginTop=-h/2+"px";
     }
   o.innerHTML=s;
   o.style.display="";
   this.t=function(){alert(this.offsetWidth)}
   };
  }
