﻿function fnGetWindowWidth()
{
	var width=0;
	if(typeof window.innerWidth=='number')width=window.innerWidth;
	else
	{
		if(document.documentElement&&document.documentElement.clientWidth)width=document.documentElement.clientWidth;
		else
		{
			if(document.body&&document.body.clientWidth)width=document.body.clientWidth;
		}
	}
	if(!width||width<100)width=100;
	return width;
}
function fnGetWindowHeight()
{
	var height=0;
	if(typeof window.innerHeight=='number')height=window.innerHeight;
	else
	{
		if(document.documentElement&&document.documentElement.clientHeight)height=document.documentElement.clientHeight;
		else
		{
			if(document.body&&document.body.clientHeight)height=document.body.clientHeight;
		}
	}
	if(!height||height<100)height=100;
	return height;
}
var Aladdincn;
if (!Aladdincn)
Aladdincn = {};
if (!Aladdincn.Web)
Aladdincn.Web = {};
Aladdincn.Web.Animation = 
{
    "AccelerationFunction": function(cr)
    {
        var self = this;
        var m_nTotal =  - 1;
        var m_nSteps =  - 1;
        var m_pFn = cr;
        this.setSteps = function(er)
        {
            m_nSteps = er;
            hr();
        };
        this.getValue = function(gr)
        {
            return m_pFn(gr) / m_nTotal;
        };
        function hr()
        {
            m_nTotal = 0;
            for (var i = 0; i < m_nSteps; i++)
            {
                m_nTotal += m_pFn(i / m_nSteps);
            }
        }
    }
    , "Movie": function(jr, kr)
    {
        var self = this;
        this.Repeat = true;
        this.AppendContent = true;
        var m_frames = new Array();
        var m_counter =  - 1;
        var m_intervalId = null;
        this.addFrame = function(lr, mr)
        {
            if (mr == null)
                mr = true;
            var f = 
            {
                "data": lr, "append": mr
            };
            m_frames.push(f);
        };
        this.start = function()
        {
            self.stop();
            self.show();
            self.clear();
            m_counter =  - 1;
            m_intervalId = setInterval(nr, kr);
        };
        this.stop = function()
        {
            if (m_intervalId)
                clearInterval(m_intervalId);
        };
        this.show = function()
        {
            jr.style.visibility = "visible";
        };
        this.hide = function()
        {
            jr.style.visibility = "hidden";
        };
        this.clear = function()
        {
            jr.innerHTML = "";
        };
        function nr()
        {
            m_counter++;
            if (m_counter > m_frames.length - 1)
            {
                m_counter = 0;
                if (!self.Repeat)
                {
                    clearInterval(m_intervalId);
                    return ;
                }
                else
                    self.clear();
            }
            var f = m_frames[m_counter];
            if (f.append)
                jr.innerHTML += f.data;
            else
                jr.innerHTML = f.data;
        }
    }
    , "RollDirection": 
    {
        "TopDown": 0, "RightLeft": 1, "BottomUp": 2, "LeftRight": 3, "Count": 4
    }
    , "RollStyle": 
    {
        "In": 0, "Out": 1
    }
    , "Roller": function(or, pr)
    {
        var self = this;
        var css = Aladdincn.Web.Css;
        var ani = Aladdincn.Web.Animation;
        var m_elem = or;
        var m_pals = null;
        var m_isExpanded = true;
        this.LeaveAmount = typeof pr == "number" ? pr : 10;
        this.AccFunction = null;
        this.Factor = null;
        this.onbeforerollin = null;
        this.onafterrollin = null;
        this.onbeforerollout = null;
        this.onafterrollout = null;
        this.isExpanded = function()
        {
            return m_isExpanded;
        };
        this.associate = function(qr)
        {
            m_pals = qr;
        };
        this.rollIn = function(rr)
        {
            Br(m_elem);
            tr(ani.RollStyle.In, rr);
            m_isExpanded = false;
        };
        this.rollOut = function(sr)
        {
            Fr(m_elem);
            tr(ani.RollStyle.Out, sr);
            m_isExpanded = true;
        };
        function tr(ur, vr)
        {
            if (!self.AccFunction)
                self.AccFunction = AccelerationFunctions.ExponentialAcc;
            if (!self.Factor)
                self.Factor = 15;
            var size;
            if (vr == ani.RollDirection.TopDown || vr ==
                ani.RollDirection.BottomUp)
                size = m_elem.offsetHeight;
            else
                size = m_elem.offsetWidth;
            var rollDistance = size - self.LeaveAmount;
            if (vr == ani.RollDirection.TopDown || vr ==
                ani.RollDirection.LeftRight)
            {
                size = 0;
                if (ur == ani.RollStyle.Out)
                    size = self.LeaveAmount;
            }
            else
            {
                if (ur == ani.RollStyle.Out)
                    size -= self.LeaveAmount;
            }
            var steps = Math.ceil(rollDistance / 10);
            if (steps < 50)
                steps = 50;
            self.AccFunction.setSteps(steps);
            for (var i = 1; i <= steps; i++)
            {
                var percentComplete = i / steps;
                setTimeout(wr(percentComplete), i * self.Factor);
            }
            function wr(xr)
            {
                return function()
                {
                    var fnX = self.AccFunction.getValue(xr) * rollDistance;
                    if (vr == ani.RollDirection.TopDown || vr ==
                        ani.RollDirection.LeftRight)
                        size += fnX;
                    else
                        size -= fnX;
                    var dir = vr;
                    if (ur == ani.RollStyle.Out)
                        dir = (vr + ani.RollDirection.Count / 2) %
                            ani.RollDirection.Count;
                    var clip = yr(dir, size);
                    m_elem.style.clip = clip;
                    if (m_pals)
                    for (var i = 0; i < m_pals.length; i++)
                    {
                        m_pals[i].style.left = size + "px";
                    }
                    if (xr == 1)
                    {
                        if (ur == ani.RollStyle.In)
                            Dr(m_elem);
                        else
                        {

                            m_elem.style.clip = "rect(auto auto auto auto)";
                            Hr(m_elem);
                        }
                    }
                };
            }
        }
        function yr(zr, Ar)
        {
            var topClip;
            var rightClip;
            var bottomClip;
            var leftClip;
            topClip = rightClip = bottomClip = leftClip = css.Units.Auto;
            var sizeClip = parseInt(Math.round(Ar)) + css.Units.Pixels;
            switch (zr)
            {
                case ani.RollDirection.TopDown:
                    topClip = sizeClip;
                    break;
                case ani.RollDirection.RightLeft:
                    rightClip = sizeClip;
                    break;
                case ani.RollDirection.BottomUp:
                    bottomClip = sizeClip;
                    break;
                case ani.RollDirection.LeftRight:
                    leftClip = sizeClip;
                    break;
            }
            var clip = "rect(" + topClip + " " + rightClip + " " + bottomClip +
                " " + leftClip + ")";
            return clip;
        }
        function Br(Cr)
        {
            if (self.onbeforerollin)
                self.onbeforerollin(Cr);
        }
        function Dr(Er)
        {
            if (self.onafterrollin)
                self.onafterrollin(Er);
        }
        function Fr(Gr)
        {
            if (self.onbeforerollout)
                self.onbeforerollout(Gr);
        }
        function Hr(Ir)
        {
            if (self.onafterrollout)
                self.onafterrollout(Ir);
        }
    }
    , "Slider": function(Jr)
    {
        var self = this;
        //var geo = Microsoft.Web.Geometry;
        var m_elem = Jr;
        var m_displacement = 0;
        var m_currentX;
        this.EasingFunction = null;
        this.Factor = null;
        this.slideToPoint = function(Kr)
        {
            if (!self.AccFunction)
                self.AccFunction = AccelerationFunctions.Linear;
            if (!self.Factor)
                self.Factor = 10;
            var startPoint = geo.Functions.getElementPosition(m_elem);
            var currentX = startPoint.x;
            var currentY = startPoint.y;
            var m = geo.Functions.getSlope(startPoint, Kr);
            var b = geo.Functions.getYIntercept(m, Kr);
            var distance = Math.abs(startPoint.x - Kr.x);
            var steps = Math.ceil(distance / 10);
            if (steps < 50)
                steps = 50;
            self.AccFunction.setSteps(steps);
            for (var i = 0; i < steps; i++)
            {
                var percentComplete = i / steps;
                setTimeout(Lr(percentComplete), i * self.Factor);
            }
            function Lr(Mr)
            {
                return function()
                {
                    if (Kr.x > startPoint.x)
                        currentX += self.AccFunction.getValue(Mr) * distance;
                    else
                        currentX -= self.AccFunction.getValue(Mr) * distance;
                    var currentY = m * currentX + b;
                    m_elem.style.left = parseFloat(Math.round(currentX)) + "px";
                    m_elem.style.top = parseFloat(Math.round(currentY)) + "px";
                };
            }
        };
    }
};
//------------------------------------------------------------------------------------------------------------------------------------------------------

