/* SinaElect JavaScript by WangShuo(2006-09-07) */
/* 修改记录： */
/* 注：此版本目前在Firefox浏览器下不能显示下拉菜单内容 */


var subcate_of_2=new Array();

subcate_of_2["27"]="PC电脑";
subcate_of_2["51"]="工作站";
subcate_of_2["346"]="笔记本配件";
subcate_of_2["320"]="笔记本电池";
subcate_of_2["94"]="准系统";
subcate_of_2["341"]="POS机";



var subcate_of_10=new Array();

subcate_of_10["19"]="MP3播放器";
subcate_of_10["272"]="MP4播放器";
subcate_of_10["81"]="数码摄像机";
subcate_of_10["60"]="数码摄像头";
subcate_of_10["37"]="移动U盘";
subcate_of_10["274"]="移动硬盘";
subcate_of_10["38"]="掌上电脑";
subcate_of_10["68"]="数码录音笔";
subcate_of_10["271"]="电子词典";
subcate_of_10["86"]="MD随身听";



var subcate_of_35=new Array();

subcate_of_35["54"]="闪存卡";
subcate_of_35["217"]="数码伴侣";
subcate_of_35["223"]="耳机";
subcate_of_35["268"]="镜头";
subcate_of_35["395"]="滤镜";
subcate_of_35["290"]="闪光灯";
subcate_of_35["307"]="三脚架";
subcate_of_35["266"]="电池";
subcate_of_35["221"]="充电器";
subcate_of_35["265"]="相机包";
subcate_of_35["216"]="读卡器";
subcate_of_35["342"]="其他配件";



var subcate_of_1=new Array();

subcate_of_1["5"]="主板";
subcate_of_1["6"]="显卡";
subcate_of_1["28"]="CPU";
subcate_of_1["3"]="内存";
subcate_of_1["2"]="硬盘";
subcate_of_1["96"]="光驱";
subcate_of_1["7"]="声卡";
subcate_of_1["34"]="音箱";
subcate_of_1["10"]="机箱";
subcate_of_1["35"]="电源";
subcate_of_1["67"]="散热器";
subcate_of_1["100"]="键鼠套装";
subcate_of_1["32"]="鼠标";
subcate_of_1["33"]="键盘";
subcate_of_1["343"]="鼠标垫";
subcate_of_1["388"]="鼠标垫脚";



var subcate_of_30=new Array();

subcate_of_30["61"]="视频采集卡";
subcate_of_30["97"]="TV卡";
subcate_of_30["63"]="RAID卡";
subcate_of_30["40"]="SCSI卡";
subcate_of_30["207"]="IEEE1394卡";
subcate_of_30["82"]="硬盘/光驱盒";
subcate_of_30["222"]="其他配件";



var subcate_of_17=new Array();

subcate_of_17["84"]="液晶显示器";
subcate_of_17["8"]="CRT显示器";
subcate_of_17["14"]="投影机";
subcate_of_17["322"]="投影灯泡";
subcate_of_17["277"]="投影展台";
subcate_of_17["276"]="投影幕布";
subcate_of_17["123"]="触摸屏";
subcate_of_17["329"]="屏幕保护";
subcate_of_17["120"]="等离子显示器";



var subcate_of_42=new Array();

subcate_of_42["314"]="数字电视";
subcate_of_42["344"]="彩电";
subcate_of_42["345"]="空调";
subcate_of_42["359"]="冰箱";
subcate_of_42["372"]="洗衣机";
subcate_of_42["364"]="音响";
subcate_of_42["363"]="碟机";



var subcate_of_3=new Array();

subcate_of_3["11"]="打印机";
subcate_of_3["101"]="多功能一体机";
subcate_of_3["12"]="扫描仪";
subcate_of_3["213"]="绘图仪";
subcate_of_3["212"]="复印机";
subcate_of_3["211"]="传真机";
subcate_of_3["18"]="UPS电源";
subcate_of_3["72"]="MO驱动器";
subcate_of_3["73"]="ZIP驱动器";
subcate_of_3["41"]="游戏设备";
subcate_of_3["78"]="手柄";
subcate_of_3["79"]="方向盘";
subcate_of_3["80"]="游戏杆";
subcate_of_3["24"]="其它";



var subcate_of_51=new Array();

subcate_of_51["31"]="服务器";
subcate_of_51["383"]="服务器CPU";
subcate_of_51["384"]="服务器内存";
subcate_of_51["385"]="服务器硬盘";
subcate_of_51["382"]="服务器主板";
subcate_of_51["389"]="服务器配件";
subcate_of_51["95"]="磁带机";
subcate_of_51["373"]="磁带库";
subcate_of_51["374"]="磁盘阵列柜";
subcate_of_51["375"]="网络存储";
subcate_of_51["257"]="KVM切换器";
subcate_of_51["378"]="KVM延长器";
subcate_of_51["56"]="磁带";



