var isIE = navigator.userAgent.toLowerCase().indexOf("msie")>0;var isGecko = navigator.userAgent.toLowerCase().indexOf("gecko")>0;var view_items_separator = "##$$!!##";function showfiltermenu(o){	whichEl =  document.getElementById(o);	var backframe = $("Banner_Frame");	var frontframe = $("tips_1");		if (whichEl.style.display == "none")	{		var im1 = document.getElementById("filter_class");		var im2 = document.getElementById("filter_ind");		var im3 = document.getElementById("filter_brand");		var im4 = document.getElementById("filter_param");		var i = 0;		if (im1) {			if (GetCookie(im1.name) == "1") {				im1.checked = true;				i++;			}		}		if (im2) {			if (GetCookie(im2.name) == "1") {				im2.checked = true;				i++;			}		}		if (im3) {			if (GetCookie(im3.name) == "1") {				im3.checked = true;				i++;			}		}		if (im4) {			if (GetCookie(im4.name) == "1") {				im4.checked = true;			}		}		var rightedge= curMouseX;        var topedge= curMouseY- 10;        whichEl.style.left=rightedge+"px";        whichEl.style.top=topedge+ "px"        backframe.style.left = rightedge - 90 + "px";        backframe.style.top = topedge + 15 + "px";        whichEl.style.display="";                backframe.style.width = frontframe.offsetWidth;        backframe.style.height = frontframe.offsetHeight;        backframe.style.zIndex = whichEl.style.zIndex - 1000;        backframe.style.display="";	}	else	{		whichEl.style.display="none";		backframe.style.display="none";	}}function dspTrNew(type, dspTr, impTr) {	var ad5 = document.getElementById(dspTr);	var im = document.getElementById(impTr);	//for(i = 0; i < ad5.length; i++) {		if (ad5) {			if (type != 1) {				if (ad5.style.display == "none") {					if (im) {						im.innerHTML="<img src='/images/search_01.gif'  />";					}					ad5.style.display = "block";				} else {					if (im) {						im.innerHTML="<img src='/images/search_02.gif'   />";					}					ad5.style.display = "none";				}			} else {				if (im) {					im.innerHTML="<img src='/images/search_01.gif'  />";				}				ad5.style.display = "block";			}		}	//}}function showsubmenu1() {			if(document.getElementById('bgDiv'))document.body.removeChild(document.getElementById('bgDiv'));            	document.getElementById("msgDiv").removeChild(document.getElementById('msgTitle'));            	document.body.removeChild(document.getElementById('msgDiv'));} function sAlert(str){	var msgw,msgh,bordercolor;	msgw=300;//提示窗口的宽度	msgh=150;//提示窗口的高度	titleheight=25 //提示窗口标题高度	bordercolor="#cccccc";//提示窗口的边框颜色	titlecolor="#ffffff";//提示窗口的标题颜色	titlebackground="/images/800_02.gif"			var sWidth,sHeight;	sWidth=document.body.offsetWidth;	sHeight=document.body.scrollHeight;		/*var s=document.getElementById("s");		s.disabled=true;	var a=document.getElementById("a");		a.disabled=true;	var b=document.getElementById("b");		b.disabled=true;	var c=document.getElementById("c");		c.disabled=true;	var qq=document.getElementById("qq");		qq.disabled=true;	var qq1=document.getElementById("qq1");		qq1.disabled=true;	var qq2=document.getElementById("qq2");		qq2.disabled=true;*/			var bgObj=document.createElement("div");	bgObj.setAttribute('id','bgDiv');	bgObj.style.position="absolute";	bgObj.style.top="0";	bgObj.style.background="#e1e1e1";	bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=100";	bgObj.style.opacity="1";	bgObj.style.left="0";	bgObj.style.width=sWidth + "px";	bgObj.style.height=sHeight + "px";	bgObj.style.zIndex = "10000";	document.body.appendChild(bgObj);		var msgObj=document.createElement("div")	msgObj.setAttribute("id","msgDiv");	msgObj.setAttribute("align","center");	msgObj.style.background="white";	msgObj.style.border="1px solid #cccccc ";////提示窗口的边框  	msgObj.style.position = "absolute";        msgObj.style.left = "50%";        msgObj.style.top = "50%";        msgObj.style.font="12px/1.6em Verdana, Geneva, Arial, Helvetica, sans-serif";        msgObj.style.marginLeft = "-225px" ;        msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px";        msgObj.style.width = msgw + "px";        msgObj.style.height =msgh + "px";        msgObj.style.textAlign = "center";        msgObj.style.lineHeight ="25px";        msgObj.style.zIndex = "10001";   var title=document.createElement("h4");   title.setAttribute("id","msgTitle");   title.setAttribute("align","right");   title.style.margin="0";   title.style.padding="3px";   title.style.background=bordercolor;   title.style.filter="progid:DXImageTransform.Microsoft.Alpha(startX=20, startY=20, finishX=100, finishY=100,style=1,opacity=100,finishOpacity=100);";   title.style.opacity="1";   title.style.border="1px solid " + bordercolor;   title.style.height="24px";   title.style.font="12px Verdana, Geneva, Arial, Helvetica, sans-serif";   title.style.color="white";   title.style.cursor="pointer";   title.innerHTML="<table width=300><tr><td align=left width=50%><img src=/images/ico_2.gif></td><td align=right><img src=/images/close1.gif></td></tr></table>";   title.onclick=function(){        document.body.removeChild(bgObj);            document.getElementById("msgDiv").removeChild(title);            document.body.removeChild(msgObj);            }   document.body.appendChild(msgObj);   document.getElementById("msgDiv").appendChild(title);   var txt=document.createElement("p");   txt.style.margin="1em 0"   txt.setAttribute("id","msgTxt");   txt.innerHTML=str;       document.getElementById("msgDiv").appendChild(txt);}function GetCookieVal(offset, flag)//获得Cookie解码后的值{	var endstr = document.cookie.indexOf (";", offset);	if (endstr == -1)		endstr = document.cookie.length;	if (flag == 1) {		return (document.cookie.substring(offset, endstr));	} else {		return unescape(document.cookie.substring(offset, endstr));	}}function SetCookie(name, value)//设定Cookie值{	var expdate = new Date();	var argv = SetCookie.arguments;	var argc = SetCookie.arguments.length;	var expires = (argc > 2) ? argv[2] : null;	var path = (argc > 3) ? argv[3] : null;	var domain = (argc > 4) ? argv[4] : null;	var secure = (argc > 5) ? argv[5] : false;	if(expires!=null) expdate.setTime(expdate.getTime() + ( expires * 1000 ));	document.cookie = name + "=" + escape (value) +((expires == null) ? "" : ("; expires="+ expdate.toGMTString()))		+((path == null) ? "" : ("; path=" + path)) +((domain == null) ? "; domain=.hc360.com" : ("; domain=" + domain))		+((secure == true) ? "; secure" : "");}function SetCookie1(name, value)//设定Cookie值{	var expdate = new Date();	var argv = SetCookie1.arguments;	var argc = SetCookie1.arguments.length;	var expires = (argc > 2) ? argv[2] : null;	var path = (argc > 3) ? argv[3] : null;	var domain = (argc > 4) ? argv[4] : null;	var secure = (argc > 5) ? argv[5] : false;	if(expires!=null) expdate.setTime(expires * 1000);	document.cookie = name + "=" + escape (value) +((expires == null) ? "" : ("; expires="+ expdate.toGMTString()))		+((path == null) ? "" : ("; path=" + path)) +((domain == null) ? "; domain=.hc360.com" : ("; domain=" + domain))		+((secure == true) ? "; secure" : "");}function DelCookie(name)//删除Cookie{	var exp = new Date();	exp.setTime (exp.getTime() - 1);	var cval = GetCookie (name);	document.cookie = name + "=0; expires="+ exp.toGMTString();}function GetCookie(name, flag)//获得Cookie的原始值{	var arg = name + "=";	var alen = arg.length;	var clen = document.cookie.length;	var i = 0;	while (i < clen)	{		var j = i + alen;		if (document.cookie.substring(i, j) == arg)		return GetCookieVal (j, flag);		i = document.cookie.indexOf(" ", i) + 1;		if (i == 0) break;	}	return null;}function setfiltercond(item) {	if (item.checked) {		Logger("cond_filter_show" + item.name);		SetCookie(item.name, "1", 60 * 60 * 24 * 10, "/");	} else {		SetCookie(item.name, "0", 60 * 60 * 24 * 10, "/");	}	SetFilterVisibility();}//用来兼容ff 和  IE 的 取得鼠标当前位置功能var curMouseX=0;var curMouseY=0;function mouseMove(ev) { ev= ev || window.event; var mousePos = mouseCoords(ev); //alert(ev.pageX); curMouseX = mousePos.x; curMouseY = mousePos.y; } function mouseCoords(ev) { if(ev.pageX || ev.pageY){ return {x:ev.pageX, y:ev.pageY}; } return { x:ev.clientX , y:ev.clientY  }; } document.onmousemove = mouseMove; function showVipInfo(layer,m_providerid){	MM_showHideLayers(layer,'','show');	var scrollTop, scrollLeft; 	if (typeof window.pageYOffset != 'undefined') { 	   scrollTop = 0; 	   scrollLeft = 0; 	} 	else if (typeof document.compatMode != 'undefined' && 	     document.compatMode != 'BackCompat') { 	   scrollTop = document.documentElement.scrollTop; 	   scrollLeft = document.documentElement.scrollLeft; 	} 	else if (typeof document.body != 'undefined') { 	   scrollTop = document.body.scrollTop ; 	   scrollLeft = document.body.scrollLeft; 	} 	var layer1 = document.getElementById(layer);    if(layer1 !=null){				layer1.innerHTML="<iframe src=\"http://detail.b2b.hc360.com/detail/turbine/template/pubinfo,mem_info.html?providerid="+m_providerid+"\" WIDTH=180 HEIGHT=223 MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=0 SCROLLING=no></iframe>";		var rightedge=document.body.clientWidth-curMouseX-100;		var bottomedge=document.body.clientHeight-curMouseY-25;		if (rightedge<layer1.offsetWidth)			layer1.style.left=scrollLeft+curMouseX-layer1.offsetWidth+ "px";		else			layer1.style.left=scrollLeft+curMouseX + "px";		if (bottomedge<layer1.offsetHeight)			layer1.style.top=scrollTop+curMouseY-layer1.offsetHeight+ "px";		else			layer1.style.top=scrollTop+curMouseY+ "px";    }}function showVipInfo1(layer,m_providerid){	MM_showHideLayers(layer,'','show');	var scrollTop, scrollLeft; 	if (typeof window.pageYOffset != 'undefined') { 	   scrollTop = window.pageYOffset; 	   scrollLeft = window.pageXOffset; 	} 	else if (typeof document.compatMode != 'undefined' && 	     document.compatMode != 'BackCompat') { 	   scrollTop = document.documentElement.scrollTop; 	   scrollLeft = document.documentElement.scrollLeft; 	} 	else if (typeof document.body != 'undefined') { 	   scrollTop = document.body.scrollTop; 	   scrollLeft = document.body.scrollLeft; 	}	var layer1 = document.getElementById(layer);    if(layer1 !=null){		layer1.innerHTML="<iframe src=\"http://detail.b2b.hc360.com/detail/turbine/template/pubinfo,mem_detail.html?providerid="+m_providerid+"\" WIDTH=180 HEIGHT=199 MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=0 SCROLLING=no></iframe>";		var rightedge=document.body.clientWidth-event.clientX-100;		var bottomedge=document.body.clientHeight-event.clientY-25;		if (rightedge<layer1.offsetWidth)			layer1.style.left=scrollLeft+event.clientX-layer1.offsetWidth;		else			layer1.style.left=scrollLeft+event.clientX;		if (bottomedge<layer1.offsetHeight)			layer1.style.top=scrollTop+event.clientY-layer1.offsetHeight;		else			layer1.style.top=scrollTop+event.clientY;    }}function MM_findObj(n, d) { //v4.0  var p,i,x;    if(!d) d=document;   if((p=n.indexOf("?"))>0&&parent.frames.length) {    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}  if(!(x=d[n])&&d.all) x=d.all[n];     for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];    for(i=0;!x&&d.layers&&i<d.layers.length;i++) 	x=MM_findObj(n,d.layers[i].document);  if(!x && document.getElementById) x=document.getElementById(n);   return x;}function MM_showHideLayers() { //v3.0  var i,p,v,obj,args=MM_showHideLayers.arguments;  for (i=0; i<(args.length-2); i+=3) 	if ((obj=MM_findObj(args[i]))!=null) 	{ 		v=args[i+2];		if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }		obj.visibility=v;     }}function Logger(logname){	if(logname == null || logname == "")		return;	try {	  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");	} catch (e) {	  try {	    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");	  } catch (e2) {	    xmlHttp = false;	  }	}		if (!xmlHttp && typeof(XMLHttpRequest) != 'undefined') {	  xmlHttp = new XMLHttpRequest();	}	if(xmlHttp){		var bust = Math.random()* 1000000000000000000;		var u = "/search/log.html?type="+logname + "&rnd=" + bust;		try {			xmlHttp.open("GET",u,true);			xmlHttp.send(null);		} catch (e3) {			hcsearchclick(u);		}	}	}function SetFilterVisibility() {	var filter_class_text = document.getElementById("filter_class_text");	var filter_ind_text = document.getElementById("filter_ind_text");	var filter_brand_text = document.getElementById("filter_brand_text");	var filter_area_text = document.getElementById("filter_area_text");		var filter_class_content = document.getElementById("filter_class_content");	var filter_ind_content = document.getElementById("filter_ind_content");	var filter_brand_content = document.getElementById("filter_brand_content");	var filter_area_content = document.getElementById("filter_area_content");		if (filter_class_text) {		if (GetCookie("filter_class") == "1") {			filter_class_text.style.display = "";			filter_class_content.style.display = "";		}	else if (GetCookie("filter_class") == "0") {			filter_class_text.style.display = "none";			filter_class_content.style.display = "none";		} else {			SetCookie("filter_class", "1", 60 * 60 * 24 * 10, "/");			filter_class_text.style.display = "";			filter_class_content.style.display = "";		}	}		if (filter_ind_text && GetCookie("filter_ind") == "1") {		filter_ind_text.style.display = "";		filter_ind_content.style.display = "";	} else if (GetCookie("filter_ind") == "0") {		filter_ind_text.style.display = "none";		filter_ind_content.style.display = "none";	} else {			SetCookie("filter_ind", "1", 60 * 60 * 24 * 10, "/");			filter_ind_text.style.display = "";			filter_ind_content.style.display = "";	}		if (filter_brand_text) {		if (GetCookie("filter_brand") == "1") {			filter_brand_text.style.display = "";			filter_brand_content.style.display = "";			//SetParamVisibility(1, "", false);		}	else if (GetCookie("filter_brand") == "0") {			filter_brand_text.style.display = "none";			filter_brand_content.style.display = "none";			//SetParamVisibility(1, "none", false);		} else {			SetCookie("filter_brand", "1", 60 * 60 * 24 * 10, "/");			filter_brand_text.style.display = "";			filter_brand_content.style.display = "";			//SetParamVisibility(1, "", false);		}	}		if (filter_area_text) {		if (GetCookie("filter_area") == "1") {			filter_area_text.style.display = "";			filter_area_content.style.display = "";		}	else if (GetCookie("filter_area") == "0") {			filter_area_text.style.display = "none";			filter_area_content.style.display = "none";		} else {			SetCookie("filter_area", "1", 60 * 60 * 24 * 10, "/");			filter_area_text.style.display = "";			filter_area_content.style.display = "";		}	}		/*if (GetCookie("filter_param") == "1") {		SetParamVisibility(3, "", true);	} else {		SetParamVisibility(3, "none", true);	}*/	}function SetParamVisibility(num, visible, c) {	for(var i = 0; i < num; i++) {		var param = document.getElementById("filter_param_div" + i);		if (param) {			param.style.display = visible;		}		param = document.getElementById("filter_param_hr" + i);		if (param) {			param.style.display = visible;		}		if(c) {			param = document.getElementById("filter_param_text" + i);			if (param) {				param.style.display = visible;			}			param = document.getElementById("filter_param_content" + i);			if (param) {				param.style.display = visible;			}		}	}}$=function(id){return document.getElementById(id)}function chbg(_this,ev){	if(ev==2) {		_this.className="current";		for(i=1;i<=8;i++){			tagObj = eval("$('tag" + i +"')");			sContent = eval("$('searchcontent" + i + "')");			if(tagObj==_this) {				tagObj.style.backgroundPosition="0 -70px";				//$("searchkeywords").innerHTML=sContent.innerHTML;			}else{				tagObj.style.backgroundPosition="0 0";				tagObj.className="";			}		}			}	if(_this.className!="current"){		if(ev==1) _this.style.backgroundPosition="0 -35px";		if(ev==0) _this.style.backgroundPosition="0 0"	}}function chbg_1(_this,ev){	if(ev==2) {		_this.className="current";		for(i=1;i<=9;i++){			tag_1Obj = eval("$('tag" + i +"_1')");			sContent = eval("$('searchcontent_1" + i + "')");			if(tag_1Obj==_this) {				tag_1Obj.style.backgroundPosition="0 -35px";				//$("searchkeywords").innerHTML=sContent.innerHTML;			}else{				tag_1Obj.style.backgroundPosition="0 0";				tag_1Obj.className="";			}		}			}	if(_this.className!="current"){		if(ev==1) _this.style.backgroundPosition="0 -35px";	}}function doSearch(theForm, ns){	var keys = theForm.w.value;	if (theForm.w.value.substring(0,3) =="请输入" || theForm.w.value == "")	{		alert("请输入查询内容！");		theForm.w.focus();		return false;	}	SetViewwords(keys,ns);	cleanCookie();	return true;}function doSearchNew(theForm, newns, ns, classcode, areacode, sign, channelkeyword){	var keys = theForm.w.value;	if (theForm.w.value.substring(0,3) =="请输入" || theForm.w.value == "")	{		alert("请输入查询内容！");		theForm.w.focus();		return false;	}	if (newns > 11 && newns < 19) {		if (theForm.w.value.indexOf(channelkeyword) == -1) {			theForm.w.value += channelkeyword			keys = theForm.w.value;		}	}	//SetViewwordsNew(keys, ns, classcode, areacode, sign);	cleanCookie();	return true;}function doSearchFB(frm,ns)//frmname,nSelect{	var keys = frm.w.value;	var cls="";	if(keys.substring(0,3) =="请输入" || keys=='')	{		keys='';		frm.w.value='';	}	if(frm.i)	{		cls = frm.i[frm.i.selectedIndex].value;	}	if(frm.s)	{		cls = frm.s[frm.s.selectedIndex].value;	}	if(cls == "" && keys == "")	{		alert("请输入查询内容！");		return false;	}	//SetViewwords(keys,ns);	//Clean Cookies	cleanCookie();	return true;}function getObj(objName){return(document.hyformnew.elements[objName]);}function getallObj(objName){return(document.getElementById(objName));}function tag_1(id){		var keywords = document.getElementById("hyformnew").w.value;	if(keywords == "" || keywords == "输入关键字" || keywords=="请输入您感兴趣的产品"||keywords=="请输入产品名的关键字"||keywords=="请输入公司名的关键字"||keywords=="请输入您感兴趣的关键字")	{		switch(id){		case 1:		getObj('w').value="请输入您感兴趣的关键字"; getObj('c').value="供应信息"; getObj('f').value = "";break;		case 2:		getObj('w').value="请输入您感兴趣的关键字"; getObj('c').value="求购信息"; getObj('f').value = "";break;		case 3:		getObj('w').value="请输入您感兴趣的关键字"; getObj('c').value="产品库"; getObj('f').value = "";break;		case 4:		getObj('w').value="请输入您感兴趣的关键字"; getObj('c').value="企业库"; getObj('f').value = "";break;		case 6:		getObj('w').value="请输入您感兴趣的关键字"; getObj('c').value="行业资讯";getObj('f').value = ""; break;		case 9:		getObj('w').value="请输入您感兴趣的关键字"; getObj('c').value="技术文章";getObj('f').value = ""; break;		case 7:		getObj('w').value="请输入您感兴趣的关键字"; getObj('c').value="论坛";getObj('f').value = "";break;		case 8:		getObj('w').value="请输入您感兴趣的关键字"; getObj('c').value="博客";getObj('f').value = "";break;		case 5:		getObj('w').value="请输入您感兴趣的关键词"; getObj('c').value="人才招聘";getObj('f').value = "";break;		default:		getObj('w').value="请输入您感兴趣的关键词"; getObj('c').value="供应信息";getObj('f').value = "";break;		}	}	else {		document.getElementById("hyformnew").w.value = keywords;		switch(id) {		case 1:			getObj('c').value="供应信息"; getObj('f').value = ""; break;		case 2:		 	getObj('c').value="求购信息";getObj('f').value = ""; break;		case 3:		 	getObj('c').value="产品库";getObj('f').value = ""; break;		case 4:		 	getObj('c').value="企业库";getObj('f').value = ""; break;		case 6:		 	getObj('c').value="行业资讯";getObj('f').value = ""; break;		case 9:		 	getObj('c').value="技术文章";getObj('f').value = ""; break;		case 7:		 	getObj('c').value="论坛";getObj('f').value = "";break; 		case 8:		 	getObj('c').value="博客";getObj('f').value = "";break; 		case 5:		 	getObj('c').value="人才招聘";getObj('f').value = "";break;		default:			getObj('c').value="供应信息";getObj('f').value = "";break;		}	}		document.getElementById("hyformnew").currenttag.value = id;	var radiodiv_display = getallObj('bottomsearchradio');	radiodiv_display.innerHTML = "";	switch(id) {		case 1:			var radiodiv = getallObj('bottomsearchradio_1');			radiodiv_display.innerHTML = radiodiv.innerHTML;			break;		case 2:			var radiodiv = getallObj('bottomsearchradio_2');			radiodiv_display.innerHTML = radiodiv.innerHTML;			break;		case 3:			//var radiodiv = getallObj('bottomsearchradio_4');			//radiodiv_display.innerHTML = radiodiv.innerHTML;			break;		case 4:			var radiodiv = getallObj('bottomsearchradio_12');			radiodiv_display.innerHTML = radiodiv.innerHTML;			break;		case 5:			var radiodiv = getallObj('bottomsearchradio_11');			radiodiv_display.innerHTML = radiodiv.innerHTML;			break;		case 6:			var radiodiv = getallObj('bottomsearchradio_5');			radiodiv_display.innerHTML = radiodiv.innerHTML;			break;		case 7:			var radiodiv = getallObj('bottomsearchradio_5');			radiodiv_display.innerHTML = radiodiv.innerHTML;			break;		case 8:			var radiodiv = getallObj('bottomsearchradio_5');			radiodiv_display.innerHTML = radiodiv.innerHTML;			break;		case 9:			var radiodiv = getallObj('bottomsearchradio_5');			radiodiv_display.innerHTML = radiodiv.innerHTML;			break;	}	}function check(theForm, newns, ns, classcode, areacode, sign, channelkeyword){	if (theForm.w.value.substring(0,3) =="请输入" || theForm.w.value == "")	{		alert("请输入查询内容！");		theForm.w.focus();		return false;	}	if (theForm.c.value =="论坛" || theForm.c.value =="博客") {		theForm.action='/cgi-bin/fb';	}	if (newns > 11 && newns < 19) {		if (theForm.w.value.indexOf(channelkeyword) == -1) {			theForm.w.value += channelkeyword		}	}	SetViewwordsNew(theForm.w.value,ns, classcode, areacode, sign);	cleanCookie();	return true;}function check_fb(theForm){	if (theForm.w.value.substring(0,3) =="请输入" || theForm.w.value == "")	{		alert("请输入查询内容！");		theForm.w.focus();		return false;	}	if (theForm.c.value !="论坛" && theForm.c.value !="博客") {		theForm.action="/cgi-bin/ls";	}	return true;}function showsubmenu_block(id, idx){	var obj = document.getElementsByName('dsptr');	if (obj[idx] && obj[idx].style.display == "none") {		dspTr(idx);	}}function showsubmenu_block_new(dspTr, imptr){	dspTrNew(1, dspTr, imptr);}function closeTips(pos){	              document.getElementById("tips_" + pos).style.display = "none";	  SetCookie("tips" + pos, "0", null, "/");}function IsInstallIMCommon(){	if (isIE) {		try{			var im  = new ActiveXObject("HCLogin.DetectHcIM");			//var ret = im.IMIsStart();		}		catch(e)		{			return false;		}	} else if (isGecko) {		try{			var mimetype = navigator.mimeTypes["application/ww-plugin"];			if (mimetype) {			  if (mimetype.enabledPlugin) {					return false;			  }			}		}		catch(e)		{			return false;		}	}	return true;}function cleanCookie() {    //if(confirm("您确认执行清空操作吗？"))    if(true)    {        var value ="";        /*cookieValue= "offerId=" + value + ";domain=.hc360.com";        document.cookie = cookieValue;        cookieValue= "corId=" + value + ";domain=.hc360.com";        document.cookie = cookieValue;        cookieValue= "sellId=" + value + ";domain=.hc360.com";        document.cookie = cookieValue;        cookieValue= "buyId=" + value + ";domain=.hc360.com";        document.cookie = cookieValue;        */                for(var i=1;i<=40;i++)        {            var elem = document.getElementById("compareBox"+i);            if(elem != null && elem.checked)            {                elem.checked = false;                elem = document.getElementById("compareColor"+i);                if(i%2 != 0){                    elem.bgColor="F4F4F6";                }                else{            					elem.bgColor="ffffff";                }            }        }    }    //alert("调试信息:cleanCookie");}function hasKeyword(arg, ns, channel){	var value = GetCookie("viewwords" + channel, 1);	var arr = arg.split('*');	var key = "";	if (arr.length >= 5) {		key = "";		for(var j = 4; j < arr.length; j++) {			key += arr[j] + "*";		}		key = key.substring(0, key.length - 1);	} else {		key = arg;	}		if(value == null || value == "null") {	    return false;	}else{		var storedkey = "";		var keys_array = value.split("#");		for(var i=0;i<keys_array.length;i++) {			storedkey = ""			var arr = keys_array[i].split('*');			if (arr.length >= 5) {				if (arr[0] != ns) continue;				for(var j = 4; j < arr.length; j++) {						storedkey += arr[j] + "*";				}				storedkey = storedkey.substring(0, storedkey.length - 1);				if (key == storedkey) {					return true;				}			} else {				var newns = keys_array[i].substring(keys_array[i].length - 3);				if (newns != ns) continue;				storedkey = keys_array[i].substring(0,keys_array[i].length-3);				if (key == storedkey) {					return true;				}			}		}    return false;	}}function hasItem(arg){	var value = GetCookie("viewitems1");	if(value == null || value == "null" || value.indexOf(arg) == -1 ) {	    return false;	}else{	    return true;	}}function SaveKeyword(str, ns, channel){	if(!hasKeyword(str, ns, channel))	{		if(str == "" ) {		    return;		}		var cookiename = "viewwords" + channel;		var value = GetCookie(cookiename, 1);		var kvalue = "";		if(value == null || value == "null" ) {			kvalue = str ;		} 		else 		{			//GET FIRST 9			var count = 0;			var position = 0;			var len = 0;			var alllen = 0;			kvalue = value;			if(value.indexOf("#") == -1)				kvalue = value;			else			{				while(value.indexOf("#") != -1) 				{					position = value.indexOf("#");					alllen = alllen+position+1;					len = value.length;					value =  value.substring(position+1,len);					count++;					if(count >= 10)						break;				}				if(count>= 10)					kvalue = kvalue.substring(0,alllen-1);			}			kvalue = str + "#" + kvalue;		}//end value==null		var expires = new Date();		expires.setTime(expires.getTime() + 365*24*60*60*1000);				var cookieValue = cookiename + "=" + kvalue + "; expires=" + expires.toGMTString() + "; path=/; domain=.hc360.com";		//alert("调试信息：" + cookieValue);		document.cookie = cookieValue;			}//end hasKeyword	}function SetViewwords(keys,ns)	//SetViewwords{	if(ns == null)		return;	if(keys==null || keys == "")		return;	if(ns == 4)		keys = keys + "[8]";        else if(ns == 5)		keys = keys + "[9]";	else if(ns == 1)		keys = keys + "[1]" 	else if(ns == 2)		keys = keys + "[2]" 	else		return;	SaveKeyword(keys);	return;}function SetRecentItem(id, clazz, u, imageu, price, title)	{	if (hasItem(id)) {		return;	}	var str = "";	var newclazz = "";	if(clazz == 4)		newclazz = "8";  else if(clazz == 5)		newclazz = "9";	else if(clazz == 1)		newclazz = "0";	else if(clazz == 2)		newclazz = "1";	else		return;		str += id;	str += "*" + newclazz;	str += "*" + u;	str += "*" + imageu;	str += "*" + price;	str += "*" + title;		var value = GetCookie("viewitems1");	var kvalue = "";	if(value == null || value == "null" ) {		kvalue = str ;	} 	else 	{		var count = 0;		var position = 0;		var len = 0;		var alllen = 0;		kvalue = value;		if(value.indexOf(view_items_separator) == -1)			kvalue = value;		else		{			while(value.indexOf(view_items_separator) != -1) 			{				position = value.indexOf(view_items_separator);				alllen = alllen+position + view_items_separator.length;				len = value.length;				value =  value.substring(position + view_items_separator.length,len);				count++;				if(count >= 5)					break;			}			if(count>= 5)				kvalue = kvalue.substring(0,alllen - view_items_separator.length);		}		kvalue = str + view_items_separator + kvalue;	}	SetCookie("viewitems1", kvalue, 365 * 24 * 60 * 60 * 1000, "/");}function SetViewwordsNew(keys,ns, classcode, areacode, sign)	//SetViewwords{	var str;	var channel;	if(ns == null)		return;	if(keys==null || keys == "")		return;	if(ns == 4)		str =  "[8]";	else if(ns == 5)		str = "[9]";	else if(ns == 1)		str =  "[1]";	else if(ns == 2)		str =  "[2]";	else		return;	channel = str;	SetCookie("hclastsearchkeyword", keys, 60 * 60 * 24 * 10, "/");	str += "*" + classcode;	str += "*" + areacode;	str += "*" + sign;	str += "*" + escape(keys);	SaveKeyword(str, channel, ns);	return;}function getImageUrl(u, type) { //type 0:  small image, 1: large image	if (!u) return;	var begin = u.lastIndexOf("/");	var u1 = u.substring(0, begin);	var filname = u.substring(begin + 1);		if (type == 0) {		return u1 + "/l_" + filname;	} else if(type == 1) {		return u1 + "/l_" + filname;	}}//分类选择日志function countMenu(){		try {	    var tempid = document.getElementById('kzdx');		  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");		} catch (e) {		  try {		    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");		  } catch (e2) {		    xmlHttp = false;		  }		}		if (!xmlHttp && typeof(XMLHttpRequest) != 'undefined') {		  xmlHttp = new XMLHttpRequest();		}		if(xmlHttp&&tempid&&tempid.options[tempid.options.selectedIndex].value){			var bust = Math.random()* 1000000000000000000;			var url = "/search/log.html?type=ClassMenu&rnd=" + bust;			xmlHttp.open("GET",url,true);			xmlHttp.send(null);		}		if(xmlHttp&&tempid&&!tempid.options[tempid.options.selectedIndex].value){			var bust = Math.random()* 1000000000000000000;			var url = "/search/log.html?type=FullClassMenu&rnd=" + bust;			xmlHttp.open("GET",url,true);			xmlHttp.send(null);		}}//左侧物理分类日志function productlog(){	try {	var tempid = document.getElementById('kzdx');	  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");	} catch (e) {	  try {		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");	  } catch (e2) {		xmlHttp = false;	  }	}	if (!xmlHttp && typeof(XMLHttpRequest) != 'undefined') {	  xmlHttp = new XMLHttpRequest();	}	if(form.propertycount)	{		var pCount = parseInt(form.propertycount.value);		var pValue = 0;		var tValue = "";		for (var lp = 0;lp<pCount;lp++)		{		 var objName = document.getElementById('h' + lp);		 if (objName != null)			{			tValue = objName.options[objName.selectedIndex].value;			if(tValue != "")				pValue++;			}		}     // alert("pValue="+pValue);	  if (pValue>0&&xmlHttp)	  {		var bust = Math.random()* 1000000000000000000;		var url = "/search/log.html?type=product_parameter_filter&rnd=" + bust;		xmlHttp.open("GET",url,true);		xmlHttp.send(null);	  }   }}	function log2(filename,type1){	if(filename == null || filename == "")		return;	try {	  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");	} catch (e) {	  try {	    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");	  } catch (e2) {	    xmlHttp = false;	  }	}		if (!xmlHttp && typeof(XMLHttpRequest) != 'undefined') {	  xmlHttp = new XMLHttpRequest();	}	if(xmlHttp){		var bust = Math.random()* 1000000000000000000;		var u = "/search/"+filename+".html?type="+type1 +"&rnd=" + bust;		try {			xmlHttp.open("GET",u,true);			xmlHttp.send(null);		} catch (e3) {			hcsearchclick(u);		}	}}function log3(filename,type1,type2){	if(filename == null || filename == "")		return;	try {	  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");	} catch (e) {	  try {	    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");	  } catch (e2) {	    xmlHttp = false;	  }	}		if (!xmlHttp && typeof(XMLHttpRequest) != 'undefined') {	  xmlHttp = new XMLHttpRequest();	}	if(xmlHttp){		var bust = Math.random()* 1000000000000000000;		var u = "/search/"+filename+".html?type="+type1 +"&type1=" +type2+"&rnd=" + bust;		try {			xmlHttp.open("GET",u,true);			xmlHttp.send(null);		} catch (e3) {			hcsearchclick(u);		}	}	}//供应页面匿名求购function checkanonymousbuy(frm, noresult) {	if (frm.islogin && frm.islogin(0)) {		if (frm.islogin(0).checked == true) {			frm.action = "http://my.b2b.hc360.com/my/turbine/template/pubinfo,infopub,buypub.html";			if (noresult == 1) {				frm.action += "?pubinfo=ssupply_error";			} else {				frm.action += "?pubinfo=ssupply";			}		} else {			frm.action = "http://my.b2b.hc360.com/my/turbine/template/pubinfo,anonymousbusin,anonymousbuy.html";		}	}	return true;}//求购页面匿名供应function checkanonymousbuy1(frm, noresult) {	if (frm.islogin && frm.islogin(0)) {		if (frm.islogin(0).checked == true) {			frm.action = "http://my.b2b.hc360.com/my/turbine/template/pubinfo,infopub,businpub.html";			if (noresult == 1) {				frm.action += "?pubinfo=sbuy_error";			} else {				frm.action += "?pubinfo=sbuy";			}		} else {			frm.action = "http://my.b2b.hc360.com/my/turbine/template/pubinfo,anonymousbusin,anonymousupply.html";		}	}	return true;}function versionalert() {	var IE = (document.all) ? 1: 0;	if (!IE) {		var needalert = GetCookie("versionalert");		if (needalert != "1") {			alert("慧聪网友情提示：\n\n        您使用的是Netspace、Firefox或者其它非IE浏览器，可能会导致无法使用搜索的部分功能。\n\n建议您使用IE6.0或以上的版本。");			SetCookie("versionalert", "1", null, "/");		}	}}function statusprintf(text) {self.status = text;}function statusnone() {self.status = '';done = 1;}function nsearch(){for(i=0;i<document.forms.length;i++){	document.forms[i].lg.value="1";}}function changeImageSize(img) {    if(img.height > 70 || img.width > 70){      if(img.height >= img.width)      {        img.height=70;      } else {        img.width=70;      }    }  }function regInput(obj, reg, inputStr){	var docSel	= document.selection.createRange()	if (docSel.parentElement().tagName != "INPUT")	return false	oSel = docSel.duplicate()	oSel.text = ""	var srcRange	= obj.createTextRange()	oSel.setEndPoint("StartToStart", srcRange)	var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)	return reg.test(str)}function showul_bak090603(ulclsname,liclsname,showmorename,layername){	var disp;	if(null == layername)	layername = "showlayer";	var showmore = document.getElementById(showmorename);	var Lshow = document.getElementById(layername);	if(showmore)	{		if(showmore.className == "showmore")		{	        Lshow.innerHTML = "<A  style=\"cursor:pointer;color:#FF0000;\" onmouseover=this.style.textDecoration='underline'   onmouseout=this.style.textDecoration='' onclick=\"showul('"+ulclsname+"','more','"+showmorename+"','"+layername+ 	                    "');Logger('classbrief_" + layername  + "');\"><font color=#FF0000>&lt;&lt;简洁显示</font></A>&nbsp;";	        showmore.className = "showless";			disp = "block";		}		else		{			Lshow.innerHTML = "<A  style=\"cursor:pointer;color:#FF0000;\" onmouseover=this.style.textDecoration='underline' onmouseout=this.style.textDecoration=''  onclick=\"showul('"+ulclsname+"','more','"+showmorename+"','"+layername+"');Logger('classmore_" + layername  + "');\"><font color=#FF0000>更多&gt;&gt;</font></A>";			showmore.className = "showmore";			disp = "none";		}	}	for(var i=1;i<=3;i++)	{	    var cds=document.getElementById("showclass"+i);		    if(("showlayer"+i!=layername) && cds != null){	        var checkShow=document.getElementById("showlayer"+i);	        if (checkShow!=null)	        {	        	checkShow.innerHTML = "<A style=cursor:pointer;color:#FF0000; onmouseover=this.style.textDecoration='underline' onmouseout=this.style.textDecoration='' onclick=\"showul('showclass"+i+"','more','lshowmore"+i+"','showlayer"+i+"','"+3+ "');Logger('classmore_" + layername  + "');\"><font color=#FF0000>更多&gt;&gt;</font></A>";		    }	       	        for (var j=0; j< cds.childNodes.length; j++)	        {	            var chis=cds.childNodes.item(j);	            if (chis && (chis.tagName == 'li' || chis.tagName == 'LI') && chis.className && chis.className == liclsname)	            {	                chis.style.display="none";	                document.getElementById("lshowmore"+i).className = "showmore";	            }	        }	    }	}	var es = document.getElementById(ulclsname);	for (var j = 0; j < es.childNodes.length; j++) {		var child = es.childNodes.item(j);		if (child && (child.tagName == 'li' || child.tagName == 'LI') && child.className && child.className == liclsname)child.style.display=disp;	}}function showul(ulclsname,liclsname,showmorename,layername,numDiv,borcolorID)//修改四期0519{		var cds;	if(null == layername)	layername = "showlayer";	var showmore = document.getElementById(showmorename);	var Lshow = document.getElementById(layername);	//alert(showmore.className);	if(showmore)	{		if(showmore.className == "showmore")		{            Lshow.innerHTML = "<A class=nav2 style=cursor:pointer;color:#FF0000; onclick=\"showul('"+ulclsname+"','more','"+showmorename+"','"+layername+ "','"+numDiv+ "','"+borcolorID+ "');\"><span style=\"color:#FF0000;\">&lt;&lt;简洁显示</font></A>&nbsp;";			showmore.className = "showless";			document.getElementById(borcolorID).className="serbox_02";			disp = "block";		}		else		{			Lshow.innerHTML = "<A class=nav2 style=cursor:pointer;color:#FF0000; onclick=\"showul('"+ulclsname+"','more','"+showmorename+"','"+layername+"','"+numDiv+ "','"+borcolorID+ "');\"><span style=\"color:#FF0000;\">更多&gt;&gt;</span></A>";						showmore.className = "showmore";			document.getElementById(borcolorID).className="serbox_01";			disp = "none";		}	}		for(i=1;i<=numDiv;i++) 	{	cds=document.getElementById("showclass"+i);	if (("showlayer"+i!=layername) && (cds != null)){		var checkShow=document.getElementById("showlayer"+i);		if (checkShow!=null) {				checkShow.innerHTML = "<A class=nav2 style=cursor:pointer;color:#FF0000; onclick=\"showul('showclass"+i+"','more','lshowmore"+i+"','showlayer"+i+"','"+numDiv+ "','bordid0"+i+"');\"><span style=\"color:#FF0000;\">更多&gt;&gt;</span></A>";		}					document.getElementById("bordid0"+i).className="serbox_01";			cds=removeBlank(cds);//去掉空白节点，引用于hcajax.js			for (var j = 0; j < cds.childNodes.length; j++)			{				chis=cds.childNodes.item(j);				//alert(getXml(chis));				if (chis && chis.tagName.toUpperCase()  == 'LI' && chis.className && chis.className == liclsname)				{					chis.style.display="none";					document.getElementById("lshowmore"+i).className = "showmore";									}			}		}	}		var es = document.getElementById(ulclsname);	for (var j = 0; j < es.childNodes.length; j++) {		var child = es.childNodes.item(j);		if (child && child.tagName && child.tagName.toUpperCase()  == 'LI' && child.className && child.className == liclsname)		child.style.display=disp;		}	}function showul_back1(ulclsname,liclsname,showmorename,layername){	if(null == layername)		layername = "showlayer";	var showmore = document.getElementById(showmorename);	var Lshow = document.getElementById(layername);	if(showmore)	{		if(showmore.className == "showmore")		{            Lshow.innerHTML = "<A  style=\"cursor:pointer;color:#FF0000;\" onmouseover=this.style.textDecoration='underline'   onmouseout=this.style.textDecoration='' onclick=\"showul('"+ulclsname+"','more','"+showmorename+"','"+layername+                         "');Logger('classbrief_" + layername  + "');\"><font color=#FF0000>&lt;&lt;简洁显示</font></A>&nbsp;";            showmore.className = "showless";			disp = "block";		}		else		{			Lshow.innerHTML = "&nbsp;<A  style=\"cursor:pointer;color:#FF0000;\" onmouseover=this.style.textDecoration='underline' onmouseout=this.style.textDecoration=''  onclick=\"showul('"+ulclsname+"','more','"+showmorename+"','"+layername+"');Logger('classmore_" + layername  + "');\"><font color=#FF0000>更多&gt;&gt;</font></A>";			showmore.className = "showmore";			disp = "none";		}	}	var es = document.getElementById(ulclsname);	for (var j = 0; j < es.childNodes.length; j++) {		var child = es.childNodes.item(j);		if (child && (child.tagName == 'li' || child.tagName == 'LI') && child.className && child.className == liclsname)child.style.display=disp;	}}function showul_bak(ulclsname,liclsname,showmorename,layername){	if(null == layername)		layername = "showlayer";	var showmore = document.getElementById(showmorename);	var Lshow = document.getElementById(layername);	if(showmore)	{		if(showmore.className == "showmore")		{			Lshow.innerHTML = "<A style='color:#ff0000' href=javascript:showul_bak('"+ulclsname+"','more','"+showmorename+"','"+layername+"')><u>&lt;&lt;简洁显示</u></A>&nbsp;";			showmore.className = "showless";			disp = "block";		}		else		{			Lshow.innerHTML = "<A style='color:#ff0000;' href=javascript:showul_bak('"+ulclsname+"','more','"+showmorename+"','"+layername+"')><u>更多&gt;&gt;</u></A>";			showmore.className = "showmore";			disp = "none";		}	}	var es = document.getElementsByTagName('ul');	for (var i=0;i<es.length;i++)	{		var e = es.item(i);		if( e && e.className && e.className == ulclsname)//find obj		{			for (var j = 0; j < e.childNodes.length; j++) {				var child = e.childNodes.item(j);				if (child && (child.tagName == 'li' || child.tagName == 'LI') && child.className && child.className == liclsname)child.style.display=disp;			}		}	}}function urljump(hurl,tar){	if(frmsearchhead.w.value == "输入关键字" || frmsearchhead.w.value=="")	{		frmsearchhead.w.value="";	}		window.location.href=hurl + "&w=" + frmsearchhead.w.value;	return false;}function GetHttpRequest() {	var httpRequest;		if (window.XMLHttpRequest){ // Mozilla, Safari,...		httpRequest = new XMLHttpRequest();		if (httpRequest.overrideMimeType){			httpRequest.overrideMimeType('text/xml');		}	}	else if (window.ActiveXObject){ // IE		try{			httpRequest = new ActiveXObject("Msxml2.XMLHTTP");					}		catch(e){			try {				httpRequest = new ActiveXObject("Microsoft.XMLHTTP");							} 			catch(e){}		}	}		return httpRequest;}function checkword(tag, event, channel) {	if (!isSuggested) return;	var returnValue = false;	switch(event.keyCode){		case 38: // UP			break;		case 40: // DOWN			break;		case 13: // ENTER			break;					case 24: // ESC			tag.value = "";			break;		default:			var httpRequest = GetHttpRequest();			httpRequest.onreadystatechange = function()			{						if(httpRequest.readyState == 1)// 开始加载				{				}				if(httpRequest.readyState == 4)	// 调用完毕				{								if(httpRequest.status == 200) // 加载成功					{						try{											  	var txt = unescape(httpRequest.responseText);					  	var item = document.getElementById("extendedsearch");					  	item.innerHTML = txt;						}catch(e){						}					}				}			}			try{				if (tag.value.length > 0) {					var  url="http://www.search.hc360.com/cgi-bin/checkword?c=" + channel + "&w=" + tag.value;					httpRequest.open("get", url, true);					httpRequest.setRequestHeader("Content-Type", "text/xml");					httpRequest.setRequestHeader("charset", "GBK");					httpRequest.send(null);				} else {					var item = document.getElementById("extendedsearch");			  		item.innerHTML = "";				}			}catch(e){			}			returnValue = true;			break;	}	return returnValue;}function checkword1(tag, channel) {	if (!isSuggested) return;	var returnValue = false;	var httpRequest = GetHttpRequest();	httpRequest.onreadystatechange = function()	{				if(httpRequest.readyState == 1)// 开始加载		{		}		if(httpRequest.readyState == 4)	// 调用完毕		{						if(httpRequest.status == 200) // 加载成功			{				try{									  	var txt = unescape(httpRequest.responseText);			  	var item = document.getElementById("extendedsearch");			  	item.innerHTML = txt;				}catch(e){				}			}		}	}	try{		if (tag.value.length > 0) {			var  url="http://www.search.hc360.com/cgi-bin/checkword?c=" + channel + "&w=" + tag.value;			httpRequest.open("get", url, true);			httpRequest.setRequestHeader("Content-Type", "text/xml");			httpRequest.setRequestHeader("charset", "GBK");			httpRequest.send(null);		} else {			var item = document.getElementById("extendedsearch");	  		item.innerHTML = "";		}	}catch(e){	}	returnValue = true;	return returnValue;}function setCookieHCadpopup(){	if ( getCookieHCadpopup("HCadRegister") == null )	{		var expires = new Date();		expires.setTime(expires.getTime() + 60*60*1000);// expires.toGMTString()		var the_cookie = "HCadRegister=viewed;path=/;";		document.cookie = the_cookie;	}}function getCookieHCadpopup(cookieName) {  var cookieString = document.cookie;  var start = cookieString.indexOf(cookieName + '=');  if (start == -1)    return null;  start += cookieName.length + 1;  var end = cookieString.indexOf(';', start);  if (end == -1) return unescape(cookieString.substring(start));  return unescape(cookieString.substring(start, end));}function ViewProductDetail(detaillayer, id, providerid, type) {	var layer1 = document.getElementById(detaillayer + "_detail");	var layer2 = document.getElementById(detaillayer + "_show");	if (layer1.innerHTML != "") {  	CloseProductDetail(detaillayer);  	return;  }  if(layer1 !=null && layer2 != null){		layer1.innerHTML = "<div id=\"ckmx\"><div style=\"float:left\"><iframe src=\"http://detail.b2b.hc360.com/detail/turbine/template/common,infosearch.html?providerid="+providerid+"&id=" + id + "&type=" + type + "\" WIDTH=680 HEIGHT=300 allowtransparency=\"true\" MARGINWIDTH=0 MARGINHEIGHT=0 FRAMEBORDER=0 SCROLLING=no></iframe></div><div id=\"right\"><img src=\"/images/search_112.gif\" style=\"cursor:pointer\" onclick=\"CloseProductDetail('" + detaillayer + "');\"/></div></div>";		layer2.className = "but8";		Logger("viewproductdetail_" + type);  }}function CloseProductDetail(detaillayer) {	var layer1 = document.getElementById(detaillayer + "_detail");	var layer2 = document.getElementById(detaillayer + "_show");  if(layer1 !=null && layer2 != null){  	layer1.innerHTML="";  	layer2.className = "but5";  }}function HCpop() {		window.open('/hcpop.cgi?w=mp3&A=', 'myt','left=0,top=10,width=380, height=350,location=no,toolbar=no,status=no,resizable=no,scrollbars=no');} function addimgroup(aa) {	try{		var im  = new ActiveXObject("HCLogin.DetectHcIM");		var groupid=aa;		var ret = im.join_qun(groupid);		var ret1 = im.IMIsStart();	}	catch(e)	{		return false;	}	return false;}function hcsearchclick(u) {    if(document.images) {        (new Image()).src = u;    }    return true;}function ShowAllChannel(_this,id,bgleft,bgtop1,bgtop2){	var backframe = $("Banner_Frame");	var frontframe = $(id);	frontframe.style.display="block";	backframe.style.width = frontframe.offsetWidth;	backframe.style.height = frontframe.offsetHeight;	backframe.style.top = frontframe.offsetTop;	backframe.style.left = frontframe.offsetLeft;	backframe.style.zIndex = frontframe.style.zIndex - 1000;	backframe.style.display="block";	frontframe.style.display="block";	var bgpos1 = bgleft + " " + bgtop1;	var bgpos2 = bgleft + " " + bgtop2;	$(id).onmouseover=function(){this.style.display="block";backframe.style.display="block";_this.style.backgroundPosition=bgpos1;}	$(id).onmouseout=function(){this.style.display="none";backframe.style.display="none";_this.style.backgroundPosition=bgpos2;}	_this.style.backgroundPosition=bgpos1;	_this.onmouseout=function(){$(id).style.display="none";backframe.style.display="none";_this.style.backgroundPosition=bgpos2;}}function ShowMoreChannel(pid,id,bgleft,bgtop1,bgtop2){	var backframe = $("Banner_Frame");	var frontframe = $(id);		frontframe.style.display="block";	backframe.style.width = frontframe.offsetWidth;	backframe.style.height = frontframe.offsetHeight;	backframe.style.top = frontframe.offsetTop;	backframe.style.left = frontframe.offsetLeft;	backframe.style.zIndex = frontframe.style.zIndex - 1000;	backframe.style.display="block";	frontframe.style.display="block";		var bgpos1 = bgleft + " " + bgtop1;	var bgpos2 = bgleft + " " + bgtop2;	$(id).onmouseover=function(){this.style.display="block";$(pid).style.backgroundPosition=bgpos1;}	$(id).onmouseout=function(){this.style.display="none";$(pid).style.backgroundPosition=bgpos2;}}var needToPopIndHomePage = true;function DrawImage(ImgD){     	var image=new Image();     	image.src=ImgD.src;   	if(image.width>0 && image.height>0){		var val = image.width - image.width;			if(image.width > image.height)//宽比高值大		{			if (image.width > 90)//原图按比例缩小			{					ImgD.width=90;							ImgD.height=(image.height*90)/image.width;  			}else //原尺寸显示			{					ImgD.width=image.width;                 					ImgD.height=image.height; 			}		} else		{			if (image.height > 90)			{				ImgD.height=90; 				ImgD.width=(image.width*90)/image.height;  			}else			{				ImgD.width=image.width; 				ImgD.height=image.height;							}		}         	} } function hcclick(param) {    if(document.images) {	var rannumber=Math.round(Math.random()*10000);        (new Image()).src="http://log.info.hc360.com/click.htm" + param + "&rannumber="+rannumber;    }    return true;}/***date:2009-04-27*//*** checkBox按钮组对象*/function CheckBox(divHeight){this.divHeight = divHeight;this.clickCount = 0;this.checkCount = 0;//当前选中的CHECKthis.checkBoxChilds = new Array();}CheckBox.prototype = {init:function(checkEl){for(var i=0;i<this.checkBoxChilds.length;i++){if(this.checkBoxChilds[i].checked==true){this.checkCount++;}}if(checkEl.checked==true){this.checkCount = this.checkCount-1;}if(checkEl.checked==false){this.checkCount = this.checkCount+1;}},/*** 获取当前check在checkBox中的序列*/getNum:function(checkEl){for(var i=0;i<this.checkBoxChilds.length;i++){if(this.checkBoxChilds[i].id==checkEl.id){return i;}}},/*** 根据在checkBox中的序列返回相应的check对象*/getCheck:function(num){return this.checkBoxChilds[num];},/*** 加载checkbox对象到checkbox组中*/add:function(checkEl){this.checkBoxChilds[this.checkBoxChilds.length] = document.getElementById(checkEl);},/*** 获取离当前checkbox最近的选中的checkbox的序列*/getNearCheckedNum:function(checkEl){var checkElNum = this.getNum(checkEl);var upCheckedNum = this.getUpCheckedNum(checkElNum);var downCheckedNum = this.getDownCheckedNum(checkElNum);if(upCheckedNum!=null&&downCheckedNum!=null){if((checkElNum-upCheckedNum)<=(downCheckedNum-checkElNum)){return upCheckedNum;}else{return downCheckedNum;}}else if(upCheckedNum==null&&downCheckedNum!=null){return downCheckedNum;}else if(upCheckedNum!=null&&downCheckedNum==null){return upCheckedNum;}else{return checkElNum;}},/*** 向上获取最近的选中的checkbox的序列*/getUpCheckedNum:function(num){for(var i = num-1;i>=0;i--){if(this.checkBoxChilds[i].checked){return i;}}return null;},/*** 向下获取最近的选中的checkbox的序列*/getDownCheckedNum:function(num){for(var i = num+1;i<this.checkBoxChilds.length;i++){if(this.checkBoxChilds[i].checked){return i;}}return null;},changecheckStat:function(checkEl){if(this.clickCount==0){this.init(checkEl);}this.clickCount++;if(checkEl.checked){this.checkCount++;if(this.checkCount>=2){this.showFloatDiv(checkEl);}else{this.hiddenFlaotDiv();}}else{this.checkCount--;if(this.checkCount>=2){this.showFloatDiv(this.getCheck(this.getNearCheckedNum(checkEl)));}else{this.hiddenFlaotDiv();}}},clearCount:function(){this.clickCount = 0;this.checkCount = 0;this.hiddenFlaotDiv();},/*** 显示并定位提示浮动层*/showFloatDiv:function(checkEl){document.getElementById("tishiDiv").style.display = "block";document.getElementById("tishiDiv").style.position = "absolute";document.getElementById("tishiDiv").style.top = getXY(checkEl)[1]-this.divHeight+18+"px";document.getElementById("tishiDiv").style.left = getXY(checkEl)[0]-10+"px";},/*** 隐藏提示浮动层*/hiddenFlaotDiv:function(){document.getElementById("tishiDiv").style.display = "none";}}/*** 获取对象el的X,Y坐标* @param {Object} el*/function getXY(el){var pos;if(this.getExplorerType()==1){var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop);var scrollLeft = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);pos = [el.getBoundingClientRect().left+scrollLeft, el.getBoundingClientRect().top+scrollTop];}else{pos = [el.offsetLeft, el.offsetTop];var parentNode = el.offsetParent;if (parentNode != el) {while (parentNode) {pos[0] += parentNode.offsetLeft;pos[1] += parentNode.offsetTop;parentNode = parentNode.offsetParent;}}if (el.parentNode) { parentNode = el.parentNode; }else { parentNode = null; }while (parentNode && parentNode.tagName.toUpperCase() != 'BODY' && parentNode.tagName.toUpperCase() != 'HTML'){if (parentNode.style.display != 'inline') {pos[0] -= parentNode.scrollLeft;pos[1] -= parentNode.scrollTop;}if (parentNode.parentNode) {parentNode = parentNode.parentNode;} else { parentNode = null; }}}return pos;}function getExplorerType(){var ua = navigator.userAgent.toLowerCase();if(window.ActiveXObject){return 1;}else if((ua.indexOf('firefox')>-1)){return 2;}else if((ua.indexOf('opera')>-1)){return 3;}}function overShow(num) { 	document.getElementById('adimg'+num).style.display='none';document.getElementById('adtext'+num).style.display='block';}function outShow(e,o,num) {         /* FF 下判断鼠标是否离开DIV */    if(window.navigator.userAgent.indexOf("Firefox")>=1) {         var x = e.clientX + document.documentElement.scrollLeft;        var y = e.clientY + document.documentElement.scrollTop;        var left = o.offsetLeft;        var top = o.offsetTop;        var w = o.offsetWidth;        var h = o.offsetHeight;                if(y < top || y > (h + top) || x > left + w || x<left ) {             document.getElementById('adtext'+num).style.display='none';document.getElementById('adimg'+num).style.display='block';document.getElementById('adtitleInfo'+num).style.position='';        }    }    /* IE */    if(o.contains(event.toElement ) == false    ) 	{	document.getElementById('adtext'+num).style.display='none';document.getElementById('adimg'+num).style.display='block';document.getElementById('adtitleInfo'+num).style.position='';	}}//搜索四期function showDiv(o){ var fo = document.getElementById(o);fo.style.display = "";var im1 = document.getElementById("filter_class");var im2 = document.getElementById("filter_ind");var im3 = document.getElementById("filter_brand");var im4 = document.getElementById("filter_param");var im5 = document.getElementById("filter_area");var i = 0;if (im1) {	if (GetCookie(im1.name) == "1") {		im1.checked = true;		i++;	}}if (im2) {	if (GetCookie(im2.name) == "1") {		im2.checked = true;		i++;	}}if (im3) {	if (GetCookie(im3.name) == "1") {		im3.checked = true;		i++;	}}if (im4) {	if (GetCookie(im4.name) == "1") {		im4.checked = true;		i++;	}}if (im5) {	if (GetCookie(im5.name) == "1") {		im5.checked = true;	}}var IE = (document.all) ? 1: 0;	//if (!IE) {		var rightedge= curMouseX;		var topedge= curMouseY- 10;		fo.style.left=rightedge+"px";		fo.style.top=topedge+ "px"	//}}function showDivMenu(a){ var a = document.getElementById(a); a.style.display = "none";	} //得到一个hcAjax对象function hcAjax(){	this.response=response;	/**	*url:访问的目标地址	*para:type为post方式时，传递的参数. infotype为txt时，格式为&para1=value1&para2=value2&para3=value3	*                               infotype为xml时，格式为xml对象，或者为字符串。	*type:提交方式，post；get	*infotype:txt为普通参数提交，xml为xml格式文档	*succeed:成功后执行的方法名。如果这里传入了字符，那么直接给以字符串为ID的html对象的innerHTML属性写入返回的字符串。	*waiting:是否异步执行。	*/			this.request=function(url,para,type,infotype,succeed,waiting){	type=type.toLowerCase();	infotype=infotype.toLowerCase();		var req=getReq();		req.onreadystatechange = function(){     		response(req,succeed,infotype);     	};     	     	req.open(type, url, waiting);     	if(infotype=="xml"){     		req.setRequestHeader('Content-type','text/html;charset=UTF-8');     		if(type=="post"){     		//alert("??"+getXml(para));     		req.send( encodeURI(getXml(para)) );     		}else{     		req.send( null );     		}     	}else{     		req.setRequestHeader('Content-type','application/x-www-form-urlencoded');     		if(type=="post"){			req.send(encodeURI(encodeURI(para)));			}else{			req.send(null);			}     	}     		}; 	function response(req,succeed,infotype){		if(req.readyState == 4){			if (req.status == 200) {				if(infotype=="xml"){				succeed(removeBlank(req.responseXML));				}else{					if(typeof(succeed)=="string"){					 	document.getElementById(succeed).innerHTML=(req.responseText);					}else{						succeed(req.responseText);					}				}			} else {        		alert("HTTP error: "+req.status);      		}		}	}; }//得到一个hcAjax对象结束//兼容ie ff代码var Sys = {};var ua = navigator.userAgent.toLowerCase();var s;(s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :(s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :(s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :(s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :(s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;var visionErr="目前代码仅支持ie和firefox！";//得到一个XMLHttpRequest对象function getReq(){var request = false;if(Sys.ie){    	var msxmls = new Array('Msxml2.XMLHTTP.5.0','Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.3.0','Msxml2.XMLHTTP','Microsoft.XMLHTTP','XMLHttpRequest');		for (var i = 0; i < msxmls.length; i++)		{			try 			{				return new ActiveXObject(msxmls[i]);			} 			catch (e)			{							}		}    }else if(Sys.firefox){		return new XMLHttpRequest();     }else{    	alert(visionErr);    } 	return null;}//得到一个XMLHttpRequest对象结束function getXMLObj(){//得到一个xml文档对象	if(Sys.ie){     return new ActiveXObject("Msxml2.DOMDocument");     }else if(Sys.firefox){     return   document.implementation.createDocument("", "", null);     }else{     alert(visionErr);     }}function removeBlank(theItems){//去掉空白节点	if(typeof(theItems)=="string"){return theItems}    if(Sys.ie){    return theItems;    }else if(Sys.firefox){		if(theItems.hasChildNodes()){			for (var i=0; i<theItems.childNodes.length; i++) {				if (theItems.childNodes[i].nodeType == 3 		        && theItems.childNodes[i].nodeName=="#text"		        && theItems.childNodes.length>1 ) {		            theItems.removeChild(theItems.childNodes[i]);		        }else{		        	theItems.childNodes[i]=removeBlank(theItems.childNodes[i]);		        }		    }	    }	    return theItems;    }else{    	alert(visionErr);    }}function getXml(oNode) {//得到某个节点的字符串	if(typeof(oNode)=="string"){return oNode}	if(Sys.ie){    	return oNode.xml;    }else if(Sys.firefox){		var oSerializer = new XMLSerializer(); 		return oSerializer.serializeToString(oNode);    }else{    	alert(visionErr);    }	}function setNodeText(oNode,theText) {//设置文本节点的内容	if(Sys.ie){    	oNode.text=theText;    }else if(Sys.firefox){		oNode.textContent=theText;    }else{    	alert(visionErr);    }}//兼容ie ff代码function changeColor(countId,checkboxID){	var trTag = document.getElementById("compareColor"+countId);	if(checkboxID.checked==true){		trTag.className="bj03";	}	else{		trTag.className="bj3";	}}//添加收藏夹function hcaddFav(){try{var title = document.title;var url = window.location.href;if (window.sidebar) {	window.sidebar.addPanel(title, url, '');} else if( window.external ) {	window.external.AddFavorite(url, title);}}catch(e){}}