Ext.apply(Yibeicha.util,{showError:function(D,B,C){var A="";if(D>100){A="错误代码:"+D+"<br>"}if(null!=B){A+=B}Ext.Msg.show({title:"错误",msg:A,buttons:Ext.Msg.OK,animEl:C,icon:Ext.MessageBox.ERROR})},showConnError:function(A){this.showError(0,"无法连接至服务器，有可能服务器暂时无法提供服务或你的Internet连接出现异常.",A)},showValidateError:function(A){this.showError(0,"抱歉，表单输入不符合要求，请修改.",A)},enterPlatform:function(){location.href="./PAccounting/PAccounting.html"}});Yibeicha.pwd=function(){ratingMsgs=new Array(6);ratingMsgColors=new Array(6);barColors=new Array(6);ratingMsgs[0]="太短";ratingMsgs[1]="弱";ratingMsgs[2]="一般";ratingMsgs[3]="很好";ratingMsgs[4]="极佳";ratingMsgs[5]="未评级";ratingMsgColors[0]="#676767";ratingMsgColors[1]="#aa0033";ratingMsgColors[2]="#f5ac00";ratingMsgColors[3]="#6699cc";ratingMsgColors[4]="#008000";ratingMsgColors[5]="#676767";barColors[0]="#dddddd";barColors[1]="#aa0033";barColors[2]="#ffcc33";barColors[3]="#6699cc";barColors[4]="#008000";barColors[5]="#676767";function E(H){if(document.all){return document.all(H)}return document.getElementById(H)}function G(I){var L=E("posBar");var K=E("negBar");var J=E("passwdRating");var H=E("passwdBar").width;if(I>=0&&I<=4){L.style.width=H/4*I+"px";K.style.width=H/4*(4-I)+"px"}else{L.style.width="0px";K.style.width=H+"px";I=5}L.style.background=barColors[I];J.innerHTML="<font color='"+ratingMsgColors[I]+"'>"+ratingMsgs[I]+"</font>"}function D(){var K=E("posBar");var J=E("negBar");var I=E("passwdRating");var H=E("passwdBar").width;K.style.width="0px";J.style.width=H+"px";I.innerHTML=""}function F(K,J){var I=K.indexOf(J);if(I!=-1){var H=parseFloat(K.substring(I+J.length));if(!isNaN(H)){return H}}return null}function C(H){if(H>=48&&H<=57){return 1}if(H>=65&&H<=90){return 2}if(H>=97&&H<=122){return 4}else{return 8}}function B(H){modes=0;for(i=0;i<4;i++){if(H&1){modes++}H>>>=1}return modes}function A(H){if(H.length<=4){return 0}Modes=0;for(i=0;i<H.length;i++){Modes|=C(H.charCodeAt(i))}return B(Modes)}return{reqPwdRate:function(I){if(!I){return false}passwd=I.value;var H=6;if(passwd.length<H){if(passwd.length>0){G(0)}else{D()}}else{rating=A(passwd);G(rating)}},getPwdRateHTML:function(){return"<table cellSpacing=0 cellPadding=0 border=0 class=ybc-normal><tbody><tr><td vAlign=top noWrap width=0>密码强度： </td> <td vAlign=top noWrap><font color=#808080><strong> <div id=passwdRating></div></strong></font></td></tr><tr><td height=3></td></tr><tr><td colSpan=2><table id=passwdBar cellSpacing=0 cellPadding=0 width=180 bgColor=#ffffff border=0><tbody><tr><td id=posBar width=0% bgColor=#e0e0e0 height=4></td><td id=negBar width=100% bgColor=#e0e0e0 height=4></td></tr></tbody></table></td></tr></tbody></table>"}}}();