// JavaScript Document
function showDialog(url,pageWidth,pageHeight){
if(typeof(pageWidth) != 'number')pageWidth=720;
if(typeof(pageHeight) != 'number')pageHeight=500;
var shield=document.createElement('DIV'),alertFram=document.createElement('DIV'),moveBar=document.createElement('DIV'),frame=document.createElement('IFRAME');
with(document.body){
var CH=clientHeight,SH=scrollHeight, CW=clientWidth, ST=scrollTop;
appendChild(shield);
appendChild(alertFram);
}
with(moveBar){
onmousedown=function(){MessageBox_x=event.x-parentNode.style.pixelLeft;MessageBox_y=event.y-parentNode.style.pixelTop;setCapture();};
onmouseup=function(){releaseCapture();};
onmousemove=function(){var obj =this.parentNode;
if(event.button==1 && typeof(MessageBox_x) != 'undefined' && typeof(MessageBox_y) != 'undefined'){
var MessageBoxX=obj.clientLeft;
var MessageBoxY=obj.clientTop;
obj.style.pixelLeft=MessageBoxX+(event.x-MessageBox_x);
obj.style.pixelTop=MessageBoxY+(event.y-MessageBox_y);
}};
with(style){
background='#5C800F';
cursor='move';
clear='both';
height=20;
display='block';
textAlign='right';
}
innerHTML='<a title="关闭" onclick="doOk()" style="background:red; padding:5px; cursor:pointer;">×</a>';
};
with(frame){id='MessagePage';
src=url;
frameborder=0;
scolling='auto';
target='parent';
height=pageHeight;
width=pageWidth;
};
with(alertFram){appendChild(moveBar);
appendChild(frame);
onselectstart=function(){return false;
};
id='MessageBox';
with(style){display='block';
position='absolute';
width=pageWidth;
height=pageHeight + 20;
left=(CW-pageWidth)/2;
top=(CH-pageHeight-20)/2 + ST;
zIndex='101';
}};
with(shield){id='shield';
with(style){position='absolute';
left=0;
top=0;
width='100%';
height=CH > SH ? CH : SH;
background='#000';
zIndex='100';
filter='alpha(opacity=1)';
}}var c=0;
//var show=setInterval('doAlpha()',1),hide;
this.doAlpha=function(){c+=4;
if (c>=50){clearInterval(show);
}else{shield.style.filter='alpha(opacity='+c+');';
}return 0;
};
this.doOk=function(){//if(!hide){clearInterval(show);
moveBar.innerHTML='<a title="关闭" style="background:red; padding:5px; cursor:pointer;">×</a>';
hide=setInterval('doOmega()',1);//}
};
this.doOmega=function(){c-=4;
if(c<=5){clearInterval(hide);
document.body.removeChild(alertFram);
document.body.removeChild(shield);
}else{shield.style.filter='alpha(opacity='+c+');';
}return 0;
};
alertFram.focus();
}
