﻿var objOpenWin;
var objHelpDoc;
function getWinPos(winWidth,winHeight)
{
	screenW=window.screen.width;
	screenH=window.screen.height;
	winLeft=(screenW-winWidth)/2;
	winTop=(screenH-winHeight)/2;
	aryPos=new Array(winLeft,winTop);
	return aryPos;
}
function openWin(winUrl,winWidth,winHeight)
{
	aryPos=getWinPos(winWidth,winHeight);
	objAgm=openWin.arguments;
	if (objAgm.length>3)
	{
		winName=objAgm[3];
		if (objAgm.length>4)
		{
			if (objAgm[4])
			{
				aryPos[0]=2000;
				aryPos[1]=2000;
			}
		}
	}
	else
	{
		pos=winUrl.indexOf(".");
		if (pos<0)
		{
			winName=winUrl;
		}
		else
		{
			winName=winUrl.substring(0,pos);
		}
	    pos=winName.lastIndexOf("/");
	    if (pos>=0)
	    {
	        winName=winName.substring(pos+1,winName.length);
	    }
	}
	if (winUrl.indexOf("<html>")<0)
	{
		winDoc="";
	}
	else
	{
		winDoc=winUrl;
		winUrl="about:blank";
		winName="Error";
	}
	var objOpenWin=window.open(winUrl,winName,"scrollbars=yes,width="+winWidth+"px,height="+winHeight+"px,left="+aryPos[0]+"px,top="+aryPos[1]+"px");
	if(typeof(objOpenWin) == 'undefined' ){
	    alert('浏览器阻止了一个弹出窗口，请关闭<阻止弹出窗口>选项后重新浏览。');
	    return false;    
	}
	if (winDoc!="")
	{
		objOpenWin.document.open();
		objOpenWin.document.write(winDoc);
		objOpenWin.document.close();
	}
	if (objAgm.length!=4)	
	{
		try
		{
			objOpenWin.focus();
			window.onfocus=openWinBlur;
		}
		catch(e){}
	}
}
function showDialog(winUrl,winWidth,winHeight)
{
    window.showModalDialog(winUrl,window,"dialogWidth:" + winWidth + "px;dialogHeight:" + winHeight + "px;help:no");
}
function openWinBlur()
{
	try
	{
		objOpenWin.close();
		window.onfocus="";
	}
	catch(e){}
}
function addChangeEvent()
{
	objInput=document.all.tags("INPUT");
	for (iACE=0;iACE<objInput.length;iACE++)
	{
		if (objInput[iACE].type=="text")
		{
			objInput[iACE].onchange=doChange;
		}
	}
}
function openWinChk(winUrl,winWidth,winHeight)
{
	aryPos=getWinPos(winWidth,winHeight);
	objAgm=openWinChk.arguments;	
	if (objAgm.length>3)
	{
		winName=objAgm[3];
		if (objAgm.length>4)
		{
			if (objAgm[4])
			{
				aryPos[0]=2000;
				aryPos[1]=2000;
			}
		}
	}
	else
	{
		pos=winUrl.lastIndexOf(".");
		if (pos<0)
		{
			winName=winUrl;
		}
		else
		{
			winName=winUrl.substring(0,pos);
		}
	}	
	if (winUrl.indexOf("<html>")<0)
	{
		winDoc="";
	}
	else
	{
		winDoc=winUrl;
		winUrl="about:blank";
		winName="Error";
	}
	objOpenWin=window.open(winUrl,winName,"scrollbars=yes,resizable=yes,width="+winWidth+"px,height="+winHeight+"px,left="+aryPos[0]+"px,top="+aryPos[1]+"px");
	if (winDoc!="")
	{
		objOpenWin.document.open();
		objOpenWin.document.write(winDoc);
		objOpenWin.document.close();
	}
	if (objAgm.length!=4)	
	{
		try
		{
			objOpenWin.focus();
			window.onfocus=openWinBlur;
		}
		catch(e){}
	}
}
function openHelpDoc(pgm)
{
	url = "CMHelp.aspx";
	if (pgm != "")
	{
		url += "?pgm=" + pgm;
	}
	aryPos=getWinPos(780,560);
	objHelpDoc=window.open(url,"HelpDoc","scrollbars=yes,resizable=yes,toolbar=yes,width=780px,height=560px,left="+aryPos[0]+"px,top="+aryPos[1]+"px");
	objHelpDoc.focus();
}