//------------------------------------------------------------加速度函数--------------------------------------------------------------------------------
var AccelerationFunctions = 
{
    "Linear": new Aladdincn.Web.Animation.AccelerationFunction(function(Nr)
    {
        return 1; 
    }
    ), "ExponentialAcc": new Aladdincn.Web.Animation.AccelerationFunction
        (function(Or)
    {
        var lower = 0; var upper = 1; var range = upper - lower; var x = lower 
            + Or * range; var fnX = Math.pow(x, 2); return fnX; 
    }
    ), "ExponentialDec": new Aladdincn.Web.Animation.AccelerationFunction
        (function(Pr)
    {
        var lower =  - 1; var upper = 0; var range = upper - lower; var x =
            lower + Pr * range; var fnX = Math.pow(x, 2); return fnX; 
    }
    ), "CosineWave": new Aladdincn.Web.Animation.AccelerationFunction(function
        (Qr)
    {
        var lower =  - Math.PI; var upper = Math.PI; var range = upper - lower;
            var x = lower + Qr * range; var fnX = Math.cos(x) + 1; return fnX; 
    }
    ), "CrazyElevator": new Aladdincn.Web.Animation.AccelerationFunction
        (function(Rr)
    {
        var lower =  - 5; var upper = 5; var range = upper - lower; var x =
            lower + Rr * range; var fnX = 2 / (Math.pow(Math.abs(x), 3) + 1);
            return fnX; 
    }
    )
};
//------------------------------------------------------------------------------------------------------------------------------------------------------

