window.onerror = function(){return true;} string.prototype.trim = function(){ return this.replace(/(^\s*)|(\s*$)/g, "");} function imagezoom(img,width,height) { var image=new image(); image.src=img.src; if(image.width>width||image.height>height) { w=image.width/width; h=image.height/height; if(w>h) { img.width=width; img.height=image.height/w; } else { img.height=height; img.width=image.width/h; } } } function imageopen(img) { window.open(img.src); } function chkuserlogin(frm) { if(frm.user_name.value.trim()=='') { alert("请输入您的用户名。"); frm.user_name.focus(); return false; } if(frm.user_password.value.trim()=='') { alert("请输入您的密码。"); frm.user_password.focus(); return false; } frm.submit(); } function chkusersearch(frm) { if(frm.keyword.value.trim()=="") { alert("请输入你要查询的关键词。"); frm.keyword.focus() return false; } return true; }