String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,''); }
var IEBrowser = (window.navigator.userAgent.toLowerCase().indexOf('msie') > -1);
function returnClick(event, rbool)
{
	if (IEBrowser) {
		window.event.returnValue = rbool;
	} else {
		if(!rbool && event.preventDefault) event.preventDefault(); //ff
	}
}		
function SearchCheck1(form)
{
	//var form = document.form5;
		//alert("aa");
		form.action="http://sou.it168.com/psearch.aspx?keyWord=" + form.ckey.value;
				
		
		returnClick(event, true);
	
 }
function SearchCheck2(value)
{
	//var form = document.form5;
		//alert("aa");
		location.href="http://sou.it168.com/psearch.aspx?keyWord=" + value;
				
		
		returnClick(event, true);
	
 } 
 function SearchCheck_final(form)
{
	//var form = document.form5;
	if (form.ckey.value.trim() == "") {
		alert("ËÑË÷¹Ø¼ü×Ö²»ÄÜÎª¿Õ£¡");
		form.ckey.focus();
		returnClick(event, false);
	}
	else
	{
		switch(form.cflag.value.trim())
		{
			case "shuyu": form.action = "http://detail.it168.com/common/shuyuxiangjie/files/searchshuyuxiangjie.asp?ckey=" + form.ckey.value;
				break;
			case "detail": form.action = "http://guide.it168.com/new/cShuomingshuList.asp?shuocSearchName=" + form.ckey.value;
				break;
			case "jingxiao": form.action = "http://search.it168.com/files/cDealersearch.asp?ckey=" + form.ckey.value;
				break;
			case "logtext": form.action = "http://weixiu.it168.com/files/searchtest.asp?keyword=" + form.ckey.value;
				break;
			case "zwss": 
				form.action = "http://www.itsousuo.com/search/search.aspx";
				form.txtkey.value=form.ckey.value.trim();
				break;
			default: form.action="http://search.it168.com/files/search.asp?ckey=" + form.ckey.value;
				break;
		}
		returnClick(event, true);
	}
 }
function big5bg(big){
	var urlft;
	var urljt;
	var url1;
	var url2;
	var url3;
	url1="http";
	url2="://www.it168.com";
	url3="://big5.it168.com:82/gate/big5/www.it168.com/"; 
	urlft=url1+url2;
	urljt=url1+url3;
	if (big==1) { document.location.href=urlft; }
	if (big==2) { document.location.href=urljt; }
}