//----------------------------------------------------------------Aladdincn.Web.Css----------------------------------------------------------------------
var Aladdincn;
if (!Aladdincn)
Aladdincn = {}
    ;
if (!Aladdincn.Web)
Aladdincn.Web = {}
    ;
Aladdincn.Web.Css = 
{
    "Style": 
    {
        "Height": 0, "Width": 1, "Top": 2, "Left": 3, "Bottom": 4, "Right": 5, 
            "Position": 6, "Margin": 7, "Padding": 8, "Display": 9, 
            "Visibility": 10
    }
    , "Units": 
    {
        "Auto": "auto", "Pixels": "px", "Points": "pt", "Ems": "em", 
            "Percentage": "%"
    }
    , "Position": 
    {
        "Static": "static", "Relative": "relative", "Absolute": "absolute"
    }
    , "Display": 
    {
        "None": "none", "Block": "block", "Table": "table", "Inline": "inline"
    }
    , "Visibility": 
    {
        "Visible": "visible", "Hidden": "hidden"
    }
    , "Cursors": 
    {
        "Auto": "auto", "Default": "default", "Crosshair": "crosshair", 
            "Pointer": "pointer", "Move": "move", "Wait": "wait", "Text": 
            "text", "Help": "help", "NResize": "n-resize", "NEResize": 
            "ne-resize", "NWResize": "nw-resize", "SResize": "s-resize", 
            "SEResize": "se-resize", "SWResize": "sw-resize", "EResize": 
            "e-resize", "WResize": "w-resize"
    }
};
//------------------------------------------------------------------------------------------------------------------------------------------------------------