var temdocument ;
//Android补丁覆盖当前操作画面
function setAllIframeDiv()
{
     var _objQueryWinC ;

    _objQueryWinC=document.createElement("div");
    _objQueryWinC.id="divQueryWinC1";
    _objQueryWinC.style.position="absolute";
    _objQueryWinC.style.width="100%";
    _objQueryWinC.style.height="100%";
    _objQueryWinC.style.left=0;
    _objQueryWinC.style.top=0;
    _objQueryWinC.style.backgroundColor="#EFEFEF";
    _objQueryWinC.style.opacity ="0.5";
    _objQueryWinC.style.display="";
    document.body.appendChild(_objQueryWinC);
    
    temdocument = event.srcElement.ownerDocument;
 
    _curFrame = top.frames[top.document.all("lstMenuList").value];
    _objQueryWinC=_curFrame.document.createElement("div");
    _objQueryWinC.id="divQueryWinC";
    _objQueryWinC.style.position="absolute";
    _objQueryWinC.style.width="100%";
    _objQueryWinC.style.height="100%";
    _objQueryWinC.style.left=0;
    _objQueryWinC.style.top=0;
    _objQueryWinC.style.backgroundColor="#EFEFEF";
    _objQueryWinC.style.opacity ="0.5";
    _objQueryWinC.style.display="";
   _curFrame.document.body.appendChild(_objQueryWinC);
        
   
}
function hideAllFrameDiv()
{
    var _objQueryWinC ;
    var  _curFrame = top.frames[top.document.all("lstMenuList").value];
    _objQueryWinC =  _curFrame.document.all("divQueryWinC");
    if(_objQueryWinC)
    {
         _objQueryWinC.style.display = "none";
    }
    

    var frmList = _curFrame.document.getElementsByTagName("IFRAME");
    for(i =0 ;i<frmList.length;i++)
    {
        var obj = frmList[i];
        _objQueryWinC=obj.contentDocument.getElementById("divQueryWinC1");
        if(_objQueryWinC)
        {
            _objQueryWinC.style.display = "none";
        }
    }

  
   
       
}
function openFrame(Url,FrameWidth,FrameHeight)
{
    if($.isAndroid) //补丁Android
    {
        openWin(Url,'70%','70%'); 
        return false;
    }

    _currentWinFrameName = document.parentWindow?document.parentWindow.name :document.defaultView.name;
	var _closeStyle="";
	if (openFrame.arguments.length>3)
	{
		if (openFrame.arguments[3])
		{
			_closeStyle=";display:none";
		}
	}
    top._srcQueryWinFrame=window;
    if (isNaN(FrameWidth))
    {
        FrameWidth=top.document.body.clientWidth*parseInt(FrameWidth.replace("%",""))/100;
    }
    else
    {
        FrameWidth=parseInt(FrameWidth);
    }
    if (isNaN(FrameHeight))
    {
        FrameHeight=top.document.body.clientHeight*parseInt(FrameHeight.replace("%",""))/100;
    }
    else
    {
        FrameHeight=parseInt(FrameHeight);
    }
	_pos=Url.indexOf(".");
	if (_pos<0)
	{
		_winName=Url;
	}
	else
	{
		_winName=Url.substring(0,_pos);
	}
    _pos=_winName.indexOf("/");
    if (_pos>=0)
    {
        _winName=_winName.substring(_pos+1,_winName.length);
    }
    _winName=_winName.toUpperCase();
    if (top._aryQueryWin1==undefined)
    {
        top._aryQueryWin1=new Array(100);
        top._aryQueryWin2=new Array(100);
    
    }
    

    _objQueryWin0=top.document.all("divQueryWin0_"+_winName);
    _objQueryWin1=top.document.all("frmQueryWin1_"+_winName);
    _objQueryWin2=top.document.all("frmQueryWin2_"+_winName);
    _objQueryWin3=top.document.all("divQueryWin3_"+_winName);
    _objQueryWin4=top.document.all("divQueryWin4_"+_winName);
    _objQueryWin5=top.document.all("divQueryWin5_"+_winName);
    //cw 2011-02-25 bug#107622 _objQueryWin2在已存在的情况下是[object HTMLFrameElement]与[object]并不相等，//导致对象创建了多次.
    
    if (_objQueryWin2==undefined)
    {
        var parentDocument = top.document.getElementById("divIframe")||top.document.body;
        
	    _objQueryWin0=top.document.createElement("div");
	    _objQueryWin0.id="divQueryWin0_"+_winName;
	    _objQueryWin0.style.position="absolute";
	    _objQueryWin0.style.width="100%";
	    _objQueryWin0.style.height="100%";
	    _objQueryWin0.style.left=0;
	    _objQueryWin0.style.top=0;
	    _objQueryWin0.style.backgroundColor="#EFEFEF";
	     if($.browser.msie){ _objQueryWin0.style.filter="Alpha(Opacity=50)";}
	    else{_objQueryWin0.style.opacity ="0.5";}
	    _objQueryWin0.style.display="";
	    _objQueryWin0.frameBorder="0";

        parentDocument.appendChild(_objQueryWin0);
	    
	    _objQueryWin1=top.document.createElement("iframe");
	    _objQueryWin1.id="frmQueryWin1_"+_winName;
	    _objQueryWin1.style.position="absolute";
	    _objQueryWin1.style.display="";
	    _objQueryWin1.frameBorder="0";
	    parentDocument.appendChild(_objQueryWin1);
	    
	    _objQueryWin2=top.document.createElement("iframe");
	    _objQueryWin2.id="frmQueryWin2_"+_winName;
	    _objQueryWin2.name="frmQueryWin2_"+_winName;
	    _objQueryWin2.style.position="absolute";
	    _objQueryWin2.style.display="";
	    _objQueryWin2.frameBorder="0";
	    _objQueryWin2.style.border="solid 1px #6D6D6D";
	    _objQueryWin2.scrolling="yes";
	    parentDocument.appendChild(_objQueryWin2);
	    
	    _objQueryWin3=top.document.createElement("div");
	    _objQueryWin3.id="divQueryWin3_"+_winName;
	    _objQueryWin3.style.position="absolute";
	    _objQueryWin3.style.display="";
	    _objQueryWin3.style.backgroundImage="url(/sunlike_client/images/1_0/QueryFrame_01.jpg)";
	    _objQueryWin3.style.cursor="move";
	    _objQueryWin3.align="right";
	    _objQueryWin3.style.borderLeft="solid 1px #6D6D6D";
	    _objQueryWin3.style.borderTop="solid 1px #6D6D6D";
	    _objQueryWin3.style.borderRight="solid 1px #6D6D6D";
	    _objQueryWin3.innerHTML='<div id="divQueryWinTitle_'+_winName+'" style="float:left;padding:5px;font-weight:bold"></div><img src="/sunlike_client/images/1_0/QueryFrame_02.gif" style="cursor:hand'+_closeStyle+'" onclick="jscript:hideQueryWin(\''+_winName+'\')">';
	    parentDocument.appendChild(_objQueryWin3);
	    
	    _objQueryWin4=top.document.createElement("div");
	    _objQueryWin4.id="divQueryWin4_"+_winName;
	    _objQueryWin4.style.position="absolute";
	    _objQueryWin4.style.width="100%";
	    _objQueryWin4.style.height="100%";
	    _objQueryWin4.style.left=0;
	    _objQueryWin4.style.top=0;
	    _objQueryWin4.style.backgroundColor="#FEFEFE";
	    if($.browser.msie){ _objQueryWin4.style.filter="Alpha(Opacity=50)";}
	    else{_objQueryWin4.style.opacity ="0.5";}
	    _objQueryWin4.style.display="";
	    parentDocument.appendChild(_objQueryWin4);
	    
	    _objQueryWin5=top.document.createElement("div");
	    _objQueryWin5.id="divQueryWin5_"+_winName;
	    _objQueryWin5.style.position="absolute";
	    _objQueryWin5.style.border="solid 1px blue";
	    _objQueryWin5.style.display="";
	    parentDocument.appendChild(_objQueryWin5);
	    
        _isDragQueryWin=false;
	    _objQueryWin3.onmousedown=function()
	    {
	        if (typeof(top) != 'undefined' && top.event  && top.event.srcElement.tagName!="IMG")
	        {
                top._srcMoveWinName=this.id.replace("divQueryWin3_","");
                _objQueryWin4=top.document.all("divQueryWin4_"+top._srcMoveWinName);
                _objQueryWin5=top.document.all("divQueryWin5_"+top._srcMoveWinName);
	            _objQueryWin4.style.display="";
	            _objQueryWin4.style.zIndex=top._divZIndex;
	            top._divZIndex++;
	            _objQueryWin5.style.display="";
	            _objQueryWin5.style.zIndex=top._divZIndex;
	            top._divZIndex++;
	            _xClient=top.event.clientX;
	            _yClient=top.event.clientY;
	            _xQueryWin=_objQueryWin5.offsetLeft;
	            _yQueryWin=_objQueryWin5.offsetTop;
	            top.document.onmousemove=function()
	            {
                    _objQueryWin5=top.document.all("divQueryWin5_"+top._srcMoveWinName);
                    _objQueryWin5.style.left=_xQueryWin+top.event.clientX-_xClient;
                    _objQueryWin5.style.top=_yQueryWin+top.event.clientY-_yClient;
	            }
	            top.document.onmouseup=function()
	            {
                    top.document.onmousemove="";
                    top.document.onmouseup="";
                    _objQueryWin1=top.document.all("frmQueryWin1_"+top._srcMoveWinName);
                    _objQueryWin2=top.document.all("frmQueryWin2_"+top._srcMoveWinName);
                    _objQueryWin3=top.document.all("divQueryWin3_"+top._srcMoveWinName);
                    _objQueryWin4=top.document.all("divQueryWin4_"+top._srcMoveWinName);
                    _objQueryWin5=top.document.all("divQueryWin5_"+top._srcMoveWinName);
                    if (_objQueryWin5.offsetLeft+_objQueryWin5.offsetWidth<20)
                    {
                        _objQueryWin5.style.left=_objQueryWin5.offsetLeft+20;
                    }
                    else if (_objQueryWin5.offsetLeft-top.document.body.clientWidth<20)
                    {
                        _objQueryWin5.style.left=_objQueryWin5.offsetLeft-20;
                    }
                    if (_objQueryWin5.offsetTop<20)
                    {
                        _objQueryWin5.style.top=0;
                    }
                    else if (_objQueryWin5.offsetTop-top.document.body.clientWidth<20)
                    {
                        _objQueryWin5.style.top=_objQueryWin5.offsetTop-20;
                    }
                    _objQueryWin1.style.left=_objQueryWin5.style.left;
                    _objQueryWin1.style.top=_objQueryWin5.style.top;
                    _objQueryWin2.style.left=_objQueryWin5.style.left;
                    _objQueryWin2.style.top=_objQueryWin5.offsetTop+25;
                    _objQueryWin3.style.left=_objQueryWin5.style.left;
                    _objQueryWin3.style.top=_objQueryWin5.style.top;
                    _objQueryWin4.style.display="none";
                    _objQueryWin5.style.display="none";
	            }
	        }
	    }
    }
    if (top._divZIndex==undefined)
    {
        top._divZIndex=1;
    }
	//_obj=event.srcElement; lzj1119
	setQueryWinArray(_winName,window);
	_left=parseInt((top.document.body.clientWidth-FrameWidth)/2);
	_top=parseInt((top.document.body.clientHeight-FrameHeight)/2)-10;
	_objQueryWin0.style.display="";
	_objQueryWin0.style.zIndex=top._divZIndex;
	top._divZIndex++;
	_objQueryWin1.style.width=FrameWidth+2;
	_objQueryWin1.style.height=FrameHeight+27;
	_objQueryWin1.style.left=_left;
	_objQueryWin1.style.top=_top;
	_objQueryWin1.style.display="";
	_objQueryWin1.style.zIndex=top._divZIndex;
	top._divZIndex++;
	top.document.all("divQueryWinTitle_"+_winName).innerText="";
	try
	{
		top.frames(_objQueryWin2.id).location.href=Url;
	}
	catch(e)
	{
		for (var i=0;i<top.frames.length;i++)
		{
			if (top.frames[i].name==_objQueryWin2.id)
			{
				top.frames[i].location.href=Url;
				break;
			}
		}
	}
	_objQueryWin2.style.width=FrameWidth;
	_objQueryWin2.style.height=FrameHeight;
	_objQueryWin2.style.left=_left;
	_objQueryWin2.style.top=_top+25;
	_objQueryWin2.style.display="";
	_objQueryWin2.style.zIndex=top._divZIndex;
	top._divZIndex++;
	_objQueryWin3.style.width=FrameWidth+2;
	_objQueryWin3.style.height=25;
	_objQueryWin3.style.left=_left;
	_objQueryWin3.style.top=_top;
	_objQueryWin3.style.display="";
	_objQueryWin3.style.zIndex=top._divZIndex;
	top._divZIndex++;
	_objQueryWin4.style.display="none";
	_objQueryWin5.style.width=FrameWidth+2;
	_objQueryWin5.style.height=FrameHeight+27;
	_objQueryWin5.style.left=_left;
	_objQueryWin5.style.top=_top;
	_objQueryWin5.style.display="none";
}
function hideQueryWin(WinName)
{
    WinName=WinName.toUpperCase();
  
     
    top.document.all("divQueryWin0_"+WinName).style.display="none";
    top.document.all("frmQueryWin1_"+WinName).style.display="none";
    top.document.all("frmQueryWin2_"+WinName).style.display="none";
    top.document.all("divQueryWin3_"+WinName).style.display="none";
    top.document.all("divQueryWin4_"+WinName).style.display="none";
    top.document.all("divQueryWin5_"+WinName).style.display="none";
    if($.isAndroid)
     {
        hideAllFrameDiv();
     }
     
    try{hideDateAll();}catch(e){}
}
function setQueryWinTitle(WinName,WinTitle)
{
    WinName=WinName.toUpperCase();
	try
	{
		top.document.all("divQueryWinTitle_"+WinName).innerText=WinTitle;
	}
	catch(e){}
}
function setQueryWinArray(winName,srcWin)
{
    _itm=0;
    for (i=0;i<top._aryQueryWin1.length;i++)
    {
        if (top._aryQueryWin1[i]==undefined || top._aryQueryWin1[i]==winName.toUpperCase())
        {
            _itm=i;
            break;
        }
    }
    top._aryQueryWin1[_itm]=winName.toUpperCase();
    top._aryQueryWin2[_itm]=srcWin;
}
function getQueryWinSrcWindow(winName)
{
    _itm=0;
    for (i=0;i<top._aryQueryWin1.length;i++)
    {
        if (top._aryQueryWin1[i]==winName.toUpperCase())
        {
            _itm=i;
            break;
        }
    }
    return top._aryQueryWin2[_itm];
}

