<!--
var newdivs = false;
if (document.images) {
	var WsImg = new Array();
	for (i=0;i<5;i++){
		WsImg[i] = new Image();
		WsImg[i].src = '/WsControls/Images/SysMeg/'+ i +'.gif';
	}
	WsImg[5] = new Image();
	WsImg[5].src = '/WsControls/Images/SysMeg/SysMeg.gif';
	WsImg[6] = new Image();
	WsImg[6].src = '/WsControls/Images/SysMeg/f1.gif';
	WsImg[7] = new Image();
	WsImg[7].src = '/WsControls/Images/SysMeg/f2.gif';
	WsImg[8] = new Image();
	WsImg[8].src = '/WsControls/Images/SysMeg/place.png';
	WsImg[9] = new Image();
	WsImg[9].src = '/WsControls/Images/SysMeg/place.gif';
}

function DispMeg(ButtonDiv,Titles,Megs,SrcOk,SrcCancle,Img,ButtonText,Types)
{
    HandleButton(ButtonDiv,"hidden");
	HandleSelect("hidden");
	var div = GetDiv(ButtonDiv+"megdiv");
	if (div)
	{
	    div.style.visibility = "visible";
	}else{
	    div = document.createElement("div");
		div.innerHTML='<div class="sysWin" id="sysMsgWin"><h4><div class="fLe"></div><b class="icoSw" id="icoSw"></b><span>'+Titles+'</span><div class="fRi"></div><a href="javascript:CloseMegDiv(\''+ButtonDiv+'\');" title="关闭" class="clsWin" id="btnSysInfoClose"></a></h4><div class="bdy"><div class="bdyCtn"><table class="swTb"><tbody><tr><th><b style="background-image:url('+Img+');" class="icoIfo" id="icoIfo"></b></th><td><span id="contextSpan" class="swTit">'+Megs+'</span></td></tr></tbody></table><div class="clear"></div></div></div><div class="bot"><div class="fLe"></div>'+GetButton(Types,ButtonText,ButtonDiv,SrcOk,SrcCancle)+'<div class="fRi"></div></div></div>';
	    div.style.width = 424;
	    div.style.position = "absolute";
	    div.style.zIndex = 99999;
	    div.id= ButtonDiv+"megdiv";
	    document.body.appendChild(div);
	}
	
    var bgdiv = GetDiv("megbgdiv");
	if (bgdiv)
	{
	    bgdiv.style.visibility = "visible";
	}else{
	    bgdiv = document.createElement("div");
		bgdiv.innerHTML='<img style="cursor:hand!important;cursor:pointer;" src="/WsControls/Images/SysMeg/place.png" height="100%" width="100%">';
		bgdiv.style.opacity = "0.6";
	    bgdiv.style.filter = "alpha(opacity=40)";
	    bgdiv.style.position = "absolute";
	    bgdiv.style.zIndex = 998;
	    bgdiv.id="megbgdiv";
	    document.body.appendChild(bgdiv);
	}
	resizewindow(div,bgdiv);
	window.onresize = function(){resizewindow(div,bgdiv);}
	if(navigator.userAgent.indexOf("Firefox")>0){ 
        return true; 
    }else{
		setwindow();
	}
}

function resizewindow(div,bgdiv){
	var xScroll, yScroll;
    if (window.innerHeight && window.scrollMaxY){
       xScroll = document.body.scrollWidth;
       yScroll = window.innerHeight + window.scrollMaxY;
    } else if (document.body.scrollHeight > document.body.offsetHeight){
       xScroll = document.body.scrollWidth;
       yScroll = document.body.scrollHeight;
    } else { 
       xScroll = document.body.offsetWidth;
       yScroll = document.body.offsetHeight;
    }
         
    var windowWidth, windowHeight;
    if (self.innerHeight) {
       windowWidth = self.innerWidth;
       windowHeight = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) {
       windowWidth = document.documentElement.clientWidth;
       windowHeight = document.documentElement.clientHeight;
    } else if (document.body) { 
       windowWidth = document.body.clientWidth;
       windowHeight = document.body.clientHeight;
    }
	   
	if(yScroll < windowHeight){
        h = windowHeight;
    } else {
        h = yScroll;
    }
    if(xScroll < windowWidth){
        w = windowWidth;
    } else {
        w = xScroll;
    }
	
    div.style.top=GetWidth()+(windowHeight/2)-130;
	div.style.left = w/2-212;
	
    bgdiv.style.top = "0";
	bgdiv.style.left = "0";
	bgdiv.style.width = w;
	bgdiv.style.height = h;
}

