G.clickForType=function(d,b,f,c){var e=d.target||d.srcElement;b=b||"A";f=f||"UL";c=c||"current";var h=this.getElement(e,f);var g=h.getElementsByTagName(b);for(var a in g){if(typeof g[a]=="object"){if(g[a]==e){e.className=c}else{g[a].className=""}}}};G.getElement=function(obj,tagName,element){element=element||"parentNode";var reObj=null;obj=eval("obj."+element);if(typeof obj=="object"){if(obj.tagName==tagName){reObj=obj}else{reObj=this.getElement(obj,tagName,element)}}return reObj};G.openTRId="";G.openTR=function(c,d,a){var b;a=a||"#CCCCCC";if(this.openTRId!=""&&this.openTRId!=c+d){b=document.getElementById(this.openTRId);if(b.tagName.toUpperCase()=="TD"){b=b.parentElement||b.parentNode}this.show(b,2);G.getElement(b,b.tagName,"previousSibling").bgColor="#FFFFFF"}this.openTRId=c+d;b=document.getElementById(this.openTRId);if(b.tagName.toUpperCase()=="TD"){b=b.parentElement||b.parentNode}if(this.show(b)){G.getElement(b,b.tagName,"previousSibling").bgColor=a}else{G.getElement(b,b.tagName,"previousSibling").bgColor="#FFFFFF"}};G.addOption=function(d,c,a){var b=document.createElement("option");b.text=c;b.value=a;document.getElementById(d).add(b)};G.delOption=function(b,c){c=c||1;var a=document.getElementById(b);if(a.length>c){a.remove(c);G.delOption(b)}else{a.selectedIndex=0}};G.secOption=function(d,c){var a=document.getElementById(d);for(var b=0;b<a.length;b++){if(a.options[b].innerHTML==c){a.selectedIndex=b;return true;break}}a.selectedIndex=0};G.Xb=function(a){return(this.getLocation(a,"offsetLeft")+3)},G.Yb=function(a){return this.getLocation(a,"offsetTop")},G.getLocation=function(c,b){if(typeof c!="object"){c=document.getElementById(c)}var a=0;while(c){a+=c[b];c=c.offsetParent}return a};G.showL=function(c,b,a,d){if(typeof c!="object"){c=document.getElementById(c)}if(this.show(c)){a=a||0;d=d||0;c.style.left=this.Xb(b)+a+"PX";c.style.top=this.Yb(b)+d+"PX"}};G.showXY=function(d,b,a,f){try{if(typeof d!="object"){d=document.getElementById(d)}if(this.show(d)){a=a||0;f=f||0;d.style.left=this.getXY(b).left+a+"PX";d.style.top=this.getXY(b).top+f+"PX"}}catch(c){}};G.locationHref=function(a,c){c=c||"get";if(window.navigator.userAgent.indexOf("MSIE")>=1||c=="post"){var b=document.createElement("FORM");b.action=a;b.method=c;document.body.appendChild(b);b.submit()}else{location.href=a}};G.drawIframe=function(f,a,c,d){d=d||'width="100%" height="20" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowTransparency="true"';a=a||"iframe_draw";document.getElementById(f).innerHTML='<iframe name="'+a+'" id="'+a+'" '+d+"></iframe>";if(window.navigator.userAgent.indexOf("MSIE")>=1){var b=document.getElementById(a);var e=document.frames(a).document}else{var b=document.getElementById(a);var e=b.contentDocument}e.open();e.write(c);e.close();if(window.navigator.userAgent.indexOf("MSIE")>=1){window.setTimeout(function(){b.height=e.body.scrollHeight},100)}else{b.height=e.body.scrollHeight}e.body.onload=function(){b.height=e.body.scrollHeight}};G.setCookie=function(b,e){var d=new Date();var a=(typeof arguments[2]!="undefined")?arguments[2]:null;var g=(typeof arguments[3]!="undefined")?arguments[3]:null;var c=(typeof arguments[4]!="undefined")?arguments[4]:null;var f=(typeof arguments[5]!="undefined")?arguments[5]:false;if(a!=null&&a>=0){d.setTime(d.getTime()+(a*1000))}document.cookie=b+"="+(/^\w+$/.test(e)?e:encodeURIComponent(e))+((a==null||a<0)?((a==-1)?"; expires=-1":""):("; expires="+d.toGMTString()))+((g==null)?"":("; path="+g))+((c==null)?"":("; domain="+c))+((f==true)?"; secure":"")};G.show_area_cn=function(c,b){var a=location.href.replace("http://"+document.domain,"");if(!(/^\/(_[a-z]+)?\/?s.*\.html$/.test(a))){c=decodeURI(decodeURI(this.getcookie("area_cn_u")))}else{this.setCookie("area_cn_u",encodeURI(c),0,"/");this.setCookie("area_py",b,0,"/")}if(!c||c==""){c="全国"}if(c!="全国"&&/^\/?s.*\.html$/.test(a)){c="全国"}document.write(c)};G.setRecentSearches=function(h,e,g){g=g||5;h=h.replace(/^\s+|\s+$/g,"");var c=h.lengthB();if(c<4||c>10){return}var b=this.getcookie("recent_searches");if(b!=""&&b!=null){b=decodeURIComponent(decodeURIComponent(b));var d=new RegExp(e+"\\|([^\\|]+)\\|","ig");if(d.exec(b)!=null){var a=RegExp.$1+"$";a="$"+h+a.replace("$"+h+"$","$").replace(/\$+$/,"");var f=a.split("$");if(f.length>g+2){f.pop();a=f.join("$")}b=b.replace(d,e+"|"+a+"|")}else{b+=e+"|$"+h+"|"}}else{b=e+"|$"+h+"|"}this.setCookie("recent_searches",encodeURIComponent(b),180*86400)};G.writeRecentSearches=function(h,g,k){var c=this.getcookie("recent_searches");if(c!=""&&c!=null){c=decodeURIComponent(decodeURIComponent(c));var l=new RegExp(h+"\\|([^\\|]+)\\|","ig");if(l.exec(c)!=null){var a=RegExp.$1.replace(/^\$+/,"");var b=a.split("$");var e="<strong>最近搜索：</strong>";if(h=="corp"){h=""}else{h+=":"}for(var f=0,d=0;f<b.length;f++){if(b[f]!=g){e+='<a href="/s'+h+encodeURIComponent(b[f])+'.html">'+b[f]+"</a>&nbsp;&nbsp;";if(++d==5){break}}}if(d==0){return}e+="";if(!k){document.write(e)}else{return e}}}if(k){return""}};var ARR_SW_DEFAULT=new Array();ARR_SW_DEFAULT.corp="请输入关键字";ARR_SW_DEFAULT.product="请输入产品关键字";ARR_SW_DEFAULT.server="请输入服务标签关键字";ARR_SW_DEFAULT.place="请输入特色标签关键字";ARR_SW_DEFAULT.sell="请输入特征关键字";ARR_SW_DEFAULT.market="请输入特征关键字";ARR_SW_DEFAULT.act="请输入特征关键字";ARR_SW_DEFAULT.zhaoshang="请输入特征关键字";ARR_SW_DEFAULT.ren="请输入特征关键字";ARR_SW_DEFAULT.job="请输入职位名称关键字";ARR_SW_DEFAULT.news="请输入新闻关键字";ARR_SW_DEFAULT.design="请输入设计关键字";ARR_SW_DEFAULT.com="请输入小区关键字";ARR_SW_DEFAULT.travel="请输入关键字";ARR_SW_DEFAULT.notice="请输入关键字";ARR_SW_DEFAULT.adv="请输入关键字";ARR_SW_DEFAULT.rent="请输入关键字";ARR_SW_DEFAULT.exchange="请输入关键字";ARR_SW_DEFAULT.fang="请输入新居关键字";ARR_SW_DEFAULT.cca="请输入商会协会关键字";ARR_SW_DEFAULT.stores="请输入专卖店关键字";ARR_SW_DEFAULT.training="请输入培训信息关键字";ARR_SW_DEFAULT["public"]="请输入场所信息关键字";ARR_SW_DEFAULT.org="请输入机构信息关键字";ARR_SW_DEFAULT.discovery="请输入发现信息关键字";ARR_SW_DEFAULT.promo="请输入优惠信息关键字";ARR_SW_DEFAULT.goods="请输入批发商品关键字";ARR_SW_DEFAULT['baike'] = '请输入百科关键字';var SELTYPE="";function selSearchType(c,e){if(e){SELTYPE=c;if(location.href!="http://"+document.domain+"/"){e.href="#";G.searchForSubmit();return}if(typeof e.tagName=="undefined"){e=e.target||e.srcElement}e.blur();var d=e.parentNode.parentNode.getElementsByTagName("LI");for(var b=0;d[b];d[b++].className=""){}}else{if(!$("as_"+c)){e=$("as_class");$("sw_class").style.display="";selSearchClass(c)}else{e=$("as_"+c)}}if(c==""){c="corp"}SELTYPE=c;var a=$("sw");if(a.value=="undefined"){a.value=""}if(a.value.replace(/^[\s　]*$/,"")==""||ARR_SW_DEFAULT.in_array(a.value)){a.value=ARR_SW_DEFAULT[c];a.style.color="#999"}else{a.style.color="#000"}e.parentNode.className="over"}function selSearchClass(b){if(window.event){window.event.returnValue=window.event.cancelBubble=true}if(typeof b!="object"){b=$("li_as_"+b)}if(typeof b=="object"){var d=b.parentNode.childNodes;for(var a=0;d[a];d[a++].style.color=""){}$("sw_class").firstChild.value=b.lastChild.nodeValue;b.style.color="#F00";G.show("div_sw_class",2)}if(!selSearchClass.caller||selSearchClass.caller.getName()!="selSearchType"){selSearchType(b.id.replace("li_as_",""))}}function selSearchSort(h,c,a){if(c){var f=c.target||c.srcElement;var g=G.getElement(f,"DIV");document.getElementById("as_sort_sec").value=h;if(g.id=="as_sort_s_show"){document.getElementById("as_sort_str_s").value=f.innerHTML.substrB(0,8,".")}else{document.getElementById("as_sort_str").value=f.innerHTML.substrB(0,8,".")}}var b=SELTYPE;if(b==""){b="corp"}if(a||!c){if(c){try{document.getElementById("as_sort_str_s").value="全部小类"}catch(d){}}else{return}}else{if(document.getElementById("sw").value.replace(/^[\s　]*$/,"")!=""&&document.getElementById("sw").value!=ARR_SW_DEFAULT[b]&&location.href!="http://"+document.domain+"/"){if(typeof c=="object"){if(typeof f=="object"){f.href="#"}}G.searchForSubmit()}if(h==0){try{document.getElementById("as_sort_str_s").value="全部小类"}catch(d){}}}G.show(g,2)}function setSortDiv(a,f){var b="<ul>";if(a){var d=$("as_sort_sec").value;if(typeof userSsortList[d]=="object"){for(var c=0;c<userSsortList[d].length;c++){if(f){b+='<li><a href="JavaScript:void(0);" onclick="setSortValue('+userSsortList[d][c].sid+",'"+userSsortList[d][c].sname+"',event);G.searchForSubmit();\">"+userSsortList[d][c].sname+"</a></li>"}else{b+='<li><a href="JavaScript:void(0);" onclick="setSortValue('+userSsortList[d][c].sid+",'"+userSsortList[d][c].sname+"',event);\">"+userSsortList[d][c].sname+"</a></li>"}}}else{return""}}else{if(SELTYPE=="job"&&/^.+\-cs\-(\d+).+$/i.test(location.href)){var g=location.href.replace(/^.+\-cs\-(\d+).+$/i,"$1")}if(typeof userSortList=="object"){for(var e=0;e<userSortList.length;e++){if(g&&g==userSortList[e].id){document.getElementById("as_sort_str").value=userSortList[e].name.substrB(0,8,".");document.getElementById("as_sort_sec").value=userSortList[e].id+","}if(f||SELTYPE=="travel"){b+='<li><a href="JavaScript:void(0);" onclick="setSearchValue('+userSortList[e].id+",'"+userSortList[e].name+"');G.searchForSubmit();\">"+userSortList[e].name+"</a></li>"}else{b+='<li><a href="JavaScript:void(0);" onclick="setSearchValue('+userSortList[e].id+",'"+userSortList[e].name+"');\">"+userSortList[e].name+"</a></li>"}}}}b+="</ul>";return b}function setSortDivAll(){var a="<ul>";a+='<li><a href="JavaScript:void(0);" onclick="setSortValue(0,\'全部职业\',event);">全部职业</a></li>';for(var b=1;b<userSortList.length;b++){a+='<li><a href="JavaScript:void(0);" onclick="setSortValue('+userSortList[b].id+",'"+userSortList[b].name+"',event);\">"+userSortList[b].name+"</a></li>"}a+="</ul>";return a}function setSearchValue(b,a){if(SELTYPE=="job"){if(document.getElementById("as_sort_sec").value==0){document.getElementById("as_sort_sec").value=b+","}else{document.getElementById("as_sort_sec").value=document.getElementById("as_sort_sec").value.replace(/^\d*\,/,b+",")}}else{document.getElementById("as_sort_sec").value=b;if(document.getElementById("as_sort_str_s")){if(SELTYPE=="travel"){document.getElementById("as_sort_s_show").innerHTML=setSortDiv(true,true)}else{document.getElementById("as_sort_s_show").innerHTML=setSortDiv(true)}document.getElementById("as_sort_str_s").value="全部小类"}}if(document.getElementById("as_sort_str").tagName=="FONT"){document.getElementById("as_sort_str").innerHTML=a}else{if(a!=null&&a!=""){document.getElementById("as_sort_str").value=a}}if(a!=null&&a!=""){document.getElementById("as_sort_str").title=a}G.show("as_sort_show",2)}function setSortValue(b,a){if(SELTYPE=="job"){if(document.getElementById("as_sort_sec").value==0){document.getElementById("as_sort_sec").value=","+b}else{document.getElementById("as_sort_sec").value=document.getElementById("as_sort_sec").value.replace(/\,\d*?$/,","+b)}}else{document.getElementById("as_sort_sec").value=b}document.getElementById("as_sort_str_s").value=a;document.getElementById("as_sort_str_s").title=a;G.show("as_sort_s_show",2)}function chanage_Small(g,f,c){if(!f){f="search_sort_id"}$(f).length=0;if(typeof userSsortList[g]=="object"&&userSsortList[g]!=""&&userSsortList[g]!=null){for(var b=0;b<userSsortList[g].length;b++){var a=new Option(userSsortList[g][b].sname,userSsortList[g][b].sid);$(f).options.add(a);if(c==userSsortList[g][b].sid){a.selected=true}}}try{if($(f).length==0){G.show("search_sort_id",2)}else{G.show("search_sort_id",1)}}catch(d){}};