function dialog(f){var g='';var h=300;var l=180;var m="";var n=f;var o='<input id="dialogOk" type="button" style="{width:62px;height:22px;border:0;background:url(\''+n+'smb_btn_bg.gif\');line-height:20px;" value="???" onclick="new dialog().reset();" /> <input id="dialogCancel" type="button" style="{width:62px;height:22px;border:0;background:url(\''+n+'smb_btn_bg.gif\');line-height:20px;" value="???" onclick="new dialog().reset();" />';var p='<input type="image" id="dialogBoxClose" onclick="new dialog().reset();" src="'+n+'dialogClose0.gif" border="0" width="17" height="17" align="absmiddle" />';var q='		<table id="dialogBodyBox" border="0" align="center" cellpadding="0" cellspacing="0">			<tr height="10"><td colspan="4"></td></tr>			<tr>				<td width="10"></td>				<td width="80" align="center" valign="absmiddle"><img id="dialogBoxFace" src="'+n+'3.gif" /></td>				<td id="dialogMsg" style="font-size:0px;"></td>				<td width="10"></td>			</tr>			<tr height="10"><td colspan="4" align="center"></td></tr>			<tr><td id="dialogFunc" colspan="4" align="center">'+o+'</td></tr>			<tr height="10"><td colspan="4" align="center"></td></tr>		</table>	';var r='		<table id="dialogBox" width="'+h+'" border="0" cellpadding="0" cellspacing="0" style="border:1px solid #000;display:none;z-index:10;">			<tr height="0" bgcolor="#D6E3EB"><td></td></tr>			<tr height="25" bgcolor="#6795B4">				<td>					<table onselectstart="return false;" style="-moz-user-select:none;" width="100%" border="0" cellpadding="0" cellspacing="0">						<tr>							<td width="6"></td>							<td id="dialogBoxTitle"  style="color:#fff;cursor:move;font-size:12px;font-weight:bold;">&nbsp;</td>							<td id="dialogClose" width="27" align="right" valign="middle">								'+p+'							</td>							<td width="6"></td>						</tr>					</table>				</td>			</tr>			<tr height="0" bgcolor="#EDEDED"><td></td></tr>			<tr id="dialogHeight">				<td id="dialogBody" bgcolor="#ffffff">'+q+'</td>			</tr>		</table>		<div id="dialogBoxShadow" style="display:none;z-index:9;"></div>	';var s='		<div id="dialogBoxBG" style="position:absolute;top:0px;left:0px;width:100%;height:100%;background:url('+n+'blank.gif);"></div>	';function $(a){return document.getElementById(a)}this.show=function(){this.middle('dialogBox');this.shadow()};this.reset=function(){$('dialogBox').style.display='none';$('dialogBoxBG').style.display='none';$('dialogBoxShadow').style.display="none";$('dialogBody').innerHTML=q};this.html=function(a){$("dialogBody").innerHTML=a;this.show()};this.init=function(){$('dialogCase')?$('dialogCase').parentNode.removeChild($('dialogCase')):function(){};var a=document.createElement('span');a.id="dialogCase";a.innerHTML=s+r;document.body.appendChild(a);$('dialogBoxBG').style.height=document.body.scrollHeight};this.button=function(a,b){if($(a)){$(a).style.display='';if($(a).addEventListener){if($(a).act){$(a).removeEventListener('click',function(){eval($(a).act)},false)}$(a).act=b;$(a).addEventListener('click',function(){eval(b)},false)}else{if($(a).act){$(a).detachEvent('onclick',function(){eval($(a).act)})}$(a).act=b;$(a).attachEvent('onclick',function(){eval(b)})}}};this.shadow=function(){var a=$('dialogBoxShadow');var b=$('dialogBox');a['style']['position']="absolute";a['style']['background']="#000";a['style']['display']="";a['style']['opacity']="0.2";a['style']['filter']="alpha(opacity=20)";a['style']['top']=b.offsetTop+6;a['style']['left']=b.offsetLeft+6;a['style']['width']=b.offsetWidth;a['style']['height']=b.offsetHeight};this.event=function(a,b,c,d){$('dialogFunc').innerHTML=o;$('dialogClose').innerHTML=p;$('dialogBodyBox')==null?$('dialogBody').innerHTML=q:function(){};$('dialogMsg')?$('dialogMsg').innerHTML=a:function(){};b&&b!=""?this.button('dialogOk',b):$('dialogOk').style.display='none';c&&c!=""?this.button('dialogCancel',c):$('dialogCancel').style.display='none';d?this.button('dialogBoxClose',d):function(){};this.show()};this.set=function(a,b){var c=$('dialogBoxShadow');var d=$('dialogBox');var e=$('dialogHeight');if(b!=''){switch(a){case'title':$('dialogBoxTitle').innerHTML=b;title=b;break;case'width':d['style']['width']=b;h=b;break;case'height':e['style']['height']=b;l=b;break;case'src':if(parseInt(b)>0){$('dialogBoxFace')?$('dialogBoxFace').src=n+b+'.gif':function(){}}else{$('dialogBoxFace')?$('dialogBoxFace').src=b:function(){}}m=b;break}}this.middle('dialogBox');c['style']['top']=d.offsetTop+6;c['style']['left']=d.offsetLeft+6;c['style']['width']=d.offsetWidth;c['style']['height']=d.offsetHeight};this.hideModule=function(a,b){var c=parent.document.getElementsByTagName("iframe");c=0;var d=document.getElementsByTagName(a);var e,iChildLen;for(var i=0;i<d.length;i++){d[i].style.display=b}for(var j=0;j<c.length;j++){e=document.frames?document.frames[j]:c[j].contentWindow;iChildLen=e.document.body.getElementsByTagName(a).length;for(var k=0;k<iChildLen;k++){e.document.body.getElementsByTagName(a)[k].style.display=b}}};this.middle=function(a){var b=parent?parent.document.body.clientWidth:document.body.clientWidth;document.getElementById(a)['style']['display']='';document.getElementById(a)['style']['position']="absolute";document.getElementById(a)['style']['left']=(document.body.clientWidth/2)-(document.getElementById(a).offsetWidth/2);document.getElementById(a)['style']['top']=200}}