//切换菜单项，一项显示，期于全部隐藏
function TableSwitch(itemIndex, itemId, tdId)
{
    for (var i = 0; i < itemId.length; i++)
    {
        if (i == itemIndex)
        {
            itemId[i].style.display = "";
            tdId[i].className = "font_FFCC00";
        }
        else
        {
            itemId[i].style.display = "none";
            tdId[i].className = "fontFFFFFF";
        }
    }
}

function TableSwitch_666666(itemIndex, itemId, tdId)
{
    for (var i = 0; i < itemId.length; i++)
    {
        if (i == itemIndex)
        {
            itemId[i].style.display = "";
            tdId[i].className = "font_FFCC00";
        }
        else
        {
            itemId[i].style.display = "none";
            tdId[i].className = "font666666";
        }
    }
}

function TableSwitch_zhiye(itemIndex, itemId)
{
    for (var i = 0; i < itemId.length; i++)
    {
        if (i == itemIndex)
        {
            itemId[i].style.display = "";
        }
        else
        {
            itemId[i].style.display = "none";
        }
    }
}

//后台登录打开主窗口
function openSoftWare()
{
    window.open("logon_cn.jsp?act=H9_e7j1M0o-x4d5_LOGON", "idm", "height=" + (screen.height - 22) + ",width=" + (screen.width - 12) + ",scrollbars=no,status=no,scrolling=no,menubar=no,fullscreen=no,location=no,top=0,left=0,resizable=no, alwaysRaised=yes, z-look=yes");
}

function openWin(url)
{
    window.open(url, "tempCpWin", 'height=450,width=680,scrollbars=yes,status=no,scrolling=no,menubar=no,fullscreen=no,top=0,left=0,resizable=no');
}

function openMessage(url)
{
    window.open(url, "tempMessageWin", 'location=yes,alwaysRaised=yes,depended=yes,height=450,width=600,scrollbars=yes,status=no,scrolling=yes,menubar=no,fullscreen=no,resizable=no,top='+ (screen.height/2-225) + ',left=' + (screen.width/2-300));
}

//打印
function doReturn(url,winName)
{
    window.open(url, winName, 'height=600,width=800,scrollbars=yes,status=no,scrolling=yes,menubar=yes,top=0,left=0');    
}

//追踪
function doTrackWin(url,winName)
{
    window.open(url, winName, 'location=yes,height=600,width=990,scrollbars=yes,status=no,scrolling=yes,menubar=yes,top=' + (screen.height/2-300) + ',left=' + (screen.width/2-495));    
}

//FRAME URL
function doFrameUrl(url, frameName)
{
	frames[frameName].location = url;
}


//退出提示
function unLoadCheck()
{
    return "关闭后退出注销,为了帐户安全，请关闭所有相关页面。";
}

//窗口最大化
function maximize_window() {

    window.moveTo(-4, -4)
    window.resizeTo((screen.availWidth + 8), (screen.availHeight + 8))

    //this.WindowState = maximized;
    //this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
}

//数字金额转大写
function ChineseNumber(num)
{
    if (isNaN(num) || num > Math.pow(10, 12)) return ""
    var cn = "零壹贰叁肆伍陆柒捌玖"
    var unit = new Array("拾佰仟", "分角")
    var unit1 = new Array("万亿", "")
    var numArray = num.toString().split(".")
    var start = new Array(numArray[0].length - 1, 2)

    function toChinese(num, index)
    {
        var num = num.replace(/\d/g, function ($1)
        {
            return cn.charAt($1) + unit[index].charAt(start-- % 4 ? start % 4 : -1)
        })
        return num
    }

    for (var i = 0; i < numArray.length; i++)
    {
        var tmp = ""
        for (var j = 0; j * 4 < numArray[i].length; j++)
        {
            var strIndex = numArray[i].length - (j + 1) * 4
            var str = numArray[i].substring(strIndex, strIndex + 4)
            var start = i ? 2 : str.length - 1
            var tmp1 = toChinese(str, i)
            tmp1 = tmp1.replace(/(零.)+/g, "零").replace(/零+$/, "")
            tmp1 = tmp1.replace(/^壹拾/, "拾")
            tmp = (tmp1 + unit1[i].charAt(j - 1)) + tmp
        }
        numArray[i] = tmp
    }

    numArray[1] = numArray[1] ? numArray[1] : ""
    numArray[0] = numArray[0] ? numArray[0] + "圆" : numArray[0],numArray[1] = numArray[1].replace(/^零+/, "")
    numArray[1] = numArray[1].match(/分/) ? numArray[1] : numArray[1] + "整"
    return numArray[0] + numArray[1]
}