//-----------------------------------------------------------TaskAreaManager----------------------------------------------------------------------------------
var eds_TaskAreaManager = function()
{
    var self = this;
    var m_items = new Array();
    var m_currentItem = null;
    this.onremoveitem = null;
    this.destroy = function()
    {
        self = null;
        m_items = null;
        m_currentItem = null;
    };
    this.addItem = function(vo)
    {
        m_items.push(vo);
        self.setCurrent(vo);
        if (!taskArea_data.childNodes[0])
            taskArea_data.appendChild(vo.el);
        else
            taskArea_data.insertBefore(vo.el, taskArea_data.childNodes[0]);
    };
    this.removeItem = function(wo, xo)
    {
        var redraw = xo == true ? false : true;
        var removeIndex =  - 1;
        for (var i = 0; i < m_items.length; i++)
        {
            if (m_items[i] == wo)
                removeIndex = i;
        }
        if (removeIndex ==  - 1)
            return ;
        m_items.splice(removeIndex, 1);
        var newIndex = removeIndex - 1;
        if (newIndex < 0)
            newIndex = 0;
        if (m_currentItem == wo)
            m_currentItem = m_items[newIndex];
        if (redraw)
            self.redraw();
        if (self.onremoveitem)
            self.onremoveitem();
    };
    this.getCurrent = function()
    {
        return m_currentItem;
    };
    this.setCurrent = function(yo)
    {
        m_currentItem = yo;
        for (var i = 0; i < m_items.length; i++)
        {
            var panel = m_items[i];
            if (panel != m_currentItem)
                panel.Minimize();
            else
                panel.Maximize();
        }
        if (document.all)
            taskArea_data.className = taskArea_data.className;
    };
    this.redraw = function()
    {
        self.setCurrent(m_currentItem);
    };
    this.getCount = function()
    {
        var count = 0;
        for (var i = 0; i < m_items.length; i++)
        {
            if (m_items[i].el.style.display != 'none')
                count++;
        }
        return count;
    };
    this.isEmpty = function()
    {
        return m_items.length == 0;
    };
};
function VENetwork(){}
VENetwork.GetExecutionID = function()
{
    var a = new Date, b = Date.UTC(a.getFullYear(), a.getMonth(), a.getDate(),
        a.getHours(), a.getMinutes(), a.getSeconds(), a.getMilliseconds());
    b += Math.round(Math.random() * 1000000);
    return b
};
VENetwork.DownloadScriptCallback = function(a)
{
    if (a)
    a()
};
VENetwork.DownloadScript = function(a, b, c)
{
    try
    {
        if (a == null || a == "undefined" || a.length == 0)
            throw new VEException("VENetwork:DownloadScript", "err_noscripturl",
                l24ht);
        var elScript = document.createElement("script");
        elScript.type = "text/javascript";
        elScript.language = "javascript";
        elScript.id = typeof(c) == "undefined" ? VENetwork.GetExecutionID() : c;
        elScript.src = a;
        if (navigator.userAgent.indexOf("IE") >= 0)
        elScript.onreadystatechange = function()
        {
            if (elScript && ("loaded" == elScript.readyState || "complete" ==
                elScript.readyState))
            {
                elScript.onreadystatechange = null;
                VENetwork.DownloadScriptCallback(b)
            }
        };
        else
        elScript.onload = function()
        {
            elScript.onload = null;
            VENetwork.DownloadScriptCallback(b)
        };
        if(document.getElementById(c))
            VENetwork.GetAttachTarget().removeChild(document.getElementById(c));
            
        VENetwork.GetAttachTarget().appendChild(elScript);
        return elScript.id
    }
    catch (e)
    {
        alert('加载失败！');
    }
};
VENetwork.AttachStyleSheetCallback = function(a)
{
    if (a)
    a()
};
VENetwork.AttachStyleSheet = function(a, b, d, c)
{
    if (a == null || a == "undefined" || a.length == 0)
        throw new VEException("VENetwork:AttachStylesheet", "err_nostylesurl", 
            "");
    var elStyle = document.createElement("link");
    if (d == true)
        elStyle.rel = "alternate stylesheet";
    else
        elStyle.rel = "stylesheet";
    if (c)
        elStyle.media = c;
    elStyle.type = "text/css";
    elStyle.rev = "stylesheet";
    elStyle.id = VENetwork.GetExecutionID();
    elStyle.href = a;
    VENetwork.GetAttachTarget().appendChild(elStyle);
    if (navigator.userAgent.indexOf("IE") >= 0)
    elStyle.onreadystatechange = function()
    {
        if (elStyle && ("loaded" == elStyle.readyState || "complete" ==
            elStyle.readyState))
        {
            elStyle.onreadystatechange = null;
            VENetwork.AttachStyleSheetCallback(b)
        }
    };
    else
        VENetwork.AttachStyleSheetCallback(b);
    return 
};
VENetwork.GetAttachTarget = function()
{
    if (document.getElementsByTagName("head")[0] != null)
        return document.getElementsByTagName("head")[0];
    else
    throw new VEException("VENetwork:cstr", "err_noheadelement", l611ft)
};

function VEException(b, c, a)
{
    this.source = b;
    this.name = c;
    this.message = a
}

VEException.prototype.Name = this.name;
VEException.prototype.Source = this.source;
VEException.prototype.Message = this.message;

var _aJsList=["01.Tools.js","02.Init.js","03.Marker.js"];
var _aCssList=[""];

