<!--

function ctlEnterSubmit(theForm)
{
    var bIsIE = (document.all) ? true : false
    if (bIsIE && window.event.ctrlKey && window.event.keyCode == 13)
    {
        SubmitForm(theForm);
    }
}

function GoPage(theForm, strPage)
{
    document.all.page.value = strPage;
    SubmitForm(theForm);
    return false;
}

function DelRec(theForm, strID)
{
    if (strID.length == 0)
    {
        if (SetCheckBoxMainSta('recordIDAll','recordID').substr(0, 1) != '0')
        {
            if (ShowConfirm('确定删除选定的全部记录吗？'))
            {
                document.all.actMod.value = 'DEL';
                SubmitForm(theForm);
            }
            else
            {
                ShowMsg("您取消了操作。");
            }
        }
        else
        {
            ShowMsg("您未选择任何记录。");
        }
    }
    else
    {
        if (ShowConfirm('确定删除指定的记录吗？'))
        {
            document.getElementsByName("recordID")[document.getElementsByName("recordID").length - 1].value = strID
            document.all.actMod.value = 'DEL';
            SubmitForm(theForm);
        }
        else
        {
            ShowMsg("您取消了删除操作。");
        }
    }
    return false;
}

function SetValueInList(theForm, strFieldShowName, strPrompt, strDefaultValue, strID)
{
    if (strID.length == 0)
    {
        if (SetCheckBoxMainSta('recordIDAll','recordID').substr(0, 1) != '0')
        {
            var strValue = ShowPrompt(strPrompt, strDefaultValue);
            if (strValue != null)
            {
                if (strValue.replace(" ", "").length > 0)
                {
                    document.all.actMod.value = "SET_BATCH_VALUE";
                    document.all.setValue_FieldShowName.value = strFieldShowName;
                    document.all.setValue_FieldValue.value = strValue;
                    SubmitForm(theForm);
                }
                else
                {
                    ShowMsg("设置值的内容不得为空。");
                }
            }
            else
            {
                ShowMsg("您取消了操作。");
            }
        }
        else
        {
            ShowMsg("您未选择任何记录。");
        }
    }
    else
    {
        var strValue = ShowPrompt(strPrompt, strDefaultValue);
        if (strValue != null)
        {
            if (strValue.replace(" ", "").length > 0)
            {
                document.getElementsByName("recordID")[document.getElementsByName("recordID").length - 1].value = strID
                document.all.actMod.value = "SET_BATCH_VALUE";
                document.all.setValue_FieldShowName.value = strFieldShowName;
                document.all.setValue_FieldValue.value = strValue;
                SubmitForm(theForm);
            }
            else
            {
                ShowMsg("设置值的内容不得为空。");
            }
        }
        else
        {
            ShowMsg("您取消了操作。");
        }
    }
    return false;
}

function SetOrderBy(theForm, strOrderby, strDesc)
{
    document.all.sqlOrderBy.value = strOrderby;
    document.all.sqlDescAsc.value = strDesc;
    SubmitForm(theForm);
    return false;
}

function SubmitForm(theCheckForm)
{
    try
    {
        if(theCheckForm.onsubmit() != false)
            theCheckForm.submit();
    }
    catch(e)
    {
        theCheckForm.submit();
    }
}

function ExportFile(theCheckForm)
{
    if (document.all.ctrl_ExportFileType.options[document.all.ctrl_ExportFileType.selectedIndex].value != "")
        SubmitForm(theCheckForm);
    else
        ShowMsg("请选择导出文件的类型");

    document.all.ctrl_ExportFileType.selectedIndex = 0;
}

function DelFileCheck(theForm, strCtrlName, strDelFileName)
{
    if (ShowConfirm('确定删除该文件吗？\n\n' + strDelFileName))
    {
        document.all.actMod.value = 'DEL_File';
        document.all.delFileName.value = strDelFileName;
        document.all.ctrlName.value = strCtrlName;
        SubmitForm(theForm);
    }
    else
    {
        ShowMsg("您取消了删除操作。");
    }
    return false;
}