var subcate_of_5=new Array();

subcate_of_5["42"]="网卡";
subcate_of_5["46"]="交换机";
subcate_of_5["44"]="路由器";
subcate_of_5["294"]="防火墙";
subcate_of_5["369"]="网关";
subcate_of_5["30"]="Modem";
subcate_of_5["45"]="集线器";
subcate_of_5["377"]="网络摄像机";
subcate_of_5["391"]="入侵检测";
subcate_of_5["392"]="IP-DSLAM";
subcate_of_5["256"]="其他";



var subcate_of_32=new Array();

subcate_of_32["224"]="无线上网卡";
subcate_of_32["225"]="无线网卡";
subcate_of_32["226"]="无线接入器";
subcate_of_32["227"]="无线路由器";



var subcate_of_4=new Array();

subcate_of_4["22"]="喷墨耗材";
subcate_of_4["49"]="激打耗材";
subcate_of_4["50"]="针打耗材";
subcate_of_4["48"]="打印介质";
subcate_of_4["258"]="打印服务器";
subcate_of_4["53"]="光盘片";
subcate_of_4["113"]="其他";



var subcate_of_48=new Array();

subcate_of_48["121"]="操作系统";
subcate_of_48["146"]="财务管理";
subcate_of_48["160"]="媒体播放";
subcate_of_48["161"]="制作设计";
subcate_of_48["172"]="文件处理";
subcate_of_48["131"]="数据库软件";
subcate_of_48["180"]="办公自动化OA";
subcate_of_48["168"]="赛车游戏";
subcate_of_48["159"]="媒体制作";
subcate_of_48["139"]="杀毒软件";
subcate_of_48["184"]="翻译软件";
subcate_of_48["148"]="建筑工程";
subcate_of_48["179"]="学习类软件";
subcate_of_48["150"]="出版印刷";
subcate_of_48["154"]="服务业管理";
subcate_of_48["200"]="项目管理";



var cate=new Array();

cate["42"]="数字家电";
cate["2"]="电脑整机";
cate["10"]="消费数码";
cate["35"]="数码配件";
cate["1"]="DIY配件";
cate["30"]="扩展配件";
cate["17"]="显示设备";
cate["3"]="办公外设";
cate["51"]="服务器及存储";
cate["5"]="网络设备";
cate["32"]="无线网络";
cate["4"]="外设耗材";
cate["48"]="软件类";

/*=================*/

document.onclick=hiddenalldiv;
function Point(iX,iY){

	this.x=iX;
	this.y=iY;

}

function fGetXY(aTag){

	var oTmp=aTag;
	var pt=new Point(0,0);
	do{

		pt.x+=oTmp.offsetLeft;
		pt.y+=oTmp.offsetTop;
		oTmp=oTmp.offsetParent;

	}while(oTmp.tagName!="BODY");
	return pt;

}

function parse_str(str,para){

	var para_arr=new Array();
	var tmp_arr2;
	var first_char=str.substr(0,1);
	if(first_char=='?')
	str=str.substr(1);
	var tmp_arr1=str.split("&");
	for(var i=0;i<tmp_arr1.length;i++){

		tmp_arr2=tmp_arr1[i].split('=');
		para_arr[tmp_arr2[0]]=tmp_arr2[1];

	}
	if(typeof(para)=="undefined")
	return para_arr;
	else
	return para_arr[para];

}

var sear=window.location.search;
var arr_test=parse_str(sear);

var cutManuid='';

var manu_arr=new Array;
var manu_arr_len=0;