function CFileLoad(u,l){
   this.vfunction="";
   this.back="";
   this.index=0;
}
//加载JS，CSS
function fnLoadJs(i,f,b,e){//i索引值；f函数；b回调函数；e函数已存在时是否调用回调函数,true不调用,false调用
   var oFLoad=new CFileLoad();
   oFLoad.vfunction=f;
   oFLoad.back=b;
   oFLoad.index=i;
   try{
      if(typeof(eval(oFLoad.vfunction))=="function"){
       if(typeof(e)=="boolean" && e==true) return true;
       execFunction(oFLoad);
       return true;
      }
   }catch(e){  
   }
   if(_aJsList.length>oFLoad.index){
       VENetwork.DownloadScript("Js/"+_sEdition+"/"+_aJsList[oFLoad.index],function(){fnLoadCss(oFLoad);});       
   }
   else{
     execFunction(oFLoad);
   }
   return false;
}
function fnLoadCss(oFLoad){
  if(_aCssList.length>oFLoad.index && _aCssList[oFLoad.index]!=""){
     VENetwork.AttachStyleSheet("style.aspx?f="+_aCssList[oFLoad.index]+"&node="+_sNode,function(){execFunction(oFLoad);});
  }
  else{
     execFunction(oFLoad);
  }
}
function execFunction(oFLoad){
    fnExecFunction(oFLoad.back);
    oFLoad=null;
}
function fnExecFunction(f){
    try{
      if(typeof(f)=="function"){f();}     
    }catch(e){
      //alert(e)
    }
}
//加载模板
function fnModelLoad(n,t,f,b){ //n:js中的变量名字；t:模板标识；f:模板文件；b回调函数
  try{
    if(typeof(eval(t))=="string") return true;
  }catch(e){
  }
  if(f=="") f="Model.html";
  VENetwork.DownloadScript("Skins.aspx?v="+n+"&s="+t+"&f="+f+"&node="+_sNode,function(){fnExecFunction(b)});
  return false;
}
//判断是否有非法字符/?^&!#$%*@'
function fnCCstr(str)
{
	var i,j,strTemp,tel;
	strTemp="'/?^&!#$%*@<>";
	for (i=0;i<str.length;i++)
	{
		j=strTemp.indexOf(str.charAt(i)); 
		if (j>=0)
		{
			return false;
		}
	}
	return true;
}
function fnGetRandomNum(minNum, maxNum)
{
    return minNum + Math.round((Math.random()*(maxNum-minNum)));
}

//获取一个随机数生成的序列
function fngetRandomList(count)
{
	var rndStr = '';
	for(var i=0; i<count; i++)
	{
		rndStr += Math.round((Math.random()*10));
	}
	return rndStr;
}
function ReadSign(strSign,strContent)
{
   var r, re;
   re = new RegExp('<!--' + strSign + '-->.*<!--/' + strSign + '-->','i');
   r = strContent.match(re);
   return(r.toString());
}
function int(i,k) 
{ 
    var ff=0; 
    var j; 
    j=Math.round(i/k)-i/k; 
    if (j>=0) 
    ff=Math.round(i/k)-1; 
    if (j<0) 
    ff=Math.round(i/k); 
    return ff; 
}
function pageShow(CurrentPage,pagesize,pagenum,CssStyle,funcName)//当前页,总的页数,每页显示的数,css样式名称
{
    var pagestr='';
    //显示页数
    if(!pagenum)pagenum = 8;
    if(!CurrentPage)CurrentPage=1;
    if(CurrentPage==0)CurrentPage=1;
    if(pagesize)
    {
        var pagecount = 0;//分几页显示
        var endcount = 0;
        pagecount = int(CurrentPage,pagenum);
        if((pagecount+1)*pagenum>pagesize)
        {
            endcount =pagecount*pagenum+pagesize%pagenum;
        }
        else
        {
            endcount = (pagecount+1)*pagenum;
        }
        for(var i=pagecount*pagenum+1;i<=endcount; i++)
        {
            if(i!=CurrentPage)
            pagestr += '<a class="'+CssStyle+'" href="javascript:'+funcName+'('+i+');">['+i+']</a> ';
            else
            pagestr += i+' ';
            
        }
        if(pagecount>=1)
        {
            var pre = pagecount*pagenum;
            pagestr= '<a class="'+CssStyle+'" href="javascript:'+funcName+'('+pre+');"> << </a> '+pagestr;
        }
        if(endcount<pagesize)
        {
            var next = endcount+1; 
            pagestr= pagestr+'<a class="'+CssStyle+'" href="javascript:'+funcName+'('+next +');"> >> </a> ';
        }	 
        pagestr=pagestr+'共 '+pagesize+' 页';
    }
    return pagestr;
}
function Getsubstr(str,len){
    if(strLength(str)<=len)return str;
    var strLen=0;
    var newstr='';
    for(var i=0;i<str.length;i++)
    {
        if(str.charCodeAt(i)>256)
        {
            strLen+=2;
        }
        else
        {
            strLen++;
        }
        newstr=newstr+str.substr(i,1);
        if(strLen==len)return  newstr;
        if(strLen>len)return newstr.substr(0,newstr.length-1);
    }
}
function strLength(astr){
    var strLen=0;
    if(astr){
        for(var k=0;k<astr.length;k++){
            if(astr.charCodeAt(k)>256){
                strLen+=2;
            }else{
                strLen++;
            }
        }
    }
    return strLen;
}
function Request(strName){
	var strHref = window.document.location.href;
	var intPos = strHref.indexOf("?");
	var strRight = strHref.substr(intPos + 1);
	var arrTmp = strRight.split("&");
	for(var i = 0; i < arrTmp.length; i++){
		var arrTemp = arrTmp[i].split("=");
		if(arrTemp[0].toUpperCase() == strName.toUpperCase()) return arrTemp[1];
	}
	return "";
}
function copycode(strUrl, msg){

	if (navigator.appVersion.match(/\bMSIE\b/)){
		Copied = $(strUrl).createTextRange();
	    Copied.execCommand('Copy');
	    alert(msg);
	}else{
		alert('您的浏览器不支持拷贝功能，请用Ctrl+C复制。');
		$(strUrl).style.display="block";
		$(strUrl).select();		
	}
}