function SetMultiUpdateNum(txtCount, ctrlName, objSpan)
{
    var strOutPut = "";
    if (!/^[\d]+$/g.test(txtCount.value) || parseInt(txtCount.value) < 1 || parseInt(txtCount.value) > 99)
    {
        txtCount.value = txtCount.value.replace(/[^\d]/g, "");
        if (!/^[\d]+$/g.test(txtCount.value) || txtCount.value == "0")
            txtCount.value = "1";
        ShowMsg("请输入1至99的数字！");
    }
    else
    {
        var iCount = txtCount.value;
        var iLen = txtCount.value.length;
        for(i = 0; i < iCount; i++)
        {
            var strNum = FillZeroBeforeNum((i + 1).toString(), iCount);
            var strI = i.toString();

            if (strI == "0") { strI = ""; }

            strOutPut += "<tr><td nowrap>" + ShowTranslateWords('文件') + strNum + ".&nbsp;</td><td width='99%'><input type=\"file\" name=\"" + ctrlName + strI + "\" id=\"" + ctrlName + strI + "\" style=\"width:100%\" class=\"textBox\"></td></tr>";
        }
        strOutPut = "<table BORDER='0' CELLPADDING='0' CELLSPACING='0' width='100%'>" + strOutPut + "</table>";
        objSpan.innerHTML = strOutPut;
    }
}

function Text_FontFace(objSpan, strFace)
{
    if (strFace != "")
    {
        for (i = 0; i < document.getElementsByName(objSpan).length; i++)
        {
            document.getElementsByName(objSpan)[i].style.fontFamily = strFace;
            SetCookieSub("FypWeb", "fontFace", strFace, "1000");
        }
    }
}

function Text_Zoom(objSpan, strSize)
{
    if (strSize != "")
    {
        for (i = 0; i < document.getElementsByName(objSpan).length; i++)
        {
            document.getElementsByName(objSpan)[i].style.fontSize = strSize + "pt";
            SetCookieSub("FypWeb", "fontSize", strSize, "1000");
        }
    }
}

function Text_SetColor(objSpan, strColor)
{
    if (strColor != "")
    {
        for (i = 0; i < document.getElementsByName(objSpan).length; i++)
        {
            document.getElementsByName(objSpan)[i].style.color = strColor;
            SetCookieSub("FypWeb", "fontColor", strColor, "1000");
        }
    }
}

function ShowTranslateWords(strMsg)
{
    try
    {
        strMsg = TranslateWords(strMsg);
    }
    catch(e)
    { }

    return strMsg;
}

function ShowConfirm(strMsg)
{
    try
    {
        strMsg = TranslateWords(strMsg);
    }
    catch(e)
    { }

    return confirm(strMsg);
}

function ShowPrompt(strMsg, strDefault)
{
    try
    {
        strMsg = TranslateWords(strMsg);
        strDefault = TranslateWords(strDefault);
    }
    catch(e)
    { }

    return window.prompt(strMsg, strDefault);
}

function ShowMsg(strMsg)
{
    try
    {
        strMsg = TranslateWords(strMsg);
    }
    catch(e)
    { }

    alert(strMsg);
}

function GoUrl(strUrl, theMethod, defaultPage)
{
    if (/^-?[\d]+$/gim.test(strUrl))
    {
        if (window.history.length > 0)
        {
            window.history.go(strUrl);
        }
        else if (defaultPage != undefined)
        {
            window.location.replace(defaultPage);
        }
        else
        {
            window.location.replace(CurrentUrlPathFolder());
        }
    }
    else
    {
        if(theMethod == "reload")
        {
            window.location.reload();
        }
        else if (theMethod == "href")
        {
            window.location.href = strUrl;
        }
        else
        {
            window.location.replace(strUrl);
        }
    }
}

function PopWin(strUrl, strParam)
{
    window.open(strUrl, "", strParam);
}

function HoverPic(objPic, strPic)
{
    objPic.src = strPic;
}

function ImgFit(img, iW, iH)
{
    iRate = img.width /img.height;

    if (img.width > iW)
    {
        img.style.width = iW;
        img.style.height = iW / iRate;
    }
    if (img.height > iH)
    {
        img.style.height = iH;
        img.style.width = iH * iRate;
    }
    if (img.style.width > iW || img.style.height > iH)
    {
        ImgFit(img, iW, iH);
    }
}

function ImgZoom(img)
{
    var zoom = parseInt(img.style.zoom, 10) || 100;
    zoom += event.wheelDelta/12;
    if (zoom > 10 && zoom < 500) img.style.zoom = zoom + '%';
    return false;
}

