
function toLinkzhanghu() {
	window.location.href="accountInfor.do?method=showAccountInfo";
}

function toLinkzhanghu2() {
	window.location.href="consiqmentAddress.do?method=seachAddress";
}

function toLinkzhanghu3() {
	window.location.href="monthlybillSearch.do?method=search";
}

function toLinkshoucang() {
	window.location.href="myFavorite.do?method=show";
}

function toLinkdingdan() {
	window.location.href="orderSearch.do?method=doSearch";
}

function toLinkdingdan2() {
	window.location.href="rejectApplication.do?method=rejectApplicationSearch";
}

function toLinkdingdan3() {
	window.location.href="rejectStatus.do?method=searchRejectOrderStatus";
}

function toLinkjifen() {
	window.location.href="pointReseach.do?method=show";
}

function toLinkhuiyuan() {
	window.location.href="modifyPWD.do?method=modifyPWD";
}

function toLinkhuiyuan2() {
	window.location.href="myComment.do?method=searchMyComment";
}

function toLinkhuiyuan3() {
	window.location.href="merchandiseSearchResult.do?method=doDetail&isOnlySearchSignnedLimitedMer=true&firshIn=true";
}


function toLogin(){
    //				document.cookie = "URL=" + document.URL;
    window.location.href = "login.jsp";
}

function toLogout(){
    //window.navigate("logout.jsp?URL="+encodeURIComponent(document.URL));
    window.location.href = "logout.jsp";
    //				alert(encodeURIComponent(document.URL));
    //				window.navigate("boardlogin.do?method=loginout&URL="+encodeURIComponent(document.URL));
}

function doMerchandiseClass(classifyId, classTypeName){


    //var urlStr = encodeURI(encodeURI(classTypeName));
    //window.location.href = "searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=" + classifyId + "&className=" + urlStr;
    var urlAdd = null;
	switch(classifyId){
    case 4:
    	urlAdd="stationary-office-products";
    	break;
    case 6:
    	urlAdd="files-clear-folder";
    	break;
    case 9:
    	urlAdd="copy-paper-printer-toner-ink";
    	break;
    case 5:
    	urlAdd="computer-supplies-media";
    	break;
    case 7:
    	urlAdd="office-electronics-battery";
    	break;
    case 1:
    	urlAdd="tools-opp-tapes-work-supplies";
    	break;
    case 8:
    	urlAdd="home-cleaning-supplies-garbage-bags";
    	break;
    case 11:
    	urlAdd="food-drinks-tea-coffee";
    	break;
    case 12:
    	urlAdd="office-furnitures-storage";
    	break;
    case 13:
    	urlAdd="office-machines-equipment";
    	break;
    }
	window.location.href=urlCommon()+"category/"+urlAdd+"/index.html";
}
/**
*页头关键字搜索画面点击搜索时
*/
function findResultHead(){
 	//var urlStr=(encodeURI(encodeURI(document.getElementById("headKey").value));
 	var urlStr= encodeURI(encodeURI(removeSpecialWord("headKey")));
	if (isNull(urlStr)){
	  	//无关键字不用传参
	  	document.getElementById('headKeyForm').action = urlCommon()+"item/search-result.html";
	} else {
		//有关键字传参用于统计
		document.getElementById('headKeyForm').action = urlCommon()+"item/search-result?keyword="+urlStr;
	}
    document.getElementById('headKeyForm').submit();
    return true;
}

/***
 * 对 特殊字符进行重新编码
 * **/
/*function URLencode(sStr){
    return sStr.replace(/\&/g, '%26').replace(/\"/g,'%22').replace(/\'/g, '%27').replace(/\//g,'%2F').replace(/\#/g,'%23').replace(/\+/g,'%2B');
  }*/


function enterSubmitForPageHeadKeyWord(){
		var oEvent = window.event ? window.event:arguments[0];
		if(oEvent.keyCode ==13){
			findResultHead();
			return false;
		}
	}

/**
 *页头点击热门关键字链接时
 */
function doSearchHeadHotWord(id, word){
	var urlStr= encodeURI(encodeURI(word));
    document.getElementById("headHotKeyId").value = id;
    document.getElementById("headKey").value = word;
    document.getElementById("headKeyForm").action = urlCommon()+"item/search-result?keyword="+urlStr;
    document.getElementById("headKeyForm").submit();
}
/**
 *专卖店铺点击关键字链接时
 */