//选择/全选，全不选
//checkboxObj 单框组建名称（ID）
//allBox 控制框组建名称（ID）
function selectItem(checkboxObj, allBox)
{
    var tempRowID;
    this.tempRowID = document.getElementsByName("table_row_id");

    if (checkboxObj != null) {
        if (allBox.checked)
        {

            if (checkboxObj.length > 0) {
                for (var i = 0; i < checkboxObj.length; i++) {
                    checkboxObj[i].checked = true;
                    this.tempRowID[i].className = "table_row_id";
                }

            } else {
                checkboxObj.checked = true;
                this.tempRowID[0].className = "table_row_id";
            }

        } else {

            if (checkboxObj.length > 0) {
                for (var i = 0; i < checkboxObj.length; i++) {
                    checkboxObj[i].checked = false;
                    if (i % 2 == 0) {
                        this.tempRowID[i].className = "table_white";
                    }else{
                        this.tempRowID[i].className = "table_row_dual";
                    }
                }

            } else {
                checkboxObj.checked = false;
                this.tempRowID[0].className = "table_white";
            }

        }

    }
}


function selectItemNoh(checkboxObj, allBox)
{
    var tempRowID;
    this.tempRowID = document.getElementsByName("table_row_id");

    if (checkboxObj != null) {
        if (allBox.checked)
        {

            if (checkboxObj.length > 0) {
                for (var i = 0; i < checkboxObj.length; i++) {
                    checkboxObj[i].checked = true;
                    this.tempRowID[i].className = "table_row_id_noh";
                }

            } else {
                checkboxObj.checked = true;
                this.tempRowID[0].className = "table_row_id_noh";
            }

        } else {

            if (checkboxObj.length > 0) {
                for (var i = 0; i < checkboxObj.length; i++) {
                    checkboxObj[i].checked = false;
                    if (i % 2 == 0) {
                        this.tempRowID[i].className = "table_white_noh";
                    }else{
                        this.tempRowID[i].className = "table_row_dual_noh";
                    }
                }

            } else {
                checkboxObj.checked = false;
                this.tempRowID[0].className = "table_white_noh";
            }

        }

    }
}

//变色



//单个选择
//checkboxObj 多选框ID名（组建对象）
//num 
function selectCB(checkboxObj, num)
{
    var tempRowID;
    this.tempRowID = document.getElementsByName("table_row_id");

    if (checkboxObj.length > 0) {

        for (var i = 0; i < checkboxObj.length; i++) {

            if (i == num) {
                if (checkboxObj[i].checked)
                {
                    checkboxObj[i].checked = false;
                    if (i % 2 == 0) {
                        this.tempRowID[i].className = "table_white";
                    }else{
                        this.tempRowID[i].className = "table_row_dual";
                    }
                } else {
                    checkboxObj[i].checked = true;
                    this.tempRowID[i].className = "table_row_id";
                }
            }
        }
    } else {
        if (checkboxObj.checked)
        {
            checkboxObj.checked = false;

            this.tempRowID[0].className = "table_white";

        } else {
            checkboxObj.checked = true;
            this.tempRowID[0].className = "table_row_id";
        }

    }

}

