//全局变量

onecount = 3;   //顶部导行个数
twocount = 6;  //左侧大栏目个数
leftlicount = 12;  //左侧小栏目个数
onename = "one";  //左侧大栏目名称
leftliname = "icon"; //左侧小栏目名称
twoname = "ul"; //左侧小栏目块名称

function CheckMenu(thisname, leftname) {
    var sname = "TopLink";

    //取消所有默认选择
    for (i = 1; i <= leftlicount; i++) {
        document.getElementById(leftliname + i).className = "";
    }
    //取消所有默认选择
    for (i = 1; i <= twocount; i++) {
        document.getElementById(twoname + i).style.display = "none";
    }

    for (i = 1; i <= 5; i++) {

        if (sname + i == thisname) {
            document.getElementById(sname + i).className = "TopLink1";
        } else {
            if (sname + i == "TopLink5") {
                document.getElementById(sname + i).className = "TopLink3";
            } else {
                document.getElementById(sname + i).className = "TopLink2";
            }
        }

    }

    if (thisname == "TopLink1") {
        document.getElementById("ul1").style.display = "";
        document.getElementById("icon1").className = "checkstyle";
    } else if (thisname == "TopLink2") {
        document.getElementById("ul3").style.display = "";
        document.getElementById("icon5").className = "checkstyle";
    } else if (thisname == "TopLink3") {
        document.getElementById("ul5").style.display = "";
        document.getElementById("icon9").className = "checkstyle";
    } else if (thisname == "TopLink4") {
        document.getElementById("ul4").style.display = "";
        document.getElementById("icon1").className = "checkstyle";
    } else if (thisname == "TopLink5") {
        document.getElementById("ul5").style.display = "";
        document.getElementById("icon1").className = "checkstyle";
    }


    TopClickleft(leftname);

}

function OnOver(thisname) {
    if (document.getElementById(thisname).className == 'TopLink1') {
    } else {
        document.getElementById(thisname).className = "TopLink2_hover";
    }
}

function OnOut(thisname) {
    if (document.getElementById(thisname).className == 'TopLink1') {
    } else {
        document.getElementById(thisname).className = "TopLink2";
    }
}
function OnOver2(thisname) {
    if (document.getElementById(thisname).className == 'TopLink1') {
    } else {
        document.getElementById(thisname).className = "TopLink3_hover";
    }
}

function OnOut2(thisname) {
    if (document.getElementById(thisname).className == 'TopLink1') {
    } else {
        document.getElementById(thisname).className = "TopLink3";
    }
}

//隐藏左侧开始
function LeftmenuBotton() {
    if (document.getElementById("LeftmenuBotton").className == 'LeftmenuBotton' || document.getElementById("LeftmenuBotton").className == 'LeftmenuBotton2') {
        document.getElementById("LeftmenuBotton").className = "LeftmenuBotton3";
        //alert("ddd");
        //document.getElementById("topmenu").style.display="none";
        document.getElementById("leftmenu").style.display = "none";
        //document.getElementById("bottommenu").style.display="none";
    } else {
        document.getElementById("LeftmenuBotton").className = "LeftmenuBotton";
        //document.getElementById("topmenu").style.display="";
        document.getElementById("leftmenu").style.display = "";
        //document.getElementById("bottommenu").style.display="";
    }
}
function OverBotton() {
    if (document.getElementById("LeftmenuBotton").className == 'LeftmenuBotton') {
        document.getElementById("LeftmenuBotton").className = "LeftmenuBotton2";
    } else {
        document.getElementById("LeftmenuBotton").className = "LeftmenuBotton4";
    }
}
function OutBotton() {
    if (document.getElementById("LeftmenuBotton").className == 'LeftmenuBotton' || document.getElementById("LeftmenuBotton").className == 'LeftmenuBotton2') {
        document.getElementById("LeftmenuBotton").className = "LeftmenuBotton";
    } else {
        document.getElementById("LeftmenuBotton").className = "LeftmenuBotton3";
    }
}
//隐藏结速
//加载默认值
function load() {
    for (i = 1; i <= onecount; i++) {
        if (i == 1) {
            document.getElementById(onename + i).style.display = "";
        } else {
            document.getElementById(onename + i).style.display = "none";
        }
    }
    for (i = 1; i <= twocount; i++) {
        if (i == 1) {
            document.getElementById(twoname + i).style.display = "";
        } else {
            document.getElementById(twoname + i).style.display = "none";
        }
    }

}
//取消默认值
function TopClickleft(thisname) {
    for (i = 1; i <= onecount; i++) {
        if (onename + i == thisname) {

            document.getElementById(onename + i).style.display = "";
        } else {
            document.getElementById(onename + i).style.display = "none";
        }
    }
}