String.prototype.replaceAll = stringReplaceAll;  
function stringReplaceAll(AFindText,ARepText){  
 var raRegExp = new RegExp(AFindText.replace(/([\(\)\[\]\{\}\^\$\+\-\*\?\.\"\'\|\/\\])/g,"\\$1"),"ig");  
 return this.replace(raRegExp,ARepText);  
} 
//Cookie
function CookieHelper() {}
CookieHelper.prototype.expires ='';
CookieHelper.prototype.path　　='';
CookieHelper.prototype.domain  ='';
CookieHelper.prototype.secure  ='';
//get Cookie value
CookieHelper.prototype.getCookie = function(sCookieName){
    var sName=sCookieName+"=", ichSt, ichEnd;
    var sCookie=document.cookie;
    if ( sCookie.length && ( -1 != (ichSt = sCookie.indexOf(sName)) ) ){
        if (-1 == ( ichEnd = sCookie.indexOf(";",ichSt+sName.length)))
            ichEnd = sCookie.length;
        return unescape(sCookie.substring(ichSt+sName.length,ichEnd));
    }
    return null;
}
//set Cookie value
CookieHelper.prototype.setCookie = function(sCookieName,sCookieValue,dCookieExpires){
    var argv = this.setCookie.arguments, argc = this.setCookie.arguments.length;
    var sExpDate = (argc > 2) ? "; expires="+argv[2].toGMTString() : "";
    var sPath = (argc > 3) ? "; path="+argv[3] : "";
    var sDomain = (argc > 4) ? "; domain="+argv[4] : "";
    var sSecure = (argc > 5) && argv[5] ? "; secure" : "";
    document.cookie = sCookieName + "=" + escape(sCookieValue,0) + sExpDate + sPath + sDomain + sSecure + ";";
}
function Request(strName){
	var strHref = window.document.location.href;
	var intPos = strHref.indexOf("?");
	var strRight = strHref.substr(intPos + 1);
	var arrTmp = strRight.split("&");
	for(var i = 0; i < arrTmp.length; i++){
		var arrTemp = arrTmp[i].split("=");
		if(arrTemp[0].toUpperCase() == strName.toUpperCase()) return arrTemp[1];
	}
	return "";
}
function fnObj_addEvent(obj, evType, fn)
{
    if (obj.addEventListener)
    {
        obj.addEventListener(evType, fn, false);
        return true;
    }
    else if (obj.attachEvent)
    {
        var r = obj.attachEvent("on"+evType, fn);
        return r;
    }
    else
    {
        return false;
    }
}
String.prototype.Xreplace=function(a,b){
//    var pattern=/{\$a}/gi;
//    return  str1.replace(pattern,"AAAA");
}