function listManu(){

	var s='';
	var tmp_manuid='';
	var tmp_manu='请选择品牌';
	var tmp_check='';

	if(manu_arr_len>0){

		s+='<table border="0" cellpadding="0">';
		for(i=0;i<manu_arr_len;i++){

			temp_manu_icon='◇';
			if(manu_arr[i][1]==document.all.manuId.value){

				tmp_manuid=manu_arr[i][1];
				tmp_manu=manu_arr[i][0];
				temp_manu_icon='';

			}
			if(typeof(manuId_zol_rand_string)!='undefined'&&manu_arr[i][1]==manuId_zol_rand_string){

				tmp_manuid=manu_arr[i][1];
				tmp_manu=manu_arr[i][0];
				temp_manu_icon='';

			}
			s+='<tr align="left">';
			s+='<td nowrap onMouseOver="this.bgColor=\'#B5C7E6\';" onMouseOut="this.bgColor=\'\';" style="cursor:hand;" onclick=setManu("'+manu_arr[i][1]+'","'+manu_arr[i][0]+'");><span id=manu_icon_'+manu_arr[i][1]+'>'+temp_manu_icon+'</span> '+manu_arr[i][0]+'</td>';
			i++;
			if(i<manu_arr_len){

				temp_manu_icon='◇';
				if(manu_arr[i][1]==document.all.manuId.value){

					tmp_manuid=manu_arr[i][1];
					tmp_manu=manu_arr[i][0];
					temp_manu_icon='';

				}
				s+='<td nowrap onMouseOver="this.bgColor=\'#B5C7E6\';" onMouseOut="this.bgColor=\'\';" style="cursor:hand;" onclick=setManu("'+manu_arr[i][1]+'","'+manu_arr[i][0]+'");><span id=manu_icon_'+manu_arr[i][1]+'>'+temp_manu_icon+'</span> '+manu_arr[i][0]+'</td>';

			}
			else s+='<td></td><td></td>';
			i++;
			if(i<manu_arr_len){

				temp_manu_icon='◇';
				if(manu_arr[i][1]==document.all.manuId.value){

					tmp_manuid=manu_arr[i][1];
					tmp_manu=manu_arr[i][0];
					temp_manu_icon='';

				}
				s+='<td nowrap onMouseOver="this.bgColor=\'#B5C7E6\';" onMouseOut="this.bgColor=\'\';" style="cursor:hand;" onclick=setManu("'+manu_arr[i][1]+'","'+manu_arr[i][0]+'");><span ID=manu_icon_'+manu_arr[i][1]+'>'+temp_manu_icon+'</span> '+manu_arr[i][0]+'</td>';

			}
			else s+='<td></td>';
			s+='</tr>';

		}
		s+='</table>';

	}
	document.all.smanuId.value=tmp_manu;
	document.all.ManuListDiv.innerHTML=s;

}

function hiddenalldiv(){

	zol_search_bar_myform=document.search_xx;
	var Type="";
	var name="";
	if(zol_search_bar_myform!=null)
	for(var i=0;i<zol_search_bar_myform.elements.length;i++)
	{

		Type=zol_search_bar_myform.elements[i].zcy;
		if(Type=="goodguy")
		{

			name=zol_search_bar_myform.elements[i].name;
			name=name.substr(1)+'div';
			eval('document.all.'+name+'.style.display="none"');

		}

	}

}

function setManu(manu_id,manu){

	try{

		eval('document.all.manu_icon_'+cutManuid+'.innerText="◇"');

	}catch(e){

	}
	cutManuid=manu_id;
	document.getElementById('smanuId_id').value=manu;
	eval('document.all.manu_icon_'+cutManuid+'.innerText="◆"');
	document.search_xx.manuId.value=manu_id;
	document.all.manuIddiv.style.display='none';
	window.event.cancelBubble=true;

}

var last_icon=0;
var last_td_id=0;
var where="";
var icon_name="";
var hidden_name="";
var form_name="";

//k:id of input
//v:value to show
//id:id of value (example 57=>mobile)
//w:id of layer
//m:whether have manu input 1:have 0:without
//c:whether from output_div()
function setChannel(k,v,id,w,m,c){

	hiddenalldiv();
	hidden_name='h_'+k;
	icon_name=(w.substr(0,w.indexOf('div')-2));
	if(last_td_id!=0&&last_td_id!='undefined'){
		document.getElementById(last_td_id).className='unsel_item';
	}
	if(c){
		if(w.length-w.indexOf('div')-3){
			document.getElementById(k+'td_id_'+w.substr(w.indexOf('div')+3,(w.length-w.indexOf('div')-3))).className='sel_item';
		}
	}
	if(last_icon!=0&&last_icon!='undefined'){
		eval('document.all.'+where+'_icon_'+last_icon+'.innerText="◇"');
	}
	where=icon_name;
	eval('document.all.'+icon_name+'_icon_'+id+'.innerText="◆"');
	eval("document.all."+hidden_name+".value="+id);
	document.getElementById(k+'_id').value=v;
	hiddenDiv(w);

	if(w.indexOf('sub')!=-1){

		//如果传递过来的是子层的id 将父层也隐藏
		hiddenDiv(w.substr(3,w.indexOf('div')));
		//设置隐藏域1
		var h_obj1=document.getElementById(k+'h1');

		h_obj1.value=w.substr(w.indexOf('div')+3,(w.length-w.indexOf('div')-3));
		//设置隐藏域2
		var h_obj2=document.getElementById(k+'h2');
		h_obj2.value=id;

	}else {
		var h_obj1=document.getElementById(k+'h1');
		h_obj1.value=id;
		document.getElementById(k+'h2').value='';
	}

	last_icon=id;
	if(c&&(w.length-w.indexOf('div')-3)){
		last_td_id=k+'td_id_'+w.substr(w.indexOf('div')+3,(w.length-w.indexOf('div')-3));
	}
	else {
		last_td_id=0;
	}
	if(m){
		document.getElementById('smanuId_id').value='请选择品牌';
		document.all.smanuId.value="更新中……";
		document.all.ManuListDiv.innerHTML='更新中……';
		getManuJs.src='http://product.tech.sina.com.cn/search/getManu.php?subcatid='+id;
	}
	//hiddenalldiv();
	window.event.cancelBubble=true;

}