function selectCBNoh(checkboxObj, num)
{
    var tempRowID;
    this.tempRowID = document.getElementsByName("table_row_id");

    if (checkboxObj.length > 0) {

        for (var i = 0; i < checkboxObj.length; i++) {

            if (i == num) {
                if (checkboxObj[i].checked)
                {
                    checkboxObj[i].checked = false;
                    if (i % 2 == 0) {
                        this.tempRowID[i].className = "table_white_noh";
                    }else{
                        this.tempRowID[i].className = "table_row_dual_noh";
                    }
                } else {
                    checkboxObj[i].checked = true;
                    this.tempRowID[i].className = "table_row_id_noh";
                }
            }
        }
    } else {
        if (checkboxObj.checked)
        {
            checkboxObj.checked = false;

            this.tempRowID[0].className = "table_white_noh";

        } else {
            checkboxObj.checked = true;
            this.tempRowID[0].className = "table_row_id_noh";
        }

    }

}



/*
 运单专用
*/

function selectCBNohCargo(checkboxObj, num)
{
//    var tempRowID;
//    this.tempRowID = document.getElementsByName("table_row_id");

    if (checkboxObj.length > 0) {

        for (var i = 0; i < checkboxObj.length; i++) {

            if (i == num) {
                if (checkboxObj[i].checked)
                {
                    checkboxObj[i].checked = false;
//                    if (i % 2 == 0) {
//                        this.tempRowID[i].className = "table_white_noh";
//                    }else{
//                        this.tempRowID[i].className = "table_row_dual_noh";
//                    }
                } else {
                    checkboxObj[i].checked = true;
//                    this.tempRowID[i].className = "table_row_id_noh";
                }
            }
        }
    } else {
        if (checkboxObj.checked)
        {
            checkboxObj.checked = false;

//            this.tempRowID[0].className = "table_white_noh";

        } else {
            checkboxObj.checked = true;
//            this.tempRowID[0].className = "table_row_id_noh";
        }

    }

}

function selectItemNohCargo(checkboxObj, allBox)
{
//    var tempRowID;
//    this.tempRowID = document.getElementsByName("table_row_id");

    if (checkboxObj != null) {
        if (allBox.checked)
        {

            if (checkboxObj.length > 0) {
                for (var i = 0; i < checkboxObj.length; i++) {
                    checkboxObj[i].checked = true;
//                    this.tempRowID[i].className = "table_row_id_noh";
                }

            } else {
                checkboxObj.checked = true;
//                this.tempRowID[0].className = "table_row_id_noh";
            }

        } else {

            if (checkboxObj.length > 0) {
                for (var i = 0; i < checkboxObj.length; i++) {
                    checkboxObj[i].checked = false;
//                    if (i % 2 == 0) {
//                        this.tempRowID[i].className = "table_white_noh";
//                    }else{
//                        this.tempRowID[i].className = "table_row_dual_noh";
//                    }
                }

            } else {
                checkboxObj.checked = false;
//                this.tempRowID[0].className = "table_white_noh";
            }

        }

    }
}

/*
编辑和浏览切换，运单应用（单个）
**/

function viewToEdit(checkBoxObj, tableView, tableEdit, num){
    if(checkBoxObj.length>0){
        if(checkBoxObj[num].checked == true){
            tableEdit[num].style.display = '';
            tableView[num].style.display = 'none';  
        }else{
            tableEdit[num].style.display = 'none';
            tableView[num].style.display = '';  
        }
    }else{
        if(checkBoxObj.checked == true){
            tableEdit.style.display = '';
            tableView.style.display = 'none';
        }else{
            tableEdit.style.display = 'none';
            tableView.style.display = '';      
        }
    }
}

/*
编辑和浏览切换，运单应用（多个）
**/

