
//头部搜索框
 function topsearch(){
 document.writeln('<div class="searchT" id="searchBarT">');
 document.writeln('<ul>');
 document.writeln('<li class="nTab" id="node1" onclick="javascript:doclick(this,1);searchform.c.value=\'供应信息\';"onMouseDown="return hcclick(\'?hcdetail_supplyselflog=supplyselftopsearch\')">供应</li>');
 document.writeln('<li class="nTab" id="node2" onclick="javascript:doclick(this,2);searchform.c.value=\'求购信息\';"onMouseDown="return hcclick(\'?hcdetail_supplyselflog=supplyselftopsearch\')">求购</li>');
 document.writeln('<li class="nTab" id="node3" onclick="javascript:doclick(this,3);searchform.c.value=\'企业库\';"onMouseDown="return hcclick(\'?hcdetail_supplyselflog=supplyselftopsearch\')">公司</li>');
 document.writeln('<li class="nTab" id="node4" onclick="javascript:doclick(this,4);searchform.c.value=\'行业资讯\';"onMouseDown="return hcclick(\'?hcdetail_supplyselflog=supplyselftopsearch\')">资讯</li>');
 document.writeln('<li class="nTab" id="node5" style="WIDTH: 48px;" onclick="javascript:doclick(this,5);searchform.c.value=\'论坛\';"onMouseDown="return hcclick(\'?hcdetail_supplyselflog=supplyselftopsearch\')">论坛</li>');
 document.writeln('<li class="defaultTab">&nbsp;</li>');
 document.writeln('</ul>');
 document.writeln('</div>');
 document.writeln('<div class="searchC">');
 document.writeln('<FORM id="searchform" name="searchform" action="http://www.search.hc360.com/cgi-bin/ls?" method="post" target="_blank">');
 document.writeln('<input name="w" class="textInput" style="font-size:13px; height:18px; line-height:18px;" type="text" value=\'\' size="30" />');
 document.writeln('<input name="c" type="hidden" value="供应信息">');
 document.writeln('<img src="http://detail.b2b.hc360.com/detail/images/home/sou.gif" width="55" height="21" align="absmiddle" onclick="cookieLog(document.searchform.w.value,document.searchform.c.value);return onSubmitSearch(document.searchform);" onMouseDown="return hcclick(\'?hcdetail_supplyselflog=supplyselftopsearch\')" style="cursor:pointer"/>');
 document.writeln('</FORM>');
 document.writeln('</div>');
 doclick(findObj("node1"),1);
 }
 
 function onSubmitSearch(theForm){
	if(theForm.w.value==''){
		alert("请输入关键字");
		return false;
	}
	if(theForm.c.value=='论坛'){
	theForm.action ='http://www.search.hc360.com/cgi-bin/fb';
	}
	else{
	theForm.action ='http://www.search.hc360.com/cgi-bin/ls?';
	}
	theForm.submit();
	return true;
}


 //详细说明和留言信息之间的切换
 function Show_YKTab(YKTabid_num,YKTabnum){
 for(var i=0;i<2;i++){document.getElementById("YKTabCon_"+YKTabid_num+i).style.display="none";}
 for(var i=0;i<2;i++){document.getElementById("YKTabMu_"+YKTabid_num+i).className="bb";}
 document.getElementById("YKTabMu_"+YKTabid_num+YKTabnum).className="aa";
 document.getElementById("YKTabCon_"+YKTabid_num+YKTabnum).style.display="block";
} 
//查看联系方式按钮
function Show_LXTab(){
 document.getElementById("ctlx_show").style.display="none";
 document.getElementById("ctlx").style.display="block";
} 

//点此举报
function report(theform){
	theform.action="http://ba.hc360.com/HcTieBa/tbList_1543.html#fabiao";
	theform.submit();	
}
//放大图片
function blowup(){                                                                                                                                                                                         
	    var url=document.getElementById("foclnk").href;  
	    window.open(url);
 }
 
 //受关注度
 function attention(){
 var attention = countStr.substring(0,countStr.indexOf(':'));
	var htmlStr = "";
	var shineStar = "<img height='13' src='http://my.b2b.hc360.com/my/images/star.gif' width='14'/>";
	var grayStar = "<img height='13' src='http://my.b2b.hc360.com/my/images/star_gray.gif' width='14'/>";
	htmlStr = htmlStr +'<a href="http://help.hc360.com/last.aspx?quesID=21008&farther=006005&channellist=wangz" target="_blank" title="什么是受关注度">';
	if(attention>=50){	
		htmlStr = htmlStr + shineStar + shineStar + shineStar + shineStar + shineStar;
	}
	else if(attention>40){
		htmlStr = htmlStr + shineStar + shineStar + shineStar + shineStar + grayStar;
	}
	else if(attention==40){
		htmlStr = htmlStr + shineStar + shineStar + shineStar + shineStar;
	}
	else if(attention>30){
		htmlStr = htmlStr + shineStar + shineStar + shineStar + grayStar;
	}
	else if(attention==30){
		htmlStr = htmlStr + shineStar + shineStar + shineStar;
	}
	else if(attention>20){
		htmlStr = htmlStr + shineStar + shineStar + grayStar;
	}
	else if(attention==20){
		htmlStr = htmlStr + shineStar + shineStar;
	}
	else if(attention>10){
		htmlStr = htmlStr + shineStar + grayStar;
	}
	else if(attention==10){
		htmlStr = htmlStr + shineStar;
	}
	else{
		htmlStr = htmlStr + grayStar;
	}
	htmlStr = htmlStr +"</a>";
	document.getElementById('attdeg').innerHTML = htmlStr;
 }
