function CMHeight(){
	var i=document.getElementById("div_l1");
	var j=document.getElementById("div_r1");
	var k=document.getElementById("div_r2");
	if(j==null||j==undefined)return false;
	if(j.offsetHeight<i.offsetHeight){j.style.height=i.offsetHeight+(-1)+"px";}
	if(k.offsetHeight<i.offsetHeight){k.style.height=i.offsetHeight+(-1)+"px";}
}
function VoteOpt(){
	var i=document.my_vote;
	var k=i.v_sm;
	var l=i.v_vw;
	var ISatte=window.attachEvent;
	if(ISatte){	k.attachEvent("onclick",VoteOpt_Submit);l.attachEvent("onclick",VoteOpt_View);}
	else{k.addEventListener("click",VoteOpt_Submit,false);l.addEventListener("click",VoteOpt_Submit,false);}
}
function VoteOpt_Submit(){
	var i=document.my_vote.v_op;
	var j,k;
	for(j=0;j<i.length;j++){if(i[j].checked){k=i[j].value;break;}}
	var t="&NOtime="+(new Date()).getTime();
	var xmlHttp=false;
	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();}
	xmlHttp.open("GET","Vote_Submit.asp?val="+k+t,true);
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4){
			if(xmlHttp.status==200){
				switch(xmlHttp.responseText){
					case"true":{alert("感谢您的投票!");break;}
					case"false1":{alert("您已经投过票了，请勿重复投票!");break;}
					default:{alert("投票失败!");break;}
				}
			}
			else{alert("未知错误!");}
		}
	}
	xmlHttp.send(null);
}
function VoteOpt_View(){
	document.getElementById("div1").style.display='';
	document.getElementById("div0").style.display='none';
	var i=document.getElementById("div1");
	var t="NOtime="+(new Date()).getTime();
	var xmlHttp=false;
	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();}
	xmlHttp.open("GET","Vote_View.asp?"+t,true);
	xmlHttp.onreadystatechange=function(){
		if(xmlHttp.readyState==4){
			if(xmlHttp.status==200){
				if(xmlHttp.responseText==""||xmlHttp.responseText=="false"){alert("暂无结果!");VoteOpt_Close();}
				else{
					var arr=xmlHttp.responseText.split("||");
					var arr2=document.getElementById("div2").innerHTML.split("||");
					var html,num;
					var itnum,it1,it2;
					html="<div class='stlvot_1'>在线调查显示</div>";
					html+="<div class='stlvot_4'><ul>";
					html+="<li><span><b>"+arr2[0]+"</b></span></li>";
					for(num=1;num<arr.length;num++){
						itnum=parseInt(arr[num]);
						if(itnum>0){it1=itnum/parseInt(arr[0]);it2=it1*200;it1=it1*100;it1=it1.toFixed(2)+"%";}
						else{it2=1;it1="0%";}
						html+="<li><span>"+arr2[num]+"["+itnum+"票,"+it1+"]:</span><img src='images/bar.gif' style='width:"+it2+"px;height:10px;'></li>";
					}
					html+="<li><span>总计["+arr[0]+"票,100%]:</span><img src='images/bar.gif' style='width:200px;height:10px;'></li>"
					html+="</ul></div>";
					html+="<div class='stlvot_2'><span onclick='VoteOpt_Close();'>[关闭窗口]</span></a></div>";
					i.innerHTML=html;
				}
			}
			else{alert("未知错误!");VoteOpt_Close();}
		}
		else{i.innerHTML="<div class='stlvot_3'>正在加载，请稍候...</div>";}
	}
	xmlHttp.send(null);
}
function VoteOpt_Close(){document.getElementById("div1").style.display='none';document.getElementById("div0").style.display='';}
function VoteOpt_startMove(objDiv){
	document.attachEvent("onmousemove",VoteOpt_moveDiv);
	document.attachEvent("onmouseup",VoteOpt_endMove);
	document.attachEvent("onselectstart",VoteOpt_selectNo);
	document["moveDiv"] = objDiv;
	document["startX"] = event.x;document["startY"] = event.y;
	document["oldX"] = objDiv.getBoundingClientRect().left;
	document["oldY"] = objDiv.getBoundingClientRect().top;
}
function VoteOpt_moveDiv(){
	var obj = document["moveDiv"];
	if(obj){
		var l = document["oldX"];
		var t = document["oldY"];
		obj.style.position = "absolute";
		obj.style.left = l + (event.x-document["startX"]);
		obj.style.top = t + (event.y-document["startY"]);
	}
}
function VoteOpt_endMove(){
	document.detachEvent("onmousemove",VoteOpt_moveDiv);
	document.detachEvent("onmouseup",VoteOpt_endMove);
	document.detachEvent("onselectstart",VoteOpt_selectNo);
	document["moveDiv"] = null;
	document["startX"] = null;
	document["startY"] = null;
}
function VoteOpt_selectNo(){return false;}
function TransPHO5(pics,texts,links,focus_width,focus_height,text_height){
	var swf_height = focus_height+text_height;
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
	document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/focus.swf"><param name="quality" value="high"><param name="bgcolor" value="#d88c96">');
	document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
	document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
	document.write('<embed src="images/focus.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#d88c96" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}
function Product_SelOption(i){
	var j,k,my;j=document.mysear.ser_cid_1;
	if(i==0){
		for(k=j.options.length;k>=0;k--){j.options[k]=null;}
		my=document.createElement("option");my.value=0;my.text="--选择小类--";j.add(my);
	}
	else{
		var t="&NOtime="+(new Date()).getTime();
		var xmlHttp=false;
		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();}
		xmlHttp.open("GET","Sel_ProductClass.asp?CID="+i+t,true);
		xmlHttp.onreadystatechange=function(){
			if(xmlHttp.readyState==4){
				if(xmlHttp.status==200){
					for(k=j.options.length;k>=0;k--){j.options[k]=null;}
					var arr=xmlHttp.responseText.split("|||");
					var l;
					if(arr.length>=1&&xmlHttp.responseText!=""){
						for(k=0;k<arr.length-1;k++){
							l=arr[k].split("||");
							my=document.createElement("option");my.value=l[0];my.text=l[1];j.add(my);
						}
					}
					else{my=document.createElement("option");my.value=0;my.text="--该大类暂无小类--";j.add(my);}
				}
				else{alert("加载列表出错!");return false;}
			}
		}
		xmlHttp.send(null);
	}
}
function Product_Submit(){
	var i=document.mysear.skey;
	if(i.value==""||i.value=="请输入产品关键字"){alert("请输入产品关键字！");i.value="";i.focus();return false;}
	var j=document.mysear.ser_cid_1.value;
	var k=document.mysear.CID;
	if(j==0){
		j=document.mysear.ser_cid_0.value;
		if(j==0){k.value="";}
		else{k.value=j;}
	}
	else{k.value=j;	}
	document.mysear.action="Product.asp";
}