function viewToEditAll(checkBoxObj, tableView, tableEdit){
    if(checkBoxObj.length>0){
        for(var i=0;i<checkBoxObj.length;i++){
            if(checkBoxObj[i].checked == true){
                tableEdit[i].style.display = '';
                tableView[i].style.display = 'none';
            }else{
                tableEdit[i].style.display = 'none';
                tableView[i].style.display = '';
            }
        }

    }else{
        if(checkBoxObj.checked == true){
            tableEdit.style.display = '';
            tableView.style.display = 'none';
        }else{
            tableEdit.style.display = 'none';
            tableView.style.display = '';
        }
    }
}





//search(隐藏和显示)
var eAction = 1;
function SearchMenu(obj1, obj2)
{
    if (eAction == 1)
    {
        obj1.src = "../images/globalStyle/01-.gif";
        obj1.title = "隐藏";
        obj2.style.display = "block";
        eAction = 0;
    }
    else
    {
        obj1.src = "../images/globalStyle/01+.gif";
        obj1.title = "显示";
        obj2.style.display = "none";
        eAction = 1;
    }
}
//list(隐藏和显示)
var elAction = 0;
function SearchList(obj1, obj2)
{
    if (elAction == 0)
    {
        obj1.src = "../images/globalStyle/02+.jpg";
        obj1.title = "显示";
        obj2.style.display = "none";
        elAction = 1;
    }
    else
    {
        obj1.src = "../images/globalStyle/02-.jpg";
        obj1.title = "隐藏";
        obj2.style.display = "block";
        elAction = 0;
    }
}
//extend(隐藏和显示)
var eAction2 = 1;
function SearchMenu2(obj1, obj2)
{
    if (eAction2 == 1)
    {
        obj1.src = "../images/globalStyle/01-.gif";
        obj1.title = "隐藏";
        obj2.style.display = "block";
        eAction2 = 0;
    }
    else
    {
        obj1.src = "../images/globalStyle/01+.gif";
        obj1.title = "显示";
        obj2.style.display = "none";
        eAction2 = 1;
    }
}

//前台
function SearchMenuQB(obj1, obj2)
{
    obj1.style.display = "none";
    obj2.style.display = "block";
}
function SearchMenuQTN(obj1, obj2)
{
    obj1.style.display = "block";
    obj2.style.display = "none";
}


//详细/修改之间切换
function getDetailToEdit(obj1, obj2, num)
{
    if (num == 0) {
        obj1[0].style.filter = 'alpha(opacity=100)';
        obj2[0].style.display = 'block';

        obj1[1].style.filter = 'alpha(opacity=45)';
        obj2[1].style.display = 'none';

    } else {
        obj1[0].style.filter = 'alpha(opacity=45)';
        obj2[0].style.display = 'none';

        obj1[1].style.filter = 'alpha(opacity=100)';
        obj2[1].style.display = 'block';
    }


}


//简历复杂JS
function getIndExtend(obj1, obj2, num)
{
    for (var i = 0; i < obj1.length; i++) {

        if (num == i) {
            obj1[i].style.filter = 'alpha(opacity=100)';
            obj2[i].style.display = 'block';
        } else {
            obj1[i].style.filter = 'alpha(opacity=45)';
            obj2[i].style.display = 'none';
        }

    }

}


//返回上页（历史记录）
function getPrevious()
{
    window.history.back()
}

//删除确认
function doActionDel()
{
    return confirm("您正在删除一些信息，确认删除吗！");
}