function set_channel(k,v,id,w,m,c){
	hidden_name='h_'+k;
  icon_name=(w.substr(0,w.indexOf('div')-2));
	if(last_td_id!=0 && last_td_id!='undefined'){
    document.getElementById(last_td_id).className='unsel_item';
	}
	if(c){
	  if(w.length-w.indexOf('div')-3){
	    document.getElementById(k+'td_id_'+w.substr(w.indexOf('div')+3,(w.length-w.indexOf('div')-3))).className='sel_item';
		}
	}
	if(last_icon!=0 && last_icon!='undefined'){
		eval('document.all.'+where+'_icon_'+last_icon+'.innerText="◇"');
	}
	where=icon_name;
	eval('document.all.'+icon_name+'_icon_'+id+'.innerText="◆"');
	eval("document.all."+hidden_name+".value="+id);
	document.getElementById(k+'_id').value=v;

	if(w.indexOf('sub')!=-1){
	  //如果传递过来的是子层的id 将父层也隐藏
		hiddenDiv(w.substr(3,w.indexOf('div')));
	  //设置隐藏域1
		var h_obj1=document.getElementById(k+'h1');
		h_obj1.value=w.substr(w.indexOf('div')+3,(w.length-w.indexOf('div')-3));
	  //设置隐藏域2
		var h_obj2=document.getElementById(k+'h2');
		h_obj2.value=id;
	}

	last_icon=id;
	if(c && (w.length-w.indexOf('div')-3)){
	  last_td_id=k+'td_id_'+w.substr(w.indexOf('div')+3,(w.length-w.indexOf('div')-3));
  }
  else{
	  last_td_id=0;
	}
	if(m){
	  document.getElementById('smanuId_id').value='请选择品牌';
		document.all.smanuId.value="更新中……";
    document.all.ManuListDiv.innerHTML='更新中……';
	  getManuJs.src='http://product.tech.sina.com.cn/search/getManu.php?subcatid='+id;
	}
	//hiddenalldiv();
	window.event.cancelBubble = true;
}

function showDiv(div_name,arr_name){

	if(eval(arr_name).length==0){

		return false;

	}
	eval("document.all."+div_name+".style.display=''");

}

function showConInfo(type){

	hiddenalldiv();
	var Obj=new Object;
	var oObj=new Object;
	Obj=eval("document.all."+type.substr(1)+"div");
	oObj=document.getElementById(type+'_id');
	//hiddenAllDiv();
	var p=fGetXY(oObj);
	Obj.style.left=p.x;
	Obj.style.top=p.y+18;
	Obj.style.display='';
	window.event.cancelBubble=true;

}

function hiddenDiv(div_name){

	if(div_name==" "){

		return false;

	}
	eval("document.all."+div_name+".style.display='none'");

}

var pro_name="";
var div_str="";
var tmp_icon='◇';
var count=0;
var total_html="";

/*===============*/

var all_form_head_str="";
all_form_head_str+="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr align=\"left\">"
+"<form name=\"search_xx\" action=\"\" target=\"_blank\"   style=\"margin:0px;padding:0px;\">";
total_html+=all_form_head_str;

/*===============*/

function ChZolSearchForm(){
	var url="";
	var i=document.search_xx.obj.value;
	switch(i){
		case "0"://article
		url="http://product.tech.sina.com.cn/article/list.php";
		break;

		case "1"://产品大全
		url="http://product.tech.sina.com.cn/products/product_search.php";
		break;

		case "2"://经销商
		url="http://product.tech.sina.com.cn/dealer/merchant_list.php";
		break;

		case "3"://多城市报价
		url="http://product.tech.sina.com.cn/price/index.php";
		break;
		default:
		url="http://product.tech.sina.com.cn/products/product_search.php";
		break;
	}
	search_xx.action=url;
	return true;
}

