//防框架
if (top.location != self.location)top.location=self.location;

//判断非法字符
function textIsNull(str)   
	{   
	var patrnn=/['|*|%]/; 
	if (!patrnn.exec(str)) return false 
	return true
} 

//头部输入关键字表单
function toptext(){
	var text1;
	text1=document.topform.keytext.value;
	text1=text1.replace(/\'/g,"")
	text1=text1.replace(/\;/g,"")
	text1=text1.replace(/\"/g,"")
	text1=text1.replace(/\</g,"")
	text1=text1.replace(/\>/g,"")
	text1=text1.replace(/\%/g,"")
	text1=text1.replace(/\&/g,"")
	text1=text1.replace(/\*/g,"")
	text1=text1.replace(/\^/g,"")
	text1=text1.replace(/\#/g,"")
	document.topform.keytext.value=text1;
}

//头部验证搜索
function topcheack(){
	var text=document.topform;				
	if (text.keytext.value.replace(/ /g,"")==""){
		alert("搜索内容不能为空,请输入搜索内容");
		text.keytext.focus();
		return false;
		}
	if (text.keytext.value.replace(/ /g,"").length>40){
		alert("搜索内容有点长了,为了方便准确的搜索出您所想要的信息,请正确输入搜索内容");
		text.keytext.focus();
		return false;
		}	
	if (textIsNull(text.keytext.value)){
		alert("搜索内容有非法字符，请正确输入您要搜索的内容");
		text.keytext.focus();
		return false;
		} 
	if (text.action.value==""){
		alert("搜索栏目不能为空,请选择一个正确搜索栏目，这样方便您快速的查找到您所要找的信息");
		text.action.focus();
		return false;
		}
return true;	
}

//单独信息过滤
function texttext(){
	var text1;
	text1=document.searchform.keytext.value;
	text1=text1.replace(/\'/g,"")
	text1=text1.replace(/\;/g,"")
	text1=text1.replace(/\"/g,"")
	text1=text1.replace(/\</g,"")
	text1=text1.replace(/\>/g,"")
	text1=text1.replace(/\%/g,"")
	text1=text1.replace(/\&/g,"")
	text1=text1.replace(/\*/g,"")
	text1=text1.replace(/\^/g,"")
	text1=text1.replace(/\#/g,"")
	document.searchform.keytext.value=text1;
}

//单独信息搜索
function textcheack(){
	var text=document.searchform;				
	if (text.keytext.value.replace(/ /g,"")==""){
		alert("搜索内容不能为空,请输入搜索内容");
		text.keytext.focus();
		return false;
		}
	if (text.keytext.value.replace(/ /g,"").length>40){
		alert("搜索内容有点长了,为了方便准确的搜索出您所想要的信息,请正确输入搜索内容");
		text.keytext.focus();
		return false;
		}	
	if (textIsNull(text.keytext.value)){
		alert("搜索内容有非法字符，请正确输入您要搜索的内容");
		text.keytext.focus();
		return false;
		} 

	return true;	
}