//更多分类
 function showul(ulclsname,limore)
{
	var ms = document.getElementById(limore);
	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.style.display="block";
		ms.style.display="none";
	}
}
//下一步
function nextStep(keyword,supcatId){
    var value = "";
	obj = document.form1.loginTag;
	if(obj==null){
		document.form1.action = 'http://my.b2b.hc360.com/my/turbine/template/corcenter,business,supplydetailedit.html?keyword='+keyword; 
		document.form1.submit();
	}else{
		value = document.form1.loginTag(0).checked?document.form1.loginTag(0).value:document.form1.loginTag(1).value;
		if(value=="1"){
		
		//var keystr = "";
		//keystr = escape("http://my.b2b.hc360.com/my/turbine/template/corcenter,business,supplydetailedit.html?keyword=$supplyInfo.keyword&supcatid=$supplyInfo.supcatId");
		//alert(keystr);
		window.location = 'http://sso.hc360.com/ssologin?ReturnURL=http://my.b2b.hc360.com/my/turbine/template/corcenter,business,supplydetailedit.html?keyword='+keyword+'&supcatid='+supcatId; 
			//window.location ="http://sso.hc360.com/ssologin?ReturnURL="+keystr;
			
			//document.form1.submit();
		}
		else if(value=="0"){
		
			document.form1.action ='http://my.b2b.hc360.com/my/turbine/template/pubinfo,anonymousbusin,anonymousbuy.html?keyword='+keyword+'&supcatid='+supcatId;      
			document.form1.submit();
			
		}
	}
}