//修改和删除及其他选择ID进行操作的项目使用 (限制FORM名：opeaForm)
function doForm(doUrl, doValue, deltxt)
{
    if (deltxt != null) {
        if (deltxt == 0) {
            var bn = confirm("该信息如果与其他信息关联，删除后可能会使其无法正常显示，继续执行吗！")
        } else if (deltxt == 1) {
            var bn = confirm("确认后，放入回收站！")
        } else if (deltxt == 2) {
            var bn = confirm("确认后，将从回收站取回数据！")
        } else if (deltxt == 3) {
            opeaForm.act.value = doValue;
            opeaForm.target = '_main';
            opeaForm.action = doUrl;
            opeaForm.submit();
        } else if (deltxt == 4) {
            opeaForm.act.value = doValue;
            opeaForm.target = '_blank';
            opeaForm.action = doUrl;
            opeaForm.submit();
            window.close();
        } else if (deltxt == 5) {       //备份专用
            opeaForm.act.value = doValue;
            opeaForm.target = '_main';
            opeaForm.action = doUrl;

            opeaForm.subButton.disabled = true;
            opeaForm.subButton.className = 'button_process';

            opeaForm.subButton2.disabled = true;
            opeaForm.subButton2.className = 'button_process';

            opeaForm.submit();
        } else if (deltxt == 6) {
            opeaForm.act.value = doValue;
            opeaForm.target = '_blank';
            opeaForm.action = doUrl;
            opeaForm.submit();
            //window.close();
        } else if (deltxt == 7) {
            opeaForm.act.value = doValue;
            opeaForm.target = '_main';
            opeaForm.action = doUrl;
            opeaForm.method = 'POST';
            opeaForm.submit();
        }
    }

    if (bn == true)
    {
        opeaForm.act.value = doValue;
        opeaForm.action = doUrl;
        opeaForm.submit();
    }

}


////修改和删除及其他选择ID进行操作的项目使用 (限制FORM名：opeaForm2)
function doForm_om2(doUrl, doValue, deltxt)
{
    if (deltxt != null) {
        if (deltxt == 0) {
            var bn = confirm("该信息如果与其他信息关联，删除后可能会使其无法正常显示，继续执行吗！")
        } else if (deltxt == 1) {
            var bn = confirm("确认后，放入回收站！")
        } else if (deltxt == 2) {
            var bn = confirm("确认后，将从回收站取回数据！")
        } else if (deltxt == 3) {
            opeaForm2.act.value = doValue;
            opeaForm2.target = '_main';
            opeaForm2.action = doUrl;
            opeaForm2.submit();
        } else if (deltxt == 4) {
            opeaForm2.act.value = doValue;
            opeaForm2.target = '_blank';
            opeaForm2.action = doUrl;
            opeaForm2.submit();
            window.close();
        } else if (deltxt == 5) {       //备份专用
            opeaForm2.act.value = doValue;
            opeaForm2.target = '_main';
            opeaForm2.action = doUrl;

            opeaForm2.subButton.disabled = true;
            opeaForm2.subButton.className = 'button_process';

            opeaForm2.subButton2.disabled = true;
            opeaForm2.subButton2.className = 'button_process';

            opeaForm2.submit();
        }
    }

    if (bn == true)
    {
        opeaForm2.act.value = doValue;
        opeaForm2.action = doUrl;
        opeaForm2.submit();
    }

}

//URL 直接调用 提示框
function urlClew(url, str)
{
    if(str == 0){
        var bn = confirm("该信息如果与其他信息关联，删除后可能会使其无法正常显示，继续执行吗！")
    }
    if(bn==true)location.href = url;
}



//只能选择一个的多选框
function selectCBtoOne(checkboxObj, num)
{

    for (var i = 0; i < checkboxObj.length; i++) {

        if (i == num) {
            checkboxObj[i].checked = true;
        } else {
            checkboxObj[i].checked = false;
        }

    }

}
//可以选择多个多选框
function selectCBtoMore(checkboxObj, num)
{
    if(checkboxObj.length > 1){
        if(checkboxObj[num].checked == false){
            checkboxObj[num].checked = true;
        }else{
            checkboxObj[num].checked = false;
        }
     } else {
        if(checkboxObj.checked == false){
            checkboxObj.checked = true;
        }else{
            checkboxObj.checked = false;
        }
    }

}