/* 以下是把SCRIPTS/OPEN_WIN.JS的方法合并到当前的SUNLIKE_CLIENT/OPEN_WIN.JS*/
function showLoading()
{
	objOpenWin=window.showModelessDialog("loading.htm",window,"dialogWidth:320px;dialogHeight:120px;help:no;status:no");
}
function closeLoading()
{
	try
	{
		objOpenWin.close();
	}
	catch(e){}
}
function openWinNoScroll(winUrl,winWidth,winHeight)
{
	aryPos=getWinPos(winWidth,winHeight);
	objAgm=openWinNoScroll.arguments;
	if (objAgm.length>3)
	{
		winName=objAgm[3];
		if (objAgm.length>4)
		{
			if (objAgm[4])
			{
				aryPos[0]=2000;
				aryPos[1]=2000;
			}
		}
	}
	else
	{
		pos=winUrl.lastIndexOf(".");
		if (pos<0)
		{
			winName=winUrl;
		}
		else
		{
			winName=winUrl.substring(0,pos);
		}
	}
	if (winUrl.indexOf("<html>")<0)
	{
		winDoc="";
	}
	else
	{
		winDoc=winUrl;
		winUrl="about:blank";
		winName="Error";
	}
	objOpenWin=window.open(winUrl,winName,"scrollbars=no,width="+winWidth+"px,height="+winHeight+"px,left="+aryPos[0]+"px,top="+aryPos[1]+"px");
	if (winDoc!="")
	{
		objOpenWin.document.open();
		objOpenWin.document.write(winDoc);
		objOpenWin.document.close();
	}
	if (objAgm.length!=4)	
	{
		try
		{
			objOpenWin.focus();
			window.onfocus=openWinBlur;
		}
		catch(e){}
	}
}
/*
* 调用:Object.Window
* 作用:Window 引用类
* 参数:
* Method 窗口打开方式
* Href 窗口地址
* Name 窗口标签
* ToolBar 显示工具条 yes/no
* MenuBar 显示菜单栏 yes/no
* ScrollBar 显示滚动条 yes/no
* UrlBar 显示地址栏 yes/no
* Status 显示状态栏 yes/no
* FullScreen 全屏窗口 yes/no
* Resize 重设窗口大小 yes/no
* Width 窗口宽度 yes/no
* Height 窗口高度 yes/no
* Place 窗口位置 center/top/openpop
* ReturnValue 返回值
* TextValue 文本显示
* ConfirmTrue 确认返回
* ConfirmFalse 取消返回
* Params 参数
* 返回:
*/
function Window()
{
	var Method;
	var Params;
	var Splits;
	var Href;
	var Name;
	var ToolBar;
	var MenuBar;
	var ScrollBar;
	var UrlBar;
	var Status;
	var FullScreen;
	var Resize;
	var Width;
	var Height;
	var Place;
	var Top;
	var Left;
	var ReturnValue;
	var TextValue;
	var ConfirmTrue;
	var ConfirmFalse;
	
	this.Method = Method;
	this.Params = Params;
	this.Splits = Splits;
	this.Href = Href;
	this.Name = Name;
	this.ToolBar = ToolBar;
	this.MenuBar = MenuBar;
	this.ScrollBar = ScrollBar;
	this.UrlBar = UrlBar;
	this.Status = Status;
	this.FullScreen = FullScreen;
	this.Resize = Resize;
	this.Width = Width;
	this.Height = Height;
	this.Place = Place;
	this.Top = Top;
	this.left = Left;
	this.ReturnValue = ReturnValue;
	this.TextValue = TextValue;
	this.ConfirmTrue = ConfirmTrue;
	this.ConfirmFalse = ConfirmFalse;
}