function doSearchInFranchised(classId, word){
	document.getElementById("classId").value = classId;
    document.getElementById("key1").value = word;
    document.getElementById("franchisedForm").action = urlCommon()+"item/search-result.html";
    document.getElementById("franchisedForm").submit();
}
function getClassOnDetail() {
	var bigClassIdDetail="";
	try{
	bigClassIdDetail = document.getElementById("bigClassIdDetail").value;
	if (isNull(bigClassIdDetail)) {
		return true;
	}
	 if (bigClassIdDetail == 4) {
                // 文具/事务用品
				 document.getElementById('wenjuimg').src = urlCommon()+'images/common/gNavi-01_rollover.png';
		         document.getElementById('wenjuimg').onmouseout=urlCommon()+"images/common/gNavi-01_rollover.png";
                
                return "class0";
            }
            else 
                if (bigClassIdDetail == 6) {
                    // 文件夹
                	 document.getElementById('fileimg').src = urlCommon()+'images/common/gNavi-02_rollover.png';
                     document.getElementById('fileimg').onmouseout=urlCommon()+"images/common/gNavi-02_rollover.png";
                    
                    return "class4";
                }
                else 
                    if (bigClassIdDetail == 9) {
                        // 耗材/OA用纸
                    	document.getElementById('oayongzhiimg').src = urlCommon()+'images/common/gNavi-03_rollover.png';
                        document.getElementById('oayongzhiimg').onmouseout=urlCommon()+"images/common/gNavi-03_rollover.png";
                        return "class6";
                    }
                    else 
                        if (bigClassIdDetail == 5) {
                            // PC用品
                        	document.getElementById('pcyongpingimg').src =urlCommon()+ 'images/common/gNavi-04_rollover.png';
                            document.getElementById('pcyongpingimg').onmouseout=urlCommon()+"images/common/gNavi-04_rollover.png";
                            return "class9";
                        }
                        else 
                            if (bigClassIdDetail == 7) {
                                // 办公家电
                            	document.getElementById('officedianqiimg').src = urlCommon()+'images/common/gNavi-05_rollover.png';
                                document.getElementById('officedianqiimg').onmouseout=urlCommon()+"images/common/gNavi-05_rollover.png";
                                return "class5";
                            }
                            else 
                                if (bigClassIdDetail == 1) {
                                    // 包装/作业用品
                                	document.getElementById('zuoyeyongpinimg').src = urlCommon()+'images/common/gNavi-06_rollover.png';
                                    document.getElementById('zuoyeyongpinimg').onmouseout=urlCommon()+"images/common/gNavi-06_rollover.png";
                                    return "class7";
                                }
                                else 
                                    if (bigClassIdDetail == 8) {
                                        // 生活用品
                                    	document.getElementById('shenghuozahuoimg').src = urlCommon()+'images/common/gNavi-07_rollover.png';
                                        document.getElementById('shenghuozahuoimg').onmouseout=urlCommon()+"images/common/gNavi-07_rollover.png";
                                        return "class1";
                                    }
                                    else 
                                        if (bigClassIdDetail == 11) {
                                            // 食品/饮料
                                        	document.getElementById('yinliaoimg').src = urlCommon()+'images/common/gNavi-08_rollover.png';
                                            document.getElementById('yinliaoimg').onmouseout=urlCommon()+"images/common/gNavi-08_rollover.png";
                                            return "class8";
                                        }
                                        else 
                                            if (bigClassIdDetail == 12) {
                                                // 家具/收纳
                                            	document.getElementById('jiajuimg').src = urlCommon()+'images/common/gNavi-09_rollover.png';
                                                document.getElementById('jiajuimg').onmouseout=urlCommon()+"images/common/gNavi-09_rollover.png";
                                                return "class11";
                                            }
                                            else 
                                                if (bigClassIdDetail == 13) {
                                                    // 办公电器
                                                	document.getElementById('yiliaoimg').src = urlCommon()+'images/common/gNavi-10_rollover.png';
                                                    document.getElementById('yiliaoimg').onmouseout=urlCommon()+"images/common/gNavi-10_rollover.png";
                                                    return "class12";
                                                }
                                               	}catch(e){
												// 错误情况直接不校验礼品
												return true;
												}
}