function zol_search(str) {
	var url="";
	var i=document.search_xx.obj.value;
	switch(i){
		case "0"://article
		url="http://product.tech.sina.com.cn/article/list.php";
		break;
		case "1"://产品大全
		url="http://product.tech.sina.com.cn/products/product_search.php";
		break;

		case "2"://经销商
		url="http://product.tech.sina.com.cn/dealer/merchant_list.php";
		break;

		case "3"://多城市报价
		url="http://product.tech.sina.com.cn/price/index.php";
		break;
		default:
		url="http://product.tech.sina.com.cn/products/product_search.php";
		break;
	}
	window.open(url+"?schannelId=%B2%FA%C6%B7%B4%F3%C8%AB&h_schannelId=&obj=1&locationid=&scateId=%3D%D1%A1%D4%F1%C0%E0%B1%F0%3D&h_scateId=&cateid=&subcatid=&smanuId=%C7%EB%D1%A1%D4%F1%C6%B7%C5%C6&manuId=&search=%CB%D1%CB%F7&keyword="+str);
	return false;
}


var channels=new Array;
channels[1]="产品大全";
channels[3]="报价查询";
var subchannel_0=new Array;
subchannel_0[35]="今日要闻";
subchannel_0[43]="即时行情";
subchannel_0[49]="调研中心";
subchannel_0[28]="硬件资讯";
subchannel_0[8]="DIY攒机";
subchannel_0[46]="数字娱乐";
subchannel_0[24]="投影机";
subchannel_0[23]="服务器";
subchannel_0[47]="显卡";
subchannel_0[48]="主板";
subchannel_0[50]="显示器";
subchannel_0[40]="手机文章";
subchannel_0[17]="笔记本文章";
subchannel_0[18]="整机文章";
subchannel_0[37]="随身听文章";
subchannel_0[36]="数码相机";
var subchannel_1=new Array;
var subchannel_2=new Array;
var subchannel_3=new Array;

subchannel_3[1]="北京报价";
subchannel_3[19]="广州报价";
subchannel_3[20]="西安报价";
subchannel_3[21]="成都报价";
subchannel_3[22]="武汉报价";
subchannel_3[23]="南京报价";
subchannel_3[24]="深圳报价";
subchannel_3[25]="沈阳报价";
subchannel_3[26]="上海报价";
subchannel_3[36]="内蒙古报价";
subchannel_3[1226]="郑州报价";
subchannel_3[7603]="山东报价";
subchannel_3[7786]="福建报价";
subchannel_3[8573]="合肥报价";
subchannel_3[9324]="新蛋网报价";
subchannel_3[9807]="哈尔滨报价";
subchannel_3[12346]="湖南报价";
subchannel_3[12373]="新疆报价";
subchannel_3[12374]="浙江报价";
subchannel_3[12523]="江苏报价";
subchannel_3[12662]="重庆报价";
subchannel_3[12719]="美国报价";
subchannel_3[12837]="江西报价";
subchannel_3[13108]="河北报价";

/*=====================*/

var all_channel_str="";
all_channel_str+="<td height=\"29\" width=\"85\">";

/*===================*/

all_channel_str+="<input class=\"stext\" id=\"schannelId_id\" style=\"text-align:center\" zcy=\"goodguy\""+
"onclick=\"showConInfo('schannelId');\" readOnly name=\"schannelId\" value=\"产品大全\"/>"+
"</td><td width=\"24\"><img src=\"http://image2.sina.com.cn/IT/deco/2006/0911/elect/elect_ws_027.gif\" align=\"middle\" border=\"0\" onClick=\"showConInfo('schannelId');\">"+
"<input type=\"hidden\" name=\"h_schannelId\" value=\"\"/>";
if(typeof(obj_zol_rand_string)!="undefined"){

	all_channel_str+="<input type=\"hidden\" name=\"obj\" value=\""+obj_zol_rand_string+"\" id=\"schannelIdh1\">";


}else {

	all_channel_str+="<input type=\"hidden\" name=\"obj\" value=\"1\" id=\"schannelIdh1\">";


}
all_channel_str+="<input type=\"hidden\" name=\"locationid\" value=\"\" id=\"schannelIdh2\">";

/*========================*/

all_channel_str+="<div id=\"channelIddiv\""+
"style=\"position:absolute;border:1px solid #808080;background:#fff;z-index:2;display:none;margin:5px 0 0 6px;\""+
"onclick=\"showConInfo('schannelId');\">";

/*======================*/

all_channel_str+="<table width=\"95\"  border=\"1\" bordercolor=\"#EFF5FE\"  style=\"background-color:#FFFFFF; border-collapse:collapse ;margin:4px; \">";