//金额输入方式
function getCompLb(obj1, obj2, num) {
    if (num == 0) {
        obj1[0].style.filter = 'alpha(opacity=100)';
        obj2[0].style.display = 'none';
        obj1[1].style.filter = 'alpha(opacity=45)';
        obj2[1].style.display = 'block';
        opeaForm.inCompUp.value = '0';
    } else {
        obj1[0].style.filter = 'alpha(opacity=45)';
        obj2[0].style.display = 'block';
        obj1[1].style.filter = 'alpha(opacity=100)';
        obj2[1].style.display = 'block';
    }

}

//表单输入框提示样式
function getFormClew(obj1, obj2, num)
{
    for (var i = 0; i < obj1.length; i++) {
        if (num == i) {
            obj1[i].style.display = 'none';
            obj2[i].style.display = 'block';
        } else {
            obj1[i].style.display = 'block';
            obj2[i].style.display = 'none';
        }

    }
}

//前台管理菜单
function menuAction(hidObj, currObj, menuObj, textObj, num, textNum)
{
    for (var i = 0; i < hidObj.length; i++) {
        if (num == i) {
            hidObj[i].style.display = 'none';
        } else {
            hidObj[i].style.display = '';
        }
    }

    for (var i = 0; i < currObj.length; i++) {
        if (num == i) {
            currObj[i].style.display = '';
        } else {
            currObj[i].style.display = 'none';
        }
    }

    for (var i = 0; i < menuObj.length; i++) {
        if (num == i) {
            menuObj[i].style.display = '';
        } else {
            menuObj[i].style.display = 'none';
        }
    }

    if (textNum != 999) {
        for (var i = 0; i < textObj.length; i++) {
            if (textNum == i) {
                textObj[i].className = 'font_FF9900';
            } else {
                textObj[i].className = 'fontFFFFFF';
            }
        }
    }


}


//关键字搜索的样式
function doOn(bgObj, inputObj)
{
    bgObj.background = '../images/2008-6/vip_member/search_on.jpg';
    inputObj.className = 'input_wukuang_90';

}
function doOut(bgObj, inputObj)
{
    if (inputObj.value == '')
    {
        bgObj.background = '../images/2008-6/vip_member/search.jpg';
        inputObj.className = 'input_wukuang_90_bg';
    } else {
        bgObj.background = '../images/2008-6/vip_member/search.jpg';
        inputObj.className = 'input_wukuang_90';
    }

}


//加载效验码
function loadimage() {
    document.getElementById("randImage").src = "../include/effImg.jsp?" + Math.random();
}

//收藏
//function bookmarkit() {
    //window.external.addFavorite('http://www.17916.cn', '一起就业咯');
//}

//去空格
String.prototype.Trim = function() {
    return this.replace(/\s/g, "");
}


/*
处理5公斤单位的计费重量
**/
function getFormatWeight(numValue, objView, objTotal)
{
    var tempValue;
    tempValue = 0;

    var numValueInt;
    numValueInt = 0;

    if(numValue != "" && numValue != "NaN" && numValue != null && numValue != "null"){

        numValueInt = parseInt(numValue);

        if(numValueInt % 5 == 0){
            objView.value = numValueInt;
            objTotal.value = numValueInt;
        }else{
            for(var i=1;i<5;i++){
                if((numValueInt+i) % 5 ==0){
                    objView.value = parseInt(numValueInt) + parseInt(i);
                    objTotal.value = parseInt(numValueInt) + parseInt(i);
                }
            }
        }

    }else{
        objView.value = 0;
        objTotal.value = 0;
    }
}