function getClassId1(){
	


    //先获取浏览器地址
    var url = window.top.location.toString();
    if(url.indexOf("stationary-office-products") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=4&"
    }else if(url.indexOf("files-clear-folder") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=6&";
    }else if(url.indexOf("copy-paper-printer-toner-ink") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=9&";
    }else if(url.indexOf("computer-supplies-media") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=5&";
    }else if(url.indexOf("office-electronics-battery") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=7&";
    }else if(url.indexOf("tools-opp-tapes-work-supplies") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=1&";
    }else if(url.indexOf("home-cleaning-supplies-garbage-bags") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=8&";
    }else if(url.indexOf("food-drinks-tea-coffee") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=11&";
    }else if(url.indexOf("office-furnitures-storage") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=12&";
    }else if(url.indexOf("office-machines-equipment") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=13&";
    }
    var index = url.indexOf("&classifyId=");
    
    var bigClassId = url.indexOf("&bigClassId");
    
    var gNaviNo = document.getElementById("gNaviNo").value;
    if (index == -1) {
        return null;
    }
    else 
        if (bigClassId == -1) {
            var queryString = url.substr(index + 1);

            if (queryString.indexOf("classifyId=4&") != -1) {
                // 文具/事务用品
                document.getElementById('colorBorder5px-1').style.borderBottomColor = '#006DBC';
                document.getElementById('topSearch-box').style.backgroundColor = '#006DBC';
                document.getElementById('wenjuimg').src = urlCommon()+'images/common/gNavi-01_rollover.png';
                document.getElementById('wenjuimg').onmouseout=urlCommon()+"images/common/gNavi-01_rollover.png";
                return "class0";
            }
            else 
                if (queryString.indexOf("classifyId=6&") != -1) {
                    // 文件夹
                    document.getElementById('colorBorder5px-1').style.borderBottomColor = '#9FC732';
                    document.getElementById('topSearch-box').style.backgroundColor = '#9FC732';
                    document.getElementById('fileimg').src = urlCommon()+'images/common/gNavi-02_rollover.png';
                    document.getElementById('fileimg').onmouseout=urlCommon()+"images/common/gNavi-02_rollover.png";
                    return "class4";
                }
                else 
                    if (queryString.indexOf("classifyId=9&") != -1) {
                        // 耗材/OA用纸
                        document.getElementById('colorBorder5px-1').style.borderBottomColor = '#E53228';
                        document.getElementById('topSearch-box').style.backgroundColor = '#E53228';
                        document.getElementById('oayongzhiimg').src = urlCommon()+'images/common/gNavi-03_rollover.png';
                        document.getElementById('oayongzhiimg').onmouseout=urlCommon()+"images/common/gNavi-03_rollover.png";
						return "class6";
                    }
                    else 
                        if (queryString.indexOf("classifyId=5&") != -1) {
                            // PC用品
                            document.getElementById('colorBorder5px-1').style.borderBottomColor = '#1C995F';
                            document.getElementById('topSearch-box').style.backgroundColor = '#1C995F';
                            document.getElementById('pcyongpingimg').src =urlCommon()+ 'images/common/gNavi-04_rollover.png';
                            document.getElementById('pcyongpingimg').onmouseout=urlCommon()+"images/common/gNavi-04_rollover.png";
							return "class9";
                        }
                        else 
                            if (queryString.indexOf("classifyId=7&") != -1) {
                                // 办公家电
                                document.getElementById('colorBorder5px-1').style.borderBottomColor = '#8E42A6';
                               document.getElementById('topSearch-box').style.backgroundColor = '#8E42A6';
                                document.getElementById('officedianqiimg').src = urlCommon()+'images/common/gNavi-05_rollover.png';
                                document.getElementById('officedianqiimg').onmouseout=urlCommon()+"images/common/gNavi-05_rollover.png";
								return "class5";
                            }
                            else 
                                if (queryString.indexOf("classifyId=1&") != -1) {
                                    // 包装/作业用品
                                    document.getElementById('colorBorder5px-1').style.borderBottomColor = '#977155';
                                    document.getElementById('topSearch-box').style.backgroundColor = '#977155';
                                    document.getElementById('zuoyeyongpinimg').src = urlCommon()+'images/common/gNavi-06_rollover.png';
                                    document.getElementById('zuoyeyongpinimg').onmouseout=urlCommon()+"images/common/gNavi-06_rollover.png";
									return "class7";
                                }
                                else 
                                    if (queryString.indexOf("classifyId=8&") != -1) {
                                        // 生活用品
                                        document.getElementById('colorBorder5px-1').style.borderBottomColor = '#EF7726';
                                        document.getElementById('topSearch-box').style.backgroundColor = '#EF7726';
                                        document.getElementById('shenghuozahuoimg').src = urlCommon()+'images/common/gNavi-07_rollover.png';
                                        document.getElementById('shenghuozahuoimg').onmouseout=urlCommon()+"images/common/gNavi-07_rollover.png";
																				
                                        return "class1";
                                    }
                                    else 
                                        if (queryString.indexOf("classifyId=11&") != -1) {
                                            // 食品/饮料
                                            document.getElementById('colorBorder5px-1').style.borderBottomColor = '#00B3EF';
                                            document.getElementById('topSearch-box').style.backgroundColor = '#00B3EF';
                                            document.getElementById('yinliaoimg').src = urlCommon()+'images/common/gNavi-08_rollover.png';
                                            document.getElementById('yinliaoimg').onmouseout=urlCommon()+"images/common/gNavi-08_rollover.png";
											return "class8";
                                        }
                                        else 
                                            if (queryString.indexOf("classifyId=12&") != -1) {
                                                // 家具/收纳
                                                document.getElementById('colorBorder5px-1').style.borderBottomColor = '#4F59B7';
                                                document.getElementById('topSearch-box').style.backgroundColor = '#4F59B7';
                                                document.getElementById('jiajuimg').src = urlCommon()+'images/common/gNavi-09_rollover.png';
                                                document.getElementById('jiajuimg').onmouseout=urlCommon()+"images/common/gNavi-09_rollover.png";
												return "class11";
												
                                            }
                                            else 
                                                if (queryString.indexOf("classifyId=13&") != -1) {
                                                    // 办公电器
                                                    document.getElementById('colorBorder5px-1').style.borderBottomColor = '#FD81B7';
                                                    document.getElementById('topSearch-box').style.backgroundColor = '#FD81B7';
                                                    document.getElementById('yiliaoimg').src = urlCommon()+'images/common/gNavi-10_rollover.png';
                                                    document.getElementById('yiliaoimg').onmouseout=urlCommon()+"images/common/gNavi-10_rollover.png";
													return "class12";
                                                }
            return queryString;
        }
        else 
            if (bigClassId != -1) {
                var queryString = url.substr(index + 1);
				
				var bigClassIdString = url.substr(bigClassId + 1);
                
                if (url.indexOf("&bigClassId=4") != -1) {
                    // 文具/事务用品
                    document.getElementById('colorBorder5px-1').style.borderBottomColor = '#006DBC';
                    document.getElementById('topSearch-box').style.backgroundColor = '#006DBC';
                    document.getElementById('wenjuimg').src = urlCommon()+'images/common/gNavi-01_rollover.png';
                    document.getElementById('wenjuimg').onmouseout=urlCommon()+"images/common/gNavi-01_rollover.png";
					 return "class0";
                }
                else 
                    if (url.indexOf("&bigClassId=6") != -1) {
                        // 文件夹
                        document.getElementById('colorBorder5px-1').style.borderBottomColor = '#9FC732';
                        document.getElementById('topSearch-box').style.backgroundColor = '#9FC732';
                        document.getElementById('fileimg').src = urlCommon()+'images/common/gNavi-02_rollover.png';
                        document.getElementById('fileimg').onmouseout=urlCommon()+"images/common/gNavi-02_rollover.png";
						return "class4";
                    }
                    else 
                        if (url.indexOf("&bigClassId=9") != -1 ) {
                            // 耗材/OA用纸
                            document.getElementById('colorBorder5px-1').style.borderBottomColor = '#E53228';
                            document.getElementById('topSearch-box').style.backgroundColor = '#E53228';
                            document.getElementById('oayongzhiimg').src = urlCommon()+'images/common/gNavi-03_rollover.png';
                            document.getElementById('oayongzhiimg').onmouseout=urlCommon()+"images/common/gNavi-03_rollover.png";
							return "class6";
                        }
                        else 
                            if (url.indexOf("&bigClassId=5") != -1 ) {
                                // PC用品
                                document.getElementById('colorBorder5px-1').style.borderBottomColor = '#1C995F';
                                document.getElementById('topSearch-box').style.backgroundColor = '#1C995F';
                                document.getElementById('pcyongpingimg').src =urlCommon()+ 'images/common/gNavi-04_rollover.png';
                                document.getElementById('pcyongpingimg').onmouseout=urlCommon()+"images/common/gNavi-04_rollover.png";
								return "class9";
                            }
                            else 
                                if (url.indexOf("&bigClassId=7") != -1 ) {
                                    // 办公家电
                                    document.getElementById('colorBorder5px-1').style.borderBottomColor = '#8E42A6';
                                    document.getElementById('topSearch-box').style.backgroundColor = '#8E42A6';
                                    document.getElementById('officedianqiimg').src = urlCommon()+'images/common/gNavi-05_rollover.png';
                                    document.getElementById('officedianqiimg').onmouseout=urlCommon()+"images/common/gNavi-05_rollover.png";
									return "class5";
                                }
                                else 
                                    if (url.indexOf("&bigClassId=1") != -1 && url.indexOf("&bigClassId=11") == -1 && url.indexOf("&bigClassId=12") == -1&& url.indexOf("&bigClassId=13") == -1) {
                                        // 包装/作业用品
                                        document.getElementById('colorBorder5px-1').style.borderBottomColor = '#977155';
                                        document.getElementById('topSearch-box').style.backgroundColor = '#977155';
                                        document.getElementById('zuoyeyongpinimg').src = urlCommon()+'images/common/gNavi-06_rollover.png';
                                        document.getElementById('zuoyeyongpinimg').onmouseout=urlCommon()+"images/common/gNavi-06_rollover.png";
										return "class7";
                                    }
                                    else 
                                        if (url.indexOf("&bigClassId=8") != -1 ) {
                                            // 生活用品
                                            document.getElementById('colorBorder5px-1').style.borderBottomColor = '#EF7726';
                                            document.getElementById('topSearch-box').style.backgroundColor = '#EF7726';
                                            document.getElementById('shenghuozahuoimg').src = urlCommon()+'images/common/gNavi-07_rollover.png';
                                            document.getElementById('shenghuozahuoimg').onmouseout=urlCommon()+"images/common/gNavi-07_rollover.png";
											 return "class1";
                                        }
                                        else 
                                            if (url.indexOf("&bigClassId=11") != -1 ) {
                                                // 食品/饮料
                                                document.getElementById('colorBorder5px-1').style.borderBottomColor = '#00B3EF';
                                                document.getElementById('topSearch-box').style.backgroundColor = '#00B3EF';
                                                document.getElementById('yinliaoimg').src = urlCommon()+'images/common/gNavi-08_rollover.png';
                                                document.getElementById('yinliaoimg').onmouseout=urlCommon()+"images/common/gNavi-08_rollover.png";
												return "class8";
                                            }
                                            else 
                                                if (url.indexOf("&bigClassId=12") != -1 ) {
                                                    // 家具/收纳
                                                    document.getElementById('colorBorder5px-1').style.borderBottomColor = '#4F59B7';
                                                    document.getElementById('topSearch-box').style.backgroundColor = '#4F59B7';
                                                    document.getElementById('jiajuimg').src = urlCommon()+'images/common/gNavi-09_rollover.png';
                                                    document.getElementById('jiajuimg').onmouseout=urlCommon()+"images/common/gNavi-09_rollover.png";
													return "class11";
                                                }
                                                else 
                                                    if (url.indexOf("&bigClassId=13") != -1) {
                                                        // 办公电器
                                                        document.getElementById('colorBorder5px-1').style.borderBottomColor = '#FD81B7';
                                                        document.getElementById('topSearch-box').style.backgroundColor = '#FD81B7';
                                                        document.getElementById('yiliaoimg').src = urlCommon()+'images/common/gNavi-10_rollover.png';
                                                        document.getElementById('yiliaoimg').onmouseout=urlCommon()+"images/common/gNavi-10_rollover.png";
														return "class12";
                                                    }
                return queryString;
            }
    
}

