	function subLogin(obj)
	{				
		
		if(obj.subPw.value==""){ alert("请输入管理密码？"); obj.subPw.focus(); return false;	}
		else obj.submit();
	}
	
	function showState(sid,tid)
	{
		for(var i=1;i<5;i++)
		{
			document.getElementById('showMess'+i).style.display='none';
		}
		if(sid)
		{
			document.getElementById('showMess'+sid).style.display='';
			document.getElementById("stateHit").innerHTML='';
			document.getElementById("stateHit").className ='';
		}
	
	}
	
	function errorInfo(id)
	{
		var email=document.getElementById("email");
		var info=document.getElementById("reason");
		//encodeURIComponent(document.getElementById("reason").value);
		
		if(!email.value && !info.value){ alert("您写的信息不全，请补全后重新举报。谢谢！"); return false;}
		if(emailCheck(email.value)==false){ return false;}
		
		var x = new Ajax('statusid', 'XML');
		x.post('pro_collection.php?IDProd='+id,"email="+email.value+"&ErrorInfo="+info.value, function(s){
				//alert(s.lastChild.firstChild.nodeValue);
				var mess =s.lastChild.firstChild.nodeValue;
				email.value="";
				info.value="";
				document.getElementById("showMess2").style.display="none";
				document.getElementById("stateHit").innerHTML = mess;
				document.getElementById("stateHit").className ='ok'; 
		});
		
	}
	
	function copyIt(id){
		var o=document.getElementById(id);
		if(document.all){
		o.select();
		window.clipboardData.clearData();
		window.clipboardData.setData("text",o.value);
		alert("已复制到剪贴板上!");
		}else{
		alert("复制失败!");
		o.select();
		}
	}
	
	
function Fsize(size)
{
	document.getElementById("content").style.fontSize=size+"px";
	//alert(document.location.href);
}

function collection(){
	var title="";
	var href="";
   title=document.title;
   href=window.location;   
   window.external.addFavorite(" "+href+""," "+title+"");	
}

function writeFun(){
	var str="";
	str+="文字大小：【<a href='javascript:Fsize(16)'>大</a>】【<a href='javascript:Fsize(14)'>中</a>】【<a href='javascript:Fsize(12)'>小</a>】";
	str+="【<a href='javascript:collection()'>收藏本页</a>】 【<a href='javascript:print()'>打印本页</a>】【<a href='javascript:close()'>关闭页面</a>】";
	document.write(str);	
}