for(channelkey in channels){


	tmp_icon='◇';

	//特殊情况 手工设置 不能被选
	if(0==channelkey||3==channelkey){

		tmp_icon='◇';


	}else if(typeof(obj_zol_rand_string)=="string"&&(channelkey==obj_zol_rand_string)){

		tmp_icon="◆";


	}


	div_str="";
	div_str+="<tr><td width=\"100%\" onMouseOver=\"this.bgColor='#B5C7E6';showDiv('subchannelIddiv"+channelkey+"','subchannel_"+channelkey+"');\" onMouseOut=\"hiddenDiv('subchannelIddiv"+channelkey+"');this.bgColor='';\"";

	if(0!=channelkey&&3!=channelkey){

		div_str+="onclick=\"hiddenDiv('channelIddiv');setChannel('schannelId','"+channels[channelkey]+"',"+channelkey+",'channelIddiv',0,0);\"";

	}else {


		div_str+="onclick=\"window.event.cancelBubble = true;\"";


	}
	div_str+="><span id=channel_icon_"+channelkey+">"+tmp_icon+"</span>"+channels[channelkey];
	div_str+="<div id=\"subchannelIddiv"+channelkey+"\"  style=\"position:absolute; border:1px solid #808080;background-color:#fff; z-index:1;display:none;\">";
	div_str+="<table width=\"240\"  border=\"1\" bordercolor=\"#808080\" style=\"background:#fff;border-collapse:collapse;margin:4px;\">";


	pro_name=eval("subchannel_"+channelkey);
	count=0;
	tmp_icon="◇";
	div_str+="<tr>";

	for(temp_key in pro_name){


		if(!(count%3)&&(count!=0)){

			div_str+="</tr><tr>";

		}
		tmp_icon="◇";
		if(typeof(obj_zol_rand_string)=="string"&&(channelkey==obj_zol_rand_string))
		if(typeof(locationid_zol_rand_string)!="undefined"&&(temp_key==locationid_zol_rand_string)){

			tmp_icon="◆";

		}
		div_str+="<td nowrap width=\"34%\" onMouseOver=\"this.bgColor='#B5C7E6'\" onMouseOut=\"this.bgColor='';\"   onclick=\"this.bgColor='#B5C7E6';hiddenDiv('subchannelIddiv"+channelkey+"');setChannel('schannelId','"+pro_name[temp_key]+"',"+temp_key+",'subchannelIddiv"+channelkey+"',0,0);\"><span id=subchannel_icon_"+temp_key+">"+tmp_icon+"</span>"+pro_name[temp_key]+"</td>";
		count++;


	}

	div_str+="</tr></table></div></td>";
	div_str+="</tr>";
	all_channel_str+=div_str;

}//end of for
all_channel_str+="</table>";

/*======================*/

all_channel_str+="</div></td>"
total_html+=all_channel_str

/*====================*/

var all_div_str="";
all_div_str+="<td>"+
"<input class=\"stext\" id=\"scateId_id\" style=\"text-align:center\" zcy=\"goodguy\""+
"onClick=\"showConInfo('scateId');\" readOnly name=\"scateId\" value=\"选择类别\"></td><td width=\"24\"><img src=\"http://image2.sina.com.cn/IT/deco/2006/0911/elect/elect_ws_027.gif\" align=\"middle\" border=\"0\" onClick=\"showConInfo('scateId');\">"+
"<input type=\"hidden\" name=\"h_scateId\" value=\"\" id=\"h_scateId\">"+
"<!--hidden_for_url_begin-->"+
"<input type=\"hidden\" name=\"cateid\" value=\"\" id=\"scateIdh1\">"+
"<input type=\"hidden\" name=\"subcatid\" value=\"\" id=\"scateIdh2\">"+
"<!--hidden_for_url_end-->";

/*=====================*/

all_div_str+="<div id=\"cateIddiv\""+
"style=\"position:absolute;border:1px solid #808080;background:#fff;z-index:2;display:none;margin:5px 0 0 6px;\""+
"onclick=\"showConInfo('scateId');\">";

/*======================*/