Window.prototype.Init = function()
{
	this.Method = this.Method?this.Method:"open";
	this.Params = this.Params?this.Params:"";
	this.Splits = this.Splits?this.Splits:"|";
	this.Href = this.Href?this.Href:"about:blank";
	this.Name = this.Name?this.Name:Math.round(Math.random() * 100000);
	this.ToolBar = this.ToolBar?this.ToolBar:"no";
	this.MenuBar = this.MenuBar?this.MenuBar:"no";
	this.ScrollBar = this.ScrollBar?this.ScrollBar:"no";
	this.UrlBar = this.UrlBar?this.UrlBar:"no";
	this.Status = this.Status?this.Status:"no";
	this.FullScreen = this.FullScreen?this.FullScreen:"no";
	this.Resize = this.Resize?this.Resize:"no";
	this.Width = this.Width?this.Width:parseInt(screen.width/2);
	this.Height = this.Height?this.Height:parseInt(screen.height/2);
	this.Place = this.Place?this.Place:"center";
	this.Top = this.Top?this.Top:"30";
	this.Left = this.Left?this.Left:"30";
	this.ReturnValue = this.ReturnValue?this.ReturnValue:"";
	this.TextValue = this.TextValue?this.TextValue:"";
	this.ConfirmTrue = this.ConfirmTrue?this.ConfirmTrue:true;
	this.ConfirmFalse = this.ConfirmFalse?this.ConfirmFalse:false;
}

