function isEmail(b){var a=/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;if(a.test(b)!=true){return false}else{return true}}function isValidReg(b){var a=/<|>|\[|\]|\{|\}|『|』|※|○|●|◎|§|△|▲|☆|★|◇|◆|□|▼|㊣|﹋|⊕|⊙|〒|ㄅ|ㄆ|ㄇ|ㄈ|ㄉ|ㄊ|ㄋ|ㄌ|ㄍ|ㄎ|ㄏ|ㄐ|ㄑ|ㄒ|ㄓ|ㄔ|ㄕ|ㄖ|ㄗ|ㄘ|ㄙ|ㄚ|ㄛ|ㄜ|ㄝ|ㄞ|ㄟ|ㄢ|ㄣ|ㄤ|ㄥ|ㄦ|ㄧ|ㄨ|ㄩ|■|▄|▆|\*|@|#|\^|\\/;if(a.test(b)==true){return false}else{return true}}function isValidLength(b,a){if(b.length<a){return false}return true}function isValidURL(b){var a=/^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(\S+\.\S+)$/;if(!isNULL(b)){b=jsTrim(b);if(b.match(a)==null){return false}else{return true}}return false}function isValidDecimal(b){var a=/^\d*\.?\d{1,2}$/;if(b.match(a)==null){return false}else{return true}}function isNumber(b){var a=/^\d*$/;if(b.match(a)==null){return false}else{return true}}function isFloat(a){for(i=0;i<a.length;i++){if((a.charAt(i)<"0"||a.charAt(i)>"9")&&a.charAt(i)!="."){return false}}return true}function isLetters(b){var a=/^[A-Za-z]+$/;if(b.match(a)==null){return false}else{return true}}function isValidPost(b){var a=/^\d{6}$/;if(b.match(a)==null){return false}else{return true}}function jsTrim(a){return a.replace(/(^\s*)|(\s*$)/g,"")}function isNULL(a){if(a==null){return true}if(jsTrim(a).length==0){return true}return false}function checkall(c,d,b){var b=b?b:"chkall";for(var a=0;a<c.elements.length;a++){var f=c.elements[a];if(f.type=="checkbox"){f.checked=c.elements[b].checked}}}function uncheckAll(b){for(var a=0;a<b.elements.length;a++){var c=b.elements[a];if(c.name!="chkall"){c.checked=!c.checked}}}function openWindow(url,windowName,width,height){var x=parseInt(screen.width/2)-(width/2);var y=parseInt(screen.height/2)-(height/2);var isMSIE=(navigator.appName=="Microsoft Internet Explorer");if(isMSIE){var p="resizable=1,location=no,scrollbars=no,width=";p=p+width;p=p+",height=";p=p+height;p=p+",left=";p=p+x;p=p+",top=";p=p+y;retval=window.open(url,windowName,p)}else{var win=window.open(url,"ZyiisPopup","top="+y+",left="+x+",scrollbars="+scrollbars+",dialog=yes,modal=yes,width="+width+",height="+height+",resizable=no");eval("try { win.resizeTo(width, height); } catch(e) { }");win.focus()}}function tourl(a){window.open(a)}function client(d){var a=navigator.userAgent.toLowerCase();var c=false;if(d=="isOP"){c=a.indexOf("opera")>-1}if(d=="isIE"){c=a.indexOf("msie")>-1}if(d=="isFF"){c=a.indexOf("firefox")>-1}return c}function setCookie(a,b,d){if(d){var c=new Date();c.setTime(c.getTime()+d*24*60*60*1000);document.cookie=a+"="+escape(b)+";expires="+c.toGMTString()}else{document.cookie=a+"="+escape(b)}}function getCookie(b){var a=document.cookie.match(new RegExp("(^| )"+b+"=([^;]*)(;|$)"));if(a!=null){return unescape(a[2])}return null}function delCookie(a){var c=new Date();c.setTime(c.getTime()-1);var b=getCookie(a);if(b!=null){document.cookie=a+"="+b+";expires="+c.toGMTString()}}function $i(a){return document.all?document.all[a]:document.getElementById(a)}function $n(a){return document.getElementsByName(a)}function get_radio_value(b){if(b&&b.length){for(var a=0;a<b.length;a++){if(b[a].checked){return b[a].value}}}else{return}}function get_checkbox_value(b){if(b&&b.length){for(var a=0;a<b.length;a++){if(b[a].checked&&!b[a].disabled){return b[a].value}}}else{return}}function get_Option_Value(a){if(a&&a.length){for(var b=0;b<a.length;b++){if(a[b].selected){return a[b].value}}}else{return}}function get_Select_Value(a){return a.options[a.selectedIndex].value}function ref(){r=window.history.back();return r}function noneSuccess(){setTimeout(function(){var a=$i("success");a.style.display="none"},5000)}function ol(b){return b==document.body?0:b.offsetLeft+ol(b.offsetParent)}function ot(b){return b==document.body?0:b.offsetTop+ot(b.offsetParent)}function getNumChecked(b){b=document.getElementById(b);var a=0;for(i=0,n=b.elements.length;i<n;i++){if(b.elements[i].type=="checkbox"){if(b.elements[i].checked==true){a++}}if(b.elements[i].name=="chkallde"||b.elements[i].name=="chkall"){if(b.elements[i].checked==true){a--}}}return a}function sorting(b,a){document.Sorting.type.value=b;document.Sorting.m.value=a;document.Sorting.submit()}function addLoading(b,c){if(b===undefined){var b="请稍候，加载中..."}var a=document.createElement("div");a.setAttribute("id","aLoadings");a.setAttribute("align","center");a.style.position="absolute";a.style.right="0px";a.style.top="0px";a.style.zindex="10000";a.innerHTML="<div style=' background:#CC4444;padding:2px 5px;width:150px;color:#ffffff;font-size:12px;overflow:hidden'><img  src='/javascript/images/loadingh.gif' style='margin-right:5px;vertical-align:middle;'>"+b+"</div>";document.body.appendChild(a)}function delLoading(){var a=$i("aLoadings");if(a){document.body.removeChild(imgObj)}}function ajax(url,id,h){var xmlHttp=false;try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(e2){xmlHttp=false}}if(!xmlHttp&&typeof XMLHttpRequest!="undefined"){xmlHttp=new XMLHttpRequest()}xmlHttp.open("GET",url,true);xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState<4&&id){document.getElementById(id).innerHTML="请稍候..."}if(xmlHttp.readyState==4&&h){var response=xmlHttp.responseText;eval(h+'("'+response+'")')}};xmlHttp.send(null)}function copyText(b){if(window.clipboardData){window.clipboardData.clearData();window.clipboardData.setData("Text",b)}else{if(navigator.userAgent.indexOf("Opera")!=-1){window.location=b}else{if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")}catch(g){alert("复制失败");return}var d=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);if(!d){return}var c=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(!c){return}c.addDataFlavor("text/unicode");var h=new Object();var a=new Object();var h=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);var j=b;h.data=j;c.setTransferData("text/unicode",h,j.length*2);var f=Components.interfaces.nsIClipboard;if(!d){return false}d.setData(c,null,f.kGlobalClipboard)}}}}function w(b){$i("pvsum").innerHTML=b}function pvs(){ajax("/index.php?action=index&pv=yes","","w");t=setTimeout("pvs()",30000)}function refurbish(){var a=document.getElementById("varImg");a.src="/index.php?action=imgcode&rand="+Math.random()}function doLogin(){var d=$i("username").value;var a=$i("password").value;if(d.length=="0"){alert("请输入你用户名");$i("username").focus();return false}if(a.length=="0"){alert("请输入你的密码!");$i("password").focus();return false}try{var b=$i("checkcode").value;if(b==""){alert("验证码不能为空");$i("checkcode").focus();return false}}catch(c){}};