all_div_str+="<table width=\"103\"  border=\"1\" bordercolor=\"#808080\"  style=\"background-color:#fff;border-collapse:collapse;\"><tr><td>";
all_div_str+="<table width=\"93\"  style=\"background-color:#fff;border-collapse:collapse;margin:5px;\">";
all_div_str+="<tr><td bgcolor=\"#EFF5FE\" align=\"center\">硬件</td></tr>";

	for(key in cate){
		if(19==key){
			all_div_str+="</table></td><td valign=\"top\"><table width=\"93\"  border=\"1\" bordercolor=\"#EFF5FE\"  style=\"background-color:#fff;border-collapse:collapse;margin:5px;\">"
				+"<tr><td bgcolor=\"#EFF5FE\" align=\"center\">软件</td></tr>";
		}
		if(42==key) {
			pro_name=eval("subcate_of_"+key);
			all_div_str+="<tr><td width=100% id='scateIdtd_id_"+key+"'";
			if(set_bgcolor){
				all_div_str+=" class=\"sel_item\"";
				set_bgcolor=false;
			}
			else{
				all_div_str+=" class=\"unsel_item\"";
			}
			all_div_str+=">";
			all_div_str+="<span ID=cate_icon_"+key+">"+tmp_icon+"</span>"+cate[key];
			all_div_str+="</td></tr>";
			for (temp_key in pro_name) {
				all_div_str+="<tr><td width=100% onMouseOver=\"this.bgColor='#B5C7E6'\" onMouseOut=\"this.bgColor='';\" onclick=\"set_channel('scateId','"+pro_name[temp_key]+"',"+temp_key+",'subcateIddiv"+key+"',1,1);\"";
				all_div_str+=">&nbsp;&nbsp;<span ID=subcate_icon_"+temp_key+">"+tmp_icon+"</span>"+pro_name[temp_key];
				all_div_str+="</td></tr>"
			}
		}
		else {
			tmp_icon='◇';
			if(typeof(cateid_zol_rand_string)=="string"&&(key==cateid_zol_rand_string)){
				//tmp_icon="◆";
				last_td_id="scateIdtd_id_"+key;
				var set_bgcolor=true;
			}
			all_div_str+="<tr><td width=\"100%\" id='scateIdtd_id_"+key+"'";
			if(set_bgcolor){
				all_div_str+=" class=\"sel_item\"";
				set_bgcolor=false;
			}
			else {
				all_div_str+=" class=\"unsel_item\"";
			}
			all_div_str+="onMouseOver=\"this.bgColor='#B5C7E6';showDiv('subcateIddiv"+key+"','subcate_of_"+key+"');\" onMouseOut=\"hiddenDiv('subcateIddiv"+key+"');this.bgColor='';\"";
			all_div_str+="onclick=\"window.event.cancelBubble = true;\"";
			all_div_str+="><span id=cate_icon_"+key+">"+tmp_icon+"</span>"+cate[key];
			all_div_str+="<div id=\"subcateIddiv"+key+"\"  style=\"position:absolute;border:1px solid #808080;background:#fff;z-index:1;display:none;\">";
			all_div_str+="<table width=\"240\"  border=\"1\" bordercolor=\"#EFF5FE\" style=\"background:#fff;border-collapse:collapse;margin:4px;\">";

			pro_name=eval("subcate_of_"+key);
			count=0;
			tmp_icon="◇";
			div_str+="<tr>";
			for(temp_key in pro_name){
				if(!(count%3)&&count!=0){
					all_div_str+="</tr><tr>";
				}
				if(typeof(subcatid_zol_rand_string)=="string"&&(temp_key==subcatid_zol_rand_string)){
					tmp_icon="◆";
					var icon="subcate_icon_";
					where=icon.substr(0,icon.indexOf("_icon_"));
					last_icon=temp_key;
				}
				else {
					tmp_icon="◇";
				}
				all_div_str+="<td nowrap width=\"34%\" onMouseOver=\"this.bgColor='#B5C7E6'\" onMouseOut=\"this.bgColor='';\"   onclick=\"this.bgColor='#B5C7E6';hiddenDiv('subcateIddiv"+key+"');setChannel('scateId','"+pro_name[temp_key]+"',"+temp_key+",'subcateIddiv"+key+"',1,1);\"><span id=subcate_icon_"+temp_key+">"+tmp_icon+"</span>"+pro_name[temp_key]+"</td>";
				count++;
			}
			all_div_str+="</tr></table>";
			all_div_str+="</div></td>";
			all_div_str+="</tr>";
		}
	}

all_div_str+="</table></td></tr></table>";

/*===================*/

all_div_str+="</div></td>"
total_html+=all_div_str;


/*==================*/

var all_manu_str="";
all_manu_str+="<td valign=\"middle\">"+
"<input class=\"stext\" id=\"smanuId_id\" style=\"text-align:center\" zcy=\"goodguy\""+
"onclick=\"showConInfo('smanuId');\" readOnly name=\"smanuId\" value=\"请选择品牌\"></td><td width=\"24\"><img src=\"http://image2.sina.com.cn/IT/deco/2006/0911/elect/elect_ws_027.gif\" align=\"middle\" border=\"0\" onClick=\"showConInfo('smanuId');\">"+
"<input type=\"hidden\" name=\"manuId\" value=\"\">";