Window.prototype.Open = function()
{
	// .toLowerCase()
	switch (this.Method)
	{
		/*
		* 类别:Open
		* 功能:Window.Open 弹出窗口 中所有功能;
		*/
		case "open":
		if (this.Place == "center")
		{
			OpenWinTopXY = "top="+((screen.availHeight-this.Height)/2)+",left="+((screen.availWidth-this.Width)/2);
		}else if (this.Place == "top"){
			OpenWinTopXY = "top=0,left=0";
		}else{
			OpenWinTopXY = "top="+this.Top+",left="+this.Left+"";
		}
		window.open (this.Href,""+this.Name+"","location=no;toolbar="+this.ToolBar+",menubar="+this.MenuBar+",scrollbars="+this.ScrollBar+",resizable="+this.Resize+",directories="+this.UrlBar+",fullscreen="+this.FullScreen+",status="+this.Status+",titlebar=no,width="+this.Width+",height="+this.Height+","+OpenWinTopXY+"");
		break;
		/*
	* 类别:showModlDialog
	* 功能:对话窗口
	*/
	case "showModalDialog":
		var DialogObj;
		DialogObj = window.showModalDialog (this.Href,"","dialogWidth:'"+this.Width+"';dialogHeight:'"+this.Height+"';status:'"+this.Status+"';scroll='"+this.ScrollBar+"';help:no");
		return (""+DialogObj+"");
		break;
	/*
	* 类别:showHelp
	* 功能:HELP帮助
	*/
	case "showHelp":
		window.showHelp(this.Href);
		break;
	/*
	* 类别:Confirm
	* 功能:确认对话框
	*/
	case "confirm":
		var msgbox = window.confirm(this.TextValue);
		if (msgbox)
		{
			eval(this.ConfirmTrue);
		}else{
			eval(this.ConfirmFalse);
		}
		break;
	case "popup":
		if (this.ie)
		{
			this.PopTop=50;
			this.oPopup = window.createPopup();
			var html=this.TextValue;
			this.oPopup.document.body.innerHTML = html;
			popshow();
		}
		break;
	/*
	* 类别:缺省状态
	* 功能:当前页面转发
	*/
	default:
		top.location=this.Href;
		break;
	}
}
var Window = new Window;
function openPopWin(winUrl,winWidth,winHeight)
{		
	Window.Method="open";
	Window.Href=winUrl;
	Window.Width=winWidth;
	Window.Height=winHeight; 
	Window.Init();
	Window.Open();
}
