
var d8g="\02";var c93="\01";var g3I=false;var b25="";var admin=false;var g5K="";var a20=false;var b7w=false;var c5g=false;var h6r="";function $V4(c91){return document.getElementById(c91);}
function d5r(a24){b29();return a24;}
function b29(a24){e6w=(isIE?document.documentElement.clientWidth:window.innerWidth);e3=(isIE?document.documentElement.clientHeight:window.innerHeight);var d2X=$V4("notice");if(d2X)d2X.style.height=e3+"px";return a24;}
var h2O={title:"Velop v4",loginTitle:T("Webmail_Login_Welcome"),loginGettingStarted:T("Webmail_Login_Getting_Started"),passTitle:T("Secret_Question"),passGettingStarted:T("Secret_Question_Getting_Started"),poweredBy:T("Powered_By_Inova"),urlLogo:"http://www.inova.net/br/",urlSupport:"http://www.inova.net/br/contato.htm",BadAnswer:"Bad_answer",CouldNotLogin:"Could_Not_Login"}
c3.prototype.constructor=c3;function c3(){this.init=function(){this.c5E();this.h7L();this.h5="/v31a/templates/html/theme_macOsX/icons/icoAnim_running_16x16.gif";this.d7B=13;this.e5M=["#ffff99","#ffffaa","#ffffbb","#ffffcc","#ffffdd","#ffffee","#ffffff"];document.title=h2O.title;$V4("welcome_title").innerHTML=h2O.loginTitle;$V4("getting_started").innerHTML=h2O.loginGettingStarted;for(var link in h2O.links){var b2l=h2O.links[link];var c82=h2O.c82[link];$V4("navigation_links").innerHTML+='<li'+(c82?' style="'+c82+'"':'')+'><a target="_self" '+((b2l.substr(0,11)=="javascript:")?'onclick="'+b2l+';return false;" href="#"':'href="'+b2l+'"')+' href="'+b2l+'" title="'+T(link)+'">'+T(link)+'</a></li>';}
$V4("loading").style.display="none";$V4("email").focus();if(document.referrer==location.href)this.h7v(h2O.CouldNotLogin);return this;}
this.accept=function(toLogin){if(this.c17(["email","password"])){var email=$V4("email").value;if(g3I&&email.indexOf("@")==-1&&$V4("domain").value!="")email=email+"@"+$V4("domain").value;var h65=["idCampanha",(g5p?g5p:"0"),"account",email,"password",$V4("password").value];var e9A=new cmdUriObj("agreeWithTerms","CtrlFastAdmin","agreeWithTerms",h65);getXDocFast(e9A.getCmdUri(),"NEW_D",[this,"f6e",{toLogin:toLogin}],null,true);}}
this.f6e=function(b0R,h65){var e2o=h65[0];var status=getStatusFromParse(b0R);if(status==200){if(g5K=="0"&&admin&&!b7w&&!c5g&&h6r=="6")this.h0u();else if(g5K=="0"&&admin&&b7w&&h6r=="6")document.location=(b25!=''?'http://www.gobits.com.br/ticket/'+b25:'http://www.gobits.com.br/cgi-bin/v31a.cgi?ifOrig=IfHtml&ctrl=CtrlFastAdmin&todo=adminWizard');else if(g5K!="0"){var url="";if(admin)url=(b25!=''?'/ticket/'+b25:'/cgi-bin/v31a.cgi?ifOrig=IfHtml&ctrl=CtrlFastAdmin&todo=adminWizard');else url='/cgi-bin/v31a.cgi?ifOrig=IfHtml&ctrl=CtrlFastAdmin&todo=adminWizard&ticket='+b25+'&ts=1';document.location=url;}else this.a77();}else alert("ERROR: postAccept status = "+status);}
this.d42=function(){if(this.c17(["email","password"])){var email=$V4("email").value;if(g3I&&email.indexOf("@")==-1&&$V4("domain").value!="")email=email+"@"+$V4("domain").value;var e9A=new cmdUriObj("userMigrated","CtrlFastAdmin","userMigrated",["email",email]);getXDocFast(e9A.getCmdUri(),"NEW_D",[this,"b0u",{email:email}],null,true);}}
this.b0u=function(b0R,h65){var e2o=h65[0];var status=getStatusFromParse(b0R);if(status==301){$("#username").val($("#email").val());var d7R=$("#password").val();$("#password").remove();$("#form_login_zimbra").append('<input type="hidden" id="password" name="password" value="" />');$("#password").val(d7R);$V4("form_login_zimbra").submit();}else this.a77();}
this.f3c=function(){var g3p="action"+d8g+"lerDepois"
+c93+"admin"+d8g+admin
+c93+"nres"+d8g+g5K
+c93+"tunelProcessDone"+d8g+c5g
+c93+"lote"+d8g+h6r
+c93+"ticket"+d8g+b25;var h65=[];h65.push("logName","veloxLogin");h65.push("refTable","velox_tickets");h65.push("refPrimaryKeyName","ticket");h65.push("refPrimaryKeyValue",b25);h65.push("actName","logLogon");h65.push("actValue",d4m(g3p));var e9A=new cmdUriObj("dbLog","CtrlLogger","dbLog",h65);getXDocFast(e9A.getCmdUri(),"NEW_D",[this,"c50",{}],null,true);}
this.c50=function(b0R,h65){var e2o=h65[0];var status=getStatusFromParse(b0R);if(status==200)
this.a77();else
f9O('Erro inesperado em postDoLogin: '+status+" / "+d03(b0R.getElementsByTagName("msg")[0])+c1q);}
this.h0u=function(){b7w=true;$V4("normal_options").style.display="none";$V4("admin_options").style.display="none";if($V4("wrapper"))$V4("wrapper").style.display="none";if($V4("notice"))$V4("notice").style.display="block";$V4("bannerTunel6").style.display="block";}
this.d8C=function(){alert((g5K=="0"?"Entre em contato com o seu administrador.":"Voce foi identificado como usuario administrador. Ligue para nosso atendimento - 0800 31 0800"));}
this.a77=function(){if($V4("wrapper"))$V4("wrapper").style.display="block";var d2X=$V4("notice");if(d2X)d2X.style.display="none";if(this.c17(["email","password"])){$V4("loading").style.display="";this.e6D($V4("email"));$V4("form_login").submit();$V4("loading_icon").src=this.h5;}
return false;}
this.c17=function(campos){for(var i=0;i<campos.length;i++){var a4b=campos[i];var g68=$V4(a4b);if(g68.value==""){this.g7v({c88:a4b,f3b:0});g68.focus();return false;}}
return true;}
this.e6D=function(email){var domain=$V4("domain");var account=$V4("account");var b8k=email.value.indexOf('@');if(b8k!=-1){domain.value=email.value.substr(++b8k);account.value=email.value.substr(0,--b8k);}else account.value=email.value;}
this.a3X=function(event){var code=event.keyCode;if(code==this.d7B)this.d42();else return true;}
this.L0=function(event){var code=event.keyCode;if(code==this.d7B)this.a77();else return true;}
this.a8c=function(){this.f4C();$V4("welcome_title").innerHTML=h2O.passTitle;$V4("getting_started").innerHTML=h2O.passGettingStarted;$V4("email_lost_pass").focus();return false;}
this.g5o=function(event){if(this.c17(['email_lost_pass','answer'])){this.e6D($V4("email_lost_pass"));var c4H='<?xml version="1.0"?>'+' <v3>'+'  <op id="ask" class="CtrlPasswd" method="pwChallenge">'+'   <param id="userAnswer"><\![CDATA['+$V4("answer").value+']'+']></param>'+'  </op>'+' </v3>';var a3d='/cgi-bin/v31a.cgi?I='+(new Date).getTime()+'&V=&ifOrig=IfXml&account='+$V4("email_lost_pass").value.replace(/@.*/,'')+'&domain='+$V4("domain").value+'&xmlData='+encodeURIComponent(c4H);$V4("loading").style.display="";getXDocFast(a3d,"NEW_D",[this,"c6L"],false,true);}}
this.c6L=function(b0R,h65){var f1B=b0R.getElementsByTagName('status');if(!f1B.length||parseInt(d03(f1B[0]))!=200){$V4("loading").style.display="none";this.h7v(h2O.BadAnswer);this.g7v({c88:"answer",f3b:0});}else{f1B=b0R.getElementsByTagName("idConta");var idConta;if(f1B.length){idConta=d03(f1B[0]);$V4("email").value=$V4("email_lost_pass").value;$V4("idConta").value=idConta;var date=new Date;date.setTime(date.getTime()-(1000));var expires="; expires="+date.toGMTString();document.cookie=idConta+"-auth=null; domain="+$V4('HTTP_HOST').value+"; path=/; "+expires;document.cookie=idConta+"-percall=; domain="+$V4('HTTP_HOST').value+"; path=/; "+expires;}
f1B=b0R.getElementsByTagName("key");if(f1B.length){$V4("key").value=d03(f1B[0]);}
$V4("form_login").submit();$V4("loading_icon").src=this.h5;}}
this.g7M=function(event){var code=event.keyCode;if(code==this.d7B)
this.g5o();else
return true;}
this.d9y=function(){this.f4C();$V4("welcome_title").innerHTML=h2O.loginTitle;$V4("getting_started").innerHTML=h2O.loginGettingStarted;$V4("email").focus();return false;}
this.h7v=function(d0M){$V4("message").innerHTML="<p>"+T(d0M)+"</p>";$V4("message").style.display="";}
this.f4C=function(){this.e9q($V4("form_login"));this.e9q($V4("form_lostpass"));$V4("message").style.display="none";}
this.e9q=function(c91){var h3e="none";if(c91.style.display=="none")
h3e="";c91.style.display=h3e;}
this.g7v=function(e2o){var c88=e2o.c88;var f3b=e2o.f3b;var c91=$V4(c88);c91.style.backgroundColor=this.e5M[f3b];var e4f=f3b+1;if(e4f<this.e5M.length)setTimeout("a5J.g7v({c88 :'"+c88+"',f3b :"+e4f+"})",100);}
this.c5E=function(){var date=new Date;date.setTime(date.getTime()-(1000));var expires="; expires="+date.toGMTString();document.cookie="rememberMe=null; domain="+$V4('HTTP_HOST').value+"; path=/; "+expires;}
this.h7L=function(){var date=new Date;date.setTime(date.getTime()-(1000));var expires="; expires="+date.toGMTString();document.cookie="session=null; domain="+$V4('HTTP_HOST').value+"; path=/; "+expires;}}