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;
	if (form.ckey.value.trim() == "") {
		alert("搜索关键字不能为空！");
		form.ckey.focus();
		returnClick(event, false);
	}
	else
	{
		form.action = "info/search.aspx?keyword=" + form.ckey.value;
    	returnClick(event, true);
	}
 }
 
 function SearchCheck2(form)
{
if (form.ckey.value.trim() == "") {
		alert("搜索关键字不能为空！");
		form.ckey.focus();
		returnClick(event, false);
	}
	else
	{
		form.action = "Products/search.aspx?keyword=" + form.ckey.value;
    	returnClick(event, true);
	}
 }

function SearchCheck3(form)
{
if (form.ckey.value.trim() == "") {
		alert("搜索关键字不能为空！");
		form.ckey.focus();
		returnClick(event, false);
	}
	else
	{
		form.action = "Company/search.aspx?keyword=" + form.ckey.value;
    	returnClick(event, true);
	}
 }
 
 function SearchCheck4(form)
{
if (form.ckey.value.trim() == "") {
		alert("搜索关键字不能为空！");
		form.ckey.focus();
		returnClick(event, false);
	}
	else
	{
		form.action = "Classad/search.aspx?keyword=" + form.ckey.value;
    	returnClick(event, true);
	}
 }
function SearchCheck5(form)
{
if (form.ckey.value.trim() == "") {
		alert("搜索关键字不能为空！");
		form.ckey.focus();
		returnClick(event, false);
	}
	else
	{
		form.action = "Jobs/search.aspx?keyword=" + form.ckey.value;
    	returnClick(event, true);
	}
 }

 function SearchCheck6(form)
{
if (form.ckey.value.trim() == "") {
		alert("搜索关键字不能为空！");
		form.ckey.focus();
		returnClick(event, false);
	}
	else
	{
		form.action = "Article/search.aspx?keyword=" + form.ckey.value;
    	returnClick(event, true);
	}
 }