/*================*/

all_manu_str+="<div id=\"manuIddiv\" style=\"position:absolute;border:1px solid #808080;background:#fff;z-index:3;display:none;margin:5px 0 0 6px;\" onclick=\"showConInfo('smanuId');\">"+
"<table border=\"1\" bordercolor=\"#EFF5FE\" cellpadding=\"0\" cellspacing=\"0\" width=\"95\" style=\"background-color:#FFFFFF; border-collapse : collapse;margin:4px;\">"+
"<tr><td>"+
"产品品牌：<span style=\"cursor:hand;\" onclick=setManu(\"\",\"所有品牌\")><span id=\"manu_icon_\">◆</span>所有品牌</span>"+
"</td></tr>"+
"<tr><td><div id=\"ManuListDiv\" class=\"dis_zone\" style=\"text-align:left;\">"+
"</div></td></tr>"+
"</table></div></td><td width=\"88\" style=\"padding:0 0 3px 0;\"><input type=\"submit\" id=\"search1\" name=\"search\" class=\"CpSearchBarBtn\" value=\"搜索\" title=\"开始搜索\" onclick=\"return ChZolSearchForm();\"/></td>"+
"</form>";
total_html+=all_manu_str;

/*================*/

var all_key_str="";
all_key_str="<td width=\"160\"><input type=\"text\" name=\"keyword\" id=\"kd\" value=\"关键字\" onfocus=\"if(this.value=='关键字') this.value='';\" onblur=\"if(this.value=='') this.value='关键字'\" class=\"CpSearchBarKey\"/>";
total_html+=all_key_str;

/*================*/

var all_sub_str="";
all_sub_str+="<td width=\"88\" style=\"padding:0 0 3px 0;\"><input type=\"button\" id=\"search2\" name=\"search\" class=\"CpSearchBarBtn\" value=\"搜索\" title=\"开始搜索\" onclick=\"return zol_search(document.getElementById('kd').value);\"/></label></td>";
total_html+=all_sub_str;

/*===============*/



/*===============*/

if(typeof(schannelId_zol_rand_string)=="string"){


	document.getElementById("schannelId_id").value=schannelId_zol_rand_string;


}
if(typeof(arr_test["obj"])!="undefined")
document.getElementById("schannelIdh1").value=arr_test["obj"];
if(typeof(arr_test["locationid"])!="undefined")
document.getElementById("schannelIdh2").value=arr_test["locationid"];
if(typeof(obj_zol_rand_string)!="undefined"&&channels[obj_zol_rand_string]){

	var c_arr_name="subchannel_"+obj_zol_rand_string;
	//如果选择了子层
	if(typeof(locationid_zol_rand_string)!="undefined"&&locationid_zol_rand_string){

		if(typeof(eval(c_arr_name+"["+locationid_zol_rand_string+"]"))!="undefined"){

			document.getElementById("schannelId_id").value=eval(c_arr_name+"["+locationid_zol_rand_string+"]");
			document.search_xx.locationid.value=locationid_zol_rand_string;

		}else {

			document.getElementById("schannelId_id").value=channels[obj_zol_rand_string];
			document.search_xx.obj.value=obj_zol_rand_string;

		}

	}else {

		document.getElementById("schannelId_id").value=channels[obj_zol_rand_string];
		document.search_xx.obj.value=obj_zol_rand_string;

	}

}


if(typeof(scateId_zol_rand_string)=="string"){

	document.getElementById("scateId_id").value=scateId_zol_rand_string;

}
if(typeof(h_scateId_zol_rand_string)=="string"){

	document.getElementById("h_scateId").value=h_scateId_zol_rand_string;

}
if(typeof(arr_test["cateid"])!="undefined")
document.getElementById("scateIdh1").value=arr_test["cateid"];
if(typeof(arr_test["subcatid"])!="undefined")
document.getElementById("scateIdh2").value=arr_test["subcatid"];



if(typeof(manuId_zol_rand_string)=="string"){
	if(typeof(smanuId_zol_rand_string)=="string")document.search_xx.smanuId.value=smanuId_zol_rand_string;
	getManuJs.src="http://product.tech.sina.com.cn/search/getManu.php?subcatid="+subcatid_zol_rand_string;


}

if(arr_test["keyword"]!=" "){

	if(typeof(keyword_zol_rand_string)=="string"&&keyword_zol_rand_string){

		document.getElementById("kd").value=keyword_zol_rand_string;

	}

}

/*=================*/

/*========Just a Joke :P   You can delete the code from this line========*/