//底部搜索框
function searchbottom(){
	document.writeln('<DIV id="search_bot">');
	document.writeln('<div class="search_botcs">');
	document.writeln('<UL id=tag_1>');
	document.writeln('<LI id=tag1_1 onclick="chbg_1(this,2);tag_1(1)" onmouseout="chbg(this,0);" onMouseDown="return hcclick(\'?hcdetail_supplyselflog=bottomsearch\')">找供应</LI>');
	document.writeln('<LI id=tag2_1 onclick="chbg_1(this,2);tag_1(2)" onmouseout="chbg(this,0);" onMouseDown="return hcclick(\'?hcdetail_supplyselflog=bottomsearch\')">找求购</LI>');
	document.writeln('<LI id=tag3_1 onclick="chbg_1(this,2);tag_1(3)" onmouseout="chbg(this,0);" onMouseDown="return hcclick(\'?hcdetail_supplyselflog=bottomsearch\')">找产品</LI>');
	document.writeln('<LI id=tag4_1 onclick="chbg_1(this,2);tag_1(4)" onmouseout="chbg(this,0);" onMouseDown="return hcclick(\'?hcdetail_supplyselflog=bottomsearch\')">找公司</LI>');
	document.writeln('<LI id=tag5_1 onclick="chbg_1(this,2);tag_1(5)" onmouseout="chbg(this,0);" onMouseDown="return hcclick(\'?hcdetail_supplyselflog=bottomsearch\')">招聘 </LI>');
	document.writeln('<LI id=tag6_1 onclick="chbg_1(this,2);tag_1(6)" onmouseout="chbg(this,0);" onMouseDown="return hcclick(\'?hcdetail_supplyselflog=bottomsearch\')">资讯 </LI>');
	document.writeln('<LI id=tag9_1 onclick="chbg_1(this,2);tag_1(9)" onmouseout="chbg(this,0);" onMouseDown="return hcclick(\'?hcdetail_supplyselflog=bottomsearch\')">技术 </LI>');
	document.writeln('<LI id=tag7_1 onclick="chbg_1(this,2);tag_1(7)" onmouseout="chbg(this,0);" onMouseDown="return hcclick(\'?hcdetail_supplyselflog=bottomsearch\')">论坛 </LI>');
	document.writeln('<LI id=tag8_1 onclick="chbg_1(this,2);tag_1(8)" onmouseout="chbg(this,0);" onMouseDown="return hcclick(\'?hcdetail_supplyselflog=bottomsearch\')">博客 </LI>');
	document.writeln('</UL>');
	document.writeln('</div>');
	document.writeln('</DIV>');
	document.writeln('<DIV class="searchinput_2">');
	document.writeln('<FORM id=hyformnew name=hyformnew target="_blank" onsubmit="return check(hyformnew, 1, 1, \'\', \'\', \'t\', \'\');" action=http://www.search.hc360.com/cgi-bin/iframe_ls.cgi? method=get>');
	document.writeln('<div style="margin:0 auto; width:590px">');
	document.writeln('<div class="searchinput_1" >');
	document.writeln('<INPUT id=w onclick="javascript:if(this.value.substring(0,3)==\'请输入\')this.value=\'\';this.focus();" style="border:1px #ff0000 solid" size=53 value="" name=w>');
	document.write('<INPUT id=m type=hidden name=m>');
	document.write('<INPUT id=r type=hidden name=r>');
	document.write('<INPUT id=c type=hidden value='+type+' name=c>');
	document.write('<INPUT id=name type=hidden name=name>');
	document.write('<INPUT id=f type=hidden name=f>');
	document.write('<INPUT type=hidden name=currenttag>');
	document.write('<INPUT type=hidden name=F>');
	document.write('<INPUT type=hidden name=G>');
	document.write('<INPUT type=hidden name=d>');
	document.writeln('<INPUT onClick="cookieLog(document.hyformnew.w.value,document.hyformnew.c.value);" onMouseDown="return hcclick(\'?hcdetail_supplyselflog=bottomsearch\')" type=image src='+searchimg+' align=absMiddle value="">');
	document.writeln('<div id="bottomsearchradio" style="margin-top:10px;" >');
	document.writeln('</div>');
	document.writeln('<div class="clear"></div>');
	document.writeln('</div>');
	document.writeln('<div class="clear"></div>');
	document.writeln('</div>');
	document.writeln('</FORM>');
	document.writeln('<DIV id=bottomsearchradio_1 style="DISPLAY: none">');
	document.writeln('<INPUT onclick="hyformnew.d.value=\'\';hyformnew.f.value=\'\'" type=radio CHECKED value="" name=tmpradio1> 全部供应 ');
	document.writeln('<INPUT onClick="hyformnew.d.value=\'1\';hyformnew.f.value=\'\'" type=radio value=1 name=tmpradio1> 最新供应');
	document.writeln('<INPUT onclick="hyformnew.f.value=\'1\';hyformnew.d.value=\'\'" type=radio value=1 name=tmpradio1> 行情');
	document.writeln('</DIV>');
	document.writeln('<DIV id=bottomsearchradio_2 style="DISPLAY: none">');
	document.writeln('<INPUT onclick="hyformnew.d.value=\'\'" type=radio CHECKED value="" name=tmpradio2> 全部求购 <INPUT onClick="hyformnew.d.value=\'1\'" type=radio value=1 name=tmpradio2> 最新求购 ');
	document.writeln('</DIV>');
	document.writeln('<DIV id=bottomsearchradio_4 style="DISPLAY: none">');
	document.writeln('<input type="radio" onclick="hyformnew.d.value=\'\'" name="tmpradio3" checked="checked" value="" /> 全部产品<input type="radio" onclick="hyformnew.d.value=\'1\'" name="tmpradio3"  value="1" /> 最新产品');
	document.writeln('</DIV>');
	document.writeln('<DIV id=bottomsearchradio_5 style="DISPLAY: none">');
	document.writeln('<input type="radio" name="tmpradio5" onclick="hyformnew.m.value=\'1\'" checked="checked" value="" /> 全文<input type="radio" name="tmpradio5" onclick="hyformnew.m.value=\'2\' "  value="" /> 标题');
	document.writeln('</DIV>');
	document.writeln('<div id="bottomsearchradio_12" style="display:none">');
	document.writeln('<input type="radio" name="tmpradio6" onclick="hyformnew.m.value=\'1\'" checked="checked" value="" /> 全部<input type="radio" name="tmpradio6" onclick="hyformnew.m.value=\'2\' "  value="" /> 公司名');
	document.writeln('</DIV>'); 
	document.writeln('<div id="bottomsearchradio_11" style="display:none">');
	document.writeln('<input type="radio" name="tmpradio7" onclick="hyformnew.r.value=\'1\'" value="" checked>职位<input type="radio" name="tmpradio7" onclick="hyformnew.r.value=\'0\'" value="" >人才');
	document.writeln('</DIV>'); 
	document.writeln('<div class="clear"></div>'); 
	document.writeln('<div class="clear"></div>'); 
	document.writeln('</DIV>'); 
}