function leftliclick(thisname) {
    for (i = 1; i <= leftlicount; i++) {
        if (leftliname + i == thisname) {
            document.getElementById(leftliname + i).className = "checkstyle";
        } else {
            document.getElementById(leftliname + i).className = "";
        }
    }
}

function lefttwo(thisname, threename) {
    for (i = 1; i <= twocount; i++) {
        if (twoname + i == thisname) {
            document.getElementById(thisname).style.display = "";
        } else {
            document.getElementById(twoname + i).style.display = "none";
        }
    }
    for (i = 1; i <= leftlicount; i++) {
        if (leftliname + i == threename) {
            document.getElementById(leftliname + i).className = "checkstyle";
        } else {
            document.getElementById(leftliname + i).className = "";
        }
    }

}
//放到前台的类别选择窗口
function qtOpenEnProductCategoryTree() {
    var dialogArg = new Object();
    dialogArg.selectedCategoryName = "";
    dialogArg.selectedCategoryId = "";
    var dialogFeature = "dialogWidth=550px;dialogHeight=580px;status:off;scroll=no";

    var isSubmit = window.showModalDialog("/Common/EnProductCaegoryTree.htm", dialogArg, dialogFeature);
    //    alert(isSubmit);
    if (isSubmit) {
        if (document.getElementById("Category") != null)
            document.getElementById("Category").value = dialogArg.selectedCategoryName;
        if (document.getElementById("HidCategory") != null)
            document.getElementById("HidCategory").value = dialogArg.selectedCategoryName;
        if (document.getElementById("CategoryId") != null)
            document.getElementById("CategoryId").value = dialogArg.selectedCategoryId;

        if (document.getElementById("txtCategoryName") != null)
            document.getElementById("txtCategoryName").value = dialogArg.selectedCategoryName;
        if (document.getElementById("hidCategoryId") != null)
            document.getElementById("hidCategoryId").value = dialogArg.selectedCategoryId;
    }

}
//放到后台的类别选择窗口
function OpenEnProductCategoryTree() {
    var dialogArg = new Object();
    dialogArg.selectedCategoryName = "";
    dialogArg.selectedCategoryId = "";
    var dialogFeature = "dialogWidth=550px;dialogHeight=580px;status:off;scroll=no";

    var isSubmit = window.showModalDialog("/Common/EnProductCaegoryTree.htm", dialogArg, dialogFeature);
    //    alert(isSubmit);
    if (isSubmit) {
        if (document.getElementById("ctl00_ContentPlaceHolder1_Category") != null)
            document.getElementById("ctl00_ContentPlaceHolder1_Category").value = dialogArg.selectedCategoryName;
        if (document.getElementById("ctl00_ContentPlaceHolder1_HidCategory") != null)
            document.getElementById("ctl00_ContentPlaceHolder1_HidCategory").value = dialogArg.selectedCategoryName;
        if (document.getElementById("ctl00_ContentPlaceHolder1_CategoryId") != null)
            document.getElementById("ctl00_ContentPlaceHolder1_CategoryId").value = dialogArg.selectedCategoryId;

        if (document.getElementById("ctl00_ContentPlaceHolder1_txtCategoryName") != null)
            document.getElementById("ctl00_ContentPlaceHolder1_txtCategoryName").value = dialogArg.selectedCategoryName;
        if (document.getElementById("ctl00_ContentPlaceHolder1_hidCategoryId") != null)
            document.getElementById("ctl00_ContentPlaceHolder1_hidCategoryId").value = dialogArg.selectedCategoryId;
    }

}
//En后台选择区域
function OpenEnRegionBox1(AreaNameCId, AreaCId, HidAreaNameCId,HidAreaCodeId,HidZipCodeCId) {

    var dialogArg = new Object();
    dialogArg.selectedAreaName = "";
    dialogArg.selectedAreaId = "";
    dialogArg.selectedLayer = "";
    dialogArg.selectedAreaCode = "";
    dialogArg.selectedZipCode = "";
    
    var dialogFeature = "dialogWidth=400px;dialogHeight=400px;status:off;scroll=no";

    var isSubmit = window.showModalDialog("/Common/EnAreaSelect.htm", dialogArg, dialogFeature);

    if (isSubmit) {
        if (document.getElementById(AreaNameCId) != null) {
            document.getElementById(AreaNameCId).value = dialogArg.selectedAreaName;
        }
        if (document.getElementById(AreaCId) != null) {
            document.getElementById(AreaCId).value = dialogArg.selectedAreaId;
        }
        if (HidAreaNameCId != null && document.getElementById(HidAreaNameCId) != null) {
            document.getElementById(HidAreaNameCId).value = dialogArg.selectedAreaId;
        }
        if (HidAreaCodeId != null && document.getElementById(HidAreaCodeId) != null) {
            document.getElementById(HidAreaCodeId).value = dialogArg.selectedAreaCode;
        }
        if (HidZipCodeCId != null && document.getElementById(HidZipCodeCId) != null) {
            document.getElementById(HidZipCodeCId).value = dialogArg.selectedZipCode;
        }
    }
}


