﻿/// <param name=""></param>

//谷木人JS文件库
//GmrJsLib.js,包含通用JS库和方法,用于每个页面的加载
//版权所有谷木人科技(北京)有限公司,www.gumuren.com
//版本1.0
//创建时间2008.12.06
//修改时间2008.12.06
//修改人
//修改时间2008.12.06
//修改人 贾军伟
//修改记录 增加Gmr.Cookie

 
var Gmr = new Object();


Gmr.Environment = new function()
{
    /// <summary>脚本环境设置</summary>

    this.WebSiteUrl = "/"; // "/Gmr.WebSite/"; //网站应用根路径
    this.GetWebSiteUrl = function(url)
    {
        /// <summary>获取路径的绝对URL</summary>
        /// <param name="url">相对于网站应用程序根路径的Url</param>
        if (url !== null)
        {
            if (url.substring(0, 1) == "/") url = url.substring(1);

            return this.WebSiteUrl + url;
        }
        else
        {
            return this.WebSiteUrl;
        }

    }
}
/*******************全局方法开始*************************/
//#region
/*HTML编码*/
function HtmlEncode(text)
{
    /// <summary>对字符串进行HTML编码</summary>
    /// <param name="text">要进行编码的文本</param>
    text = text.toString();
    text = text.replace(/&/g, "&amp;");
    text = text.replace(/"/g, "&quot;");
    text = text.replace(/</g, "&lt;");
    text = text.replace(/>/g, "&gt;");
    text = text.replace(/'/g, "&#39;");
    return text;

}
function HtmlDecode(text)
{
    /// <summary>对字符串进行HTML解码</summary>
    /// <param>要进行解码的文本</text>
    text = text.toString();
    text = text.replace(/&amp;/g, "&");
    text = text.replace(/&quot;/g, '"');
    text = text.replace(/&lt;/g, '<');
    text = text.replace(/&gt;/g, ">");
    text = text.replace(/&#39;/g, "'");
    return text;

}

String.prototype.Trim = function()
{
    /// <summary>去除字符串两端的空格</summary>
    var m = this.match(/^\s*(\S+(\s+\S+)*)\s*$/);
    return (m == null) ? "" : m[1];

   // return this.replace(/(^\s*)|(\s*$)/g, "");
}
Array.prototype.Remove = function(arrayItem)
{
    /// <summary>移除数组第一个匹配的对象</summary>
    /// <param name="arrayItem">要移除的对象</param>

    var i = -1;
    for (var j = 0; j < this.length; j++)
    {
        if (this[j] == arrayItem)
        {
            this.splice(j, 1);
            break;
        }
    }
}
Array.prototype.RemoveAt = function(index)
{
    /// <summary>移除数组指定索引处的元素</summary>

    this.splice(index, 1);
}
Array.prototype.IndexOf = function(arrayItem)
{
    /// <summary>查询数组中第一个匹配对象,并返回该元素索引,如果不存在指定元素,则返回-1</summary>
    /// <param name="arrayItem">要查找的对象</param>

    for (var i = 0; i < this.length; i++)
    {
        if (this[i] == arrayItem)
        {
            return i;
        }
    }
    return -1;
}
function $(expression)
{
    /// <summary>取元素</summary>
    ///<param name="expression">元素ID或元素对象</param>
    var obj;
    if (typeof (expression) == "object")
    {
        obj = expression;
    }
    else if (typeof (expression) == "string")
    {
        switch (expression)
        {
            case ("document.body"):
                obj = document.body;
                break;
            default:
                obj = document.getElementById(expression);
                break;
        }

    }
    return obj;
}
function $P(childNode, parentTagName, parentDepth, isDepthOnly)
{
    /// <summary>查找对像的父节点中具有指定标签名的对象</summary>
    /// <param name="childNode">子级点对象或对象表达式</param>
    /// <param name="parentTagName">要查询的父对象标签名称</param>
    /// <param name="parentDepth">要查询的父对象深度,即返回第几个满足标签名称要求的父对象.默认值为1</param>
    /// <param name="isDepthOnly">父对象深度是否精确要求.如果值为False,则在没有满足parentDepth情况下则返回不满足parentDepth的最外层父对象.如果值为True,则在没有满足parentDepth情况下返回null.默认为False</param>
    var obj = $(childNode);
    if (typeof (parentTagName) == "string")
    {
        parentTagName = parentTagName.toLowerCase();
        if (parentDepth == null)
        {
            parentDepth = 1;
        }
        if (isDepthOnly == null)
        {
            isDepthOnly = false;
        }
        var p = obj;
        var t = null;
        var i = 0;
        while (p)
        {
            p = obj.parentNode;
            if (p == obj || p == document.body)
            {
                if (i > 0 && !isDepthOnly)
                {
                    return t;
                }
                else
                {
                    return null;
                }
            }
            if (p.tagName.toLowerCase() == parentTagName)
            {
                t = p;
                i++;
                if (i == parentDepth)
                {
                    return t;
                }
            }
            obj = p;
        }
    }
    else
    {
        return null;
    }

}
function $T(expression)
{
    /// <summary>获取指定标签名的标签数组</summary>
    /// <param name="expression">标签名表达式</param>
    var tarray = Array();
    tarray = document.getElementsByTagName(expression);
    return tarray;
}
function $C(expression, parentObj, tagName)
{
    /// <summary>获取包含指CSS类的元素数组,只有第一个参数时对FF不兼容</summary>
    /// <param name="expression">CSS类名</param>
    /// <param name="parentObj">在指定对象下面搜索</param>

    var objs;

    if (arguments.length == 3)
    {

        objs = parentObj.getElementsByTagName(tagName);

    }
    else
    {
        objs = document.all; //FF不兼容
    }

    var rs = new Array();
    for (var i = 0; i < objs.length; i++)
    {
        var cns = objs[i].className.split(/ +/);
        for (var j = 0; j < cns.length; j++)
        {
            if (cns[j] == expression)
            {
                rs[rs.length] = objs[i];
            }
        }
    }
    return rs;
}
//#endregion
/*******************全局方法结束*************************/

/*******************Gmr.Pub公共类开始********************/
//#region Gmr.Pub公共类
Gmr.Pub = new Object();
Gmr.Pub.GetFeature = function(featureString, featureName, defaultValue)
{
    /// <summary>从特征字符串中查找指定的特征值</summary>
    /// <param name="featureString">特征字符串,开如f1:v1;f2:v2;</param>
    /// <param name="featureName">特征值名字</param>
    /// <param name="defaultValue">不包含指定值时返回的默认值</param>
    if (!featureName) { return defaultValue; }
    var fs = featureString.split(";");
    for (var i = 0; i < fs.length; i++)
    {
        var fvs = fs[i].split(":");
        if (fvs[0].Trim() == featureName)
        {
            return fvs[1].Trim();
        }
    }
    return defaultValue;

}
Gmr.Pub.$A =  $A=function(parentObj, tagName, attributeName, attributeValue)
{
    /// <summary>根据标签名和属性查找子节点</summary>
    /// <param name="parentObj">要查找的父对象</param>
    /// <param name="tagName">匹配的子节点的标签</param>
    /// <param name="attributeName">匹配的属性名</param>
    /// <param name="attributeValue">匹配的属性值,默认忽略</param>

    var pObj = $(parentObj);
    var objs = pObj.getElementsByTagName(tagName);
    var rojbs = new Array();
    if (attributeValue)
    {
        for (var i = 0; i < objs.length; i++)
        {
            if (objs[i].attributes[attributeName] && (objs[i].attributes[attributeName].value == attributeValue))
            {
                rojbs[rojbs.length] = objs[i];
            }
        }
    }
    else
    {
        for (var i = 0; i < objs.length; i++)
        {

            if (objs[i].attributes[attributeName])
            {

                rojbs[rojbs.length] = objs[i];
            }
        }
    }
    return rojbs;
}

Gmr.Pub.GetUrl = function()
{
    /// <summary>获取当前的URL</summary>
    return window.location;
}
Gmr.Pub.GetUrlWithoutParam = function(strUrl)
{
    /// <summary>获取URL地址不带参数部分</summary>
    /// <param name="strUrl">原始URL字符串</param>
    /// <return>返回URL地址不带参数部分</return>
    var urls = strUrl.split("?");
    return urls[0];
}


Gmr.Pub.GetUrlParam = function(name, rawUrl)
{
    /// <summary>获取UrlGet参数，如果参数不存在则返回""</summary>
    /// <param name="name">要获取的参数名称</param>
    /// <param name="rawUrl">原始URL，默认为当前客户端URL</param>
    var str = rawUrl ? rawUrl : window.location.href;
    if (str.indexOf("?") >= 0)
    {
        str = str.substring(str.indexOf("?"));
    }
    if (str.indexOf(name +"=") >=0)
    {
        var pos_start = str.indexOf(name) + name.length + 1;
        var pos_end = str.indexOf("&", pos_start);
        if (pos_end == -1)
        {
            return str.substring(pos_start);
        }
        else
        {
            return str.substring(pos_start, pos_end)
        }
    }
    else
    {
        return "";
    }
}
Gmr.Pub.UrlReplaceParamValue = function(paramName, newParamValue, rawUrl)
{
    /// <summary>替换URL中的参数值，如果不存在则添加</summary>
    /// <param name="paramName">参数名称</param>
    /// <param name="newParamValue">新的参数值</param>
    /// <param name="rawUrl">要操作的URL，默认为当前客户端URL</param>
    var oUrl = rawUrl ? rawUrl : window.location.href.toString();
    var nUrl = "";
    if (Gmr.Pub.GetUrlParam(paramName, oUrl) == "")
    {
       
        if (oUrl.indexOf("?") > 0)
        {
            nUrl = oUrl + ("&" + paramName + "=" + newParamValue);
        }
        else
        {
            nUrl = oUrl + ("?" + paramName + "=" + newParamValue);
        }
    }
    else
    {
        var re = eval('/(' + paramName + '=)([^&]*)/gi');

        nUrl = oUrl.replace(re, paramName + '=' + newParamValue);

    }
    return nUrl;
}
Gmr.Pub.SetClipboardText = SetClipboardText = function(text)
{
    /// <summary>设置客户端剪贴板的文本内容</summary>
    /// <param name="text">要设置的文本值</param>
    window.clipboardData.setData("text", text.toString())
}
Gmr.Pub.SelectSetValue = SelectSetValue = function(selectObj, value, text)
{/// <summary>设置下拉控件的先择值</summary>
    /// <param name="value">要匹配的值，如果设为null，则匹配text参数</param>
    /// <param name="text">当value参数为 null时，匹配文本</param>

    var obj = $(selectObj);
    if (obj)
    {
        for (var i = 0; i < obj.options.length; i++)
        {
            var op = obj.options[i];
            if (value)
            {
                if (op.value == value)
                {
                    obj.selectedIndex = i; break;
                }
            }
            else if (text && op.text == text)
            {
                obj.selectedIndex = i; break;
            }
        }
    }
}
Gmr.Pub.SelectGetOptions = SelectGetOptions = function(selectObj, value, text)
{
    /// <summary>返回下拉控件的选择项option对象集合引用</summary>
    /// <param name="value">要匹配的值，如果设为null，则忽略参数</param>
    /// <param name="text">当value参数为 null时，忽略此参数</param>
    var obj = $(selectObj);
    if (obj)
    {
        if (value == null && text == null)
        {
            return obj.options;
        }
        var ops = new Array();
        for (var i = 0; i < obj.options.length; i++)
        {
            var op = obj.options[i];
            if (value && value != op.value)
            {
                continue;
            }
            if (text && op.text != text)
            {
                continue;
            }
            ops[ops.length] = op;
        }
        return ops;
    }
    else
    {
        return null;
    }
} 
Gmr.Pub.InputRadioSetValue =InputRadioSetValue= function(controlName, selectedValue)
{
    var objs = document.getElementsByName(controlName);
    for (var i = 0; i < objs.length; i++)
    {
        if (objs[i].value == selectedValue)
        {
            objs[i].checked = true;
            break;
        }
    }
}
Gmr.Pub.InputRadioGetValue = InputRadioGetValue = function(controlName, defaultValue)
{
    var objs = document.getElementsByName(controlName);
    for (var i = 0; i < objs.length; i++)
    {
        if (objs[i].checked)
        {
            return objs[i].value;
        }
    }
    return defaultValue;

}
Gmr.Pub.SubmitKeyClick = SubmitKeyClick = function(evt, button, func)
{
    /// <summary>设置处理对象提交事件</summary>
    /// <param name="button">要绑定的提交按钮</param>
    evt = evt ? evt : window.event;
    me = evt.srcElement || evt.target;

    var keyCode = evt.which || evt.keyCode;
    if (keyCode == 13)
    {
        if (document.all)
        {
            evt.keyCode = 9;
            evt.returnValue = false;
        }
        else
        {
            evt.preventDefault();
        }
        if (button && button.length > 0)
        {
            $(button).click();
        }
        else if (func)
        {
            func();
        }
    }
}
Gmr.Pub.GetMouseCoords = function(ev)
{
    /// <summary>获取事件中的鼠标坐标，返回值为坐标数据结构</summary>
    /// <param name="ev">事件源</param>
    if (ev.pageX || ev.pageY)
    { return { x: ev.pageX, y: ev.pageY }; }
    return { x: ev.clientX + document.body.scrollLeft - document.body.clientLeft, y: ev.clientY + document.body.scrollTop - document.body.clientTop };
 }
 Gmr.Pub.ParseAbsoluteUrl= function (targetUrl, thisUrl)
 {
     /// <summary>转换URL地址为绝对URL地址</summary>
     /// <param name="targetUrl">要转换的目标URL</param>
     /// <param name="thisUrl">参考URL，默认为当前页面URL</param> 
     thisUrl = thisUrl ? thisUrl : window.location.pathname;
     thisUrl = thisUrl.substring(0, thisUrl.lastIndexOf("/") + 1);
     if ((targetUrl.substring(0, 7).toLowerCase() == "http://") || (targetUrl.substring(0, 8).toLowerCase() == "https://") || (targetUrl.substring(0, 1).toLowerCase() == "/")) { return targetUrl; }
     else { targetUrl = thisUrl + targetUrl; }
     return targetUrl;
 }
//#endregion
/*******************Gmr.Pub公共类结束********************/

/*******************Gmr.Sys系统类开始********************/
//#region 
Gmr.Sys = new Object();

Gmr.Sys.AddEvent = SysAddEvent=function (objExpression, eventName, callBack)
{
    /// <summary>给对象添加事件</summary>
    /// <param name="objExpression">对象或对象ID</param>
    /// <param name="eventName">事件名称</param>
    /// <param name="callBack">回调函数</param>

    if (typeof (objExpression) == "string")
    {
        if ($(objExpression) == null)
        {
            SysAddEvent(window, "onload", function() { SysAddEvent(objExpression, eventName, callBack); });
            return;
        }
    }
    var obj = $(objExpression);
    if (obj.addEventListener)
    {
        if (eventName.substring(0, 2) == "on") eventName = eventName.substring(2, eventName.length);
        obj.addEventListener(eventName, callBack, false);
    } else if (obj.attachEvent)
    {//IE
        if (eventName.substring(0, 2) != "on") eventName = "on" + eventName;
        obj.attachEvent(eventName, callBack);
    } else
    {
        if (eventName.substring(0, 2) != "on") eventName = "on" + eventName;
        obj[eventName] = callBack;
    }
}
Gmr.Sys.RemoveEvent =SysRemoveEvent =function (objExpression, eventName, callBack)
{
    /// <summary>删除通过Gmr.Sys.AddEvent()方法添加的事件</summary>
    /// <param name="objExpression">对象或对象ID</param>
    /// <param name="eventName">事件名称</param>
    /// <param name="callBack">要删除的回调函数</param>
    if (typeof (objExpression) == "string")
    {
        if ($(objExpression) == null)
        {
            SysAddEvent(window, "onload", function() { Gmr.Sys.RemoveEvent(objExpression, eventName, callBack); });
            return;
        }
    }
    var obj = $(objExpression);
    if (obj.removeEventListener)
    {
        if (eventName.substring(0, 2) == "on") eventName = eventName.substring(2, eventName.length);
        obj.removeEventListener(eventName, callBack, false);
    } else if (obj.detachEvent)
    {//IE
        if (eventName.substring(0, 2) != "on") eventName = "on" + eventName;
        obj.detachEvent(eventName, callBack);
    } else
    {
        if (eventName.substring(0, 2) != "on") eventName = "on" + eventName;
        obj[eventName] = "";
    }
}


Gmr.Sys.LoadJsCssFile = SysLoadJsCssFile=function (filename, filetype)
{
    /// <summary>向页面的Head标签添加Js脚本文件或Css样式表文件</summary>
    /// <param name="filename">文件Url</param>
    /// <param name="filetype">文件类型,值取"js"或"css"</param>

    if (filetype == "js")
    {
        var fileref = document.createElement('script');
        fileref.setAttribute("type", "text/javascript");
        fileref.setAttribute("src", filename)
    } else if (filetype == "css")
    {
        var fileref = document.createElement("link");
        fileref.setAttribute("rel", "stylesheet");
        fileref.setAttribute("type", "text/css");
        fileref.setAttribute("href", filename)
    }
    if (typeof fileref != "undefined") document.getElementsByTagName("head")[0].appendChild(fileref)
}

Gmr.Sys.GetUniqueID = function()
{
    /// <summary>生成页面内一个唯一的ID标识</summary>
    if (window._uid == 0 || window._uid == NaN || window._uid == null)
    {
        window._uid = 0;
    }
    window._uid++;
    return "gmrid" + window._uid;
}

Gmr.Sys.GetEventSrc = SysGetEventSrc = function(evt)
{
    /// <summary>获取鼠标事件对象</summary>
    var evt = evt ? evt : event;
    
    if (evt.srcElement)
    {
        return evt.srcElement;
    }
    else
    {
        return evt.target;
    }
}
//#endregion 
/*******************Gmr.Sys系统类结束********************/

/*******************Gmr.Math数学类开始*******************/
//#region
Gmr.Math = new Object(); 
Gmr.Math.GetAvarage =function (dataArray)
{
    /// <summary>获取数值数组元素的平均值</summary>
    /// <param name="dataArray">要计算的数组,必须是数值型一维数组</param>
    var tv = 0;
    for (var i = 0; i < dataArray.length; i++)
    {
        tv += dataArray[i];
    }
    return tv / dataArray.length;
}
Gmr.Math.ConvertJiaoToRad=function (jiaoValue)
{
    /// <summary>把角度转换成弧度</summary>
    /// <param name="jiaoValue">要转换的角度值</param>
    return jiaoValue * Math.PI / 180;
}
Gmr.Math.ConvertRadToJiao=function (radValue)
{
    /// <summary>把角度转换成弧度</summary>
    /// <param name="radValue">要转换的弧度值</param>
    return radValue * 180 / Math.PI;
}
Gmr.Math.GetArraySum=function (numberArray)
{
    /// <summary>获取数字数组的总和</summary>
    /// <param name="numberArray">要计算的数值数组</param>
    var s = 0;
    for (var i = 0; i < numberArray.length; i++)
    {
        s += numberArray[i];
    }
    return s;
}
//#endregion
/*******************Gmr.Math数学类结束*******************/

/*******************Gmr.String字符串类开始***************/
//#region
Gmr.String = new Object();
Gmr.String.PaddLeft=StrPaddLeft= function (sourceString, totalLength, paddingChar)
{
    /// <summary>右对齐字符串,在左边用指定的字符填充以达到指定的总长度</summary>
    /// <param name="sourceString">要编辑的字符串</param>
    /// <param name="totalLength">总长度</param>
    /// <param name="paddingChar">填充的字符</param>

    var sl = sourceString.length;
    var al = totalLength - sl;
    if (al < 0) return sourceString;
    var st = "";
    for (var i = 0; i < al; i++)
    {
        st += paddingChar;
    }
    return st + sourceString;
}
Gmr.String.GetExtentsion = function(path, isWithPoint)
{
    /// <summary>获取路径中的文件扩展名</summary>
    /// <param name="path">路径字符串</param>
    /// <param name="isWithPoint">是否包含点号".",默认包含</param>
    if (isWithPoint || isWithPoint == null)
    {
        return path.substring(path.lastIndexOf("."));
    }
    else
    {
        return path.substring(path.lastIndexOf(".") + 1);
    }
}
Gmr.String.Trim = StrTrim = function(str)
{
    /// <summary>去除字符串两端的空格</summary>
    /// <param name="str">输入字符串</param>
    str = str.toString();
    if (str == "") { return ""; }
    var m = str.match(/^\s*(\S+(\s+\S+)*)\s*$/);
    return (m == null) ? "" : m[1];
}
//#endregion
/*******************Gmr.String字符串类结束***************/

/*******************Gmr.Cookie Cookie类开始**************/
//#region
Gmr.Cookie = new Object();
Gmr.Cookie.Add = function(name, value, expirestime)
{
    /// <summary>添加Cookie</summary>
    /// <param name="name">名称</param>
    /// <param name="value">值</param>
    /// <param name="expirestime">超时时间,单位分钟,默认值为0,为0时表示随浏览器进程</param>
    var str = name + "=" + escape(value);
    if (expirestime > 0)
    {//为0时不设定过期时间，浏览器关闭时cookie自动消失
        var date = new Date();
        var ms = expirestime * 60 * 1000;
        date.setTime(date.getTime() + ms);
        str += "; expires=" + date.toGMTString();
    }
    document.cookie = str;
    return true;

}
Gmr.Cookie.GetValue = function(name)
{
    /// <summary>获取Cookie值</summary>
    /// <param name="name">名称</param>
    var arrStr = document.cookie.split("; ");
    for (var i = 0; i < arrStr.length; i++)
    {
        var temp = arrStr[i].split("=");
        if (temp[0] == name) return unescape(temp[1]);
    }
    return "";
}
Gmr.Cookie.Delete = function(name)
{
    /// <summary>删除指定Cookie</summary>
    /// <param name="name">名称</param>
    var date = new Date();
    date.setTime(date.getTime() - 10000);
    document.cookie = name + "=a; expires=" + date.toGMTString();
}
//#endregion
/*******************Gmr.Cookie Cookie类结束**************/

/*******************Gmr.Color颜色类开始******************/
//#region
Gmr.Color = new Object();
Gmr.Color.ConvertDecToHex=function (decValue)
{
    /// <summary>把十进制数转换成十六进制颜色值</summary>
    /// <param name="decValue">要转换的十进制值</param>
    return decValue.toString(16);

}
Gmr.Color.ConvertHexToDec=function (hexValue)
{
    /// <summary>把十六进制颜色值转换成十进制数</summary>
    /// <param name="hexValue">要转换的十六进制值</param>
    var v = hexValue.replace("#", "");
    return parseInt(v, 16);
}
Gmr.Color.GetColors=function (number, colorStart, colorEnd)
{
    /// <summary>获取指定数量的16进制格式的颜色值</summary>
    /// <param name="number">要获取的颜色数量</param>
    /// <param name="colorStart">起始颜色,16进制</param>
    /// <param name="colorEnd">终止颜色,16进制</param>

    if (arguments.length == 1)
    {
        colorStart = "00f000";
        colorEnd = "FF0FFF";
    }

    var st = ColorConvertHexToDec(colorStart), en = ColorConvertHexToDec(colorEnd);
    var span = Math.floor((en - st) / number);
    var colors = new Array();
    for (var i = 0; i < number - 1; i++)
    {
        colors[i] = "#" + StrPaddLeft(ColorConvertDecToHex(st + span * i), 6, '0');
    }
    colors[colors.length] = "#" + StrPaddLeft(ColorConvertDecToHex(en), 6, '0');
    return colors;

}
Gmr.Color.GetRandomColors=function (number)
{
    /// <summary>生成指定个数的随机16进制颜色值</summary>
    /// <param name="number">要生成的颜色数量</param>
    var colors = new Array();
    var dm = ColorConvertHexToDec("FFFFFa");
    for (var i = 0; i < number; i++)
    {
        colors[i] = "#" + StrPaddLeft(ColorConvertDecToHex(Math.floor(Math.random() * dm)), 6, '0');
    }
    return colors;
}
//#endregion
/*******************Gmr.Color颜色类结束******************/


/*******************Gmr.Navigator浏览器类开始************/
//#region
Gmr.Navigator = new Object();
Gmr.Navigator.Info = new function() {
    /// <summary>浏览器信息对象</summary>

    this.userAgent = "";
    this.IsIE = false;
    this.IsIE6 = false;
    this.IsIE7 = false;
    this.IsIE8 = false;
    this.IsFireFox = false;
    this.IsOther = false;

    this.getInfo = function() {
        /// <summary>判断当前的浏览器种类,返回当前的浏览器信息对象NavInfo</summary>

        var str = navigator.userAgent.toLowerCase();
        if (/msie (8.0)/.test(str)) {
            this.IsIE = this.IsIE8 = true;
        }
        else if (/msie (7.0)/.test(str)) {
            this.IsIE = this.IsIE7 = true;
        }
        else if (/msie (5\.5|6\.)/.test(str)) {
            this.IsIE = this.IsIE6 = true;
        }
        else if (/firefox/.test(str)) {
            this.IsFireFox = true;
        }
        else {
            this.IsOther = true;
        }
        this.IsIE = !!window.ActiveXObject;

    }

    this.getInfo();
}

//#endregion
/*******************Gmr.Navigator浏览器类结束************/


/*******************Gmr.Style样式类开始******************/
//#region
Gmr.Style = new Object();
Gmr.Style.GetBodyDocumentElement = function(windowobj)
{
    /// <summary>根据当前所有标准自动获取Body对象或DocumentElement对象</summary>
    /// <param name="windowobj">包含document的window对象，默认为当前页面的window对象</param>
    
    var doc = document;
    if (windowobj)
    {
        doc = windowobj.document;
    }
    switch (doc.compatMode)
    {
        //HTML标准       
        case ("BackCompat"):
            return doc.body;
            break;
        //XHTML 1.0                    
        case ("CSS1Compat"):
        default:
            return doc.documentElement;
            break;
    }
}
Gmr.Style.GetRuntimeStyle = function(obj, propertyName)
{
    /// <summary>获取对象运行时的样式属性值,包括内联和外联CSS属性值</summary>
    /// <param name="obj">要获取属性值的对象</param>
    /// <param name="propertyName">属性名称,对于IE为Js样式属性名,为于FF为CSS属性名称</param>

    var v = null;
    if (obj.currentStyle) v = obj.currentStyle[propertyName];
    else v = window.getComputedStyle(obj, null).getPropertyValue(propertyName);
    return v;
}
Gmr.Style.GetBackgroundImageUrl = function(obj)
{
    /// <summary>获取指定对象或url形式字符串中的背景图片路径</summary>
    /// <param name="obj">获取对象,可为对象类型或字符串,字符串须为url(...)格式</param>
    if (typeof (obj) == "object")
    {
        obj = Gmr.Style.GetRuntimeStyle(obj, Gmr.Navigator.Info.IsFireFox ? "background-image" : "backgroundImage");
    }
    if (obj.length == 0)
    {
        return "";
    }
    else
    {
        //却除两端标记
        var reg = /url|\(|\)|'|"/ig;
        return obj.replace(reg, "");
    }
}
Gmr.Style.GetClassNames = function(obj)
{
    /// <summary>获取标签对象的CSS类名称数组</summary>
    /// <param name="obj">对象表达式</param>
    obj = $(obj);
    var name = obj.className.split(/ +/);
    var cns = new Array();
    for (var i = 0; i < name.length; i++)
    {
        if (name[i] != "" && name[i] != " ")
        {
            cns[cns.length] = name[i];
        }
    }
    return cns;
}
Gmr.Style.GetObjTopY = function(obj)
{
    /// <summary>获取对象顶部相对于网页左上角的Y坐标</summary>

    var ParentObj = obj;
    var top = obj.offsetTop;
    while (ParentObj = ParentObj.offsetParent)
    {
        top += ParentObj.offsetTop;
    }
    return top;
}
Gmr.Style.GetObjLeftX = function(obj)
{
    /// <summary>获取对象左侧相对于网页左上角的X坐标</summary>

    var ParentObj = obj;
    var left = obj.offsetLeft;
    while (ParentObj = ParentObj.offsetParent)
    {
        left += ParentObj.offsetLeft;
    }
    return left;
}

Gmr.Style.SetAlignCenterInParent = function(obj, type)
{
    /// <summary>设置对象居于父窗口中间</summary>
    /// <param name="obj">要居中的对象</param>
    /// <param name="type">居中方式,可取值为"x","y","both",默认both</param>
    var obj = $(obj);
    var pw = obj.parentNode.offsetWidth;
    var ph = obj.parentNode.offsetHeight;
    var pos = Gmr.Style.GetRuntimeStyle(obj, "position");

    if (pos == "static")
    {
        //obj.style.position = "relative";
        return;
    }
    var tw = obj.offsetWidth;
    var th = obj.offsetHeight;
    if (type == "y" || type == "both")
    {
        obj.style.top = (ph / 2 - th / 2) + "px";

    }
    if (type == "x" || type == "both")
    {
        obj.style.left = "50%";
        obj.style.marginLeft = (-1 * tw / 2) + "px";
    }
}
Gmr.Style.SetAlignCenterInWindow = function(obj, type)
{
    /// <summary>设置对象居于浏览器窗口中间</summary>
    /// <param name="obj">要居中的对象</param>
    /// <param name="type">居中方式,可取值为"x","y","both",默认both</param>
    obj = $(obj);
    var winHeight, winWidth, winLeft, winTop;
    var oWidth = obj.offsetWidth, oHeight = obj.offsetHeight;
    var objBody = Gmr.Style.GetBodyDocumentElement();
    winHeight = objBody.clientHeight;
    winWidth = objBody.clientWidth;
    winLeft = objBody.scrollLeft, winTop = objBody.scrollTop;

    if (type == "x" || type == "both" || type == null)
    {
        obj.style.left = winLeft + winWidth / 2 - oWidth / 2 + "px";
    }
    if (type == "y" || type == "both" || type == null)
    {
        obj.style.top = winTop + winHeight / 2 - oHeight / 2 + "px";
    }
    if (obj.getAttribute("SetAlignCenterInWindow"))
    {
        if (obj.parentNode.parentNode == null)
        {
            var o = obj.getAttribute("SetAlignCenterInWindow");
            window.SetAlignCenterInWindowArray.Remove(o);
            Gmr.Sys.RemoveEvent(window, "onresize", o);
            obj.setAttribute("SetAlignCenterInWindow", false);
        }
    }
    else
    {
        if (!window.SetAlignCenterInWindowArray)
        {
            window.SetAlignCenterInWindowArray = new Array();
        }
        var f = window.SetAlignCenterInWindowArray[window.SetAlignCenterInWindowArray.length] = function()
        {
            Gmr.Style.SetAlignCenterInWindow(obj, type);
        }
        Gmr.Sys.AddEvent(window, "onresize", f);
        obj.setAttribute("SetAlignCenterInWindow", f);


    }
}
Gmr.Style.SetPostionInWindow = function(obj, left, top, right, bottom)
{
    /// <summary>设置对象相对于浏览器窗口的位置</summary>
    /// <param name=""></param>
    /// <param name=""></param>
    /// <param name=""></param>
    /// <param name=""></param>
    var winLeft, winTop;
    //HTML 4.01
    switch (document.compatMode)
    {
        case ("BackCompat"):

            winLeft = document.body.scrollLeft, winTop = document.body.scrollTop;
            break;
        //XHTML 1.0            
        case ("CSS1Compat"):
        default:

            winLeft = document.documentElement.scrollLeft, winTop = document.documentElement.scrollTop;
            break;
    }
    obj = $(obj);
    if (left != null)
    {
        obj.style.left = left + winLeft + "px";
    }
    if (top != null)
    {
        obj.style.top = top + winTop + "px";
    }

}
Gmr.Style.Ie6Png = new Object();
Gmr.Style.Ie6Png.FixImg = function(imgObj)
{
    /// <summary>修复IE6下img标签的图片PNG</summary>
    /// <param name="imgObj">img标签表达式</param>

    var obj = $(imgObj);
    if (Gmr.String.GetExtentsion(obj.src).toLowerCase() != ".png" || obj.tagName.toLocaleLowerCase() != "img" || !Gmr.Navigator.Info.IsIE6)
    {
        return;
    }
    
    obj.style.width = obj.offsetWidth + "px";
    obj.style.height = obj.offsetHeight + "px";
    obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader ( sizingMethod=scale,src='" + obj.src + "') ";
    obj.src = '/Skins/Default/images/blank.gif';
}
Gmr.Style.Ie6Png.Fix = function(obj)
{
    /// <summary>修正IE6的PNG显示问题</summary>
    /// <param name="obj">要修正的对象,默认缺省检查页面所有标签</param>

    if (Gmr.Navigator.Info.IsIE6)
    {
        //修正Input标签
        var tags = $T("input");
        for (var i = 0; i < tags.length; i++)
        {
            if (tags[i].type == "image")
            {
                var obj = tags[i];
                if (Gmr.String.GetExtentsion(obj.src).toLowerCase() != ".png")
                {
                    continue;
                }
                obj.style.width = obj.offsetWidth + "px";
                obj.style.height = obj.offsetHeight + "px";
                obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader ( sizingMethod=scale,src='" + obj.src + "') ";
                obj.src = '/Skins/Default/images/blank.gif';
            }
        }
        //修正img标签
        var tags = $T("img");
        for (var i = 0; i < tags.length; i++)
        {
            var obj = tags[i];
            Gmr.Style.Ie6Png.FixImg(obj);

        }
        //修正背景
        var tags = $C("AutoPng");
        for (var i = 0; i < tags.length; i++)
        {
            var obj = tags[i];
            var src = Gmr.Style.GetBackgroundImageUrl(obj);
            if (src != null && src.length > 5 && Gmr.String.GetExtentsion(src).toLowerCase() == ".png")
            {

                obj.style.backgroundImage = "none";
                var bacPosX = Gmr.Style.GetRuntimeStyle(obj, "backgroundPositionX").replace(/ +/, "");
                var bacPosY = Gmr.Style.GetRuntimeStyle(obj, "backgroundPositionY").replace(/ +/, "");
                var tdiv = document.createElement("div");
                var tdiv2 = document.createElement("div");
                tdiv2.id =
                tdiv.appendChild(tdiv2);
                obj.parentNode.appendChild(tdiv);
                tdiv2.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader ( sizingMethod=image ,src='" + src + "') ";
                tdiv2.style.margin = "0px auto";
                tdiv2.style.display = "block";


                tdiv2.style.position = "absolute";
                tdiv.style.position = "absolute";
                tdiv.style.left = obj.offsetLeft + "px";
                tdiv.style.top = obj.offsetTop + "px";
                tdiv2.style.width = tdiv.style.width = obj.offsetWidth + "px";
                tdiv2.style.height = tdiv.style.height = obj.offsetHeight + "px";
                tdiv.style.overflow = "hidden";

                switch (bacPosX.toLowerCase())
                {
                    case ("left"):
                        tdiv2.style.left = "0px";
                        break;
                    case ("right"):
                        //tdiv.style.textAlign='right';
                        tdiv2.style.right = "0px";
                        break;
                    case ("center"):
                        //tdiv.style.textAlign = "center";
                        //tdiv2.style.left = obj.offsetLeft + obj.offsetWidth / 2 - parseInt(tdiv.style.width) / 2 + "px";
                        break;
                    default:
                        tdiv2.style.left = "0px";
                        break;
                }
                switch (bacPosY.toLowerCase())
                {
                    case ("top"):
                        tdiv2.style.top = "0px";
                        break;
                    case ("center"):
                        tdiv2.style.top = obj.offsetTop + obj.offsetHeight / 2 - parseInt(tdiv.style.height) / 2 + "px";
                        break;
                    case ("bottom"):
                        tdiv2.style.bottom = "0px";
                        break;
                    default:
                        tdiv2.style.top = "0px";
                        break;
                }
                var zi = Gmr.Style.GetRuntimeStyle(obj, "position");
                if (zi == "static")
                {
                    obj.style.position = "relative";
                    obj.style.zIndex = 5;
                    tdiv.style.zIndex = -1;
                }
                else
                {
                    tdiv.style.zIndex = Gmr.Style.GetRuntimeStyle(obj, "zIndex") - 1;
                }


            }
        }
    }
}
if (Gmr.Navigator.Info.IsIE6)
{
    SysAddEvent(window, "onload", Gmr.Style.Ie6Png.Fix);
}

Gmr.Style.ShowBodyInfo = function()
{
    var bd = Gmr.Style.GetBodyDocumentElement();
    var s = "";
    s += "\r\n网页可见区域宽：" + bd.clientWidth;
    s += "\r\n网页可见区域高：" + bd.clientHeight;
    s += "\r\n网页可见区域宽：" + bd.offsetWidth + "  (包括边线的宽)";
    s += "\r\n网页可见区域高：" + bd.offsetHeight + "  (包括边线的宽)";
    s += "\r\n网页正文全文宽：" + bd.scrollWidth;
    s += "\r\n网页正文全文高：" + bd.scrollHeight;
    s += "\r\n网页被卷去的高：" + bd.scrollTop; //document.documentElement.scrollTop;//
    s += "\r\n网页被卷去的左：" + bd.scrollLeft;
    s += "\r\n网页正文部分上：" + window.screenTop;
    s += "\r\n网页正文部分左：" + window.screenLeft;
    s += "\r\n屏幕分辨率的高：" + window.screen.height;
    s += "\r\n屏幕分辨率的宽：" + window.screen.width;
    s += "\r\n屏幕可用工作区高度：" + window.screen.availHeight;
    s += "\r\n屏幕可用工作区宽度：" + window.screen.availWidth;
    alert(s);
}

Gmr.Style.SetWindowAlpha = function(opacityValue, colorValue,windowSet)
{
    /// <summary>设置整个屏幕窗口的透明度,即使网页变暗</summary>
    /// <param name="opacityValue">透明值,0~100</param>
    /// <param name="colorValue">原始颜色值，默认为透明色Transparent</param>
    /// <param name="windowSet">要设置的window对象，默认为window.top即顶层窗口</param>
    var cv;
    if (colorValue)
    {
        cv = colorValue;
    }
    else
    {
        cv = "Transparent";
    }
    var pw = windowSet ? windowSet : window.top, dmt = pw.document, pnode = dmt.body;
    if (Gmr.Navigator.Info.IsIE8 || Gmr.Navigator.Info.IsFireFox) { pnode = dmt.body.parentNode; }
    var aDiv = dmt.createElement("div");
    if (Gmr.Navigator.Info.IsIE)
    {
        aDiv.style.cssText = "position:absolute;top:0px;left:0px ;width:100%;height:100%;bottom:0px;margin-bottom:0px;background-color:" + cv + ";filter:alpha(opacity=" + opacityValue + "); ";
    }
    else
    {
        aDiv.style.cssText = "position:absolute;top:0px;left:0px ;width:100%;height:100%;bottom:0px;background-color:" + cv + ";-moz-opacity:" + opacityValue / 100 + "; ";
    }
    aDiv.style.height = pnode.scrollHeight + "px";
    aDiv.style.width = pnode.scrollWidth + "px";
    pnode.appendChild(aDiv);
    return aDiv;
}

Gmr.Style.ClearWindowAlpha = function(alphaObj)
{
    /// <summary>消除由SetWindowAlpha方法设置的屏幕透明度</summary>
    /// <param name="alphaObj">由SetWindowAlpha方法返回的句柄对象</param>

    var obj = $(alphaObj);
    if (obj)
    {
        obj.parentNode.removeChild(obj);
    }
}
//#endregion

/*******************Gmr.Style样式类结束******************/

/*******************图层动画部分开始*********************/
/*模拟对话框*/
//#region
Gmr.MessageBox = new Object();
Gmr.MessageBox.OpenWindow = gmrOpenWindow = function(title, url, windowStyle, closeStyle, feature, closeFunction, showWindow)
{
    /// <summary>打开一个模拟窗口,内容为指定的URL</summary>
    /// <param name="url">要打开的页面URL</param>
    /// <param name="title">窗口标题</param>
    /// <param name="feature">窗口特征</param>
    /// <param name="showWindow">加载window对象</param>
    var divBox, tw = window.top, pw = showWindow ? showWindow : tw, dmt = pw.document, pnode = dmt.body, htmlNode = pnode.parentNode;
    if (Gmr.Navigator.Info.IsIE8 || Gmr.Navigator.Info.IsFireFox) { pnode = dmt.body.parentNode; }
    if (pw.iframeWindow) { divBox = window.iframeWindow; return; }
    else { divBox = dmt.createElement("div"); }
    if (windowStyle != null) { divBox.style.cssText = windowStyle; }
    divBox.className = "divOpenWindow";
    divBox.innerHTML = "<iframe  frameborder='0'  scrolling='no'   allowtransparency='true' ></iframe>";
    var divCaption = dmt.createElement("div"), spTitle = dmt.createElement("span"), divClose = dmt.createElement("div"), ifr = divBox.getElementsByTagName("iframe")[0];
    var objalpha = Gmr.Style.SetWindowAlpha(60, Gmr.Pub.GetFeature(feature, "alphacolor", "#000"), pw);
    var oldOverflowValue = Gmr.Style.GetRuntimeStyle(htmlNode, "overflow");
    htmlNode.style.overflow = "hidden";
    divCaption.className = "windowCaption";
    divClose.className = "windowClose";
    if (closeStyle != null) { divClose.style.cssText = closeStyle; }
    if (Gmr.Pub.GetFeature(feature, "hidecaption", "true") == "true") { divCaption.style.display = "none"; }
    ifr.style.cssText = "width:100%;border:none;height:100%;background-color:Transparent;";
    var closeImg = Gmr.Pub.GetFeature(feature, "closeimg", "");
    divClose.innerHTML = "<a href='javascript:void(0);' onclick='return  false;'  >" + (closeImg.length > 0 ? ("<img alt='关闭' title='关闭' src='" + closeImg + "' onload='Gmr.Style.Ie6Png.FixImg(this);' />") : "关闭") + "</a>";
    var resizeBox = function()//调整控件尺寸
    {
        var pageHeight = htmlNode.clientHeight, pageWidth = htmlNode.clientWidth;
        var hgt = Gmr.Pub.GetFeature(feature, "height", "auto"), wdh = Gmr.Pub.GetFeature(feature, "width", "auto");
        if (hgt == "auto")
        {
            ifr.style.height = Gmr.Style.GetBodyDocumentElement(ifr.contentWindow).scrollHeight + "px";
            var h = ifr.offsetHeight + divCaption.offsetHeight;
            h = h > pageHeight - 20 ? pageHeight - 20 : h;
            divBox.style.height = h + "px";
        }
        else if (hgt = "max")
        {
            divBox.style.height = htmlNode.clientHeight - 20 + "px";
        }
        if (wdh == "auto")
        {
            ifr.style.width = Gmr.Style.GetBodyDocumentElement(ifr.contentWindow).scrollWidth + "px";
            var w = ifr.offsetWidth;
            w = w > pageWidth - 20 ? pageWidth - 20 : w;
            divBox.style.width = w + "px";
        }
        else if (wdh == "max")
        {
            divBox.style.width = htmlNode.clientWidth - 20 + "px";
        }
        ifr.style.height = divBox.offsetHeight - divCaption.offsetHeight - 0 - 5 + "px";
        divBox.style.marginLeft = "50%";
        divBox.style.left = -1 * divBox.offsetWidth / 2 + "px";
        divBox.style.top = pageHeight / 2 - divBox.offsetHeight / 2 + htmlNode.scrollTop + "px";
    }
    if (!tw.CloseMessageBox) { tw.CloseMessageBox = new Array(); }
    var cmf = tw.CloseMessageBox;
    var closeIndex = cmf.length;
    divClose.onclick = cmf[closeIndex] = function()
    {
        //设置关闭方法
        SysRemoveEvent(ifr, "onload", resizeBox);
        divBox.getElementsByTagName("iframe")[0].src = "";
        pnode.removeChild(divBox);
        Gmr.Style.ClearWindowAlpha(objalpha);
        htmlNode.style.overflow = oldOverflowValue;
        var cmf = tw.CloseMessageBox;
        cmf[closeIndex] = null;
        for (var i = cmf.length - 1; i >= 0.; i--)
        {
            if (cmf[i] == null) { cmf.length = i; } else { break; }
        }
        if (closeFunction) { if (typeof (closeFunction) == "string") { eval(closeFunction); } else if (typeof (closeFunction) == "function") { closeFunction.call(null); } }
    }
    spTitle.innerHTML = title;
    ifr.setAttribute("frameborder", "0", 0);
    ifr.setAttribute("scrolling", Gmr.Pub.GetFeature(feature, "scrolling", "no"));
    SysAddEvent(ifr, "onload", resizeBox);
    divCaption.appendChild(spTitle);
    divBox.appendChild(divClose);
    divBox.appendChild(divCaption);
    pnode.appendChild(divBox);
    var src = Gmr.Pub.ParseAbsoluteUrl(url);
    if (src.indexOf("?") > 0) { src = src + "&gmrCloseMessageboxIndex=" + closeIndex; } else { src = src + "?gmrCloseMessageboxIndex=" + closeIndex; }
    ifr.setAttribute("src", src);

}
Gmr.MessageBox.CloseOpenWindow = window.gmrCloseOpenWindow = function(index)
{
    /// <summary>关闭由 Gmr.MessageBox.OpenWindow 即 gmrOpenWindow 打开的窗口</summary>
    /// <param name="index">要关闭的窗口索引</param>

    var closeIndex = index;
    if (!closeIndex) { closeIndex = parseInt(Gmr.Pub.GetUrlParam("gmrCloseMessageboxIndex")); }
    if (isNaN(closeIndex) ||(closeIndex == null)) { closeIndex = 0; } 
    var tw = window.top, cf = tw.CloseMessageBox;
    if (cf && cf.length > closeIndex) { cf[closeIndex](); } 
}
//#endregion
/*******************图层动画部分结束*********************/

/*******************Gmr.Ajax GmrAjax类开始***************/
//#region
Gmr.Ajax = new Object();
Gmr.Ajax.GetXmlHttpRequest = function()
{
    /// <summary>获取一个XmlHttpRequest对象,兼容各浏览器</summary>
    var name = false;
    try
    {
        name = new ActiveXObject("Msxml2.XMLHTTP");

    }
    catch (e)
    {
        try
        {
            name = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (e)
        {
            if (typeof XMLHttpRequest != 'undefined')
            {
                try
                {
                    name = new XMLHttpRequest();
                }
                catch (e)
                {
                    if (window.createRequest)
                    {
                        try
                        {
                            name = window.createRequest();
                        }
                        catch (e)
                        {
                            name = false;
                        }
                    }
                }
            }
        }
    }
    return name;
}

function GmrAjax()
{
    /// <summary>Ajax对象</summary>
    var newAjax = Gmr.Ajax.GetXmlHttpRequest();
    var requestUrl = "";
    var requestAsync = true;
    var userName = "";
    var userPassword = "";
    var contentType = "application/x-www-form-urlencoded";
    var returnCall = function()
    {
        /// <summary>回调函数</summary>

        //如果执行是状态正常，那么就把返回的内容赋值给上面指定的层
        if (newAjax.readyState == 4 && newAjax.status == 200)
        {
            //alert(3);
            readyFunction();
        }
    }
    var readyFunction = function()
    {
        /// <summary>默认加载完成处理函数</summary>

        window.alert(newAjax.responseText);
        newAjax.responseBody;
        newAjax.responseXML;
        newAjax.responseStream;
    }
    this.SetContentType = function(value)
    {
        /// <summary>设置针对Send()方法的Content-type值,执行该方法将返回设置之前的值</summary>
        /// <param name="value">要设置的值,默认为"application/x-www-form-urlencoded"</param>
        var oldType = contentType;
        if (value != null)
        {
            contentType = value;
        }
        return oldType;
    }
    this.SetCallFunction = function(callFunction)
    {
        /// <summary>设置回调函数</summary>
        returnCall = callFunction;
    }
    this.SetReadyFunction = function(readyCallFunction)
    {
        /// <summary>设置加载完成后的处理函数,如果调用了SetCallFunction()方法设置了新的回调函数,本方法将不会起做用</summary>
        /// <param name="readyCallFunction">加载完成后的处理函数</param>
        if (readyCallFunction != null)
        {
            readyFunction = readyCallFunction;
        }


    }

    this.Open = function(url, callFunction, isAsync)
    {
        /// <summary>AJAX对象的OPEN方法</summary>
        /// <param name="url">请求的URL地址</param>
        /// <param name="callFunction">回调函数,不指定本参数将采用默认回调函数</param>
        /// <param name="isYibu">是否采用异步模式,默认采用异步</param>

        if (typeof (url) == 'undefined')
        {
            return false;
        }
        requestUrl = url;
        if (typeof (callFunction) != 'undefined')
        {
            this.SetCallFunction(callFunction);
        }
        if (isAsync != null)
        {
            requestAsync = isAsync;
        }
    }
    this.Close = function()
    {
        /// <summary>取消发送</summary>
        newAjax.abort();
    }
    this.SetUser = function(username, userpassword)
    {
        /// <summary>设置用户名和密码,默认为空</summary>
        if (username != null)
        {
            userName = username;
            if (userpassword != null)
            {
                userPassword = userpassword;
            }
        }
    }
    this.Send = function(value)
    {
        /// <summary>发送</summary>

        if (typeof (requestUrl) == 'undefined')
        {
            return false;
        }
        if (typeof (returnCall) == 'undefined')
        {
            return false;
        }
        if (typeof (value) == 'undefined')
        {
            //使用Get方式进行请求
            if (typeof (userName) == 'undefined' || userName.length > 0)
            { newAjax.open("GET", requestUrl, requestAsync); }
            else
            {
                newAjax.open("GET", requestUrl, requestAsync, userName, userPassword);
                newAjax.onreadystatechange = returnCall; //设置执行状态回调处理函数句柄
                newAjax.send(null); //发送
            }
        }
        else
        { //使用POST方式进行请求
            //alert("ok");
            if (typeof (userName) == 'undefined' || userName.length > 0)
            { newAjax.open("POST", requestUrl, requestAsync); }
            else
            {
                newAjax.open("POST", requestUrl, requestAsync, userName, userPassword);
                newAjax.onreadystatechange = returnCall; //设置执行状态回调处理函数句柄
                newAjax.setRequestHeader("Content-Length", value.length);
                newAjax.setRequestHeader("Content-type", contentType);
                //newAjax.setRequestHeader("Content-type", "text/xml");
                newAjax.send(value); //发送

            }
        }
    }
    this.SendXml = function(value)
    {
        /// <summary>发送text/xml格式的数据</summary>
        /// <param name="value">要发送的数据</param>

        var conType = this.SetContentType("text/xml");
        this.Send(value);
        this.SetContentType(conType);
    }
    this.GetXmlHttpObject = function()
    {
        /// <summary>获取内部生成的XMLHttpRequest对象</summary>
        return newAjax;
    }
    this.GetResponseText = function()
    {
        /// <summary>获取客户端接收到的HTTP响应的文本内容</summary>    
        return newAjax.responseText;
    }
    this.GetResponseXML = function()
    {
        /// <summary>获取接收到完整的HTTP响应时(readyState为4)描述XML响应</summary>

        return newAjax.responseXML;
    }
    this.GetResponseBody = function()
    {
        /// <summary></summary>

        return newAjax.responseBody;
    }
    this.GetResponseStream = function()
    {
        return newAjax.responseStream;
    }
}
//#endregion
/*******************Gmr.Ajax GmrAjax类开始***************/

/*******************Gmr.XML XML相关类开始****************/
//#region
Gmr.XML = new Object();
Gmr.XML.LoadXmlFile = function(xmlFile)
{
    /// <summary>加载XML文件,返回XmlDom对象</summary>
    /// <param name="xmlFile">加载的xml文件URI</param>

    var xmlDoc;
    if (window.ActiveXObject)
    {
        xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
        xmlDoc.async = false;
        xmlDoc.load(xmlFile);
    }
    else if (document.implementation && document.implementation.createDocument)
    {
        xmlDoc = document.implementation.createDocument('', '', null);
        xmlDoc.async = false;
        xmlDoc.load(xmlFile); 
    }
    else
    {
        return null;
    }
    return xmlDoc;
}
Gmr.XML.LoadXmlString = function(xmlString)
{
    /// <summary>从xml格式字符串中加载XmlDom对象</summary>
    /// <param name="xmlString">XML格式字符串</param>
    var xmlDoc;
    if (window.ActiveXObject)
    {
        xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
        xmlDoc.async = false;
        xmlDoc.loadXML(xmlString);
    }
    else if (document.implementation && document.implementation.createDocument)
    {
        var oParser = new DOMParser();
        var xmlDoc = oParser.parseFromString(xmlString, "text/xml");
    }
    else
    {
        return null;
    }
    return xmlDoc;
}
/**
* Xml解析助手
*/
if (!Gmr.Navigator.Info.IsIE)
{
    try
    {
        XMLDocument.prototype.selectNodes = function(cXPathString, xNode)
        {
            if (!xNode) { xNode = this; }
            var oNSResolver = this.createNSResolver(this.documentElement)
            var aItems = this.evaluate(cXPathString, xNode, oNSResolver,
                   XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)
            var aResult = [];
            for (var i = 0; i < aItems.snapshotLength; i++)
            {
                aResult[i] = aItems.snapshotItem(i);
            }
            return aResult;
        }
        // prototying the Element
        Element.prototype.selectNodes = function(cXPathString)
        {
            if (this.ownerDocument.selectNodes)
            {
                return this.ownerDocument.selectNodes(cXPathString, this);
            }
            else { throw "For XML Elements Only"; }
        }

        // prototying the XMLDocument
        XMLDocument.prototype.selectSingleNode = function(cXPathString, xNode)
        {
            if (!xNode) { xNode = this; }
            var xItems = this.selectNodes(cXPathString, xNode);
            if (xItems.length > 0)
            {
                return xItems[0];
            }
            else
            {
                return null;
            }
        }
        // prototying the Element
        Element.prototype.selectSingleNode = function(cXPathString)
        {
            if (this.ownerDocument.selectSingleNode)
            {
                return this.ownerDocument.selectSingleNode(cXPathString, this);
            }
            else { throw "For XML Elements Only"; }
        }

        XMLDocument.prototype.transformNode = function(styleDocument)
        {
            var xslProc = new XSLTProcessor();
            xslProc.importStylesheet(styleDocument);
            //alert(styleDocument.xml);
            var mDoc = xslProc.transformToFragment(this, document);
            return mDoc.xml;
        }
        Element.prototype.transformNode = function(styleDocument)
        {
            var xslProc = new XSLTProcessor();
            xslProc.importStylesheet(styleDocument);
            //alert(styleDocument.xml);
            //var mDoc=xslProc.transformToDocument(xDoc);
            var mDoc = xslProc.transformToFragment(this, document);
            return mDoc.xml;
        }

        XMLDocument.prototype.__defineGetter__("xml", function()
        {
            var xmlStr;
            try
            {
                xmlStr = new XMLSerializer().serializeToString(this);
            }
            catch (ex)
            {
                var d = document.createElement(" div ");
                d.appendChild(this.cloneNode(true));
                xmlStr = d.innerHTML;
            }
            var re = / encoding=\"UTF-8\"/g
            xmlStr = xmlStr.replace(re, "");
            return xmlStr;
        });
        Element.prototype.__defineGetter__("xml", function()
        {
            var xmlStr;
            try
            {
                xmlStr = new XMLSerializer().serializeToString(this);
            }
            catch (ex)
            {
                var d = document.createElement(" div ");
                d.appendChild(this.cloneNode(true));
                xmlStr = d.innerHTML;
            }
            var re = / encoding=\"UTF-8\"/g
            xmlStr = xmlStr.replace(re, "");
            return xmlStr;
        });
        DocumentFragment.prototype.__defineGetter__("xml", function()
        {
            var xmlStr;
            try
            {
                xmlStr = new XMLSerializer().serializeToString(this);
            }
            catch (ex)
            {
                var d = document.createElement(" div ");
                d.appendChild(this.cloneNode(true));
                xmlStr = d.innerHTML;
            }
            var re = / encoding=\"UTF-8\"/g
            xmlStr = xmlStr.replace(re, "");
            return xmlStr;
        });

        XMLDocument.prototype.__defineGetter__("text", function()
        {
            return this.firstChild.textContent;
        });
        Element.prototype.__defineGetter__("text", function()
        {
            return this.textContent;
        });
    }
    catch (e) { }
}
//#endregion
/*******************Gmr.XML XML相关类结束****************/
/*******************Gmr.Validator验证控件相关开始********/
//#region
Gmr.Validator = new Object();
Gmr.Validator.GetValue = function(varControl)
{
    /// <summary>获取控件的值</summary>
    /// <param name="varControl">验证控件对象表达式</param>
    var control = $(varControl);
    if (typeof (control.value) == "string")
    {
        return control.value;
    }
    return Gmr.Validator.GetValueRecursive(control);
}
Gmr.Validator.ConvertAttribute = function(varControl, attributeName, defaultValue)
{
    var control = $(varControl);
    if (control.getAttribute(attributeName) != null)
    {
        eval("control." + attributeName + "=control.getAttribute('" + attributeName + "');");
    }
    else if (defaultValue != null)
    {
        eval("control." + attributeName + "=defaultValue ;");
    }
}
Gmr.Validator.SetMessage = GmrValSetMessage = function(varControl, isOk, message)
{
    /// <summary>设置验证控件消息及状态</summary>
    /// <param name="varControl">要设置的验证的控件</param>
    /// <param name="isOk">设置状态为True：通过验证，Fasle：未通过验证，null：未进行验证</param>
    /// <param name="message">消息文本</param>
    var control = $(varControl);
    with (control)
    {
        if (isOk)
        {
            className = classok;
            innerHTML = message;
        }
        else
        {
            className = classerror;
            innerHTML = message;
        }
        valIsOk = isOk;
    }
}
//递规获取控件的值

Gmr.Validator.GetValueRecursive = function(valControl)
{
    /// <summary>递规获取控件的值</summary>
    /// <param name="varControl">验证控件对象表达式</param>
    //#region  
    var control = $(valControl);
    if (typeof (control.value) == "string" && (control.type != "radio" || control.checked == true))
    {
        return control.value;
    }
    var i, val;
    for (i = 0; i < control.childNodes.length; i++)
    {
        val = Gmr.Validator.GetValueRecursive(control.childNodes[i]);
        if (val != "") return val;
    }
    return "";
    //#endregion

}


Gmr.Validator.RfvIsValid = function(val)
{
    /// <summary>检测指定必须输入值验证控件是否通过验证</summary>
    /// <param name="val">输入值验证控件对象表达式</param>
    //#region
    var val = $(val); //alert(val.initialvalue=="");
    val.valIsOk = (StrTrim(Gmr.Validator.GetValue(val.controltovalidate)) != StrTrim(val.initialvalue));
    return val.valIsOk;
    //#endregion
}

//检测指定正则表达式验证控件是否通过验证

Gmr.Validator.RevIsVaild = function(val)
{
    /// <summary>检测指定正则表达式验证控件是否通过验证</summary>
    /// <param name="val">验证控件对象表达式</param>
    //#region
    var value = Gmr.Validator.GetValue(val.controltovalidate);
    if (StrTrim(value).length == 0)
    {    
        if (val.isallowempty)
        {
            val.valIsOk = true;
        }
        else
        {

            val.valIsOk = false;
        }
        return val.valIsOk;
    }
    var rx = new RegExp(val.valexpression);
    var matches = rx.exec(value);
    val.valIsOk = (matches != null && value == matches[0]);
    return val.valIsOk;
    //#endregion
}

Gmr.Validator.RcpIsVaild = function(val)
{
    /// <summary>检测指定同值验证控件是否通过验证</summary>
    /// <param name="val">验证控件对象表达式</param>
    //#region
    var value = Gmr.Validator.GetValue(val.controltovalidate);
    var value2 = Gmr.Validator.GetValue(val.controltocompare);
    if (value == value2)
    {
        val.valIsOk = true;
    }
    else
    {
        val.valIsOk = false;
    }
    return val.valIsOk;
    //#endregion
}
Gmr.Validator.ValidateControl = function(vaildControl)
{
    /// <summary>验证指定的控件</summary>
    /// <param name="vaildControl">要验证的验证控件</param>
    var val = $(vaildControl);
    //val.valIsOk = false; //设置是否验证成功属性
    switch (val.getAttribute("valmode").toLowerCase())
    {
        case ("rfv"):
            Gmr.Validator.RfvIsValid(val);
            break;
        case ("rev"):
            Gmr.Validator.RevIsVaild(val);
            break;
        case ("rcp"):
            Gmr.Validator.RcpIsVaild(val);
            break;
    }
    var isOk = val.valIsOk;
    Gmr.Validator.SetMessage(val, isOk, isOk ? val.messageok : val.messageerror);
    if (isOk && val.valokscript)
    {
        eval(val.valokscript);
    }
}
//初始化控件 
//#region
Gmr.Validator.InitRfv = function(val)
{
    /// <summary>初始化一个输入验证控件</summary>
    /// <param name="val">验证控件对象表达式</param>
    //#region
    var control = $(val.controltovalidate);
    SysAddEvent(control, "onblur", function()
    {
        var isOk = Gmr.Validator.RfvIsValid(val);
        Gmr.Validator.SetMessage(val, isOk, isOk ? val.messageok : val.messageerror);
        if (isOk && val.valokscript)
        {
            eval(val.valokscript);
        }
    });
    SysAddEvent(control, "onfocus", function()
    {
        val.className = val.classfocus;
        val.innerHTML = val.messagefocus;
    });
    //#endregion
}

Gmr.Validator.InitRev = function(val)
{
    /// <summary>初始化一个正则表达式验证控件</summary>
    /// <param name="val">验证控件对象表达式</param>
    //#region
    var control = $(val.controltovalidate);
    if (val.getAttribute("isallowempty") == null || val.getAttribute("isallowempty").toLowerCase() == "false")
    {
        val.isallowempty = false;
    }
    else
    {
        val.isallowempty = true;
    }
    val.valexpression = val.getAttribute("valexpression");
    SysAddEvent(control, "onblur", function()
    {
        var isOk = Gmr.Validator.RevIsVaild(val);
        Gmr.Validator.SetMessage(val, isOk, isOk ? val.messageok : val.messageerror);
        if (isOk && val.valokscript)
        {
            eval(val.valokscript);
        }

    });
    SysAddEvent(control, "onfocus", function()
    {
        //alert(control.id);
        val.className = val.classfocus;
        val.innerHTML = val.messagefocus; 
    });
    //#endregion
}
Gmr.Validator.InitRcp = function(val)
{
    /// <summary>初始化一个等值验证控件</summary>
    /// <param name="val">验证控件对象表达式</param>
    //#region
    var control = $(val.controltovalidate);

    if (val.getAttribute("controltocompare") != null)
    {
        val.controltocompare = $(val.getAttribute("controltocompare"));
    }

    SysAddEvent(control, "onblur", function()
    {
        var isOk = Gmr.Validator.RcpIsVaild(val);
        Gmr.Validator.SetMessage(val, isOk, isOk ? val.messageok : val.messageerror);
        if (isOk && val.valokscript)
        {
            eval(val.valokscript);
        }
    });
    SysAddEvent(control, "onfocus", function()
    {
        //alert(control.id);
        val.className = val.classfocus;
        val.innerHTML = val.messagefocus;
    });
    //#endregion
}
//#endregion
Gmr.Validator.Init = function()
{
    /// <summary>初始化验证控件</summary>    
    //#region
    var vals = $A(document.body, "span", "isval");
    for (var i = 0; i < vals.length; i++)
    {
        var val = vals[i];
        if (val.getAttribute("classerror") == null) { val.classerror = "valMessageError"; } else { val.classerror = val.getAttribute("classerror"); }
        if (val.getAttribute("classok") == null) { val.classok = "valMessageOk"; } else { val.classok = val.getAttribute("classok"); }
        if (val.getAttribute("classfocus") == null) { val.classfocus = "valMessageFocus"; } else { val.classfocus = val.getAttribute("classfocus"); }
        if (val.getAttribute("messageok") == null) { val.messageok = ""; } else { val.messageok = val.getAttribute("messageok"); }
        if (val.getAttribute("messageerror") == null) { val.messageerror = ""; } else { val.messageerror = val.getAttribute("messageerror"); }
        if (val.getAttribute("messagefocus") == null) { val.messagefocus = ""; } else { val.messagefocus = val.getAttribute("messagefocus"); }
        if (val.getAttribute("initialvalue") == null) { val.initialvalue = ""; } else { val.initialvalue = val.getAttribute("initialvalue"); }
        if (val.getAttribute("controltovalidate") != null) { val.controltovalidate = $(val.getAttribute("controltovalidate")); }
        if (val.getAttribute("valokscript") == null || val.getAttribute("valokscript").length == 0) { val.valokscript = null; } else { val.valokscript = val.getAttribute("valokscript"); }
        val.valIsOk = false; //设置是否验证成功属性
        switch (val.getAttribute("valmode").toLowerCase())
        {
            case ("rfv"):
                Gmr.Validator.InitRfv(val);
                break;
            case ("rev"):
                Gmr.Validator.InitRev(val);
                break;
            case ("rcp"):
                Gmr.Validator.InitRcp(val);
                break;
        }
    }
    var ipts = document.getElementsByTagName("input");
    for (var i = 0; i < ipts.length; i++)
    {
        var obj = ipts[i];
        if (obj && (obj.getAttribute("type") == "submit" || obj.getAttribute("type") == "image"))
        {
            var vGroup = obj.valgroup ? obj.valgroup : obj.getAttribute("valgroup");
            if (vGroup) { SysAddEvent(obj, "onclick", function() { return Gmr.Validator.ValidateControls(vGroup); }); }
        }
    }
    //#endregion 
}
Gmr.Validator.ValidateControls = function(groupname)
{
    /// <summary>验证指定组控件，通过验证返回True，反之返回False</summary>

    var sps = $A(document.body, "span", "valmode");
    for (var i = 0; i < sps.length; i++)
    {
        var spVal = sps[i];
        if ((groupname && groupname.length > 0 && (spVal.getAttribute("valgroup") == groupname)) || !groupname || (groupname.length==0))
        {
            if (!spVal.valIsOk) { Gmr.Validator.ValidateControl(spVal); }
        }
    }
    for (var i = 0; i < sps.length; i++)
    {
        var spVal = sps[i];
        if (!spVal.valIsOk)
        {
            return false;
        }
    }
    return true;
}
SysAddEvent(window, "onload", Gmr.Validator.Init);
//#endregion
/*******************Gmr.Validator验证控件相关结束********/
/*******************Gmr.Controls控件类开始***************/
//#region
Gmr.Controls = new Object();
Gmr.Controls.TextBoxSetRemark = TextBoxSetRemark = function(objOrId, remarkString, isAutoHide)
{
    /// <summary>设置文本框的提示内容信息</summary>
    /// <param name="objOrId">要设置的文本框对象为ID</param>
    /// <param name="remarkString">提示内容</param>
    /// <param name="isAutoHide">当获得焦点时是否自动隐藏,设为False时将会自动把文本设为选中状态;设为True时则会自动清空文本</param>
    var obj = $(objOrId);
    obj.value = remarkString;
    var oldColorr=Gmr.Style.GetRuntimeStyle(obj,"color")
    obj.setAttribute("oldFontColor", oldColorr);
    obj.style.color = "gray";
    if (isAutoHide)
    {
        SysAddEvent(obj, "onfocus", function() { if (obj.value == remarkString) obj.value = ''; obj.style.color = obj.getAttribute("oldFontColor"); });
    }
    else
    {
        SysAddEvent(obj, "onfocus", function() { obj.select(); });
    }
    SysAddEvent(obj, "onblur", function() { if (obj.value == '') { obj.value = remarkString; obj.style.color = "gray"; } });
}
//#endregion
/*******************Gmr.Controls控件类结束***************/
/*******************其他*********************************/
//Flash输出
//#region
if (typeof deconcept == "undefined") { var deconcept = new Object(); } if (typeof deconcept.util == "undefined") { deconcept.util = new Object(); } if (typeof deconcept.SWFObjectUtil == "undefined") { deconcept.SWFObjectUtil = new Object(); } deconcept.SWFObject = function(_1, id, w, h, _5, c, _7, _8, _9, _a) { if (!document.getElementById) { return; } this.DETECT_KEY = _a ? _a : "detectflash"; this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY); this.params = new Object(); this.variables = new Object(); this.attributes = new Array(); if (_1) { this.setAttribute("swf", _1); } if (id) { this.setAttribute("id", id); } if (w) { this.setAttribute("width", w); } if (h) { this.setAttribute("height", h); } if (_5) { this.setAttribute("version", new deconcept.PlayerVersion(_5.toString().split("."))); } this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion(); if (!window.opera && document.all && this.installedVer.major > 7) { deconcept.SWFObject.doPrepUnload = true; } if (c) { this.addParam("bgcolor", c); } var q = _7 ? _7 : "high"; this.addParam("quality", q); this.setAttribute("useExpressInstall", false); this.setAttribute("doExpressInstall", false); var _c = (_8) ? _8 : window.location; this.setAttribute("xiRedirectUrl", _c); this.setAttribute("redirectUrl", ""); if (_9) { this.setAttribute("redirectUrl", _9); } }; deconcept.SWFObject.prototype = { useExpressInstall: function(_d) { this.xiSWFPath = !_d ? "expressinstall.swf" : _d; this.setAttribute("useExpressInstall", true); }, setAttribute: function(_e, _f) { this.attributes[_e] = _f; }, getAttribute: function(_10) { return this.attributes[_10]; }, addParam: function(_11, _12) { this.params[_11] = _12; }, getParams: function() { return this.params; }, addVariable: function(_13, _14) { this.variables[_13] = _14; }, getVariable: function(_15) { return this.variables[_15]; }, getVariables: function() { return this.variables; }, getVariablePairs: function() { var _16 = new Array(); var key; var _18 = this.getVariables(); for (key in _18) { _16[_16.length] = key + "=" + _18[key]; } return _16; }, getSWFHTML: function() { var _19 = ""; if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); this.setAttribute("swf", this.xiSWFPath); } _19 = "<embed type=\"application/x-shockwave-flash\" src=\"" + this.getAttribute("swf") + "\" width=\"" + this.getAttribute("width") + "\" height=\"" + this.getAttribute("height") + "\" style=\"" + this.getAttribute("style") + "\""; _19 += " id=\"" + this.getAttribute("id") + "\" name=\"" + this.getAttribute("id") + "\" "; var _1a = this.getParams(); for (var key in _1a) { _19 += [key] + "=\"" + _1a[key] + "\" "; } var _1c = this.getVariablePairs().join("&"); if (_1c.length > 0) { _19 += "flashvars=\"" + _1c + "\""; } _19 += "/>"; } else { if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); this.setAttribute("swf", this.xiSWFPath); } _19 = "<object id=\"" + this.getAttribute("id") + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"" + this.getAttribute("width") + "\" height=\"" + this.getAttribute("height") + "\" style=\"" + this.getAttribute("style") + "\">"; _19 += "<param name=\"movie\" value=\"" + this.getAttribute("swf") + "\" />"; var _1d = this.getParams(); for (var key in _1d) { _19 += "<param name=\"" + key + "\" value=\"" + _1d[key] + "\" />"; } var _1f = this.getVariablePairs().join("&"); if (_1f.length > 0) { _19 += "<param name=\"flashvars\" value=\"" + _1f + "\" />"; } _19 += "</object>"; } return _19; }, write: function(_20) { if (this.getAttribute("useExpressInstall")) { var _21 = new deconcept.PlayerVersion([6, 0, 65]); if (this.installedVer.versionIsValid(_21) && !this.installedVer.versionIsValid(this.getAttribute("version"))) { this.setAttribute("doExpressInstall", true); this.addVariable("MMredirectURL", escape(this.getAttribute("xiRedirectUrl"))); document.title = document.title.slice(0, 47) + " - Flash Player Installation"; this.addVariable("MMdoctitle", document.title); } } if (this.skipDetect || this.getAttribute("doExpressInstall") || this.installedVer.versionIsValid(this.getAttribute("version"))) { var n = (typeof _20 == "string") ? document.getElementById(_20) : _20; n.innerHTML = this.getSWFHTML(); return true; } else { if (this.getAttribute("redirectUrl") != "") { document.location.replace(this.getAttribute("redirectUrl")); } } return false; } }; deconcept.SWFObjectUtil.getPlayerVersion = function() { var _23 = new deconcept.PlayerVersion([0, 0, 0]); if (navigator.plugins && navigator.mimeTypes.length) { var x = navigator.plugins["Shockwave Flash"]; if (x && x.description) { _23 = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".")); } } else { if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0) { var axo = 1; var _26 = 3; while (axo) { try { _26++; axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + _26); _23 = new deconcept.PlayerVersion([_26, 0, 0]); } catch (e) { axo = null; } } } else { try { var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); } catch (e) { try { var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); _23 = new deconcept.PlayerVersion([6, 0, 21]); axo.AllowScriptAccess = "always"; } catch (e) { if (_23.major == 6) { return _23; } } try { axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); } catch (e) { } } if (axo != null) { _23 = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(",")); } } } return _23; }; deconcept.PlayerVersion = function(_29) { this.major = _29[0] != null ? parseInt(_29[0]) : 0; this.minor = _29[1] != null ? parseInt(_29[1]) : 0; this.rev = _29[2] != null ? parseInt(_29[2]) : 0; }; deconcept.PlayerVersion.prototype.versionIsValid = function(fv) { if (this.major < fv.major) { return false; } if (this.major > fv.major) { return true; } if (this.minor < fv.minor) { return false; } if (this.minor > fv.minor) { return true; } if (this.rev < fv.rev) { return false; } return true; }; deconcept.util = { getRequestParameter: function(_2b) { var q = document.location.search || document.location.hash; if (_2b == null) { return q; } if (q) { var _2d = q.substring(1).split("&"); for (var i = 0; i < _2d.length; i++) { if (_2d[i].substring(0, _2d[i].indexOf("=")) == _2b) { return _2d[i].substring((_2d[i].indexOf("=") + 1)); } } } return ""; } }; deconcept.SWFObjectUtil.cleanupSWFs = function() { var _2f = document.getElementsByTagName("OBJECT"); for (var i = _2f.length - 1; i >= 0; i--) { _2f[i].style.display = "none"; for (var x in _2f[i]) { if (typeof _2f[i][x] == "function") { _2f[i][x] = function() { }; } } } }; if (deconcept.SWFObject.doPrepUnload) { if (!deconcept.unloadSet) { deconcept.SWFObjectUtil.prepUnload = function() { __flash_unloadHandler = function() { }; __flash_savedUnloadHandler = function() { }; window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs); }; window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload); deconcept.unloadSet = true; } } if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }; } var getQueryParamValue = deconcept.util.getRequestParameter; var FlashObject = deconcept.SWFObject; var SWFObject = deconcept.SWFObject;
Gmr.Pub.WriteFlash = WriteFlash = function(canvId, swfUrl, swfId, width, height, version, params)
{
    /// <summary>向指定容器输出Swf动画</summary>
    /// <param name="canvId">窗口ID</param>
    /// <param name="swfUrl">swf文件URL</param>
    /// <param name="width">宽度</param>
    /// <param name="height">高度</param>
    /// <param name="version">版本</param>
    /// <param name="swfId">生成的对象ID</param>
    /// <param name="params">要添加的参数,格式如下:"wmode:transparent;quality:high"</param>

    var sf = new SWFObject(swfUrl, swfId, width, height, version);
    if (params)
    {
        var ps = params.split(";");
        for (var i = 0; i < ps.length; i++)
        {
            var p = ps[i].split(":");
            sf.addParam(p[0], p[1]);
        }
    } 
    sf.write(canvId);
}
//#endregion
/*******************其他*********************************/
