var getid=0;//页面传参数
var e=0;//页面传参数
//var userid = 0;//页面传参数，用户ID值

function acDiv(div,x,y,width,height,src){
this.div=div;

var v_left=(document.body.clientWidth-width)/2; 
var v_top=(document.body.clientHeight-height)/2; 
this.x=v_left;
this.y=v_top;

this.width=width;
this.height=height;
this.src=src;
this.name="acdiv";
this.sourcesrc = src;
var me=this;
try{window.attachEvent("onload",load)}
catch(e){window.addEventListener("load",load,false)}
function load(){me.init();me.hide()}};
acDiv.prototype.init=function(div,x,y,width,height,src){
var me=this;var div=me.div;
if(typeof(div)=="string")div=document.getElementById(div);
me.root=document.createElement("div");x=x||me.x;y=y||me.y;width=width||me.width;height=height||me.height;src=src||me.src;
var root=me.root;
document.body.appendChild(root);
root.style.position="absolute";
root.style.left=x+"px"||0;
root.style.top=y+"px"||0;
root.style.width=width+"px";
root.style.height=height+"px";
root.style.zIndex="65536";
me.st=root.style.visibility;
if(div)root.appendChild(div);
else me.createFrame(src)};
acDiv.prototype.hide=function(){
var me=this;
this.src = this.sourcesrc;
var st=me.root.style.visibility;
if(st!="hidden")me.root.style.visibility="hidden"};
acDiv.prototype.show=function(){
var me=this;
var st=me.root.style.visibility;
if(st=="hidden")me.root.style.visibility="visible";
//var timenow=new Date().getTime();
//me.ifr.src=me.src+"?t="+timenow;

if (getid!=0)
{me.src = me.src+"&id="+getid;
me.ifr.src=me.src;}
else
{me.ifr.src=me.src;}
if (e!=0)
{me.src=me.src+"&e="+e;
me.ifr.src=me.src;}
else
{me.ifr.src=me.src;}
//add
};
acDiv.prototype.sh=function(){
var me=this;
var st=me.root.style.visibility;
if(st=="hidden")me.show();else me.hide()};
acDiv.prototype.createFrame=function(src){
var me=this;
var ifr=document.all;
if(ifr){try{ifr=document.createElement("<iframe frameborder=0 scrolling='no'>")}catch(e){ifr=document.createElement("iframe")}}
else{ifr=document.createElement("iframe")}
me.root.appendChild(ifr);
ifr.src=src||"about:blank";
ifr.frameBorder="0";
ifr.scrolling="no";
ifr.width=me.width;
ifr.height=me.height;
me.ifr=ifr};