//En前台选择区域
function OpenEnRegionBox() {

    var dialogArg = new Object();
    dialogArg.selectedAreaName = "";
    dialogArg.selectedAreaId = "";
    dialogArg.selectedLayer = "";

    var dialogFeature = "dialogWidth=400px;dialogHeight=450px;status:off;scroll=no";

    var isSubmit = window.showModalDialog("/Common/EnAreaSelect.htm", dialogArg, dialogFeature);

    if (isSubmit) {
        document.getElementById("selAreaNameByBox").value = dialogArg.selectedAreaName;
        document.getElementById("hidSelAreaNameByBox").value = dialogArg.selectedAreaName;
        document.getElementById("selAreaIdByBOx").value = dialogArg.selectedAreaId;
    }
}


function OpenAreaTree() {
    window.showModalDialog("/Common/AreaTree.htm", window, "dialogWidth=500px;dialogHeight=610px;scroll=no;status=no");
}

function OpenProductCategoryTree() {
    window.showModalDialog("/Common/ProductCategoryTree.htm", window, "dialogWidth=500px;dialogHeight=610px;scroll=no;status=no");
}

//遮罩层高度设置
function boxAlpha() {
    //    var showBox = document.getElementById("showBox");
    //   // var bgalpaha = document.getElementById("alphaBox");
    //    var content = document.getElementById("content");
    //    //    if (showBox.style.display == "none") {
    //    //        showBox.style.display = "block";
    //    showBox.style.height = document.documentElement.scrollHeight;


    //    //bgalpaha.style.height = document.documentElement.scrollHeight + "px";
    //    //        if (document.body.scrollHeight < 600)
    //    //            bgalpaha.style.height = "610px";
    ////    if (navigator.appName == "Microsoft Internet Explorer")
    ////        bgalpaha.style.width = document.documentElement.scrollWidth + "px";
    ////    else
    ////        bgalpaha.style.width = document.documentElement.scrollWidth + "px";
    //    //    }
    //    //    else
    //    //        showBox.style.display = "none";
}


function keyword_Clicked(oTxtBox) {
    //oTxtBox.select();
    if (oTxtBox.value == "Enter keywords")
        oTxtBox.value = "";
}

function keyword_Blur(oTxtBox) {
    if (oTxtBox.value == "")
        oTxtBox.value = "Enter keywords";
}