function readState(obj, num){
    if(obj.length>1){
        obj[num].src = "../images/globalStyle/it_state/old_msg.gif";
        obj[num].alt = "已读";
    }else{
        obj.src = "../images/globalStyle/it_state/old_msg.gif";
        obj.alt = "已读";
    }
}

    //读取声音文件
    function doSound(val){
        //alert(val);
        var sound = document.getElementById("soundOpen");
        if(val == 1){
            sound.outerHTML = "<EMBED id=\"soundOpen\" src=\"../common/sound/1.mp3\" autostart=\"true\" loop=\"0\" width=\"1\" height=\"1\"></EMBED>";
            //sound.play();
        }else if(val == 2){
            sound.outerHTML = "<EMBED id=\"soundOpen\" src=\"../common/sound/2.wav\" autostart=\"true\" loop=\"0\" width=\"1\" height=\"1\"></EMBED>";
            //sound.play();
        }else if(val == 3){
            sound.outerHTML = "<EMBED id=\"soundOpen\" src=\"../common/sound/3.wav\" autostart=\"true\" loop=\"0\" width=\"1\" height=\"1\"></EMBED>";
            //sound.play();
        }else if(val == 4){
            sound.outerHTML = "<EMBED id=\"soundOpen\" src=\"../common/sound/4.wav\" autostart=\"true\" loop=\"0\" width=\"1\" height=\"1\"></EMBED>";
            //sound.play();
        }else if(val == 5){
            sound.outerHTML = "<EMBED id=\"soundOpen\" src=\"../common/sound/5.wav\" autostart=\"true\" loop=\"0\" width=\"1\" height=\"1\"></EMBED>";
            //sound.play();
        }
    }

function createEmbed(){
    document.body.innerHTML += "<EMBED id=\"soundOpen\" src=\"\" autostart=\"true\" loop=\"0\" width=\"1\" height=\"1\"></EMBED>";
}


function reLoad()
{
	document.execCommand('Refresh');
	//window.parent.location.reload();
}


/*
* 处理 排序 的JS
* fieldNum 字段编号
* orderby  0 正排 1倒排
* objForm  提交的查询表单名称
* objImg   图片名称
* ImgNum   图片编号
* **/
function doOrderProcess(fieldNum, objForm)
{
    if(objForm.rqtOrderName.value == fieldNum){     //是否是当前字段

        //是 （是当前相同字段）
        if(objForm.rqtOrderBy.value == 0){   //当前排序方式是否为 正叙。
            //是
            objForm.rqtOrderName.value = fieldNum;
            objForm.rqtOrderBy.value = 1;
//            alert(objForm.rqtOrderBy.value);
        }else{
            //否
            objForm.rqtOrderName.value = fieldNum;
            objForm.rqtOrderBy.value = 0;
//            alert(objForm.rqtOrderBy.value);
        }
        objForm.submit();
    }else{
        //否 （不是当前字段）
        objForm.rqtOrderName.value = fieldNum;
        objForm.rqtOrderBy.value = 0;


//        alert(objForm.rqtOrderName.value);
//        alert(objForm.rqtOrderBy.value);

        objForm.submit();

    }

    

}


/*
* 快速处理角色权限时，CHECK BOX 的JS
* **/
function doDisCheckBox(objModule, objRoleModule, objSelect, num){

//    alert(objModule);
//    alert(objModule[num].checked);
//    alert(objRoleModule);
//    alert(objSelect);
//    alert(num);

    var rmNum;
    rmNum = num * 5;

//    alert(rmNum);

    if(objModule[num].checked == true){

        for(var i=rmNum; i<rmNum+5; i++){
            if(rmNum == i){
                objRoleModule[i].checked = true;      //在模块有效时，必须有只读权限。  
            }
            objRoleModule[i].disabled = false;      //权限有效
        }
        objSelect[num].disabled = false;    //下拉框有效

    }else{

        for(var i=rmNum; i<rmNum+5; i++){
            objRoleModule[i].disabled = true;      //权限无效
        }
        objSelect[num].disabled = true;    //下拉框无效    

    }

}

/**
 * 快速处理 角色权限， 给只读权限使用的 JS
 * */
function doDisModule(objModule, objRoleModule, objSelect, num){

    var rmNum;
    rmNum = num * 5;

    if(objRoleModule[rmNum].checked == false){

        objModule[num].checked = false      //模块去勾
        objSelect[num].disabled = true;    //下拉框无效

        for(var i=rmNum; i<rmNum+5;i++){
            objRoleModule[i].disabled = true;      //权限无效
        }
    }


}

