function init(_1){
var _2=["uid","password"];
for(var i=0,_3=_2.length;i<_3;i++){
_4=document.getElementById(_2[i])||document.getElementsByName(_2[i])[0];
_4.onfocus=function(_5){
var e=_5||window.event;
var _6=e.target||e.srcElement;
_6.className="input focus";
};
_4.onblur=function(_7){
var e=_7||window.event;
var _8=e.target||e.srcElement;
_8.className="input";
};
}
var _4;
if(_1){
_4=document.getElementById(_1)||document.getElementsByName(_1)[0];
if(_4!=null){
_4.focus();
}
}
restoreCookies();
if(!document.all){
var _9=document.getElementById("homepage");
if(_9){
_9.style.display="none";
}
}
};
function getCookie(_a){
var _b=new RegExp("(^| )"+_a+"=([^;]*)(;|$)","gi");
var _c=_b.exec(document.cookie);
return unescape((_c||[])[2]||"");
};
function setCookie(_d,_e){
document.cookie=_d+"="+escape(_e)+";expires="+(new Date(2099,12,31)).toGMTString();
};
function restoreCookies(){
var _f=document.getElementById("uid");
if(!_f.value){
_f.value=getCookie("uid");
}
};
function loginSubmit(_10,_11){
if(document.getElementById("saveUsername").checked){
setCookie("uid",document.getElementById("uid").value);
}
var userid = document.getElementById("uid");
 var idargs = userid.value.split(".");
 var globaldomain = "@tzb.com";
 var internetdimain = "@tzbank.com";
 //将IP分成4段，将每段转成数字进行比较
 var ips = localip.split(".");
 var ip1 = parseInt(ips[0]);
 var ip2 = parseInt(ips[1]);
 var ip3 = parseInt(ips[1]);
 var ip4 = parseInt(ips[1]);
 //根据详细分段进行条件组合 “或”为“||”，“并且”为“&&”
 if(idargs.length==1){
 if(ip1==10 || (ip1==20 && ip2==1) || (ip1==172 && ip2>=16 && ip2<=31) || (ip1==192 && ip2== 168))
 {
     userid.value = userid.value+globaldomain;
//  alert(userid.value);
 }
 else
 {
     userid.value = userid.value+internetdimain;
//	alert(userid.value);
 }
}
var _12=(document.getElementsByName("useSSL")[0]||{}).checked;
if(typeof (_12)=="boolean"){
var _13=_12?"http://":"https://";
var _14=_12?"https://":"http://";
_10.action=(function translateProtocol(url){
if(url.charAt(0)=="/"){
if(location.protocol+"//"!=_14){
return _14+location.hostname+url;
}
return url;
}
if(url.substring(0,_13.length).toLowerCase()==_13){
var _15=url.indexOf("/",_13.length);
var _16=url.lastIndexOf(":",_15);
if(_15>0&&_16>0&&url.substring(_16+1,_15).match(/^\d+$/)){
return _14+url.substring(_13.length,_16)+url.substring(_15);
}else{
return _14+url.substring(_13.length);
}
}
return url;
})(_10.action);
}
if((document.getElementById("face_classic_cgi")||{}).selected){
if(document.all){
_11.returnValue=false;
}
document.getElementById("classic_cgi_form").elements["user"].value=_10.elements["uid"].value;
document.getElementById("classic_cgi_form").elements["pass"].value=_10.elements["password"].value;
document.getElementById("classic_cgi_form").submit();
return false;
}
return true;
};
function recoverPwd(_17){
_17.href+="?uid="+document.getElementById("uid").value;
};
function bookmarkMe(){
try{
window.external.AddFavorite(location.href,document.title);
}
catch(e){
alert(markme_msg);
}
};