// search
function search(module) {
    var stQuery = "";
    var seprator = '&';
    var keyword = "";
    if (module == "supply") {

        keyword = Trim(document.getElementById("EnSupply1_keyword").value);
        if (keyword != "" && keyword != "Enter keywords") {
            keyword = SqlFilter(keyword);
            stQuery += "keyword=" + escape(keyword) + seprator;
        }

        if (document.getElementById("selAreaIdByBox").value != "0" && document.getElementById("selAreaIdByBox").value != "") {
            stQuery += "region=" + document.getElementById("selAreaIdByBox").value + seprator;
        }

        if (document.getElementById('selSearchDate').value != "") {
            stQuery += "date=" + document.getElementById('selSearchDate').value;
        }

        if (stQuery.length > 0) {
            location.href = "/EN/Product/Supply/SupplyList.aspx?" + stQuery;
        } else {
            location.href = "/EN/Product/Supply/SupplyList.aspx";
        }
    } else if (module == "buy") {
        keyword = Trim(document.getElementById("EnBuyers1_keyword").value);
        if (keyword != "" && keyword != "Enter keywords") {
            keyword = SqlFilter(keyword);
            stQuery += "keyword=" + escape(keyword) + seprator;
        }

        if (document.getElementById("selAreaIdByBox").value != "0" && document.getElementById("selAreaIdByBox").value != "") {
            stQuery += "region=" + document.getElementById("selAreaIdByBox").value + seprator;
        }

        if (document.getElementById('selSearchDate').value != "") {
            stQuery += "date=" + document.getElementById('selSearchDate').value + seprator;
        }

        if (document.getElementById("selregion").value == "0") {
            url = "/EN/Product/Buy/BuyList.aspx";
        }
        else if (document.getElementById("selregion").value == "1")
            url = "/EN/Product/Buy/NewOrder.aspx";

        stQuery += "type=" + document.getElementById("selregion").value;
        if (stQuery.length > 0) {
            location.href = url + "?" + stQuery;
        } else {
            location.href = url;
        }
    } else if (module == "ent") {

        keyword = Trim(document.getElementById("EnEnterprise1_keyword").value);
        if (keyword != "" && keyword != "Enter keywords") {
            keyword = SqlFilter(keyword);
            stQuery += "keyword=" + escape(keyword) + seprator;
        }

        if (document.getElementById("selAreaIdByBox").value != "0" && document.getElementById("selAreaIdByBox").value != "") {
            stQuery += "region=" + document.getElementById("selAreaIdByBox").value + seprator;
        }

        if (document.getElementById('selSearchDate').value != "") {
            stQuery += "date=" + document.getElementById('selSearchDate').value + seprator;
        }

        if (stQuery.length > 0) {
            location.href = "/EN/Ent/Supply/SupplierList.aspx?" + stQuery;
        } else {
            location.href = "/EN/Ent/Supply/SupplierList.aspx";
        }
    } else if (module == "news") {

        keyword = document.getElementById("Keyword").value;
        if (keyword != "" && keyword != "Enter keywords") {
            keyword = SqlFilter(keyword);
            stQuery += "keyword=" + escape(document.getElementById("Keyword").value) + seprator;
        }
        if (stQuery.length > 0) {
            location.href = "/CN/Biz/BizList.aspx?" + stQuery;
        } else {
            location.href = "/CN/Biz/BizList.aspx";
        }
    } else if (module == "index") {
        keyword = Trim(document.getElementById("EnIndex1_keyword").value);

        if (keyword != "" && keyword != "Enter keywords") {
            keyword = SqlFilter(keyword);
            stQuery += "keyword=" + escape(keyword) + seprator;
        }


        //        if (document.getElementById("selAreaIdByBox").value != "0" && document.getElementById("selAreaIdByBox").value != "" && document.getElementById("selAreaIdByBox").value != "" && document.getElementById("selAreaNameByBox").value != "") {
        //            stQuery += "region=" + document.getElementById("selAreaIdByBox").value + "_" + document.getElementById("selAreaLayer").value + "_" + escape(document.getElementById("selAreaNameByBox").value) + seprator;
        //        }

        if (document.getElementById("selAreaIdByBox").value != "0" && document.getElementById("selAreaIdByBox").value != "") {
            stQuery += "region=" + document.getElementById("selAreaIdByBox").value + seprator;
        }


        if (document.getElementById('selSearchDate').value != "") {
            stQuery += "date=" + document.getElementById('selSearchDate').value + seprator;
        }

        type = document.getElementById("SelType").value;


        if (type == "supply") {
            if (stQuery.length > 0) {
                location.href = "/EN/Product/Supply/SupplyList.aspx?" + stQuery;
            } else {
                location.href = "/EN/Product/Supply/SupplyList.aspx";
            }
        } else if (type == "buy") {
            if (stQuery.length > 0) {
                location.href = "/EN/Product/Buy/BuyList.aspx?" + stQuery;
            } else {
                location.href = "/EN/Product/Buy/BuyList.aspx";
            }
        } else if (type == "enterprise") {


            if (stQuery.length > 0) {
                location.href = "/EN/Ent/Supply/SupplierList.aspx?" + stQuery;
            } else {
                location.href = "/EN/Ent/Supply/SupplierList.aspx";
            }
        } else if (type == "exposition") {
            if (stQuery.length > 0) {
                location.href = "/CN/Exp/Exposition/ExpInfo.aspx?" + stQuery;
            } else {
                location.href = "/CN/Exp/Exposition/ExpInfo.aspx";
            }
        } else if (type == "news") {
            if (stQuery.length > 0) {
                location.href = "/cn/Biz/BizList.aspx?" + stQuery;
            } else {
                location.href = "/cn/Biz/BizList.aspx";
            }
        }


    }
}

