//加入收藏
function AddFav(){	window.external.addFavorite(window.document.location.href,document.title);}

//防框架
if (top.location != self.location)
    top.location=self.location;

//改变搜索框的样式
function textobj(){
	var ftext = document.textform.text;
	if (ftext.className == "mformt"){
		ftext.value = "";
		ftext.className="mformts";
		}	
return true;
}

//验证首页搜索时，是否有非法字符
function textIsNull(str){   
	var patrnn=/['|*|%]/; 
	if (!patrnn.exec(str)) return false 
	return true
	} 

//验证首页搜索
function textcheack(){
	var text=document.textform;	
	if (text.keytext.value.replace(/ /g,"")=="请输入要搜索的信息"){
		alert("请输入要搜索的信息");
		text.keytext.focus();
		return false;
		}
	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;	
	}

//QQ客服使用
function qqboxove(str){document.getElementById(str).className="qqobjboxove";}
function qqboxout(str){document.getElementById(str).className="qqobjboxout";}