function setwindow(){
var temp_h1 = document.body.clientHeight;
var temp_h2 = document.documentElement.clientHeight;
var isXhtml = (temp_h2<=temp_h1&&temp_h2!=0)?true:false; 
var htmlbody = isXhtml?document.documentElement:document.body;
  if (newdivs){
		newdivs = false;
		htmlbody.style.overflowY = "auto";
		htmlbody.style.overflowX = "hidden";
  }else{
		newdivs = true;
		htmlbody.style.overflow = "hidden";
  }
}
function CloseMegDiv(ButtonNames)
{
   //window.location.reload(true);
   //history.back(-1);
    HandleDiv(ButtonNames+"megdiv");
    HandleDiv("megbgdiv");
    HandleSelect("visible");
    HandleButton(ButtonNames,"visible");
	if(navigator.userAgent.indexOf("Firefox")>0){ 
        return true; 
    }else{
		setwindow();
	}
}
function HandleSelect(States)
{
    var sels = document.getElementsByTagName("SELECT");
	for(var i=0; i<sels.length; i++)
	{
	  sels[i].style.visibility = States;
	}
}
function HandleDiv(ButtonNames)
{
  d = GetDiv(ButtonNames);
  if (d)
  {
    if (document.layers) d.visibility = "hide";
	else d.style.visibility = "hidden";
  }else{
  alert(ButtonNames);
  }
}
function HandleButton(ButtonNames,States)
{
  d = GetDiv(ButtonNames);
  if (d)
  {
	 d.style.visibility = States;
  }
}
function GetDiv(sDiv)
{
	var div;
	if (document.getElementById)
		div = document.getElementById(sDiv);
	else if (document.all)
		div = eval("window." + sDiv);
	else if (document.layers)
		div = document.layers[sDiv];
	else
		div = null;
	return div;
}
function GetWidth()
{		
    var scrollPos; 
    if (typeof window.pageYOffset != 'undefined') { 
       scrollPos = window.pageYOffset; 
    }else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') { 
      scrollPos = document.documentElement.scrollTop; 
    }else if (typeof document.body != 'undefined') { 
      scrollPos = document.body.scrollTop; 
    } 
    return scrollPos;
}
function OpenModalDialog(Url,Width,Height,WindowObj)
{
	var ReturnStr=showModalDialog(Url,WindowObj,'dialogWidth:'+Width+'pt;dialogHeight:'+Height+'pt;status:no;help:no;scroll:no;');
	return ReturnStr;
}
function OpenMake(url)
{
    newwin=window.open('about:blank','Make','width=500,height=400,resizable=1,scrollbars=1');
    if (document.all){
        newwin.moveTo(screen.width/2-200,screen.height/2-180)
    }
	myform.action=url;
	myform.target='Make';
	myform.submit();
}
function GetButton(types,ButtonText,ButtonDiv,SrcOk,SrcCancle)
{
    var bstr;
	var cstr;
	bstr='<input name="WsSave" class="syBtn" id="btnSysMsgOk" type="button" value="'+ButtonText+'"'
	cstr='<input name="WsCancle" class="syBtn" id="btnSysMsgCancel" type="button" value=" 取 消 "'
    if (types == 0) {
         bstr+=' onclick="CloseMegDiv(\''+ButtonDiv+'\');" />';
    }else if (types == 1){
         bstr+=' onclick="CloseMegDiv(\''+ButtonDiv+'\');window.close();" />';
    }else if (types == 2){
         bstr+=' onclick="CloseMegDiv(\''+ButtonDiv+'\'); if(window.dialogArguments != null){window.dialogArguments.location.reload(true);} window.close();" />';
    }else if (types == 3){
         bstr+=' onclick="CloseMegDiv(\''+ButtonDiv+'\'); if(window.dialogArguments != null){window.dialogArguments.location.reload(true);} window.close();" />';
    }else if (types == 4){
         bstr+=' onclick="CloseMegDiv(\''+ButtonDiv+'\'); window.location=\''+SrcOk+'\';" />';
    }else if (types == 5){
         bstr+=' onclick="CloseMegDiv(\''+ButtonDiv+'\');history.back();" />';
    }else if (types == 6){
         bstr+=' onclick="CloseMegDiv(\''+ButtonDiv+'\');__doPostBack('+SrcOk+');" />';
    }else if (types == 7){
         bstr+=' onclick="CloseMegDiv(\''+ButtonDiv+'\');__doPostBack('+SrcOk+');" />'+cstr+' onclick="CloseMegDiv(\''+ButtonDiv+'\');__doPostBack('+SrcCancle+');" />';
    }else if (types == 8){
         bstr+=' onclick="CloseMegDiv(\''+ButtonDiv+'\');window.location=\''+SrcOk+'\';" />'+cstr+' onclick="CloseMegDiv(\''+ButtonDiv+'\');" />';
    }else if (types == 9){
         bstr+=' onclick="CloseMegDiv(\''+ButtonDiv+'\');OpenMake(\''+SrcOk+'\');" />'+cstr+' onclick="CloseMegDiv(\''+ButtonDiv+'\');" />';
    }else if (types == 10){
         bstr+=' onclick="CloseMegDiv(\''+ButtonDiv+'\');OpenModalDialog('+SrcOk+');" />'+cstr+' onclick="CloseMegDiv(\''+ButtonDiv+'\');OpenMake(\''+SrcCancle+'\');" />';
    }else if (types == 11){
         bstr='';
         if (SrcOk != ""){
            copytext(SrcOk);
         }
    }else if (types == 12){
         bstr='';
         copytext(SrcOk);
    }else if (types == 13){
         bstr='';
    }else{
         bstr='';
    }
    return bstr;
}
//-->