function SqlFilter(inputStr) {
    if (typeof (inputStr) != "string") {
        //判断是否是字符串类型
        return inputStr;
    }
    if (inputStr != '') {
        var tmpValue = inputStr;
        //以下搜索字符串中的特殊字符，如果存在，则替换成""
        while (tmpValue.indexOf(';') > -1) { tmpValue = tmpValue.replace(';', ''); }
        while (tmpValue.indexOf('<') > -1) { tmpValue = tmpValue.replace('<', ''); }
        while (tmpValue.indexOf('>') > -1) { tmpValue = tmpValue.replace('>', ''); }
        while (tmpValue.indexOf('--') > -1) { tmpValue = tmpValue.replace('--', ''); }
        while (tmpValue.indexOf(",") > -1) { tmpValue = tmpValue.replace(",", ""); }
        while (tmpValue.indexOf("'") > -1) { tmpValue = tmpValue.replace("'", ""); }
        while (tmpValue.indexOf("?") > -1) { tmpValue = tmpValue.replace("?", ""); }
        while (tmpValue.indexOf("!") > -1) { tmpValue = tmpValue.replace("!", ""); }
        while (tmpValue.indexOf("(") > -1) { tmpValue = tmpValue.replace("(", ""); }
        while (tmpValue.indexOf(")") > -1) { tmpValue = tmpValue.replace(")", ""); }
        while (tmpValue.indexOf("~") > -1) { tmpValue = tmpValue.replace("~", ""); }
        while (tmpValue.indexOf("#") > -1) { tmpValue = tmpValue.replace("#", ""); }
        while (tmpValue.indexOf("$") > -1) { tmpValue = tmpValue.replace("$", ""); }
        while (tmpValue.indexOf("%") > -1) { tmpValue = tmpValue.replace("%", ""); }
        while (tmpValue.indexOf("^") > -1) { tmpValue = tmpValue.replace("^", ""); }
        while (tmpValue.indexOf("&") > -1) { tmpValue = tmpValue.replace("&", ""); }
        while (tmpValue.indexOf("*") > -1) { tmpValue = tmpValue.replace("*", ""); }
        while (tmpValue.indexOf("|") > -1) { tmpValue = tmpValue.replace("|", ""); }
        while (tmpValue.indexOf(".") > -1) { tmpValue = tmpValue.replace(".", ""); }
        while (tmpValue.indexOf("-") > -1) { tmpValue = tmpValue.replace("-", ""); }
        while (tmpValue.indexOf("=") > -1) { tmpValue = tmpValue.replace("=", ""); }
        while (tmpValue.indexOf("+") > -1) { tmpValue = tmpValue.replace("+", ""); }
        return tmpValue; //重新显示更改后的变量
    }
    else {
        return inputStr;
    }
}
// 去掉字符串的头空格（左空格）
function LTrim(str) {
    var i;
    for (i = 0; i < str.length; i++) {
        if (str.charAt(i) != " ") break;
    }
    str = str.substring(i, str.length);
    return str;
}

// 去掉字符串的尾空格（右空格）
function RTrim(str) {
    var i;
    for (i = str.length - 1; i >= 0; i--) {
        if (str.charAt(i) != " ") break;
    }
    str = str.substring(0, i + 1);
    return str;
}

// 去掉字符串的头尾空格（左右空格）
function Trim(str) {
    return LTrim(RTrim(str));
}