function SetTRcolorOver(objTR, cssName, cssOnName, cssClick, cssClickOn)
{
    if (objTR.className == cssClick)
        objTR.className = cssClickOn;
    else if (objTR.className == cssName)
        objTR.className = cssOnName;
}

function SetTRcolorOut(objTR, cssName, cssOnName, cssClick, cssClickOn)
{
    if (objTR.className == cssClickOn)
        objTR.className = cssClick;
    else if (objTR.className == cssOnName)
        objTR.className = cssName;
}

function SetTRcolorClick(bExec, objTab, objTR, strCBMainName, strAllCBName, bMultiLine, iheaderNum, cssName, cssOnName, cssClick, cssClickOn)
{
    try
    {
        if (bExec)
        {
            if (!bMultiLine)
            {
                for (var i = 0; i < objTab.rows.length; i++)
                {
                    if (objTab.rows[i].className == cssClick && objTR.rowIndex != i)
                    {
                        objTab.rows[i].className = RegExpMatch("(<tr.*?)(onmouseover.*?')([^\s]*?)('[\s\S]*)", objTab.rows[i].outerHTML, "$3");

                        if (document.getElementsByName(strCBMainName).length > 0)
                        {
                            document.getElementsByName(strAllCBName)[i - iheaderNum].checked = false;
                        }
                    }
                }
            }

            if (objTR.className != cssClick && objTR.className != cssClickOn)
            {
                objTR.className = cssClick;
                if (document.getElementsByName(strCBMainName).length > 0) {document.getElementsByName(strAllCBName)[objTR.rowIndex - iheaderNum].checked = true;}
            }
            else
            {
                objTR.className = cssName;
                if (document.getElementsByName(strCBMainName).length > 0) {document.getElementsByName(strAllCBName)[objTR.rowIndex - iheaderNum].checked = false;}
            }

            if (document.getElementsByName(strCBMainName).length > 0) {SetCheckBoxMainSta(strCBMainName, strAllCBName);}
        }
    }
    catch(e)
    {
        alert(strAllCBName + "程序错误，请修改相应代码：" + e.description);
    }
}

