﻿function jscheck()
{

	var keyValue=document.getElementById("searchWord");
	var exp=/^([\u4E00-\u9FA5a-zA-Z0-9 　]{1,49})([\-]{0,1})([\u4E00-\u9FA5a-zA-Z0-9 　]{0,49})$/;
	if(!exp.test(keyValue.value.Trim()))
	{
		alert("关键字输入有误，要求长度1-50字符，请勿使用特殊符号！");
		keyValue.focus;
		return;
	}
	
	window.open("http://www.chinabins.com/search/"+keyValue.value.Trim()+".shtml");

}


String.prototype.Trim = function() 
{ 
return this.replace(/^(　|[\s])+|(　|[\s])+$/g, "" );
}

function keySubmit(event){
	event=window.event || event;
	if(event.keyCode==13){
	jscheck();
	}
}