function quickSearch(module, keyword) {
    var stQuery = "";
    if (module == "supply" && keyword != "") {

        location.href = "/Web/EN/Product/Supply/SupplyList.aspx?keyword=" + escape(keyword);

    } else if (module == "buy" && keyword != "") {
        location.href = "/Web/EN/Product/Buy/BuyList.aspx?keyword=" + escape(keyword);

    } else if (module == "ent" && keyword != "") {

        location.href = "/Web/EN/Ent/Supply/SupplierList.aspx?keyword=" + escape(keyword);

    } else if (module == "news" && keyword != "") {

        location.href = "/Web/EN/Biz/BizList.aspx?keyword=" + escape(keyword);

    }
}

function selDisplayRegion() {

    document.getElementById("hidSelAreaNameByBox").value = "";
    document.getElementById("selAreaIdByBox").value = "";

}


function OpenProductAds(Text) {
    var dialogArg = new Object();
    dialogArg.selectedText = "";
    dialogArg.Text = Text;
    var dialogFeature = "dialogWidth=800px;dialogHeight=650px;status:off;scroll=no";
    var isSubmit = window.showModalDialog("/Admin/AD/ProductAds.htm", dialogArg, dialogFeature);
    if (isSubmit) {
        if (document.getElementById(Text) != null)
            document.getElementById(Text).value = dialogArg.selectedText;
    }

}



function OpenEntProCategoryBox2(EntId, CurCategoryId, CategoryIDId, CategoryNameId, HidCategoryNameId) {
    var dialogArg = new Object();
    dialogArg.selectedCategoryName = "";
    dialogArg.selectedCategoryId = "";
    dialogArg.CurCategoryId = CurCategoryId;
    dialogArg.EntId = EntId;

    var dialogFeature = "dialogWidth=500px;dialogHeight=350px;status:off;scroll=no";

    var isSubmit = window.showModalDialog("/Common/ProvideProductCategoryTree.htm", dialogArg, dialogFeature);
    if (isSubmit) {
        if (document.getElementById(CategoryIDId) != null)
            document.getElementById(CategoryIDId).value = dialogArg.selectedCategoryId;
        if (document.getElementById(CategoryNameId) != null)
            document.getElementById(CategoryNameId).value = dialogArg.selectedCategoryName;
        if (document.getElementById(HidCategoryNameId) != null)
            document.getElementById(HidCategoryNameId).value = dialogArg.selectedCategoryName;
    }
}

function OpenEntProCategoryBox3(EntId, CurCategoryId, CategoryIDId, CategoryNameId, HidCategoryNameId) {

    var dialogArg = new Object();
    dialogArg.selectedCategoryName = "";
    dialogArg.selectedCategoryId = "";
    dialogArg.CurCategoryId = CurCategoryId;
    dialogArg.EntId = EntId;

    var dialogFeature = "dialogWidth=500px;dialogHeight=600px;status:off;scroll=no";

    var isSubmit = window.showModalDialog("/Common/DemandProductCategoryTree.htm", dialogArg, dialogFeature);
    if (isSubmit) {
        if (document.getElementById(CategoryIDId) != null)
            document.getElementById(CategoryIDId).value = dialogArg.selectedCategoryId;
        if (document.getElementById(CategoryNameId) != null)
            document.getElementById(CategoryNameId).value = dialogArg.selectedCategoryName;
        if (document.getElementById(HidCategoryNameId) != null)
            document.getElementById(HidCategoryNameId).value = dialogArg.selectedCategoryName;
    }
}
function OpenEntProCategoryBox4(EntId, CurCategoryId, CategoryIDId, CategoryNameId, HidCategoryNameId) {

    var dialogArg = new Object();
    dialogArg.selectedCategoryName = "";
    dialogArg.selectedCategoryId = "";
    dialogArg.CurCategoryId = CurCategoryId;
    dialogArg.EntId = EntId;

    var dialogFeature = "dialogWidth=500px;dialogHeight=600px;status:off;scroll=no";

    var isSubmit = window.showModalDialog("/Common/EnDemandProductCategoryTree.htm", dialogArg, dialogFeature);
    if (isSubmit) {
        if (document.getElementById(CategoryIDId) != null)
            document.getElementById(CategoryIDId).value = dialogArg.selectedCategoryId;
        if (document.getElementById(CategoryNameId) != null)
            document.getElementById(CategoryNameId).value = dialogArg.selectedCategoryName;
        if (document.getElementById(HidCategoryNameId) != null)
            document.getElementById(HidCategoryNameId).value = dialogArg.selectedCategoryName;
    }
}
