var checkOK = "'\"&*"; String.prototype.Trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); } function fucCheckLength(strTemp) { var i,sum; sum=0; for(i=0;i=0) && (strTemp.charCodeAt(i)<=255)) { //if (strTemp.charAt(i)!=" ") sum=sum+1; } else sum=sum+2; } return sum; } function CheckInput(InputStr) { var checkStr = InputStr; var len=-1; for (i = 0; i < checkOK.length; i++) { ch = checkOK.charAt(i); if (checkStr.indexOf(ch)>=0) { return (false); break; } } return (true); } function frmadminlogin_Validator(theForm) { var checkOK1 = "'\"&*"; if(theForm.username.value == "") { alert("请输入您的登录名!"); theForm.username.focus(); return false; } if (!CheckInput(theForm.username.value)) { alert("登录名中不能包含如下字符: "+checkOK1); theForm.username.focus(); return (false); } if (theForm.password.value == "") { alert("请输入您的密码!"); theForm.password.focus(); return (false); } if (!CheckInput(theForm.password.value)) { alert("密码中不能包含如下字符: "+checkOK1); theForm.password.focus(); return (false); } return (true); } function MyPopNewsWin(myurl) { //window.open(myurl,"_blank","status=no,menubar=no,scrollbars=yes,resizable=auto, left=0,top=0,width=520,height=540"); window.open(myurl,"_blank","status=no,menubar=no,scrollbars=yes,resizable=yes, left=0,top=0,width=520,height=540"); } function MyPopProWin(myurl,iwidth,iheight) { window.open(myurl,"mypopwin","status=no,menubar=no,scrollbars=yes,resizable=yes, left=0,top=0,width="+iwidth+",height="+iheight); } function MyZpWin(myurl) { window.open(myurl,"MyZpWin","status=no,menubar=no,scrollbars=yes,resizable=yes, left=0,top=0,width=640,height=480"); } function MyCompanyWin(myurl) { window.open(myurl,"mycompanywin"); } function Page_onChange(theForm) { var jtopid,jparentid,jchildid,jPagenum,jcategoryid,jKeyword, i,MyString,stid; for (i=0;theForm.selGoPage.length;i++) { if(theForm.selGoPage.options[i].selected==true) { jPagenum=theForm.selGoPage.options[i].value; break ; } } if(jPagenum>0) { jtopid="topid="+theForm.topid.value; jparentid="&parentid="+theForm.parentid.value; jchildid="&childid="+theForm.childid.value; jcategoryid="&categoryid="+theForm.categoryid.value; jPagenum="&pagenum="+jPagenum; jKeyword="&keyword="+theForm.keyword.value; stid="&stid="+theForm.stid.value; MyString="?"+jtopid+jparentid+jchildid+jcategoryid+jPagenum+jKeyword+stid; //alert(MyString); window.open(MyString,"_self"); } return true; } function PageGo(theForm) { var jtopid,jparentid,jchildid,jPagenum,jcategoryid,jKeyword, i,MyString,stid; for (i=0;theForm.selGoPage.length;i++) { if(theForm.selGoPage.options[i].selected==true) { jPagenum=theForm.selGoPage.options[i].value; break ; } } if(jPagenum>0) { jtopid="topid="+theForm.topid.value; jparentid="&parentid="+theForm.parentid.value; jchildid="&childid="+theForm.childid.value; jcategoryid="&categoryid="+theForm.categoryid.value; jPagenum="&pagenum="+jPagenum; jKeyword="&keyword="+theForm.keyword.value; stid="&stid="+theForm.stid.value; MyString="?"+jtopid+jparentid+jchildid+jcategoryid+jPagenum+jKeyword+stid; //alert(MyString); window.open(MyString,"_self"); } return true; } function DelClientHtml(Word) { var a,b,len,c,d,tagCheck; a = Word.indexOf("<"); b = Word.indexOf(">"); len = Word.length; c = Word.substring(0, a); if(b == -1) b = a; d = Word.substring((b + 1), len); Word = c + d; tagCheck = Word.indexOf("<"); if(tagCheck != -1) Word = Del(Word); return Word; }