function killerror(){return true;}
window.onerror = killerror;
function qieHuanStart(){
 var _1=document.getElementById("h_qiehuan").getElementsByTagName("li");
for(var i=0;i<_1.length;i++){
_1[i].onmouseover=function(){
this.className+=(this.className.length>0?" ":"")+"cityhover";
};
_1[i].onmouseout=function(){
this.className=this.className.replace(new RegExp("( ?|^)cityhover\\b"),"");
};
}
}; 
//留言时检测
function checkmessage()
{
if (document.form.messagetext.value.length<1)
{
alert("请填写留言内容！");
document.form.messagetext.focus();
return false;
}
if (document.form.messagetext.value.length>100)
{
alert("请把留言字数控制在100以内！");
document.form.messagetext.focus();
return false;
}
}
//显示验证码
function get_Code(codePath) {
	var CodeFile = codePath+'inc/GetCode.asp';
	if(document.getElementById("codeImgId"))
		document.getElementById("codeImgId").innerHTML = '<img src="'+CodeFile+'?t='+Math.random()+'" alt="点击刷新验证码" style="cursor:pointer;border:0;vertical-align:middle;" onclick="this.src=\''+CodeFile+'?t=\'+Math.random()" />'
}
//显示中文验证码
function get_cnCode(codePath) {
	var CodeFile = codePath+'inc/GetcnCode.asp';
	if(document.getElementById("codeImgId"))
		document.getElementById("codeImgId").innerHTML = '<img src="'+CodeFile+'?t='+Math.random()+'" alt="点击刷新验证码" style="cursor:pointer;border:0;vertical-align:middle;" onclick="this.src=\''+CodeFile+'?t=\'+Math.random()" />'
}
//弹出一个居中的窗口
function openWindow(u,w,h,title) { 
	var ww = screen.width;
	if(ww<w) w = ww;
	if(wh<h) h = wh;
	var wh = screen.height;
    var l = (ww - w) / 2; 
    var t = (wh - h) / 2; 
    var s = 'width='+w+',height='+h+', top='+t+',left='+l; 
    s += ', toolbar=no,scrollbars=yes,menubar=no,location=no,resizable=no'; 
    open(u,title,s); 
} 
//自动控制图片大小

function imgauto(inp,w,h) { 
	var img=null;
　  if(img)img.removeNode(true); 
　  img=document.createElement("img");   
　  img.src=inp; 
	if(img.width<w)
		w = img.width;
	else w = w - 6;
	if(img.height<h) 
		h = img.height;
	else h = h -6;
//	img.width = w;
//	img.height = h;
	showimg.innerHTML='<img src="'+inp+'"  width="'+w+'"  height="'+h+'"/>';
	//showimg.insertAdjacentElement("BeforeEnd",img); 
} 
　　 