function killErrors() {
return true;
}
window.onerror = killErrors;
//uesrLOGIN
function ChkUL(){
if(ulogin.username.value==''){
alert("请填写昵称！");
ulogin.username.focus();
return false;
}
if(ulogin.password.value==''){
alert("请填写密码！");
ulogin.password.focus();
return false;
}
return true;
}

// 关键字
function ChkNewSearch(){
if(newssearch.keytext.value==''){
alert("请填写关键字！");
newssearch.keytext.focus();
return false;
}
return true;
}
// 控制层的显示与关闭
function findobj(n, d) {
	var p, i, x;
	if(!d) d = document;
	if((p = n.indexOf("?"))>0 && parent.frames.length) {
		d = parent.frames[n.substring(p + 1)].document;
		n = n.substring(0, p);
	}
	if(x != d[n] && d.all) x = d.all[n];
	for(i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
	for(i = 0; !x && d.layers && i < d.layers.length; i++) x = findobj(n, d.layers[i].document);
	if(!x && document.getElementById) x = document.getElementById(n);
	return x;
}
function onoff(objname) {
obj = findobj(objname);
if(obj.style.display == "none") {
obj.style.display = "";
} else {
obj.style.display = "none";
}
}
//转换_blank
function externallinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && 
       anchor.getAttribute("rel") == "external") 
     anchor.target = "_blank"; 
 } 
} 
window.onload = externallinks;