function getClassId8(){
	


    //先获取浏览器地址
    var url = window.top.location.toString();
    if(url.indexOf("stationary-office-products") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=4&"
    }else if(url.indexOf("files-clear-folder") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=6&";
    }else if(url.indexOf("copy-paper-printer-toner-ink") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=9&";
    }else if(url.indexOf("computer-supplies-media") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=5&";
    }else if(url.indexOf("office-electronics-battery") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=7&";
    }else if(url.indexOf("tools-opp-tapes-work-supplies") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=1&";
    }else if(url.indexOf("home-cleaning-supplies-garbage-bags") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=8&";
    }else if(url.indexOf("food-drinks-tea-coffee") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=11&";
    }else if(url.indexOf("office-furnitures-storage") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=12&";
    }else if(url.indexOf("office-machines-equipment") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=13&";
    }
    var index = url.indexOf("&classifyId=");
    
    var bigClassId = url.indexOf("&bigClassId");
    
    var gNaviNo = document.getElementById("gNaviNo").value;

    if (index == -1) {
        return null;
    }
    else 
        if (bigClassId == -1) {
            var queryString = url.substr(index + 1);

            if (queryString.indexOf("classifyId=4&") != -1) {
                // 文具/事务用品
                document.getElementById('colorBorder5px-1').style.borderBottomColor = '#006DBC';
                document.getElementById('topSearch-box').style.backgroundColor = '#006DBC';
                return "class0";
            }
            else 
                if (queryString.indexOf("classifyId=6&") != -1) {
                    // 文件夹
                    document.getElementById('colorBorder5px-1').style.borderBottomColor = '#9FC732';
                    document.getElementById('topSearch-box').style.backgroundColor = '#9FC732';
                  
                    return "class4";
                }
                else 
                    if (queryString.indexOf("classifyId=9&") != -1) {
                        // 耗材/OA用纸
                        document.getElementById('colorBorder5px-1').style.borderBottomColor = '#E53228';
                        document.getElementById('topSearch-box').style.backgroundColor = '#E53228';
                      
                        return "class6";
                    }
                    else 
                        if (queryString.indexOf("classifyId=5&") != -1) {
                            // PC用品
                            document.getElementById('colorBorder5px-1').style.borderBottomColor = '#1C995F';
                            document.getElementById('topSearch-box').style.backgroundColor = '#1C995F';
                        
						    return "class9";
                        }
                        else 
                            if (queryString.indexOf("classifyId=7&") != -1) {
                                // 办公家电
                                document.getElementById('colorBorder5px-1').style.borderBottomColor = '#8E42A6';
                               document.getElementById('topSearch-box').style.backgroundColor = '#8E42A6';
                             							
                                return "class5";
                            }
                            else 
                                if (queryString.indexOf("classifyId=1&") != -1) {
                                    // 包装/作业用品
                                    document.getElementById('colorBorder5px-1').style.borderBottomColor = '#977155';
                                    document.getElementById('topSearch-box').style.backgroundColor = '#977155';
                                    document.getElementById('zuoyeyongpinimg').src = urlCommon()+'images/common/gNavi-06_rollover.png';
                                    document.getElementById('zuoyeyongpinimg').onmouseout=urlCommon()+"images/common/gNavi-06_rollover.png";
									
                                    return "class7";
                                }
                                else 
                                    if (queryString.indexOf("classifyId=8&") != -1) {
                                        // 生活用品
                                        document.getElementById('colorBorder5px-1').style.borderBottomColor = '#EF7726';
                                        document.getElementById('topSearch-box').style.backgroundColor = '#EF7726';
                                    
                                        return "class1";
                                    }
                                    else 
                                        if (queryString.indexOf("classifyId=11&") != -1) {
                                            // 食品/饮料
                                            document.getElementById('colorBorder5px-1').style.borderBottomColor = '#00B3EF';
                                            document.getElementById('topSearch-box').style.backgroundColor = '#00B3EF';
                                      		return "class8";
                                        }
                                        else 
                                            if (queryString.indexOf("classifyId=12&") != -1) {
                                                // 家具/收纳
                                                document.getElementById('colorBorder5px-1').style.borderBottomColor = '#4F59B7';
                                                document.getElementById('topSearch-box').style.backgroundColor = '#4F59B7';
                                             	return "class11";
												
                                            }
                                            else 
                                                if (queryString.indexOf("classifyId=13&") != -1) {
                                                    // 办公电器
                                                    document.getElementById('colorBorder5px-1').style.borderBottomColor = '#FD81B7';
                                                    document.getElementById('topSearch-box').style.backgroundColor = '#FD81B7';
                                                    return "class12";
                                                }
            return queryString;
        }
        else 
            if (bigClassId != -1) {
                var queryString = url.substr(index + 1);
				
				var bigClassIdString = url.substr(bigClassId + 1);
                
                if (url.indexOf("&bigClassId=4") != -1) {
                    // 文具/事务用品
                    document.getElementById('colorBorder5px-1').style.borderBottomColor = '#006DBC';
                    document.getElementById('topSearch-box').style.backgroundColor = '#006DBC';
                    return "class0";
                }
                else 
                    if (url.indexOf("&bigClassId=6") != -1) {
                        // 文件夹
                        document.getElementById('colorBorder5px-1').style.borderBottomColor = '#9FC732';
                        document.getElementById('topSearch-box').style.backgroundColor = '#9FC732';
                        return "class4";
                    }
                    else 
                        if (url.indexOf("&bigClassId=9") != -1 ) {
                            // 耗材/OA用纸
                            document.getElementById('colorBorder5px-1').style.borderBottomColor = '#E53228';
                            document.getElementById('topSearch-box').style.backgroundColor = '#E53228';
                            return "class6";
                        }
                        else 
                            if (url.indexOf("&bigClassId=5") != -1 ) {
                                // PC用品
                                document.getElementById('colorBorder5px-1').style.borderBottomColor = '#1C995F';
                                document.getElementById('topSearch-box').style.backgroundColor = '#1C995F';
                                return "class9";
                            }
                            else 
                                if (url.indexOf("&bigClassId=7") != -1 ) {
                                    // 办公家电
                                    document.getElementById('colorBorder5px-1').style.borderBottomColor = '#8E42A6';
                                    document.getElementById('topSearch-box').style.backgroundColor = '#8E42A6';
                                    return "class5";
                                }
                                else 
                                    if (url.indexOf("&bigClassId=1") != -1 && url.indexOf("&bigClassId=11") == -1 && url.indexOf("&bigClassId=12") == -1&& url.indexOf("&bigClassId=13") == -1) {
                                        // 包装/作业用品
                                        document.getElementById('colorBorder5px-1').style.borderBottomColor = '#977155';
                                        document.getElementById('topSearch-box').style.backgroundColor = '#977155';
                                        return "class7";
                                    }
                                    else 
                                        if (url.indexOf("&bigClassId=8") != -1 ) {
                                            // 生活用品
                                            document.getElementById('colorBorder5px-1').style.borderBottomColor = '#EF7726';
                                            document.getElementById('topSearch-box').style.backgroundColor = '#EF7726';
                                            return "class1";
                                        }
                                        else 
                                            if (url.indexOf("&bigClassId=11") != -1 ) {
                                                // 食品/饮料
                                                document.getElementById('colorBorder5px-1').style.borderBottomColor = '#00B3EF';
                                                document.getElementById('topSearch-box').style.backgroundColor = '#00B3EF';
                                                return "class8";
                                            }
                                            else 
                                                if (url.indexOf("&bigClassId=12") != -1 ) {
                                                    // 家具/收纳
                                                    document.getElementById('colorBorder5px-1').style.borderBottomColor = '#4F59B7';
                                                    document.getElementById('topSearch-box').style.backgroundColor = '#4F59B7';
                                                    return "class11";
                                                }
                                                else 
                                                    if (url.indexOf("&bigClassId=13") != -1) {
                                                        // 办公电器
                                                        document.getElementById('colorBorder5px-1').style.borderBottomColor = '#FD81B7';
                                                        document.getElementById('topSearch-box').style.backgroundColor = '#FD81B7';
                                                        return "class12";
                                                    }
                return queryString;
            }
    
}