function SetTabTrColor(objTab, strCBMainName, strAllCBName, iSelMode, iheaderNum, ifooterNum, cssA, cssAOn, cssB, cssBOn, cssClick, cssClickOn)
{
    var iTR = 1;
    var classNameNow = "";
    var classNameOnNow = "";

    for (var i = iheaderNum; i < objTab.rows.length - ifooterNum; i++)
    {
        var objTR = objTab.rows[i];
        {
            if (iTR % 2 == 1)
            {
                classNameNow = cssA;
                classNameOnNow = cssAOn;
            }
            else
            {
                classNameNow = cssB;
                classNameOnNow = cssBOn;
            }

            objTR.className = classNameNow;

            var strElementHtml = objTR.outerHTML;
            strElementHtml = strElementHtml.replace(/(onmouseover[\s]*=)/gim, "$1 ");
            strElementHtml = strElementHtml.replace(/(<tr[\s\S]*?)(>[\s\S]*?<\/tr>)/gim, "$1 $2");
            var strOldStr = "";

            if (/(onmouseover[\s]*=[\s]*)([ \t'"\b]+)([\s\S]*?)(\2)/gim.test(strElementHtml))
            {
                strOldStr = strElementHtml.replace(/([\s\S]*?onmouseover[\s]*=[\s]*)([ \t'"]+)(.*?)(\2+[\s\S]*)/gim, " $3");
            }
            objTR.onmouseover = " if (this.className == '" + cssClick + "') {this.className = '" + cssClickOn + "';} else if (this.className == '" + classNameNow + "') {this.className = '" + classNameOnNow + "';} " + strOldStr;

            if (/(onmouseout[\s]*=[\s]*)([ \t'"\b]+)([\s\S]*?)(\2)/gim.test(strElementHtml))
            {
                strOldStr = strElementHtml.replace(/([\s\S]*?onmouseout[\s]*=[\s]*)([ \t'"]+)(.*?)(\2+[\s\S]*)/gim, " $3");
            }
            objTR.onmouseout = " if (this.className == '" + cssClickOn + "') this.className = '" + cssClick + "'; else if (this.className == '" + classNameOnNow + "') this.className = '" + classNameNow + "'; " + strOldStr;

            if (iSelMode > 0)
            {
                var strClick = "";
                if (iSelMode != 2)
                {
                    strClick += "for (var i = 0; i < document.all." + objTab.id + ".rows.length; i++){if (document.all." + objTab.id + ".rows[i].className == '" + cssClick + "' && this.rowIndex != i) {document.all." + objTab.id + ".rows[i].className = '" + RegExpMatch("(<tr.*)(onmouseout.*')([^\s]*?)('[\s\S]*?>)", objTR.outerHTML, "$3") + "'; if (document.getElementsByName('" + strCBMainName + "').length > 0) {document.getElementsByName('" + strAllCBName + "')[i - " + iheaderNum.toString() + "].checked = false;}}}";
                }
                strClick += "if (this.className != '" + cssClick + "' && this.className != '" + cssClickOn + "'){this.className = '" + cssClick + "'; if (document.getElementsByName('" + strCBMainName + "').length > 0) {document.getElementsByName('" + strAllCBName + "')[" + (i - iheaderNum).toString() + "].checked = true;}}";
                strClick += "else{this.className = '" + classNameNow + "'; if (document.getElementsByName('" + strCBMainName + "').length > 0) {document.getElementsByName('" + strAllCBName + "')[" + (i - iheaderNum).toString() + "].checked = false;}}";
                strClick += "if (document.getElementsByName('" + strCBMainName + "').length > 0) {SetCheckBoxMainSta('" + strCBMainName + "', '" + strAllCBName + "');}";
                strClick = "try{" + strClick + "}catch(e){alert('" + strCBMainName + "未找到，请修改相应代码：' + e.description)}";
                if (/(onclick[\s]*=[\s]*)([ \t'"\b]+)([\s\S]*?)(\2)/gim.test(strElementHtml))
                {
                    strOldStr = strElementHtml.replace(/([\s\S]*?onclick[\s]*=[\s]*)([ \t'"]+)(.*?)(\2+[\s\S]*)/gim, " $3");
                }
                objTR.onclick = strClick + strOldStr;
            }

            iTR++;
        }
    }
}

function SetTabTrColorAll(bExec, objTab, objCBMain, iheaderNum, ifooterNum, cssA, cssB, cssClick)
{
    if (bExec)
    {
        var iTR = 1;
        var classNameNow = "";
        var isChecked = objCBMain.checked;
        for (var i = iheaderNum; i < objTab.rows.length - ifooterNum; i++)
        {
            var objTR = objTab.rows[i];
            if (iTR % 2 == 1)
            {
                classNameNow = cssA;
            }
            else
            {
                classNameNow = cssB;
            }

            if (isChecked)
                objTR.className = cssClick;
            else
                objTR.className = classNameNow;

            iTR++;
        }
    }
}

function SetAllCheckBoxSta(objCBMain, strAllCBName)
{
    var isChecked = objCBMain.checked;
    var allElements = document.getElementsByName(strAllCBName);
    for(i = 0; i < allElements.length; i++)
    {
        if (allElements[i].disabled != true)
            allElements[i].checked = isChecked;
    }
    for(i = 0; i < document.getElementsByName(objCBMain.name).length; i++)
    {
        document.getElementsByName(objCBMain.name)[i].checked = isChecked;
    }
    return isChecked;
}

function SetCheckBoxMainSta(strCBMainName, strAllCBName)
{
    var allElements = document.getElementsByName(strAllCBName);
    var isChecked = true;
    var iSel = 0;
    var iNoSel = 0;
    for(i = 0; i < allElements.length; i++)
    {
        if (!allElements[i].checked)
        {
            iNoSel++;
            isChecked = false;
        }
        else
        {
            iSel++;
        }
    }
    for(i = 0; i < document.getElementsByName(strCBMainName).length; i++)
    {
        document.getElementsByName(strCBMainName)[i].checked = isChecked;
    }
    return iSel.toString() + " " + iNoSel.toString();
}

function GetCtrlTextOrValue(ctrlName, strTextOrValue)
{
    var strText = "";
    try
    {
        var cType, i;
        var allElements = document.getElementsByName(ctrlName);
        for(i = 0; i < allElements.length; i++)
        {
            var ctrl = allElements[i];
            cType = ctrl.type;

            var strEnd = "";
            if (strText.length > 0)
            {
                strEnd = " ";
            }
            switch(cType.toLowerCase())
            {
                case "text" :
                case "password" :
                case "file" :
                case "hidden" :
                case "textarea" :
                case "button" :
                case "submit" :
                case "reset" :
                    strText += strEnd + ctrl.value;
                case "checkbox" :
                case "radio" :
                    if (ctrl.checked)
                        strText += strEnd + ctrl.value;
                    break;
                case "select-one" :
                    if (ctrl.selectedIndex >= 0)
                    {
                        if (strTextOrValue == "text")
                            strText += strEnd + ctrl.options[ctrl.selectedIndex].text;
                        else
                            strText += strEnd + ctrl.options[ctrl.selectedIndex].value;
                    }
                    break;
                case "select-multiple" :
                    var s;
                    for (s = 0; s < ctrl.options.length; s++)
                    {
                        if (ctrl.options[s].selected)
                        {
                            if (strTextOrValue == "text")
                                strText += " " + ctrl.options[s].text;
                            else
                                strText += " " + ctrl.options[s].value;
                        }
                    }
                    break;
            }
        }

        return strText;
    }
    catch(e)
    {
        alert(e.description);
    }
}

function ShowMedia(ctrlName, strShowType)
{
    var strText = "";
    var strShowMedia = "";
    try
    {
        var cType;
        var allElements = document.getElementsByName(ctrlName);
        for(i = 0; i < allElements.length; i++)
        {
            strText = "";
            var ctrl = allElements[i];
            cType = ctrl.type;

            switch(cType.toLowerCase())
            {
                case "text" :
                case "password" :
                case "file" :
                case "hidden" :
                case "textarea" :
                case "button" :
                case "submit" :
                case "reset" :
                    strText =ctrl.value;
                case "checkbox" :
                case "radio" :
                    if (ctrl.checked)
                        strText = ctrl.value;
                    break;
                case "select-one" :
                    strText = ctrl.options[ctrl.selectedIndex].text;
                    break;
                case "select-multiple" :
                    var s;
                    for (s = 0; s < ctrl.options.length; s++)
                    {
                        if (ctrl.options[s].selected)
                            strText += " " + ctrl.options[s].text;
                    }
                    break;
            }

            switch(strShowType)
            {
                case "link" :
                    strShowMedia += "<a href=\"" + strText + "\" target=\"_blank\">查看 [" + strText + "]</a>";
                    break;
                case "img" :
                    strShowMedia += "<a href=\"" + strText + "\" target=\"_blank\"><img src=\"" + strText + "\" onload=\"ImgFit(this, screen.width - 200, 10000)\" onmouseover=\"ImgFit(this, screen.width - 200, 10000)\" onmousewheel=\"return ImgZoom(this);\" oncontextmenu=\"this.style.zoom='100%';return(false);\" border=\"0\" onerror=\"this.style.display='none'\"></a>";
                    break;
                case "sound" :
                    strShowMedia += "<BGSOUND SRC=\"" + strText + "\" LOOP=INFINITE><EMBED SRC=\"" + strText + "\" AUTOSTART=TRUE HIDDEN=TRUE VOLUME=100 LOOP=TRUE>";
                    break;
                case "flash" :
                    strShowMedia += "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http:\/\/download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\"100%\" height=\"100%\">";
                    strShowMedia += "<param name=\"movie\" value=\"" + strText + "\" />";
                    strShowMedia += "<param name=\"quality\" value=\"high\" />";
                    strShowMedia += "<embed src=\"" + strText + "\" quality=\"high\" pluginspage=\"http:\/\/www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"32\" height=\"32\"></embed>";
                    strShowMedia += "</object>";
                    break;
                case "vedio" :
                    strShowMedia += "<object classid=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" id=\"FireAsp_MediaPlayer<%=iShowMedia%>\" name=\"FireAsp_MediaPlayer<%=iShowMedia%>\" width=\"450\" height=\"390\" STANDBY=\"正在加载 Loading Windows Media Player components...\" TYPE=\"application/x-oleobject\">";
                    strShowMedia += "<param name=\"Filename\" value=\"" + strText + "\" valuetype=\"ref\">";
                    strShowMedia += "<!--播放文件路径-->";
                    strShowMedia += "<param name=\"AudioStream\" value=\"-1\">";
                    strShowMedia += "<param name=\"AutoSize\" value=\"-1\">";
                    strShowMedia += "<!--是否自动调整播放大小-->";
                    strShowMedia += "<param name=\"AutoStart\" value=\"0\">";
                    strShowMedia += "<!--是否自动播放-->";
                    strShowMedia += "<param name=\"AnimationAtStart\" value=\"-1\">";
                    strShowMedia += "<param name=\"AllowScan\" value=\"-1\">";
                    strShowMedia += "<param name=\"AllowChangeDisplaySize\" value=\"-1\">";
                    strShowMedia += "<param name=\"AutoRewind\" value=\"0\">";
                    strShowMedia += "<param name=\"Balance\" value=\"0\">";
                    strShowMedia += "<!--左右声道平衡,最左-9640,最右9640-->";
                    strShowMedia += "<param name=\"BaseURL\">";
                    strShowMedia += "<param name=\"BufferingTime\" value=\"15\">";
                    strShowMedia += "<!--缓冲时间-->";
                    strShowMedia += "<param name=\"CaptioningID\">";
                    strShowMedia += "<param name=\"ClickToPlay\" value=\"-1\">";
                    strShowMedia += "<param name=\"CursorType\" value=\"0\">";
                    strShowMedia += "<param name=\"CurrentPosition\" value=\"0\">";
                    strShowMedia += "<!--当前播放进度 -1 表示不变,0表示开头 单位是秒,比如10表示从第10秒处开始播放,值必须是-1.0或大于等于0-->";
                    strShowMedia += "<param name=\"CurrentMarker\" value=\"0\">";
                    strShowMedia += "<param name=\"DefaultFrame\">";
                    strShowMedia += "<param name=\"DisplayBackColor\" value=\"0\">";
                    strShowMedia += "<param name=\"DisplayForeColor\" value=\"16777215\">";
                    strShowMedia += "<param name=\"DisplayMode\" value=\"0\">";
                    strShowMedia += "<param name=\"DisplaySize\" value=\"0\">";
                    strShowMedia += "<!--视频1-50%, 0-100%, 2-200%,3-全屏 其它的值作0处理,小数则采用四舍五入然后按前的处理-->";
                    strShowMedia += "<param name=\"Enabled\" value=\"-1\">";
                    strShowMedia += "<param name=\"EnableContextMenu\" value=\"-1\">";
                    strShowMedia += "<!-是否用右键弹出菜单控制-->";
                    strShowMedia += "<param name=\"EnablePositionControls\" value=\"-1\">";
                    strShowMedia += "<param name=\"EnableFullScreenControls\" value=\"-1\">";
                    strShowMedia += "<param name=\"EnableTracker\" value=\"-1\">";
                    strShowMedia += "<!--是否允许拉动播放进度条到任意地方播放-->";
                    strShowMedia += "<param name=\"InvokeURLs\" value=\"-1\">";
                    strShowMedia += "<param name=\"Language\" value=\"-1\">";
                    strShowMedia += "<param name=\"Mute\" value=\"0\">";
                    strShowMedia += "<!--是否静音-->";
                    strShowMedia += "<param name=\"PlayCount\" value=\"10\">";
                    strShowMedia += "<!--重复播放次数,0为始终重复-->";
                    strShowMedia += "<param name=\"PreviewMode\" value=\"-1\">";
                    strShowMedia += "<param name=\"Rate\" value=\"1\">";
                    strShowMedia += "<!--播放速度1.0-2.0倍的速度播放-->";
                    strShowMedia += "<param name=\"SAMILang\">";
                    strShowMedia += "<param name=\"SAMIStyle\">";
                    strShowMedia += "<param name=\"SAMIFileName\">";
                    strShowMedia += "<!--选择同时播放(伴音)的歌曲-->";
                    strShowMedia += "<param name=\"SelectionStart\" value=\"-1\">";
                    strShowMedia += "<param name=\"SelectionEnd\" value=\"-1\">";
                    strShowMedia += "<param name=\"SendOpenStateChangeEvents\" value=\"-1\">";
                    strShowMedia += "<param name=\"SendWarningEvents\" value=\"-1\">";
                    strShowMedia += "<param name=\"SendErrorEvents\" value=\"-1\">";
                    strShowMedia += "<param name=\"SendKeyboardEvents\" value=\"0\">";
                    strShowMedia += "<param name=\"SendMouseClickEvents\" value=\"0\">";
                    strShowMedia += "<param name=\"SendMouseMoveEvents\" value=\"0\">";
                    strShowMedia += "<param name=\"SendPlayStateChangeEvents\" value=\"-1\">";
                    strShowMedia += "<param name=\"ShowCaptioning\" value=\"0\">";
                    strShowMedia += "<!--是否显示字幕,为一块黑色,下面会有一大块黑色,一般不显示-->";
                    strShowMedia += "<param name=\"ShowControls\" value=\"-1\">";
                    strShowMedia += "<!--是否显示控制,比如播放,停止,暂停-->";
                    strShowMedia += "<param name=\"ShowAudioControls\" value=\"-1\">";
                    strShowMedia += "<!--是否显示音量控制-->";
                    strShowMedia += "<param name=\"ShowDisplay\" value=\"0\">";
                    strShowMedia += "<!--显示节目信息,比如版权等-->";
                    strShowMedia += "<param name=\"ShowGotoBar\" value=\"0\">";
                    strShowMedia += "<!--一条框,在下面,有往下箭头-->";
                    strShowMedia += "<param name=\"ShowPositionControls\" value=\"-1\">";
                    strShowMedia += "<!--是否显示往前往后及列表,如果显示一般也都是灰色不可控制-->";
                    strShowMedia += "<param name=\"ShowStatusBar\" value=\"-1\">";
                    strShowMedia += "<!--当前播放信息,显示是否正在播放,及总播放时间和当前播放到的时间-->";
                    strShowMedia += "<param name=\"ShowTracker\" value=\"-1\">";
                    strShowMedia += "<!--是否显示当前播放跟踪条,即当前的播放进度条-->";
                    strShowMedia += "<param name=\"TransparentAtStart\" value=\"-1\">";
                    strShowMedia += "<param name=\"VideoBorderWidth\" value=\"0\">";
                    strShowMedia += "<!--显示部的宽部,如果小于视频宽,则最小为视频宽,或者加大到指定值,并自动加大高度.此改变只改变四周的黑框大小,不改变视频大小-->";
                    strShowMedia += "<param name=\"VideoBorderColor\" value=\"0\">";
                    strShowMedia += "<!--显示黑色框的颜色, 为RGB值,比如ffff00为黄色-->";
                    strShowMedia += "<param name=\"VideoBorder3D\" value=\"0\">";
                    strShowMedia += "<param name=\"Volume\" value=\"0\">";
                    strShowMedia += "<!--音量大小,负值表示是当前音量的减值,值自动会取绝对值,最大为0,最小为-9640,最大0-->";
                    strShowMedia += "<param name=\"WindowlessVideo\" value=\"0\">";
                    strShowMedia += "<!--如果是0可以允许全屏,否则只能在窗口中查看-->";
                    strShowMedia += "</object>";
                    break;
            }
        }

        return strShowMedia;
    }
    catch(e)
    {
        alert(e.description);
    }
}

function BreakItUp(objForm, objCtrl)
{
    var FormLimit = (1024*100)/2-1;
    var TempVar = new String;
    TempVar = objCtrl.value;
    if (TempVar.length > FormLimit)
    {
        objCtrl.value = TempVar.substr(0, FormLimit) ;
        TempVar = TempVar.substr(FormLimit) ;
        while (TempVar.length > 0)
        {
            var objTEXTAREA = document.createElement("TEXTAREA");
            objTEXTAREA.name = objCtrl.name;
            objTEXTAREA.value = TempVar.substr(0, FormLimit);
            objTEXTAREA.style.display = "none";
            objForm.appendChild(objTEXTAREA);

            TempVar = TempVar.substr(FormLimit);
        }
    }
}

var hkey_root, hkey_path, hkey_key
hkey_root="HKEY_CURRENT_USER";
hkey_path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";

function PrintPage()
{
    PageSetup_Null();
    window.print();
    PageSetup_Default();
}

function PageSetup_Null()
{
    try
    {
        var RegWsh = new ActiveXObject("WScript.Shell");
        hkey_key = "header";
        RegWsh.RegWrite(hkey_root+hkey_path+hkey_key, "");
        hkey_key = "footer";
        RegWsh.RegWrite(hkey_root+hkey_path+hkey_key, "");
    }
    catch(e){}
}

function PageSetup_Default()
{
    try{
        var RegWsh = new ActiveXObject("WScript.Shell");
        hkey_key="header";
        RegWsh.RegWrite(hkey_root+hkey_path+hkey_key, "&w&b页码，&p/&P");
        hkey_key="footer";
        RegWsh.RegWrite(hkey_root+hkey_path+hkey_key, "&u&b&d");
    }
    catch(e){}
}
-->