function getClassId2(){
    getClassId('colorBorder5px-2');
}

function getClassId4(){
    getClassId('head1');
}


function getClassId(elementById){
    var gNaviNo;
    if (document.getElementById("gNaviNo") == null) {
        gNaviNo = "";
    }
    else {
        gNaviNo = document.getElementById("gNaviNo").value;
    }
    
    
    //先获取浏览器地址
    var url = window.top.location.toString();
    if(url.indexOf("stationary-office-products") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=4&"
    }else if(url.indexOf("files-clear-folder") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=6&";
    }else if(url.indexOf("copy-paper-printer-toner-ink") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=9&";
    }else if(url.indexOf("computer-supplies-media") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=5&";
    }else if(url.indexOf("office-electronics-battery") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=7&";
    }else if(url.indexOf("tools-opp-tapes-work-supplies") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=1&";
    }else if(url.indexOf("home-cleaning-supplies-garbage-bags") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=8&";
    }else if(url.indexOf("food-drinks-tea-coffee") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=11&";
    }else if(url.indexOf("office-furnitures-storage") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=12&";
    }else if(url.indexOf("office-machines-equipment") != -1){
    	url="searchMerchandiseAeassort.do?method=searchMerchandiseAeassort&fromPageId=main&classifyId=13&";
    }
    var index = url.indexOf("&");
    
    var bigClassId = url.indexOf("&bigClassId");
    
    if (index == -1) {
        return null;
    }
    else 
        if (bigClassId == -1) {
            var queryString = url.substr(index + 1);
            if (queryString.indexOf("classifyId=4&") != -1) {
                // 文具/事务用品
                document.getElementById(elementById).style.borderBottomColor = '#006DBC';
                return "class0";
            }
            else 
                if (queryString.indexOf("classifyId=6&") != -1) {
                    document.getElementById(elementById).style.borderBottomColor = '#9FC732';
                    return "class4";
                }
                else 
                    if (queryString.indexOf("classifyId=9&") != -1) {
                        document.getElementById(elementById).style.borderBottomColor = '#E53228';
                        
                        return "class6";
                    }
                    else 
                        if (queryString.indexOf("classifyId=5&") != -1) {
                            document.getElementById(elementById).style.borderBottomColor = '#1C995F';
                            
                            return "class9";
                        }
                        else 
                            if (queryString.indexOf("classifyId=7&") != -1) {
                                document.getElementById(elementById).style.borderBottomColor = '#8E42A6';
                                
                                return "class5";
                            }
                            else 
                                if (queryString.indexOf("classifyId=1&") != -1) {
                                    document.getElementById(elementById).style.borderBottomColor = '#977155';
                                    
                                    return "class7";
                                }
                                else 
                                    if (queryString.indexOf("classifyId=8&") != -1) {
                                        document.getElementById(elementById).style.borderBottomColor = '#EF7726';
                                        
                                        return "class1";
                                    }
                                    else 
                                        if (queryString.indexOf("classifyId=11&") != -1) {
                                            document.getElementById(elementById).style.borderBottomColor = '#00B3EF';
                                            
                                            return "class8";
                                        }
                                        else 
                                            if (queryString.indexOf("classifyId=12&") != -1) {
                                                document.getElementById(elementById).style.borderBottomColor = '#4F59B7';
                                                
                                                return "class11";
                                            }
                                            else 
                                                if (queryString.indexOf("classifyId=13&") != -1) {
                                                    document.getElementById(elementById).style.borderBottomColor = '#FD81B7';
                                                    
                                                    return "class12";
                                                }
            return queryString;
        }
        else 
            if (bigClassId != -1) {
                var queryString = url.substr(index + 1);
                
                var bigClassIdString = url.substr(bigClassId + 1);
                
                if (url.indexOf("&bigClassId=4") != -1) {
                    document.getElementById(elementById).style.borderBottomColor = '#006DBC';
                    document.getElementById('wenjuword').style.color = '#006ec0';
                    return "class0";
                }
                else 
                    if (url.indexOf("&bigClassId=6") != -1) {
                        // 文件夹
                        document.getElementById(elementById).style.borderBottomColor = '#9FC732';
                        document.getElementById('fileword').style.color = '#9cc430';
						return "class4";
                    }
                    else 
                        if (url.indexOf("&bigClassId=9") != -1) {
							document.getElementById(elementById).style.borderBottomColor = '#E53228';
							document.getElementById('qayongzhiword').style.color = '#e33029';
							return "class6";
                        }
                        else 
                            if (url.indexOf("&bigClassId=5") != -1) {
								document.getElementById(elementById).style.borderBottomColor = '#1C995F';
								document.getElementById('pcyongpingword').style.color = '#1d9b61';
                                return "class9";
                            }
                            else 
                                if (url.indexOf("&bigClassId=7") != -1) {
									document.getElementById(elementById).style.borderBottomColor = '#8E42A6';
									document.getElementById('officedianqiword').style.color = '#8c42a3';
                                    return "class5";
                                }
                                else 
                                    if (url.indexOf("&bigClassId=1") != -1 && url.indexOf("&bigClassId=11") == -1 && url.indexOf("&bigClassId=12") == -1 && url.indexOf("&bigClassId=13") == -1) {
                                        document.getElementById(elementById).style.borderBottomColor = '#977155';
                                        document.getElementById('zuoyeyongpinword').style.color = '#987154';
										return "class7";
                                    }
                                    else 
                                        if (url.indexOf("&bigClassId=8") != -1) {
											document.getElementById(elementById).style.borderBottomColor = '#EF7726';
											document.getElementById('shenghuozahuoword').style.color = '#ee7725';
											return "class1";
                                        }
                                        else 
                                            if (url.indexOf("&bigClassId=11") != -1) {
												document.getElementById(elementById).style.borderBottomColor = '#00B3EF';
												document.getElementById('yinliaoword').style.color = '#01b5f2';
                                                return "class8";
                                            }
                                            else 
                                                if (url.indexOf("&bigClassId=12") != -1) {
													document.getElementById(elementById).style.borderBottomColor = '#4F59B7';
													document.getElementById('jiajuword').style.color = '#505ab9';
                                                    return "class11";
                                                }
                                                else 
                                                    if (url.indexOf("&bigClassId=13") != -1) {
														document.getElementById(elementById).style.borderBottomColor = '#FD81B7';
														document.getElementById('yiliaoword').style.color = '#ff81ba';
                                                        return "class12";
                                                    }
                return queryString;
            }
}


