var nsILastPass=Components.interfaces.nsILastPass,nsISupports=Components.interfaces.nsISupports,CLASS_ID=Components.ID("{89cfce0b-8110-11dd-ad8b-0800200c9a66}"),CLASS_NAME="LastPass Javascript XPCOM Component",CONTRACT_ID="@lastpass.com/lastpass;1",LP=null,LastPassFactory={createInstance:function(Vb,ub){if(Vb!=null)throw Components.results.NS_ERROR_NO_AGGREGATION;if(null==LP)LP=new LastPassContainer;return LP.QueryInterface(ub)}},LastPassModule={registerSelf:function(Vb,ub,Xd,oc){Vb=Vb.QueryInterface(Components.interfaces.nsIComponentRegistrar);
Vb.registerFactoryLocation(CLASS_ID,CLASS_NAME,CONTRACT_ID,ub,Xd,oc)},unregisterSelf:function(Vb,ub){Vb=Vb.QueryInterface(Components.interfaces.nsIComponentRegistrar);Vb.unregisterFactoryLocation(CLASS_ID,ub)},getClassObject:function(Vb,ub,Xd){if(!Xd.equals(Components.interfaces.nsIFactory))throw Components.results.NS_ERROR_NOT_IMPLEMENTED;if(ub.equals(CLASS_ID))return LastPassFactory;throw Components.results.NS_ERROR_NO_INTERFACE;},canUnload:function(){return true}};
function NSGetModule(){return LastPassModule}function NSGetFactory(){return LastPassFactory}
function LastPassContainer(){function Vb(){}function ub(){}function Xd(){}function oc(){}function Lc(){}function hi(){}function Dg(){}function ii(){}function Ik(){}function ji(){}function ki(){}function of(){}function Eg(){}function la(){}function H(){}function Fa(){}function li(){}function Hb(b,c,d,e){var f=b,g=typeof c=="undefined"||c==null?"":c;if(typeof mi[g+b]!="undefined")return mi[g+b];if(typeof Yd["en-US"]=="undefined")Yd["en-US"]=Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService).createBundle("chrome://lastpass-locales/content/en-US/lang.properties");
if((typeof c=="undefined"||c==null)&&!e)c=fb;if(typeof c=="undefined"||c==null)try{f=Jk.GetStringFromName(b);if(f=="")f=Yd["en-US"].GetStringFromName(b)}catch(h){}else{try{if(typeof Yd[c]=="undefined")Yd[c]=Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService).createBundle("chrome://lastpass-locales/content/"+c+"/lang.properties");f=Yd[c].GetStringFromName(b)}catch(j){return LP.lpgs(b,null,d,true)}if(f=="")return LP.lpgs(b,null,d,true)}return f}
function Kk(b,c,d){var e=c.getElementById("eventdata1")?c.getElementById("eventdata1").value:"",f=c.getElementById("eventdata2")?c.getElementById("eventdata2").value:"",g=c.getElementById("eventdata3")?c.getElementById("eventdata3").value:"",h=c.getElementById("eventdata4")?c.getElementById("eventdata4").value:"",j=c.getElementById("eventdata5")?c.getElementById("eventdata5").value:"";switch(b){case "login":b=e.toLowerCase().replace(/\s*/g,"");d=f;f=h==Fg?"":j;e=h==Fg?j:"";if(b==""&&d==""&&g=="")ga||
LP.lplogincheck("websitelogin");else if(b!=""&&d!=""){var l=Ed();for(j=0;j<l.length;j++)if(l[j]==b){l.splice(j,1);break}l.unshift(b);ye(l);j=false;keybin=Da(d);keyhexold=Ka(na?na:"");if(!(ga&&Z==b&&keyhexold==d))if(ga&&Z==b){Fd(keybin);ze()}else if(ga&&Z!=""){Ia();j=true}else if(ga&&Z=="")U("login invalid state A");else j=true;if(j){Fd(keybin);if(f!="")Ib=f;if(g!="")if(h==Fg){e!=""&&Mc("login",{data0:b,data1:e});Gg(ni,null,b,g)}else LP.lplogincheck("websitelogin");else LP.lplogincheck("websitelogin")}}else U("login invalid params  username="+
b+" wxhash="+g+" keyhex=xxx");break;case "logoff":ga&&Ia(false);break;case "refresh":if(ga){h=c.getElementById("eventdata1");g=c.getElementById("eventdata2");h&&h.value=="settings"?Gg(g&&g.value=="2"?"websiterefreshrsa":"websiterefresh"):LP.lpGetAccounts()}break;case "rsaencrypt":Lk(c);break;case "rsaencryptmultiple":Mk(c);break;case "rsadecrypt":Nk(c);break;case "keyweb2plug":b=f.toLowerCase().replace(/\s*/g,"");if(b==""||e=="")U("keyweb2plug invalid params cmd="+g+" username="+b+" localkey=xxx");
else if(g=="2"){oi();pf();Fd(Da(e));ze()}break;case "keyplug2web":h=c.getElementById("eventdata1");g=c.getElementById("eventdata2");b=c.getElementById("eventdata3");f=c.getElementById("eventdata4");j=c.getElementById("eventdata5");if(h&&g){if(Z=="")break;e=d.directory;d=d.file;e=e.replace(/^\/~[^\/]*/,"");if(e!=""&&e!="/"&&e!="/sso/"&&e!=Ok&&e!="/sso/aso/"&&e!=Pk)break;d=d.replace(/#/,"");if(d!=""&&d!="index.php"&&d!="import.php"&&d!="export.php"&&d!="otp.php"&&d!="frameset.php"&&d!="frame_login.php"&&
d!="gettopost.php"&&d!=Qk&&d!=Rk&&d!="misc_challenge.php"&&d!="enterprise_users.php")break;d="none";if(h&&h.value==""){h.value=sb(Z);if(na!="")d=Ka(na)}else if(sb(h.value)!=sb(Z)){if(ga){Ia();break}}else if(na!="")d=Ka(na);if(b)b.value=Wb;if(f)f.value=LP.GetIdentity();if(j)j.value=Zd;g.value=d}break;case "getuuid":h=c.getElementById("eventdata1");h.value=LP.getuuid();break;case "switchidentity":h=c.getElementById("eventdata1");g="";if(h)g=h.value;h=false;for(j=0;j<La.length;j++)if(La[j].iid==g)h=
true;h||(g="");g!=LP.GetIdentity()&&LP.lpIdentityHelper(g,true);break;case "clearcache":Ae(".lps");Ae(".slps");Ae(".xml");Ae(".sxml");Ae(".key");break;case "getimportdata":e=d.directory;d=d.file;e=e.replace(/^\/~[^\/]*/,"");if(e!=""&&e!="/"&&e!="/sso/")break;if(d!="import.php")break;c.getElementById("source").value=qf;c.getElementById("t").value=rf(Ya._utf8_encode(Be));c.getElementById("b64").value="1";c.getElementById("utf8").value="1";c.getElementById("encryptandstore").click();qf=Be="";break;case "recover":e=
d.directory;d=d.file;e=e.replace(/^\/~[^\/]*/,"");if(e!=""&&e!="/"&&e!="/sso/")break;if(d!="recover.php")break;h="";h=c.getElementById("eventdata1").value;g=za(h)+"_ff.sotp";h=za(h)+"_ff.otp";if(!yb(g)&&!yb(h))h="nouser";else if(yb(g)){h=$d(ib(g),true);h=Ka(h)}else h=Ka(ib(h));c.getElementById("eventdata2").value=h;break;case "gohome":if(Cc)return;c.location.href="chrome://lastpass/content/home.xul";h=c.getElementById("eventdata1");g=c.getElementById("eventdata2");if(h&&g){h=h.value;g=g.value;if(h!=
""&&g!=""){Ia();sf=g;LP.lpOpenLogin(null,h)}}break;case "setupmultifactor":if(f==Z){if(c.getElementById("eventdata3"))c.getElementById("eventdata3").value="working";h="type="+LP.en(e)+"&username="+LP.en(f);LP.lpMakeRequest(LP.lp_base+"setupmultifactor.php",h,pi,function(){Hg(c.getElementById("eventdata3"))},{resultinput:c.getElementById("eventdata3"),password:""})}else if(c.getElementById("eventdata3"))c.getElementById("eventdata3").value="error";break;case "setupsinglefactor":var o=j=="1";if(f==
Z&&Da(za(f+g))==na){if(!o&&c.getElementById("eventdata4"))c.getElementById("eventdata4").value="working";h="type="+LP.en(e)+"&username="+LP.en(f);LP.lpMakeRequest(LP.lp_base+"setupmultifactor.php",h,pi,function(){Hg(o?null:c.getElementById("eventdata4"))},{resultinput:o?null:c.getElementById("eventdata4"),password:g})}else if(!o&&c.getElementById("eventdata4"))c.getElementById("eventdata4").value="error";break;case "checkmultifactorsupport":if(c.getElementById("eventdata3"))if(Aa()&&LP.lpis_win&&
typeof ba.validity_supported=="function"&&ba.validity_supported()){c.getElementById("eventdata4").value="validity";c.getElementById("eventdata3").value="done"}else if(Aa()&&LP.lpis_win&&typeof ba.trueapi_supported=="function"&&ba.trueapi_supported()){c.getElementById("eventdata4").value="trueapi";c.getElementById("eventdata3").value="done"}else if(ac&&Aa()&&LP.lpis_mac&&typeof ba.lpvt_supported=="function"&&ba.lpvt_supported()){c.getElementById("eventdata4").value="vtapi";c.getElementById("eventdata3").value=
"done"}else c.getElementById("eventdata3").value="error";break;case "multifactorauth":if(c.getElementById("eventdata3")){c.getElementById("eventdata3").value="working";g="";if(e=="trueapi"){g=za(za(sb(f)+e));if(g.length!=64)if(Aa()&&LP.lpis_win&&typeof ba.trueapi_get_hash=="function")g=ba.trueapi_get_hash(f);g=g!=""?za(g+h):""}if(g=="")c.getElementById("eventdata3").value="error";else{c.getElementById("eventdata5").value=g;c.getElementById("eventdata3").value="done"}}break;case "multifactorreprompt":if(c.getElementById("eventdata3")){c.getElementById("eventdata3").value=
"working";if(LP.securityPrompt())c.getElementById("eventdata3").value="done";else c.getElementById("eventdata3").value="error"}break;case "checkloggedin":if(c.getElementById("eventdata1"))c.getElementById("eventdata1").value=ga?"1":"0";break}}function pi(b,c,d){if(4==b.readyState){c=d.resultinput;d=d.password;if(200==b.status&&b.responseXML!=null&&b.responseXML.documentElement!=null){var e=b.responseXML.documentElement.getElementsByTagName("ok");if(e.length>0){b=e[0].getAttribute("type");e=e[0].getAttribute("hash");
if(b=="trueapi")if(d!=""){if(Aa()&&LP.lpis_win&&typeof ba.trueapi_store_default_login=="function")if(ba.trueapi_store_hash(Z,e)){var f=c?ba.trueapi_get_hash(Z):e;if(f==e)if(ba.trueapi_store_default_login(Z,d,e)){LP.setsinglefactortype(b);if(c)c.value="done";return}}}else{if(Aa()&&LP.lpis_win&&typeof ba.trueapi_store_hash=="function")if(ba.trueapi_store_hash(Z,e)){f=c?ba.trueapi_get_hash(Z):e;if(f==e){if(c)c.value="done";return}}}else if(b=="vtapi"){if(Aa()&&LP.lpis_mac&&typeof ba.lpvt_store_data==
"function")if(ba.lpvt_store_data(encodeURIComponent(Z)+"|"+encodeURIComponent(d),LP.lpgs("Swipe finger"),LP.lpgs("Swipe your finger on the fingerprint sensor"),LP.lpgs("Cancel"))){LP.setsinglefactortype(b);if(c)c.value="done";return}}else if(b=="validity")if(Aa()&&LP.lpis_win&&typeof ba.validity_store_data=="function")if(ba.validity_store_data(encodeURIComponent(Z)+"|"+encodeURIComponent(d),LP.lpgs("Swipe finger"),LP.lpgs("Swipe your finger on the fingerprint sensor"),LP.lpgs("Cancel"))){LP.setsinglefactortype(b);
if(c)c.value="done";return}}}Hg(c)}}function Hg(b){if(b)b.value="error"}function qi(b){b=b.getElementsByTagName("meta");for(var c=0;c<b.length;c++)if(b[c].httpEquiv&&b[c].httpEquiv=="refresh"&&b[c].content&&b[c].content.match(/^0;/))return true;return false}function ri(b){b=b.target;if(typeof b.wrappedJSObject!="undefined")b=b.wrappedJSObject;if(b.nodeName=="IFRAME"||b.nodeName=="FRAME"){b.addEventListener("load",function(){Ig(LP.getBrowser().contentDocument)},false);b.addEventListener("unload",Sk,
false)}}function Sk(b){b=b.target;if(typeof b.wrappedJSObject!="undefined")b=b.wrappedJSObject;if(b.nodeName=="IFRAME"||b.nodeName=="FRAME"){b.removeEventListener("load",function(){Ig(LP.getBrowser().contentDocument)},false);b.removeEventListener("unload",lpNodeRemove,false)}}function Ce(b,c){if(!ic(b.contentWindow.location.href))try{for(var d=b.contentWindow;d.top!=null&&d.top!=d;)d=d.top;var e=d.document;if(typeof e.LPlpinstalledclick=="undefined"){e.addEventListener("mouseup",Tk,false);e.LPlpinstalledclick=
true}else if(c==e)e.LPlpnoinstalledclick=true}catch(f){}}function Jg(){var b=tf();b!=""&&yb(b)&&Wa(b)}function tf(){var b=ia;if(b==""||b==null)return"";b+="_retry5.lps";return b.toUpperCase()}function Ig(b){var c=null;try{var d=mb(b);if(!d)return null;c=b.location.href;if(typeof b.forms!="undefined"&&b.forms.length>0)try{var e=b.getElementsByTagName("HEAD");if(e&&e.length>0){var f=b.createElement("SCRIPT");f.appendChild(b.createTextNode("try {  for(var lastpass_iter=0; lastpass_iter < document.forms.length; lastpass_iter++){    var lastpass_f = document.forms[lastpass_iter];    if(typeof(lastpass_f.lpsubmitorig)==\"undefined\"){      if (typeof(lastpass_f.submit) == \"function\") {        lastpass_f.lpsubmitorig = lastpass_f.submit;        lastpass_f.submit = function(){          var form = this;          try {            if (document.documentElement && 'createEvent' in document)            {              var forms = document.getElementsByTagName('form');              for (var i=0 ; i<forms.length ; ++i)                if (forms[i]==form)                {                  var element = document.createElement('lpformsubmitdataelement');                  element.setAttribute('formnum',i);                  element.setAttribute('from','submithook');                  document.documentElement.appendChild(element);                  var evt = document.createEvent('Events');                  evt.initEvent('lpformsubmit',true,false);                  element.dispatchEvent(evt);                  break;                }            }          } catch (e) {}          try {            form.lpsubmitorig();          } catch (e) {}        }      }    }  }} catch (e) {}"));
e[0].appendChild(f)}}catch(g){U("Failure with appending JS: "+g+" ln: "+g.lineNumber,null)}e=false;if(typeof Gd=="function"&&uf==d){e=true;Gd();Gd=null}si(b,e);var h=Ra(c);Ta(c,h);var j=ob(h.host,c);LP.compare_tlds(j,"netvibes.com")&&Ce(d,b);var l=Kg(d,c,null,"lploadpagedoc");if(!ga&&!l&&!ic(c,h)&&De(null,b))if(!Lg)if(Ee){var o=LP.getBrowser().selectedTab.linkedBrowser.contentDocument;o.LPlpUseLastPassLogin=true;vf(o)}else Ob("UseLastPassLogin",d,0,"login",null)}catch(n){U("Failure with loading page: "+
n+" ln: "+n.lineNumber,c)}finally{}}function Kg(b,c,d,e,f){e=Ra(c);var g=ob(e.host,c),h=false;if(!ga){var j=cb();for(var l in bc){var o=bc[l];if(o!=null&&j>o.timeSaved+300)bc[l]=null}o=[];for(l in bc)bc[l]&&o.push(bc[l]);bc=o;for(l in Ja){o=Ja[l];if(o!=null&&j>o.timeSaved+300)Ja[l]=null}j=[];for(l in Ja)Ja[l]&&j.push(Ja[l]);Ja=j}for(l in Ja)if(!(typeof f!="undefined"&&l!=f)){var n=Ja[l];if(!(n&&n.ignorefromcheckadd))if(n&&(LP.compare_tlds(g,n.tld)||LP.compare_tlds(g,n.actiontld)||LP.compare_tlds(g,
n.topdoctld)||n.basic_auth)){j=null;if(n.basic_auth){var p=n.postdata;j=LP.compare_tlds(g,n.tld)||LP.compare_tlds(g,n.actiontld)?LP.lpgetcurrenturl(b):n.url;p+="&url="+LP.en(Ka(j));n.ai.url=j;j=function(){ti(p,n.ai,n.newvalues)};Ja[l]=null}else{var q=l;j=function(){a:{var r=q;b||LP.getBrowser();if(Ja[r]!=null){var u=Ja[r].url,t=Ta(u),C=Ua(u);if(Ja[r].needsEncryption){var A=Ja,J;J=Ja[r];if(J.needsEncryption)if(!ga||typeof na!="string"||0==na.length)J=null;else{for(var D=0;D<J.encryptedStrings.length;D++)J.postdata+=
"&encryptedstring"+D+"="+LP.en(P(J.encryptedStrings[D]));J.encryptedPassword=P(J.encryptedPassword);if(typeof J.fields!="undefined")for(D=0;D<J.fields.length;D++)if("email"==J.fields[D].type||"text"==J.fields[D].type||"password"==J.fields[D].type||"textarea"==J.fields[D].type||"hidden"==J.fields[D].type)J.fields[D].value=P(J.fields[D].value);J.needsEncryption=false}A[r]=J;if(Ja[r]==null)break a}if(!(A=ae)){b:{A=Ja[r].uname;J=Ja[r].username;D=Ja[r].encryptedPassword;var B=typeof sa[C]!="undefined"?
sa[C]:[];for(var z in B)if(!(typeof y[z]=="undefined"||y[z].genpw||y[z].isbookmark))if(y[z].logins)for(var L=0;L<y[z].logins.length;L++){var S=y[z].logins[L];if((S.unencryptedUsername==J||A==""&&J=="")&&K(S.password)==K(D)){u=true;break b}if(y[z].save_all&&Ta(y[z].url)==Ta(u)&&S.urid==0&&S.otherfields)for(var $=A==""&&J==""?true:false,E=false,ea=0;ea<S.otherfields.length;ea++){if(!$&&("text"==S.otherfields[ea].type||"email"==S.otherfields[ea].type)&&J==K(S.otherfields[ea].value))$=true;else if(!E&&
S.otherfields[ea].type=="password"&&K(D)==K(S.otherfields[ea].value))E=true;if($&&E){u=true;break b}}}u=false}if(u=!u){if(t=!(Yc.length>0&&!Qa(t,Yc)&&!Qa(C,Yc)?true:Qa(t,Pb)||Qa(C,Pb)?true:false))b:{t=Ja[r].username;u=Ja[r].encryptedPassword;z=cb();A=[];for(var v in od){J=od[v];if(z>J.rejectedTime+600)A[A.length]=v}for(v=A.length-1;v>=0;v--)od.splice(A[v],1);for(v in od){J=od[v];if(J.username==t&&K(J.encryptedPassword)==K(u)&&LP.compare_tlds(J.tld,C)){t=false;break b}}t=true}u=t}A=u}if(A){v=false;
var F;if(typeof LP.getBrowser().getNotificationBox=="function")F=LP.getBrowser().getNotificationBox(b).currentNotification;if(F)if(typeof F.choices!="undefined"&&F.choices=="addconfirm"&&typeof F.extra!="undefined"&&typeof F.extra.key!="undefined")if(F.extra.key==r)v=true;if(!v){F=b.contentDocument;if(!d&&F)if((v=De(null,F))&&Ta(v.action)==Ta(Ja[r].action)){t=[];t.fields=Ja[r].fields;if(Fe(v,t,null,false))if(!ae){if(typeof LP.getBrowser().getNotificationBox=="function"){C=LP.getBrowser().getNotificationBox(b).allNotifications;
for(F=C.length-1;F>=0;F--)typeof C[F].choices!="undefined"&&C[F].choices=="addconfirm"&&LP.getBrowser().getNotificationBox(b).removeNotification(C[F])}Ja[r]=null;break a}}v=cb();if(Ja[r].show_count==0)Ja[r].first_show_time=v;if(++Ja[r].show_count>5||v-Ja[r].first_show_time>=30){if(typeof LP.getBrowser().getNotificationBox=="function"){C=LP.getBrowser().getNotificationBox(b).allNotifications;for(F=C.length-1;F>=0;F--)typeof C[F].choices!="undefined"&&C[F].choices=="addconfirm"&&LP.getBrowser().getNotificationBox(b).removeNotification(C[F])}Ja[r]=
null}else if(ui){v=[];v.key=r;v.tld=C;LP.lpshowHelpDlg("addsite");Ob("AddAccountText",b,0,"addconfirm",v);if(F)F.LPlpaddaccountshown=true}}}else Ja[r]=null}}}}if(!ga&&!ic(c,e)){if(!Lg){Ob("UseLastPassCapture",b,0,"login",j);h=true}}else{LP.lpGetCurrentWindow().setTimeout(j,100);return h}}}return h}function si(b,c,d){var e=mb(b);if(!e)return null;var f=null;try{f=LP.lpgetcurrenturl(e);var g=Ra(f);Ta(f,g);if(!d){var h,j=f,l=false;for(var o in Ge)if(o==e&&Ge[o]!=null)l=true;o=false;for(var n=b.getElementsByTagName("form"),
p=0;p<n.length;p++)if(wf(n[p],true).password==1){o=true;break}if(o){var q=e.sessionHistory;q&&q.count>0&&q.index>0&&ic(q.getEntryAtIndex(q.index-1,false).URI.spec,null,q.getEntryAtIndex(q.index-1,false).URI.asciiHost)&&q.getEntryAtIndex(q.index-1,false).URI.path.indexOf("launch")!=-1&&!ic(j,g)&&De(null,b)!=null&&U("autologin failed web",j);h=l?true:false}else h=false;if(He(e,null,null,null,null,b,e.contentWindow,-1))return;Mg(b)}if(!ic(f,g)){g=false;if(g=pd(e,b,h)){b.LPlpshowednote=1;if(d){Ng[e]=
f;qd[e]=true}}if(!g&&!c&&(d||!xf[e]))if(be(e,b)){if(d){xf[e]=f;qd[e]=true}}else if(d||!yf[e])if(Nc(e,b))if(d){yf[e]=f;qd[e]=true}}}catch(r){U("lpcheckpage: caught: "+r+" ln: "+r.lineNumber,f)}}function pd(b,c,d,e,f){if(!b)return false;if(!c||typeof c=="undefined")return false;var g=null,h=b.contentWindow;try{var j=LP.lpgetcurrenturl(b),l=Ra(j),o=Ta(j,l),n=ob(l.host,j);if(Zc.length>0&&!Qa(o,Zc)&&!Qa(n,Zc)?true:Qa(o,pc)||Qa(n,pc)?true:false)return;g=c.location.href;var p=Ra(g),q=typeof p.path=="string"?
p.path.split("/"):[],r=Ta(g,p),u=ob(p.host,g);if(""==u)u=g.indexOf("file")==0?"file":g.indexOf("javascript")==0?"JAVASCRIPT":"UNKNOWN";j=[];zf(j,h,c);o=h=r;n=l=false;if(!Qa(r,Jb)){var t=0,C="",A=0,J=0,D=typeof sa[u]!="undefined"?sa[u]:[];for(var B in D)if(!(typeof y[B]=="undefined"||y[B].genpw||y[B].isbookmark))if(y[B].logins){for(var z=0;z<y[B].logins.length;z++){var L=Ra(y[B].logins[z].url);if(y[B].save_all){if(LP.compare_urls(Ta(y[B].logins[z].url,L),r,true)){l=false;h=r;n=true}break}if(LP.compare_tlds(y[B].logins[z].tld,
u)){var S=y[B].logins[z].password,$=y[B].logins[z].openid_url,E=z<y[B].logins.length-1?true:false,ea=y[B].logins[z].uname,v=y[B].logins[z].pname,F=$c(j,y[B].logins[z].tld,S,$,E,v,ea),M=Ta(y[B].logins[z].url,L);if(F&&Fe(F,y[B].logins[z],null,false)){l=false;h=M;n=true;break}l=true;if(C!=M){t++;h=C=Ta(y[B].logins[z].url,L)}if(L.host==p.host&&J!=M){A++;o=J=M}break}}if(t>1&&A>1||n)break}if(A==1&&!n)h=o;else if(t!=1&&!n){h=r;l=true}}L=false;M=true;o=[];var W=Ua(h);n=[];for(t=0;t<2;t++){D=typeof sa[u]!=
"undefined"?sa[u]:[];for(B in D)if(!(typeof y[B]=="undefined"||y[B].genpw||y[B].isbookmark))if(y[B].logins){A=C=false;for(z=0;z<y[B].logins.length;z++){var da=Ua(y[B].url);if(t==0&&LP.compare_urls(Ta(y[B].logins[z].url),h,y[B].save_all)||t==1&&!y[B].save_all&&LP.compare_tlds(W,da)){if(y[B].logins[z].custom_js!=""){var ta=Og(y[B].logins[z].custom_js,Kb(y[B],0),Kb(y[B],1),"1",false,c);try{if(c.body){var pb=c.createElement("script"),ua=c.createTextNode(ta);pb.appendChild(ua);c.body.textContent.replace(/^\s\s*/,
"").replace(/\s\s*$/,"")!=""&&c.body.appendChild(pb)}}catch(V){U("Error running custom JS 1: "+V+" ln: "+V.lineNumber,h)}}S=y[B].logins[z].password;$=y[B].logins[z].openid_url;E=z<y[B].logins.length-1?true:false;ea=y[B].logins[z].uname;v=y[B].logins[z].pname;var aa=y[B].logins[z].oname,pa=y[B].logins[z].username,x=y[B].logins[z].password;F=null;if(y[B].urid==0)C=true;var ca=false,w=y[B].logins[z];J=-1;if(y[B].logins[z].fields.length>0||typeof y[B].otherlogins!="undefined"&&typeof y[B].otherlogins[z]!=
"undefined"&&y[B].otherlogins[z].fields.length>0){if(!F&&z==0)for(var va=y[B].otherlogins.length-1;va>=0;va--)if(y[B].otherlogins[va].fields.length>0||y[B].otherlogins[va].otherfields.length>0)if(F=$c(j,y[B].logins[z].tld,S,$,false,y[B].otherlogins[va].pname,y[B].otherlogins[va].uname)){w=y[B].otherlogins[va];J=va;break}F||(F=$c(j,y[B].logins[z].tld,S,$,E,v,ea));if(F)ca=true;else if(F=$c(j,y[B].logins[z].tld,S,$,E)){C=true;if(E)F=null}}else{F=$c(j,y[B].logins[z].tld,S,$,E);C=true}if(F!=null)if(l)if(!Fe(F,
w,null,false)){C=true;if(E)F=null}if(F!=null)if(typeof F.bHasInvisible!=undefined&&F.bHasInvisible==true){f=true;F.bHasInvisible=false}var gb=false;if(F&&C){if(typeof n[F]!="undefined")fields=n[F];else{fields=wf(F,true);n[F]=fields}if(fields.password>=2)F=null;else if(!ca){ea=fields.uname;v=fields.pname;aa=fields.oname;if(w.fields.length==0&&w.otherfields.length==0)gb=true}}var Ca=t==0&&y[B].save_all&&!l?true:false;if(F&&!Ca)F=vi(F,c);if(F!=null||Ca){if(Ca)C=false;else{if(w.fields.length==0)C=true;
A=C;var Va;if(Va=w.captcha_id!="")a:{ca=F;var Xb=w.captcha_id;if(ca&&ca.elements&&ca.elements.length)for(var Ga=0;Ga<ca.elements.length;Ga++)if(ka(ca.elements[Ga])==Xb){Va=true;break a}Va=false}if(Va)C=true}if(!Ca)for(ca=0;ca<F.elements.length;ca++){var Oa;if(!(Oa=""!=v&&ka(F.elements[ca])==v&&""!=x)){var db;if(!(db=""!=aa&&ka(F.elements[ca])==aa)){var kb;if(!(kb=""!=ea&&ka(F.elements[ca])==ea&&""!=pa)){var ma;if(ma="email"==F.elements[ca].type||"text"==F.elements[ca].type||"password"==F.elements[ca].type){var Ea;
a:{var X=ka(F.elements[ca]),ha=w.fields;for(Ga=0;Ga<ha.length;Ga++)if(ha[Ga].name==X&&ha[Ga].value!=""){Ea=true;break a}Ea=false}ma=Ea||gb&&(pa!=""&&F.elements[ca].name==ea||x!=""&&F.elements[ca].name==v||F.elements[ca].oname==aa)}kb=ma}db=kb}Oa=db}Oa&&Ie(F.elements[ca])}wi(w,Ca,F&&F.ownerDocument?F.ownerDocument:c,F&&F.ownerWindow?F.ownerWindow:b.contentWindow);gb=false;for(ca=0;ca<o.length;ca++)if(o[ca].id==y[B].id){gb=true;break}if(!gb){C||(M=false);var R=new Dg;R.realmmatch=false;R.id=y[B].id;
R.onlyfill=C;R.needsnewurid=A;R.otherlogin=J;R.url=g;var ab=Ra(y[B].url);R.urlmatch=Ta(y[B].url,ab)==r?true:false;R.servermatch=ab.host==p.host?true:false;R.portmatch=Pg(ab,p);R.serverportmatch=R.servermatch&&R.portmatch;R.tldmatch=LP.compare_tlds(y[B].tld,u)?true:false;J={};R.formmatch=Ca?true:Fe(F,w,null,false,true,J);R.needsnewurid|=J.value&&!Ca;R.methodok=Ca?true:w.method!="post"||F.method.toLowerCase()==w.method?true:false;R.protocolok=ab.protocol!="https"||p.protocol=="https"?true:false;R.fieldmatchcount=
Ca?xi(c,w):0;var G=typeof ab.path=="string"?ab.path.split("/"):[],Lb;for(Lb=0;Lb<q.length&&Lb<G.length;Lb++)if(G[Lb]!=q[Lb])break;R.pathlevelmatch=Lb;o[o.length]=R}}}}}}q=false;var oa=cb();o.sort(Af);o=Bf(ad,o,u,typeof p.path=="string"?p.path:"",p.host,y,ce(p));for(B=0;B<o.length;B++){if(typeof qc[o[B].id]!="undefined"&&qc[o[B].id]!=null&&oa-qc[o[B].id]>=300)qc[o[B].id]=null;if(!o[B].onlyfill&&y[o[B].id]&&y[o[B].id].logins.length>1)q=true}oa=false;if(Hd)if(cb()-de<Hd)oa=true;p=0;b.lpfieldchanged=
false;if(!d&&e!=true)if(!p&&yi&&!Dc)for(B=0;B<o.length;B++)if(parseInt(y[o[B].id].never_autofill)!=1)if(!Dc&&!y[o[B].id].pwprotect||oa){if(o[B].tldmatch&&o[B].formmatch&&o[B].methodok&&o[B].protocolok){var bd=typeof qc[o[B].id]!="undefined";LP.lpLaunchUrl(o[B].id,1,0,b,true,false,o[B].otherlogin,false,true,c);if(f&&bd)qc[o[B].id]=null;p=o[B].id;c.m_filledAid=p}break}if(o.length>0){var I=b.contentDocument;e=false;if(I&&typeof I.LPlpaddaccountshown!="undefined")e=true;d=false;if(o.length>0){if(typeof I.aid!=
"undefined")for(bd=0;bd<o.length;bd++){oa=false;for(r=0;r<I.aid.length;r++)if(I.aid[r].id==o[bd].id){oa=true;break}if(!oa){I.aid[I.aid.length]=o[bd];d=true}}else{I.aid=o;I.aidindex=-1}if(p!=0)for(B=0;B<o.length;B++)if(o[B].id==p){I.aidindex=B;break}}LP.lpRebuildToolsMenu_all();if(!e&&Cf){B=M?"UseLastPassFill":"UseLastPass";if(p)B="AlreadyFilled";if(!(typeof c.LPlpinvisiblepw2!="undefined"&&c.LPlpinvisiblepw2))if(!f){if(I.aid.length>1||p==0||q){if(typeof b.lastautologintld=="undefined"||!LP.compare_tlds(b.lastautologintld,
u)){b.lastautologintld=u;b.suppressautloginnotification=false}if(!Oc(b,"autologin")&&(typeof b.suppressautloginnotification=="undefined"||b.suppressautloginnotification==false))Ob(B,b,I.aid,"autologin",M,null,p,null,false,true);else d&&Ob(B,b,I.aid,"autologin",M,null,p,null,true)}L=true}}}return L}catch(tb){U("Failure with checking for autologin: "+tb+" ln: "+tb.lineNumber,g)}finally{}return false}function xi(b,c,d,e){try{if(typeof e=="undefined")e=1;if(e>10)return null;if(typeof b.getElementsByName==
"undefined")return null;for(var f=0,g=0;g<c.otherfields.length;g++){var h=c.otherfields[g],j=b.getElementsByName(h.name);if(j.length==0){var l=b.getElementById(h.name);if(l)j=Array(l)}for(var o=0;o<j.length;o++){l=j[o];ka(l.form)==h.formname&&f++}}if(typeof d=="undefined"||d==null){var n=mb(b);d=n?n.contentWindow:null}if(d&&d.frames){var p=d.frames.length;if(p>10)p=10;for(b=0;b<p;b++)if(d.frames[b].document)f+=xi(d.frames[b].document,c,d.frames[b].window,e+1)}}catch(q){throw q;}finally{}return f}
function vi(b,c,d){if(b){if(!d&&Qg)if(b.getAttribute("autocomplete")=="off")return null;if(zi)if(b.method&&b.method.toUpperCase()=="GET"||typeof b.action=="string"&&b.action.indexOf("mailto:")==0)if(d){if(!LP.lpConfirmYesNo(LP.lpgs("InsecureFormSubmit")))return null}else if(typeof c.m_warnedUserThisPage=="undefined")if(LP.lpConfirmYesNo(LP.lpgs("InsecureForm")))c.m_warnedUserThisPage=1;else{c.m_warnedUserThisPage=2;return null}else if(c.m_warnedUserThisPage==2)return null}return b}function Af(b,c){return b.realmmatch!=
c.realmmatch?b.realmmatch?-1:1:b.urlmatch!=c.urlmatch?b.urlmatch?-1:1:b.serverportmatch&&c.serverportmatch&&b.pathlevelmatch!=c.pathlevelmatch?b.pathlevelmatch>c.pathlevelmatch?-1:1:b.serverportmatch!=c.serverportmatch?b.serverportmatch?-1:1:b.servermatch!=c.servermatch?b.servermatch?-1:1:b.fieldmatchcount!=c.fieldmatchcount?b.fieldmatchcount>c.fieldmatchcount?-1:1:y[b.id].last_touch!=y[c.id].last_touch?y[b.id].last_touch>y[c.id].last_touch?-1:1:y[b.id].name!=y[c.id].name?y[b.id].name<y[c.id].name?
-1:1:y[b.id].logins[0].unencryptedUsername<y[c.id].logins[0].unencryptedUsername?-1:1}function Uk(b,c){return b.getAttribute("name").toLowerCase()<c.getAttribute("name").toLowerCase()?-1:1}function Ai(b,c){return b.name.toLowerCase()<c.name.toLowerCase()?-1:1}function Je(){try{var b=Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);if(!Bi){Bi=true;b.addObserver(Vk,"http-on-modify-request",false)}}catch(c){U("Failure with XHR setup: "+c+" ln: "+
c.lineNumber)}}function Og(b,c,d,e,f,g){if(e=="3"&&g.body&&g.body.textContent.replace(/^\s\s*/,"").replace(/\s\s*$/,"")!=""){if(b.indexOf("lpcurruser")!=-1){if(!g.getElementById("lpcurruserelt"))if(g.body){var h=g.createElement("input");h.setAttribute("style","display: none;");h.setAttribute("type","text");h.setAttribute("id","lpcurruserelt");h.setAttribute("value","");g.body.appendChild(h)}if(g.getElementById("lpcurruserelt"))g.getElementById("lpcurruserelt").value=c}if(b.indexOf("lpcurrpass")!=
-1){if(!g.getElementById("lpcurrpasselt"))if(g.body){c=g.createElement("input");c.setAttribute("style","display: none;");c.setAttribute("type","password");c.setAttribute("id","lpcurrpasselt");c.setAttribute("value","");g.body.appendChild(c)}if(g.getElementById("lpcurrpasselt"))g.getElementById("lpcurrpasselt").value=d}}b="if (typeof(lpcurruser) == 'undefined') lpcurruser = ''; if (document.getElementById('lpcurruserelt') && document.getElementById('lpcurruserelt').value != '') { lpcurruser = document.getElementById('lpcurruserelt').value; document.getElementById('lpcurruserelt').value = ''; } if (typeof(lpcurrpass) == 'undefined') lpcurrpass=''; if (document.getElementById('lpcurrpasselt') && document.getElementById('lpcurrpasselt').value != '') { lpcurrpass = document.getElementById('lpcurrpasselt').value; document.getElementById('lpcurrpasselt').value = ''; } var lploc="+
cd(e)+";"+(f==1?"var lponlyfill=1;":"var lponlyfill=null;")+b+"lpcurruser = ''; lpcurrpass = '';";b=b.replace(/lpcurrpage\./g,"");b=b.replace(/lpframe1\./g,"");b=b.replace(/lpframe2\./g,"");return b.replace(/lpframe3\./g,"")}function wi(b,c,d,e,f){if(typeof f=="undefined")f=1;if(f>10)return null;if(typeof d.getElementsByName=="undefined")return null;if(d.location!=null&&LP.compare_tlds(b.tld,Ua(d.location.href)))for(var g=0;g<b.otherfields.length;g++){var h=b.otherfields[g],j=d.getElementsByName(h.name);
if(j.length==0){var l=d.getElementById(h.name);if(l)j=Array(l)}var o=false;if(j.length==0){o=true;var n=h.name.match(/^(input|select|textarea)(\d+)$/);if(n){l=n[1];n=parseInt(n[2]);l=d.getElementsByTagName(l);if(l.length>n)j=Array(l[n])}}for(n=0;n<j.length;n++){l=j[n];if((o||ka(l.form)==h.formname)&&h.value!="")Ie(l)}}if(c){if(typeof e=="undefined"||e==null)e=browser.contentWindow;if(e&&e.frames){d=e.frames.length;if(d>10)d=10;for(g=0;g<d;g++)e.frames[g].document&&wi(b,c,e.frames[g].document,e.frames[g].window,
f+1)}}}function Ie(b,c){if(!(b.type!="text"&&b.type!="password"&&b.type!="email")){var d=false;if(typeof c=="undefined")d=c=true;if(Ci){var e=b.style.width.replace(/px/,"");if(e=="")try{var f=b.ownerDocument.defaultView.getComputedStyle(b,"");e=f.width.replace(/px/,"")}catch(g){}if(!(e>0&&e<30)){e=b.style.backgroundImage;if(e=="")try{f=b.ownerDocument.defaultView.getComputedStyle(b,"");e=f.backgroundImage}catch(h){}if(e=="none")e="";if(e=="")b.style.backgroundImage=c?"url(data:image/gif;base64,R0lGODlhEAAQAPZVADsBAkECBFEGCmQDBGoEB3UIDWcOEn0dHnZGRnhBQntbXIILEoIMEoENFI8QGI0UHJMQGKERGqURGq4QGIsaIZ4fJq8WI68YJrQXJLIZJbgZJ7gZKLwcK74dLa4gKq4iLLUgLaApMLwpNrwsOKUzOcAfL8EhMcUjM8YkNMgoOJw+QKY8QtA5Sdo/T6dARa5FS6tOUr9MUqRRVrRVWY9pa5BmaZBqbMRKVNlRYclud/14iLyIiKuoqNGbneyPmfOAkPeElNGvsNO3t+aorfGjq+y/w8zMzNXU1N3S0t7W1t3a2uLR0e3U1vLd4OLh4ejo6Png4/bx8ff09Pr5+f7+/v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAFYALAAAAAAQABAAAAfEgFaCVlCFhoWDgzk6QD+Oj0A6OYMyLSwdJR2amywtMoITKZgbFRsYIRqaKROCEpgZO1IkMFM7GJgSghGZKEVVQktVQyclJRG6JR8uM1NVVVEvKx7GyDHO11VUVTHUVgEECUlIR+RHSUoJBAGCAAMHKgpO8koIKgcDAIICCwwGRk89gjzhUYABAwGCGly4IIIIkxE3mvgAkeFCA0EPMBQ7gcNEio7FMDwQVAOCBQ6bNnGwAKHGIBoUHMicKZOCjUQ4cw4KBAA7)":
"";else d=false;f=b.offsetWidth;if(e==""){b.style.paddingRight=c?"18px":"0px";b.style.backgroundRepeat="no-repeat";b.style.backgroundAttachment="scroll";b.style.backgroundPosition="center right"}b.style.border="1px solid #c01f2f";if(f>0){b.style.width=f+"px";b.style.width=2*f-b.offsetWidth+"px"}if(d&&f>0&&f<54){b.addEventListener("focus",function(){Ie(b,false)},false);b.addEventListener("blur",function(){Ie(b,true)},false)}}}}}function He(b,c,d,e,f,g,h,j,l,o,n){if(typeof j=="undefined")j=1;if(j>10)return null;
if(j==1){if(typeof b.lpformtosubmit1=="undefined")b.lpformtosubmit1=null;if(typeof b.lpformtosubmit2=="undefined")b.lpformtosubmit2=null}if(typeof g=="undefined"||g==null)g=b.contentDocument;if(typeof h=="undefined"||h==null)h=b.contentWindow;var p=LP.lpgetcurrenturl(b);if(typeof g.location=="undefined"||g.location==null)return false;var q=g.location.href,r=[];zf(r,h,g);var u=cb();l||(l=[]);o||(o=[]);for(var t=false,C=false,A=false,J=0;J<2;J++)if(!C)for(var D in wa){var B=D,z=wa[D],L=y[z.aid],S=L&&
L.sharedfromaid!=null&&L.sharedfromaid!=""&&L.sharedfromaid!="0",$=false;if(J==0)if(typeof b.loginAid!="undefined"&&b.loginAid==z.aid){$=true;c=false}else continue;if(LP.compare_tlds(Ua(z.url),Ua(q))){if(f)f.aid=z.aid;if(e!=true&&u-z.create_time>=45){l[l.length]=B;o[o.length]=z.url}else{var E=Ta(q),ea=Ta(z.url),v=p==q?E:Ta(p),F=Ra(z.url);F=ob(F.host,z.url);var M=false;if(!$&&E!=ea){var W=Ra(q);W=ob(W.host,q);if(LP.compare_tlds(W,F)){var da=$c(r,F,z.p,z.o,z.multi,z.pname,z.uname,-1);if(da)if(Fe(da,
z,null,false))M=true}}if($||M||E==ea||v==ea){if(z.save_all)A=true;if(z.onlyfill)c=true;if(e){t=!c&&!z.overlay_shown?true:false;z.overlay_shown=true;return t}var ta=true;if(z.custom_js!=""){E=Og(z.custom_js,Kb(L,0),Kb(L,1),"2",false,g);if(E!="")if(E.indexOf("lpdonotsendkeys")!=-1)ta=false;try{if(g.body){var pb=g.createElement("script"),ua=g.createTextNode(E);pb.appendChild(ua);g.body.textContent.replace(/^\s\s*/,"").replace(/\s\s*$/,"")!=""&&g.body.appendChild(pb)}}catch(V){U("Error running custom JS 2: "+
V+" ln: "+V.lineNumber,q)}}if(!z.save_all)if(d||$){da=$c(r,F,z.p,z.o,z.multi,null,null,-1);if(!da&&n&&!z.multi)da=$c(r,F,z.p,z.o,true,null,null,-1)}else da=$c(r,F,z.p,z.o,z.multi,z.pname,z.uname,-1);if(!da&&!z.save_all)break;C=da&&da.ownerDocument?da.ownerDocument:g;E=da?da.elements:[];t=null;if(da)if(d||$){z.uname=z.pname=z.oname="";for(M=0;M<E.length;M++)if(typeof E[M].type!="undefined")if(("text"==E[M].type||"email"==E[M].type)&&ka(E[M])!="openid_url"&&(z.uname==""||z.pname==""))z.uname=ka(E[M]);
else if(E[M].type=="password")z.pname=ka(E[M]);else if(("text"==E[M].type||"email"==E[M].type)&&ka(E[M])=="openid_url")z.oname=ka(E[M])}g.lastpass_recheck_fields=[];if(typeof g._LP_STATE!="undefined"&&"pageshowdone"==g._LP_STATE)g.recent_no_dupes=[];if(typeof g.recent_no_dupes=="undefined")g.recent_no_dupes=[];$=function(Va,Xb,Ga){if(Va.value!=Xb){if(!Ga)if(typeof g.recent_no_dupes[ka(Va)]=="undefined")g.recent_no_dupes[ka(Va)]=1;else if(Va.value!="")return;if(Qg)if(Va.getAttribute("autocomplete")==
"off")return;if(S&&Va.type=="password"){if(typeof g.LPlpsharedpasswordfills=="undefined")g.LPlpsharedpasswordfills=[];if(typeof g.LPlpsharedpasswordfills=="object")g.LPlpsharedpasswordfills[g.LPlpsharedpasswordfills.length]=Va}Va.value=Xb;cc(Va,ta);Ga={};Ga.f=Va;Ga.v=Xb;g.lastpass_recheck_fields[g.lastpass_recheck_fields.length]=Ga}};for(M=0;M<E.length;M++)if(typeof E[M].type!="undefined"){if(E[M].type!="reset"&&E[M].type!="button"&&E[M].type!="image"&&E[M].type!="submit"&&E[M].type!="file"&&E[M].type!=
"textarea"){z.uname!=""&&ka(E[M])==z.uname&&$(E[M],z.u);z.pname!=""&&ka(E[M])==z.pname&&$(E[M],z.p);z.oname!=""&&ka(E[M])==z.oname&&$(E[M],z.o)}if(z.captcha_id!=""&&ka(E[M])==z.captcha_id)t=E[M];else if(typeof z.fields!="undefined"&&typeof z.fields[ka(E[M])]!="undefined")if(E[M].type=="checkbox"){var aa=z.fields[ka(E[M])]?true:false;if(E[M].checked!=aa){E[M].checked=aa;cc(E[M].checked)}}else if(E[M].type=="radio"){if(E[M].value==z.fields[ka(E[M])])if(!E[M].checked){E[M].checked=true;cc(E[M].checked)}}else if(E[M].type==
"select-one")for(W=0;W<E[M].options.length;W++){if(E[M].options[W].value==z.fields[ka(E[M])]){$(E[M],z.fields[ka(E[M])]);break}}else if(E[M].type=="select-multiple"){aa=z.fields[ka(E[M])];aa=aa!=""?aa.split("|"):[];for(W=0;W<aa.length;W++)aa[W]=decodeURIComponent(aa[W]);var pa=false;for(W=0;W<E[M].options.length;W++)if(Qa(E[M].options[W].value,aa)){if(!E[M].options[W].selected)pa=E[M].options[W].selected=true}else if(E[M].options[W].selected){E[M].options[W].selected=false;pa=true}pa&&cc(E[M])}else E[M].type!=
"hidden"&&E[M].type!="reset"&&E[M].type!="button"&&E[M].type!="image"&&E[M].type!="submit"&&E[M].type!="file"&&E[M].type!="textarea"&&$(E[M],z.fields[ka(E[M])])}ea=E=v=L=false;for(var x in z.otherfields){F=[];if(x!=""&&typeof C.getElementsByName!="undefined"){W=C.getElementsByName(x);for(M=0;M<W.length;M++)if(W[M].tagName=="FORM")F[F.length]=W[M];if(F.length==0&&z.save_all)if((M=C.getElementById(x))&&M.tagName=="FORM")F=Array(M)}if(F.length==0){W=C.getElementsByTagName("form");for(M=0;M<W.length;M++)if(ka(W[M])==
x)F[F.length]=W[M];var ca=Array("input","select","textarea");M=[];var w=[];for(aa=0;aa<ca.length;aa++){W=g.getElementsByTagName(ca[aa]);for(pa=0;pa<W.length;pa++)if(W[pa].form==null||ka(W[pa])==""||typeof z.otherfields[x][ca[aa]+pa]!="undefined"){M[M.length]=W[pa];w[w.length]=ca[aa]+pa}}if(M.length>0){W={};W.elements=M;W.elementnames=w;F[F.length]=W}}for(M=0;M<F.length;M++){w=F[M];if(typeof w.elements!="undefined"&&w.elements&&typeof w.elements.length!="undefined")for(W=0;W<w.elements.length;W++){ca=
w.elements[W];aa=ka(ca);if(typeof z.otherfields[x][aa]=="undefined"){pa=ka(ca,true);if(typeof z.otherfields[x][pa]!="undefined")aa=pa}if((aa==""||typeof z.otherfields[x][aa]=="undefined")&&typeof w.elementnames!="undefined"&&w.elementnames.length>W)aa=w.elementnames[W];if("email"==ca.type||"text"==ca.type||"password"==ca.type){L=true;if(ca.type=="password")E=true}if(typeof z.otherfields[x][aa]!="undefined")if(z.captcha_id!=""&&ka(ca)==z.captcha_id)t=ca;else if(ca.type=="checkbox"){aa=z.otherfields[x][aa]?
true:false;if(ca.checked!=aa){ca.checked=aa;cc(ca)}if(A&&!b.lpformtosubmit2)b.lpformtosubmit2=ca.form}else if(ca.type=="radio"){if(ca.value==z.otherfields[x][aa])if(!ca.checked){ca.checked=true;cc(ca)}if(A&&!b.lpformtosubmit2)b.lpformtosubmit2=ca.form}else if(ca.type=="select-one"){for(var va=0;va<ca.options.length;va++)if(ca.options[va].value==z.otherfields[x][aa]){$(ca,z.otherfields[x][aa],true);break}if(A&&!b.lpformtosubmit2)b.lpformtosubmit2=ca.form}else if(ca.type=="select-multiple"){aa=z.otherfields[x][aa];
aa=aa!=""?aa.split("|"):[];for(va=0;va<aa.length;va++)aa[va]=decodeURIComponent(aa[va]);pa=false;for(va=0;va<ca.options.length;va++)if(Qa(ca.options[va].value,aa)){if(!ca.options[va].selected)pa=ca.options[va].selected=true}else if(ca.options[va].selected){ca.options[va].selected=false;pa=true}pa&&cc(ca);if(A&&!b.lpformtosubmit2)b.lpformtosubmit2=ca.form}else if("email"==ca.type||"text"==ca.type||"password"==ca.type||"textarea"==ca.type){$(ca,z.otherfields[x][aa],true);if(z.otherfields[x][aa]!=""&&
("email"==ca.type||"text"==ca.type||"password"==ca.type)){v=true;if(ca.type=="password")ea=true}if(A)if(ca.type=="password"){if(!b.lpformtosubmit1)b.lpformtosubmit1=ca.form}else if(!b.lpformtosubmit2)b.lpformtosubmit2=ca.form}}}}if(A&&L&&!v)if((L=y[z.aid])&&L.logins&&L.logins.length>0)if(L=L.logins[0].otherfields){W=0;F=g.getElementsByTagName("input");for(M=0;M<F.length;M++)if("text"==F[M].type||"password"==F[M].type||"email"==F[M].type){for(;W<L.length&&L[W].type!="text"&&L[W].type!="password"&&
L[W].type!="email";)W++;if(W<L.length){w=L[W];if(w.value!=""&&w.type==F[M].type&&w.name.length>=16&&w.name.length==ka(F[M]).length){$(F[M],K(w.value),true);v=true;if(F[M].type=="password"){ea=true;if(!b.lpformtosubmit1)b.lpformtosubmit1=F[M].form}else if(!b.lpformtosubmit2)b.lpformtosubmit2=F[M].form}W++}}if(!v){F=g.getElementsByTagName("input");for(M=0;M<F.length;M++)if("text"==F[M].type||"password"==F[M].type||"email"==F[M].type){v=ka(F[M]);if(W=v.match(/^(\D+)\d+$/)){v=W[1];for(w=0;w<L.length;w++)if(L[w].value!=
"")if((W=L[w].name.match(/^(\D+)\d+$/))&&W[1]==v){$(F[M],K(L[w].value),true);v=true;if(F[M].type=="password"){ea=true;if(!b.lpformtosubmit1)b.lpformtosubmit1=F[M].form}else if(!b.lpformtosubmit2)b.lpformtosubmit2=F[M].form;break}}}}}if(A&&E&&!ea){E=null;M=ea=0;ca=w=null;W=g.getElementsByTagName("form");for(v=0;v<W.length;v++){M=W[v].elements;if(!(M==null||typeof M=="undefined")){pa=aa=0;F=L=null;for(va=0;va<M.length;va++){var gb=M[va];if("text"==gb.type||"email"==gb.type){if(aa==0)L=gb;aa++}if(gb.type==
"password"){if(pa==0)F=gb;pa++}}if(pa==1)if(!E||aa==1&&ea!=1){ea=aa;M=pa;E=W[v];w=L;ca=F}}}if(E){w&&$(w,Kb(y[z.aid],0),true);$(ca,Kb(y[z.aid],1),true);b.lpformtosubmit1=E}}g.lastpass_domcontent_redo=function(){if(g.lastpass_recheck_fields){for(var Va=0;Va<g.lastpass_recheck_fields.length;Va++)if(""==g.lastpass_recheck_fields[Va].f.value)if(g.lastpass_recheck_fields[Va].f.value!=g.lastpass_recheck_fields[Va].v){ka(g.lastpass_recheck_fields[Va].f);g.lastpass_recheck_fields[Va].f.value=g.lastpass_recheck_fields[Va].v;
cc(g.lastpass_recheck_fields[Va].f)}g.lastpass_recheck_fields=null}};if(c&&Di(z.aid))c=false;if(z.custom_js!=""){$=z.custom_js.indexOf("lpframe1.")!=-1?b.contentWindow.frames[0].document:g;E=Og(z.custom_js,Kb(y[z.aid],0),Kb(y[z.aid],1),"3",c,$);try{if($.body){pb=$.createElement("script");ua=$.createTextNode(E);pb.appendChild(ua);$.body.textContent.replace(/^\s\s*/,"").replace(/\s\s*$/,"")!=""&&$.body.appendChild(pb)}}catch(Ca){U("Error running custom JS 3: "+Ca+" ln: "+Ca.lineNumber,q)}}$=z.custom_js.indexOf("lpdontsubmit")==
-1&&!A;if(!c)g.LPlpskipaddconfirm=true;if(t!=null){Mg(g);Ob("EnterCaptcha",b,0,"captcha");Ie(t);t.focus();b.lpformtosubmit1=b.lpformtosubmit2=null}else if($){if(typeof b.loginAid!="undefined")b.loginAid="";if(!c){z.overlay_shown=true;Rg(g,z.aid)}!c&&Ei(C,da,z.submit_id)}Sg(g,LP.lpgs("Submitted the form, waiting for the remote website..."));l[l.length]=B;o[o.length]=z.url;t=true;if(!z.multi&&!c)Ge[b]=q;C=true;break}}}}if(A||j!=-1)if(h&&h.frames){p=h.frames.length;if(p>10)p=10;for(D=0;D<p;D++)if(h.frames[D].document)if(He(b,
c,d,e,f,h.frames[D].document,h.frames[D].window,j+1,l,o,n))t=true}if(j<=1)if(A){if(!c){c=null;if(b.lpformtosubmit1)c=b.lpformtosubmit1;else if(b.lpformtosubmit2)c=b.lpformtosubmit2;if(c){z.overlay_shown=true;Rg(g,z.aid);C=c.ownerDocument;Ei(C,c,z.submit_id);Sg(g,LP.lpgs("Submitted the form, waiting for the remote website..."))}}b.lpformtosubmit1=null;b.lpformtosubmit2=null}for(D=l.length-1;j<2&&D>=0;D--)wa.length>l[D]&&wa[l[D]].url==o[D]&&wa.splice(l[D],1);return t}function Ei(b,c,d){var e=0;if(!e&&
d!=""){var f=b.getElementById(d);if(!f){var g=b.getElementsByName(d);if(g&&g.length>0)f=g[0]}if(!f)if(g=b.getElementsByTagName("INPUT"))for(var h=0;h<g.length;h++)if(g[h].value==d)f=g[h];if(!f)if(g=b.getElementsByTagName("A"))for(h=0;h<g.length;h++)if(g[h].href==d)f=g[h];if(f){g=f.ownerDocument.createEvent("MouseEvents");g.initMouseEvent("click",true,true,f.ownerDocument.defaultView,1,0,0,0,0,false,false,false,false,0,null);f.dispatchEvent(g);e=1}}e||(e=Tg(b,c,"submit"));e||(e=Tg(b,c,"image"));e||
(e=Tg(b,c,"button"));if(!e){f="";try{f=Ua(b.location.href)}catch(j){}d=null;if(g=b.getElementsByTagName("INPUT"))for(h=0;h<g.length;h++)if(g[h].type=="password")d=g[h];d&&Wk(13,d,b);f!="bankofamerica.com"&&LP.lpGetCurrentWindow().setTimeout(function(){var l=b.createEvent("HTMLEvents");l.initEvent("submit",true,true);c.dispatchEvent(l)},250)}}function Wk(b,c,d){c.focus();var e=d.createEvent("KeyboardEvent");e.initKeyEvent("keydown",true,true,null,false,false,false,false,b,0);c.dispatchEvent(e);e=d.createEvent("KeyboardEvent");
e.initKeyEvent("keypress",true,true,null,false,false,false,false,b,0);c.dispatchEvent(e);d=d.createEvent("KeyboardEvent");d.initKeyEvent("keyup",true,true,null,false,false,false,false,b,0);c.dispatchEvent(d)}function Fe(b,c,d,e,f,g){d=true;var h=e=0,j=[],l=[];if((typeof c.fields=="undefined"||c.fields.length==0)&&typeof c.login!="undefined")c=c.login;if(typeof c.fields!="undefined")if(c.fields.length>0)for(var o=0;o<c.fields.length;o++){if(c.fields[o].type=="text"||"email"==c.fields[o].type)e++;c.fields[o].type==
"password"&&h++;if(c.fields[o].type=="email"||c.fields[o].type=="text"||c.fields[o].type=="password"||c.fields[o].type=="select-one"){j[c.fields[o].name]=c.fields[o].value;l[c.fields[o].name]=c.fields[o].type}}else for(o in c.fields)if(typeof c.fields[o]!="undefined"){j[o]=c.fields[o];l[o]="unknown"}if(c.uname)j[c.uname]=c.uname;if(c.pname)j[c.pname]=c.pname;if(c.oname)j[c.oname]=c.oname;var n=c=false,p=false,q=false,r=0,u=0;b=b.elements;for(o=0;o<b.length;o++){c=true;if(typeof b[o].type!="undefined"){if(!g&&
r+u>e+h){n=true;break}if("text"==b[o].type||"email"==b[o].type)r++;b[o].type=="password"&&u++;if(b[o].type=="email"||b[o].type=="text"||b[o].type=="password"||b[o].type=="select-one"){var t=ka(b[o]);if(typeof j[t]!="undefined"){p=true;j[t]=null}else if(t!="")b[o].type=="hidden"||b[o].type=="select-one"||(n=true)}}}for(o in j){p=true;if(j[o]!=null&&o!="")if(l[o]!="select-one")q=true}if(g)g.value=r==e&&u==h&&(n||q);if(!c||!p)d=false;else if(f){if(n&&q)d=false}else if(n||q)d=false;return d}function De(b,
c){var d=[];zf(d,b,c);for(var e=0;e<d.length;e++)if(d[e].pwnames.length>0)return d[e].form;return null}function zf(b,c,d,e){if(typeof e=="undefined")e=1;if(e>10)return null;if(!(typeof d=="undefined"||typeof d.location=="undefined")){var f=d.location.href,g=Ra(f);f=ob(g.host,f);g=d.getElementsByTagName("form");var h=g.length;if(h>100)h=100;for(var j=0,l=0;l<h;l++){var o=[];o.tld=f;o.pwnames=[];o.textnames=[];var n=g[l].elements;if(typeof n!="undefined"){var p=0,q=0,r=n.length;if(r>200)r=200;for(var u=
0;u<r;u++)if(typeof n[u].type!="undefined"){if(n[u].type=="password")if(!dd(n[u])){d.LPlpinvisiblepw=true;for(var t=mb(d),C=t.contentWindow;C.top!=null&&C.top!=C;)C=C.top;C=C.document;typeof C.LPlpinstalledclick=="undefined"&&typeof C.LPlpnoinstalledclick!="undefined"&&Ce(t,d);if(Fi)continue;else g[l].bHasInvisible=true}if("text"==n[u].type||"email"==n[u].type)p++;else n[u].type=="password"&&q++;if(("text"==n[u].type||"email"==n[u].type)&&f!="yahoo.com"&&f!="directcpv.com"&&f!="zestservers.com")o.textnames[o.textnames.length]=
ka(n[u]);if(n[u].type=="password")o.pwnames[o.pwnames.length]=ka(n[u])}o.form=g[l];o.numText=p;o.numPass=q;b[b.length]=o;if(p>0||q>0)if(++j>=10)break}}if(e==-1)return null;if(typeof c=="undefined"||c==null)if(d=mb(d))c=d.contentWindow;if(c&&c.frames){d=c.frames.length;if(d>10)d=10;for(f=0;f<d;f++)c.frames[f].document&&zf(b,c.frames[f].window,c.frames[f].document,e+1)}}}function $c(b,c,d,e,f,g,h){d=typeof d=="undefined"||d!="";e=null;for(var j=0,l=0,o=0;o<b.length;o++){var n=b[o],p=null,q=c&&typeof c!=
"undefined"&&!LP.compare_tlds(c,n.tld)?false:true;if(q){for(q=0;q<n.pwnames.length;q++){var r=n.pwnames[q];if(d&&(typeof g=="undefined"||g==null||r==g))p=n.form}if(p!=null)if(e==null||n.numText+n.numPass<j+l||n.numText+n.numPass==j+l&&n.numPass<n.bestNumPass){e=p;j=n.numText;l=n.numPass}}}if(e!=null)return e;if(f)for(o=0;o<b.length;o++){n=b[o];if(c&&typeof c!="undefined"&&!LP.compare_tlds(c,n.tld)?false:true)for(q=0;q<n.textnames.length;q++)if(typeof h=="undefined"||h==null||n.textnames[q]==h)return n.form}return null}
function Gi(b,c,d){if(typeof d=="undefined")d=1;if(d>10)return c;var e=b.frames;c.push(b.document);for(b=0;b<e.length;b++)Gi(e[b],c,d+1);return c}function mb(b){for(var c=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");c.hasMoreElements();){var d=c.getNext();if(typeof d.getBrowser=="function"){var e=d.getBrowser();if(null!=e){d=e.browsers;if(typeof d=="undefined"&&LP.isFennec)d=Array(e);for(e=0;typeof d!="undefined"&&
e<d.length;e++)if(typeof d[e]!="undefined")if(b==d[e].contentDocument)return d[e];for(var f=0;typeof d!="undefined"&&f<d.length;f++)if(typeof d[f]!="undefined"){e=Gi(d[f].contentWindow,[]);for(var g=0;g<e.length;g++)if(b==e[g])return d[f]}}}}return null}function Tk(b){LP.lpGetCurrentWindow().setTimeout(function(){Xk(b)},900)}function Xk(b){try{var c=mb((b?b.target:this).ownerDocument);if(c!=null){for(var d=c.contentWindow;d.top!=null&&d.top!=d;)d=d.top;var e=d.document;if(!(typeof e=="undefined"||
typeof e.forms=="undefined"))if(!(typeof e.LPlpshowednote!="undefined"&&e.LPlpshowednote>1)){var f=e.forms.length;if(f>100)f=100;for(b=0;b<f;b++){var g=e.forms[b].elements;d=true;for(var h=0;h<g.length;h++)if(typeof g[h].type!="undefined")if(g[h].type=="password")if(!dd(g[h])){d=false;break}if(d==true){if(typeof e.LPlpclickfilled=="undefined"){e.LPlpclickfilled=[];e.LPlpclickfilled[e.LPlpclickfilled.length]=b}else{d=false;for(h=0;h<e.LPlpclickfilled.length;h++)if(e.LPlpclickfilled[h]==b){d=true;break}if(d)continue;
else e.LPlpclickfilled[e.LPlpclickfilled.length]=b}var j=mb(e);if(typeof LP.getBrowser().getNotificationBox=="function"){LP.lpGetCurrentWindow().setTimeout(function(){LP.getBrowser().getNotificationBox(c).allNotifications.length==0&&pd(j,j.contentDocument,null,Fi==false)},500);break}}}}}}catch(l){U("Error in click handler: "+l+" ln: "+l.lineNumber,null)}}function ee(b,c,d){try{if(b!=null){var e=c.ownerDocument;b.lpcurrenturl=LP.compare_tlds(Ua(e.location.href),Ua(d))?d:e.location.href}}catch(f){b.lpcurrenturl=
d}}function Yk(b,c){try{if(!LP.compare_tlds(Ua(b),Ua(c)))return b}catch(d){}return c}function Hi(b,c){var d=null,e=typeof sa[b]!="undefined"?sa[b]:[];for(var f in e)if(!(typeof y[f]=="undefined"||y[f].genpw||y[f].isbookmark||c&&y[f].id==c))if(y[f].logins)for(var g=0;g<y[f].logins.length;g++)if(LP.compare_tlds(y[f].logins[g].tld,b)){if(d==null)d=[];d[f]=y[f].logins[g].unencryptedUsername}return d}function Ug(b){b=b||event;if(b.preventDefault)b.preventDefault();else b.returnValue=false}function Ia(b){ga&&
Mc("logout");Qb={};rc={};Rb={};Sb={};Vg=false;LP.lpCloseNotifications();LP.lplogoff_win();try{Components.classes["@mozilla.org/network/http-auth-manager;1"].getService().QueryInterface(Components.interfaces.nsIHttpAuthManager).clearAll()}catch(c){}LP.lpMakeRequest(LP.lp_base+"logout.php?ff_plugin=1","",b==null||b==true?Zk:null);Zd=ia=Z="";de=0;rd="";Ke();LP.lphelpstats=null;Df=0;Wg=false;Ib="";LP.lpGetCurrentWindow().setTimeout('LP.lp_remove_cookie(".'+LP.lp_basehost+'", "PHPSESSID");',30);LP.lpDisplayAccounts_all(true)}
function Zk(b){b&&b.readyState==4&&jc()}function ze(){var b=Ka(na);if(typeof ed!="undefined"&&ed!=null&&ed!=""&&typeof Z!="undefined"&&Z!=null&&Z!=""&&typeof ia!="undefined"&&ia!=null&&ia!=""){b=Ya.Encrypt({pass:ed,data:b,b64:true,mode:"ecb",bits:256});var c=Ya.Encrypt({pass:na,data:"lastpass rocks",b64:true,mode:"ecb",bits:256});b=b+"\n"+c;b=sd(b,true);Yb(ia+"_lpall.slps",b);Wa(ia+"_lp.act.key")}}function Ii(b,c,d){var e=0,f=0,g=0,h=0,j=0,l=0,o=b.split(".");for(b=0;b<o.length;b++)if(b==0)e=parseInt(o[b]);
else if(b==1)f=parseInt(o[b]);else if(b==2)g=parseInt(o[b]);c=c.split(".");for(b=0;b<c.length;b++)if(b==0)h=parseInt(c[b]);else if(b==1)j=parseInt(c[b]);else if(b==2)l=parseInt(c[b]);if(e!=h)return e>h?1:-1;if(f!=j)return f>j?1:-1;if(d)return 0;if(g!=l)return g>l?1:-1;return 0}function sc(b,c,d,e,f,g,h,j,l,o,n,p,q,r,u){var t=false;if(c)o=t=true;if(typeof q=="undefined")q=1;if(q>10)return"";if(q==1)Id=[];if(typeof n=="undefined"||n==null)n=e?e.contentDocument:LP.getBrowser().contentDocument;if(!(typeof n.LPlpforminfosaved!=
"undefined"&&!l)){n.LPlpforminfosaved=true;if(d==1||d==3||d==4){if(typeof n.LPlpforminfouploaded!="undefined")return;n.LPlpforminfouploaded=true}var C;C=e&&typeof e.lpcurrenturl!="undefined"?e.lpcurrenturl:typeof n.location!="undefined"?n.location.href:e?LP.lpgetcurrenturl(e):LP.lpgetcurrenturl(LP.getBrowser());var A=Ua(C),J=n.getElementsByTagName("form"),D=J.length,B="";if(o&&q==1)if(r)r.siteinfo_save_all_fields_numfields=0;for(var z=[],L="",S="",$="",E="",ea="",v="",F=false,M=false,W="",da="",ta=
"",pb="",ua=!ga,V=[],aa="",pa="",x="",ca="",w=Array(""),va=typeof f!="undefined"&&f!=0?0:1;va<D+(o?2:1);va++){if(va==1&&F)break;var gb="",Ca=0,Va=0,Xb=0,Ga,Oa,db,kb;if(va==D+1){Ga=null;L="";Oa=[];db=[];S=Array("input","select","textarea");for($=0;$<S.length;$++)for(var ma=n.getElementsByTagName(S[$]),Ea=0;Ea<ma.length;Ea++)if(ma[Ea].form==null||Qa(ka(ma[Ea]),w)){Oa[Oa.length]=ma[Ea];db[db.length]=S[$]+Ea}kb=Oa.length;$=S=""}else{Ga=va>=1?J[va-1]:f;L=va>=1?ka(J[va-1]):ka(f);Oa=va>=1?J[va-1].elements:
f.elements;kb=Oa.length;S=va>=1?J[va-1].action:f.action;$=va>=1?J[va-1].method:f.method}var X=[],ha=[],R=[],ab=[];for(Ea=0;Ea<kb;Ea++){if(typeof X[Oa[Ea].name]!="undefined")R[Oa[Ea].name]=true;X[Oa[Ea].name]=true;if(typeof ha[Oa[Ea].id]!="undefined")ab[Oa[Ea].id]=true;ha[Oa[Ea].id]=true}for(Ea=0;Ea<kb;Ea++){X=Oa[Ea];ha=X.value;if(X.type=="image")ha=X.src;if(o&&ha==""&&X.name&&X.name!=""){ma=n.getElementsByName(X.name);for(var G=ka(X),Lb=false,oa=0;oa<ma.length;oa++)if(ka(ma[oa].form)==L&&ka(ma[oa])==
G&&ma[oa].type==X.type&&ma[oa].value!=""){Lb=true;break}if(Lb)continue}G=o&&L==""?ka(X,true):ka(X);if((G==""||typeof R[G]!="undefined"&&typeof ab[G]!="undefined")&&o)if(va==D+1)G=db[Ea];else{w[w.length]=G;continue}if((!o||L!="")&&typeof R[G]!="undefined")G=ka(X,true);if((!o||t)&&fe==Ga)for(ma=0;ma<Za.length;ma++)if(Za[ma].name==ka(X)){if(Za[ma].value!=ha)if(ha==""||ha.match(/^\*+$/))ha=Za[ma].value;else if(ha.length==Za[ma].value.length){Lb=true;for(oa=0;oa<ha.length;oa++)if(ha.charAt(oa)!=Za[ma].value.charAt(oa)&&
ha.charAt(oa)!="*"){Lb=false;break}if(Lb)ha=Za[ma].value}break}if(X.type=="password"&&typeof n.LPlpsharedpasswordfills=="object")for(ma=0;ma<n.LPlpsharedpasswordfills.length;ma++)if(n.LPlpsharedpasswordfills[ma]==X){ha="";break}if(LP.compare_tlds(A,"live.com")&&X.type=="hidden"&&ka(X)=="login")X.type="text";if(X.type=="checkbox")ha+=X.checked?"-1":"-0";if(X.type=="radio")ha+=X.checked?"-1":"-0";if(X.type=="select-one"||X.type=="dropdown"||X.type=="select-multiple"){if(X.type=="select-multiple"){oa=
ha="";for(ma=0;ma<X.options.length;ma++)if(X.options[ma].selected){ha+=oa+LP.en(X.options[ma].value);oa="|"}}else ha=X.selectedIndex<0||X.selectedIndex>=X.options.length||typeof X.options[X.selectedIndex]=="undefined"?"":X.options[X.selectedIndex].value;for(ma=0;ma<X.options.length;ma++){gb+=(o?L:va)+"\t"+LP.en(G)+"\t"+LP.en(Jd(X.options[ma].value))+"\tselect-option\n";gb+=(o?L:va)+"\t"+LP.en(G)+"\t"+LP.en(Jd(X.options[ma].text))+"\tselect-option-text\n"}}if(("email"==X.type||X.type=="text")&&ka(X)!=
"openid_url"&&!X.readOnly&&(ha!=""||j)){if(!Va||!Ca){W=ka(X);ta=ha}Ca=1;M=true}if(X.type=="password"&&(ha!=""||j)){if(ha!=""){if(Va&&""!=da&&!Ca){W=da;ta=pb;Ca=1;M=true}if(da==""&&pb==""||dd(X)){da=ka(X);pb=ha}}Va=1}if(ka(X)=="openid_url"&&(ha!=""||j))Xb=1;ma=ha=Jd(ha);if("email"==X.type||"text"==X.type||"password"==X.type||"textarea"==X.type||"hidden"==X.type)if(ua){oa=V.length;V[oa]=ha;ha="__LPENCRYPTEDSTRING"+oa+"__"}else{Id.push(ha);ha=P(ha)}gb+=(o?L:va)+"\t"+LP.en(G)+"\t"+LP.en(ha)+"\t"+LP.en(X.type)+
"\n";if(o){oa=false;if("email"==X.type||X.type=="text"||X.type=="password"||X.type=="textarea"||X.type=="select-one"||X.type=="select-multiple"){r&&r.siteinfo_save_all_fields_numfields++;oa=true}else if(X.type=="checkbox"){r&&r.siteinfo_save_all_fields_numfields++;oa=true}else if(X.type=="radio"&&X.checked){r&&r.siteinfo_save_all_fields_numfields++;oa=true}if(oa){oa=new Lc;oa.name=G;oa.type=X.type;oa.value=ha;oa.formname=L;if(X.type=="checkbox"||X.type=="radio"){oa.checked=X.checked;oa.value=typeof oa.value==
"string"&&oa.value.length>=2?oa.value.substring(0,oa.value.length-2):""}if(r){if(r.siteinfo_save_all_fields_fields==null)r.siteinfo_save_all_fields_fields=[];r.siteinfo_save_all_fields_fields[r.siteinfo_save_all_fields_fields.length]=oa}}}G=new Lc;G.name=ka(X);G.type=X.type;G.value=ua?ma:ha;if(X.type=="checkbox"||X.type=="radio"){G.checked=X.checked;G.value=G.value.substring(0,G.value.length-2)}if(o)G.formname=L;if(X.type!="radio"||X.checked)z[z.length]=G;if(h&&aa==""&&("email"==X.type||"text"==X.type)&&
ka(X)!=""&&X.value!=""){ha=RegExp(LP.lpgs("ff_username_regexp"),"i");if(ha.exec(ka(X))){aa=ka(X);pa=ma}else{G=Le(X);if(G!=""&&ha.exec(G)){aa=ka(X);pa=ma}}}if(h&&x==""&&("email"==X.type||"text"==X.type)&&ka(X)!=""&&X.value!=""){ha=RegExp(LP.lpgs("ff_email_regexp"),"i");if(ha.exec(ka(X))){x=ka(X);ca=ma}else{G=Le(X);if(G!=""&&ha.exec(G)){x=ka(X);ca=ma}}}}if(Va||Xb){E=L;ea=S;v=$;Ga=n.getElementsByTagName("input");for(Ea=0;Ea<Ga.length;Ea++){X=Ga[Ea];G=ka(X);if(X.type=="image")if(va>=1&&va<=D&&X.form==
n.forms[va-1]||va<1&&X.form==f)gb+=(o?L:va)+"\t"+LP.en(G)+"\t"+LP.en(Jd(X.src))+"\t"+LP.en(X.type)+"\n"}}if(Va||Xb||c&&Ca&&(d>0||va<1||va>D||J[va-1]==f)||o){B+=gb;if(!o){B+=va+"\taction\t"+LP.en(Jd(S))+"\taction\n";B+=va+"\tmethod\t"+LP.en(Jd($))+"\tmethod\n"}F=true}}if(!o&&F)for(ma=0;ma<Za.length;ma++)if(Za[ma].value!=""&&Za[ma].formname&&Za[ma].formname!=""&&Za[ma].formname!=E){X=Za[ma];ha=Jd(X.value);if("email"==X.type||X.type=="text"||X.type=="password"||X.type=="textarea"||X.type=="hidden")if(ua){oa=
V.length;V[oa]=ha;ha="__LPENCRYPTEDSTRING"+oa+"__"}else{Id.push(ha);ha=P(ha)}B+=X.formname+"\t"+LP.en(ka(X))+"\t"+LP.en(ha)+"\t"+LP.en(X.type)+"\n"}if(o){if(typeof p=="undefined"||p==null)p=e?e.contentWindow:LP.getBrowser().contentWindow;if(p&&p.frames){A=p.frames.length;if(A>10)A=10;for(ma=0;ma<A;ma++)if(p.frames[ma].document)B+=sc(b,c,d,e,f,g,h,j,l,o,p.frames[ma].document,p.frames[ma].window,q+1,r,u)}if(q>1)return B}if(E=="")E=L;if(ea=="")ea=S;if(v=="")v=$;if(B!=""||o){A=typeof n.characterSet!=
"undefined"?n.characterSet:n.charset;n=Yk(C,n.location.toString());B="data="+Ka(B)+"&ref="+LP.en(Ka(n))+"&charset="+A;if(aa==""){aa=x;pa=ca}if(h){B+="&createacct=1&username_field="+LP.en(aa);if(pa!="")ta=pa}B+=LP.GetIdentityParam();aa=Ra(C);if(d==1)if(ua)U("Was going to potentially upload unencrypted data. upload=1,multi="+c+",createacct="+h+",allowblank="+j,null);else{d=y[g];d.postdata=B;d.posturl=LP.lp_base+"gm_deliver.php";d.newvalues=Id;LP.lpMakeRequest(d.posturl,d.postdata,null,null,d)}else if(d==
2)return B;else if(d==3)if(ua)U("Was going to potentially upload unencrypted data. upload=3,multi="+c+",createacct="+h+",allowblank="+j,null);else{d=y[g];d.url=n;A=Ua(d.url);d.tld=A;d.postdata=B+"&updatefields=1&aid="+LP.en(g);d.posturl=LP.lp_base+"gm_deliver.php";d.newvalues=Id;Ji(d,z);d.logins[0].fields=z;LP.lpMakeRequest(d.posturl,d.postdata,Me,null,d)}else if(d==4)if(ua)U("Was going to potentially upload unencrypted data. upload=4,multi="+c+",createacct="+h+",allowblank="+j,null);else{d=y[g];
d.postdata=B+"&addurid=1&aid="+LP.en(g);d.posturl=LP.lp_base+"gm_deliver.php";d.newvalues=Id;if(d.otherlogins.length<10){Ji(d,z);c=new oc;c.urid=0;c.url=n;u=Ra(c.url);c.server=u.host;c.tld=ob(u.host,c.url);Ta(c.url,u);c.submit_id=typeof d.logins!="undefined"&&d.logins.length>0?d.logins[0].submit_id:"";c.captcha_id=typeof d.logins!="undefined"&&d.logins.length>0?d.logins[0].captcha_id:"";c.custom_js=typeof d.logins!="undefined"&&d.logins.length>0?d.logins[0].custom_js:"";c.username=d.username;c.password=
d.password;c.openid_url="";c.method="";c.action="";c.unencryptedUsername=K(c.username);c.uname="";c.pname="";c.oname="";c.fields=z;c.otherfields=[];d.otherlogins[d.otherlogins.length]=c}LP.lpMakeRequest(d.posturl,d.postdata,Me,null,d)}else{oa=new hi;oa.newvalues=Id;oa.upload=d;oa.postdata=B;oa.url=C;oa.server=aa.host;oa.hastext=M;oa.tld=ob(aa.host,C);g=Ra(ea);oa.actiontld=ob(g.host,ea);if(g=e?LP.lpgetcurrenturl(e):LP.lpgetcurrenturl(LP.getBrowser()))oa.topdoctld=Ua(g);oa.basic_auth=false;oa.uname=
W;oa.username=ta;oa.pname=da;oa.encryptedPassword=ua?pb:P(pb);oa.needsEncryption=ua;oa.encryptedStrings=V;oa.show_count=0;oa.action=ea;oa.method=v;oa.fields=z;oa.timeSaved=cb();oa.ignorefromcheckadd=typeof u!="undefined"&&u!=null?true:false;if(c){z=false;if(d!=5&&Za.length>0){ha=RegExp(LP.lpgs("ff_search_regexp"),"i");for(ma=0;ma<Za.length;ma++)if(Za[ma].name!=""&&Za[ma].type=="text"&&!ha.exec(Za[ma].name)){z=true;break}}if(z||d==5){bc.length>5&&bc.splice(0,bc.length-5);bc.push(oa)}}else{Ja[typeof u!=
"undefined"&&u!=null?u:ea]=oa;!oa.ignorefromcheckadd&&e&&LP.setTimeout(function(){LP.checkAddTimer(e,ea)},1E4)}}}}}function Ji(b,c){for(var d=0,e="",f=0;f<c.length;f++)if(c[f].type=="text"){e=c[f].value;if(++d>=2)break}if(d==1&&e!=""){for(f=d=0;f<b.logins.length;f++)for(var g=0;g<b.logins[f].fields.length;g++)if("text"==b.logins[f].fields[g].type||"email"==b.logins[f].fields[g].type){d++;break}if(d==0)for(f=0;f<b.otherlogins.length;f++)for(g=0;g<b.otherlogins[f].fields.length;g++)if("email"==b.otherlogins[f].fields[g].type||
"text"==b.otherlogins[f].fields[g].type){d++;break}if(d==0){b.username=e;b.unencryptedUsername=K(b.username);for(f=0;f<b.logins.length;f++){b.logins[f].username=b.username;b.logins[f].unencryptedUsername=b.unencryptedUsername}for(f=0;f<b.otherlogins.length;f++){b.otherlogins[f].username=b.username;b.otherlogins[f].unencryptedUsername=b.unencryptedUsername}}}}function $k(b,c,d,e){var f=Ja[d],g="";if(f){if(g=="")g=f.postdata;g+="&name="+LP.en(P(b,void 0))+"&grouping="+LP.en(P(c,void 0));if(e)g+=e;LP.lpGetCurrentWindow().setTimeout(function(){ti(g,
f.ai,f.newvalues)},100)}Ja[d]=null;bc=[]}function Ef(b,c){var d=vb();if(d){var e;try{if(typeof d=="object"&&typeof d.accts_version!="undefined"){if(c==0)d.neverurls.neveraccounts.push(b);else if(c==1)d.neverurls.nevergenerates.push(b);else if(c==2)d.neverurls.neverformfills.push(b);else c==3&&d.neverurls.neverautologins.push(b);e=true}else e=false}catch(f){e=false}e&&Ne(d)&&Ab(d,null,"add_never_to_local_file")&&Bb()}}function Ki(b,c){var d=Ja[b].url,e;d=c?Ua(d):Ta(d);e="url="+LP.en(Ka(d));Pb[Pb.length]=
d;Ef(d,0);LP.lpGetCurrentWindow().setTimeout(function(){Oe(e)},100)}function al(b,c){var d,e=c?Ua(b):Ta(b);d="url="+LP.en(Ka(e))+"&type=1";tc[tc.length]=e;Ef(e,1);LP.lpGetCurrentWindow().setTimeout(function(){Oe(d)},100)}function bl(b,c){var d,e=c?Ua(b):Ta(b);d="url="+LP.en(Ka(e))+"&type=2";uc[uc.length]=e;Ef(e,2);LP.lpGetCurrentWindow().setTimeout(function(){Oe(d)},100)}function cl(b,c){var d,e=c?Ua(b):Ta(b);d="url="+LP.en(Ka(e))+"&type=3";pc[pc.length]=e;Ef(e,3);LP.lpGetCurrentWindow().setTimeout(function(){Oe(d)},
100)}function ti(b,c,d){b+=LP.GetIdentityParam();try{for(var e in y)if(y[e].genpw&&y[e].tld==Ua(c.url)&&K(y[e].password)==K(c.password)){b+="&delgenpwaid="+LP.en(e);break}}catch(f){}c.postdata=b;c.posturl=LP.lp_base+"deliver_and_add.php";c.newvalues=typeof d!="undefined"&&d.length>0?d:[];LP.lpMakeRequest(c.posturl,c.postdata,Me,null,c)}function Li(b,c){return fd.length>0&&!Qa(b,fd)&&!Qa(c,fd)?true:Qa(b,tc)||Qa(c,tc)?true:false}function Mi(b,c){return gd.length>0&&!Qa(b,gd)&&!Qa(c,gd)?true:Qa(b,uc)||
Qa(c,uc)?true:false}function Oe(b){LP.lpMakeRequest(LP.lp_base+"add_never.php",b,null)}function Ff(){var b=ia;if(b==""||b==null)return"";var c=b+"_icons3.lps";Aa()||(c=b+"_icons3b64.lps");return c.toUpperCase()}function Ni(b){var c="";if(!b){b=Ff();if(b=="")return c;b=ib(b);if(b==false)return c}if((b=/iconsversion=([^\n]+)\n/.exec(b))&&b.length==2){c=parseInt(b[1]);c=isNaN(c)?"":c.toString()}return c}function Oi(b){if(b.readyState==4&&b.status==200&&b.responseText){var c=b.responseText;if(!(c=="latest"||
c=="nodata")){b=Ni(c);if(b!=""){b="iconsversion="+b+"\n";c=c.substring(b.length);var d=rf("LastPassIcons<"+c+">LastPassIcons");if(d==null)return false;c=Aa()?P(d):rf(d);if(c==""||c==null){U("Failed to encrypt icons data",null);return false}d=Ff();if(d!=""){Ec=true;Yb(d,b+c);zb(null);LP.lpGetCurrentWindow().setTimeout("LP.lpDisplayAccounts_all(true);",0);LP.lpGetCurrentWindow().setTimeout("LP.lpRebuildToolsMenu_all();",0)}}}}}function zb(b,c){function d(){Wa(Ff());versionff="0";LP.lpMakeRequest(LP.lp_base+
"geticon.php","versionff="+LP.en(versionff),Oi);return e}var e="data:image/gif;base64,R0lGODlhEAAQAIcAAAAAAExnf1BpgWR0iHZ6hHeBkX+GkYiOmpeaopucoaSlqqWmqrm9w7q+xL+/wry/xcXGyc3Oz9HS1NPU1tnZ2d/h4+Di5OLj5uPl5+Tk5OXm6O7u7+7v8O/w8e/w8vDw8fHx8vLy8/Pz8/Pz9PT09fX19fX29vb29vf39/f3+Pj4+Pj4+fn5+vr6+/v7/Pz8/P39/f7+/v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAiQAAEIHEiw4MAFCBEmQCjBIIAFMiLK8CBjA4QIBiFu2Fgh4oYJDgpq5Chxw4KCCiqSlKigIAKVGyowYNDgAYGCB2BWsHABgwYDBQvA/CCiBAoVBQoOUNlBhAkVLV4MKCigIgenK1zAiCGgYICKIEhAhRExgFcZHEKcYEG27NkOI1K0aCvDLMEAePPqteuwr8CAADs=";
if(b=="sn")return"data:image/gif;base64,R0lGODlhEAAQAPfBAFdCGCpgtyxity1kuS5kuS5luS9lujBlujBmujFmuzFnuzNpvIdhK4JmLjZvvzhxvzt2wTt2xKZoJjx4wT98xUB8xEKAxUKAxkWCxUWCxkeExkmFxEmIxkqIxkuIxWCFrUuJxUuJxkyJxr56Gk2LyE+Lx0+MyE+MyU+NyKqJQ8mFQWWU27yJTMKMSMeMSMWYSWWo0siZZLOfcNqYSduZS9CdRk+y99iaVFGy99mbUVW0+NOfZuChUdejY32y4tilWGG8+2K8/GK9/GO9+2C+/Ge9/GS+/GW++2i//W7C/duxhb+2ptW2etG3kNa5dprJ4+e+d+fAi8zGsMzGs+TJVcLLtpPU/8nNr5TV/+3KbefLd5XW//nHlPnJke3QeM3S2tDUvrjW9O7TebrW9fDTecjV4u7UffHUe9XWve7Vgc3W4fLWeu/SrPDStMHb+PbTrvXcXvXcX8Lc+MTd+fXfW/bdbPffY8Xf+ffhWsfg+sjg+ffiW8jg+8ng+/jiXcjh+8nh+8rh+sni+8vi+83j+83j/Onf0s7j+8/j/M/k/NDk+9Hk/PHjr9Xl/tPm/Nfm8tTm/NTm/fzgxPnjstPn/dXn/dbn/dbn/tfn/tbo/tfo/tjo/tzq9t7q9t7r9t/r9d/s9+Pt9+bw9+jx+Orx+Ory+uvy+Ozy9+zy+Ovz+uzz+e3z+O30+O30+e70+O/0+f/y4PD0+f32wv32xPH1+f/z5f33x/L2+vL3+/P3/PT3+/T4/PX5/Pf6/fj7/fj7//3+/v///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEKAP8ALAAAAAAQABAAAAj+AP/9I2GioAkUJ0qAiCCw4YZTrlitmojq1CMfKxr+83ArDyBBfO64CfOryg8lNQSKoFXoEKFBeuSMYQSlTS02Lv6FoIVIUaJCgeZcSTMpyhtJO3TGcgSJ0iJCYMzMqpOlRwyBHV5hslQpEhoxtuLsWcPjg0AOrTZt0iRFiy04eM7QMJRBoAZVmTRNcSLLjh8yM8qUuiAQg6lLS5g0oULHSw41gHBREGhhVKMUsG6MeNHiS58/vSAIrCBKRwMuXVRIgIHDhg1eDgROCJUEAAMWMp5swWLliC4FAh98QlLkiBEjQoYAIRLE1wCBC0iB8tSJE6dUqUrl2gUsQMMDCRAMiD9goEABAgQECAwIADs=";
if(Kd==null||b==null){Kd=[];var f=Ff();if(f=="")return e;f=ib(f);if(f==""||f==null)return d();var g=/(iconsversion=[^\n]+\n)/,h=g.exec(f);if(!h||h.length!=2)return d();f=f.substring(h[1].length);try{g=null;g=Aa()?K(f):Xg(f)}catch(j){return d()}if(g==""||g==null)return d();if(g.length%4!=0||g.length<50)return d();f=Xg(g);if(f==null)return d();g=f.indexOf(">LastPassIcons");if(-1==g)return d();if(f.length<=28||f.indexOf("LastPassIcons<")!=0||g!=f.length-14)return d();for(f=f.substring(14,g);;){if(f.length<
10)break;g=/lp([^:]+):([^:]+):/;h=g.exec(f);if(!h||h.length!=3)break;g=h[1];var l=h[2];h=parseInt(l);if(isNaN(h))break;l="lp"+g+":"+l+":";Kd[g]=dl(f,l.length,l.length+h);f=f.substring(l.length+h)}}if(b!=null){if(typeof Kd[b+".gif"]!="undefined")e="data:image/gif;base64,"+Kd[b+".gif"];else if(typeof Kd[b+".ico"]!="undefined")e="data:image/ico;base64,"+Kd[b+".ico"];else if(c){e=el(b);if(e==null)e="data:image/gif;base64,R0lGODlhEAAQAPfBAFdCGCpgtyxity1kuS5kuS5luS9lujBlujBmujFmuzFnuzNpvIdhK4JmLjZvvzhxvzt2wTt2xKZoJjx4wT98xUB8xEKAxUKAxkWCxUWCxkeExkmFxEmIxkqIxkuIxWCFrUuJxUuJxkyJxr56Gk2LyE+Lx0+MyE+MyU+NyKqJQ8mFQWWU27yJTMKMSMeMSMWYSWWo0siZZLOfcNqYSduZS9CdRk+y99iaVFGy99mbUVW0+NOfZuChUdejY32y4tilWGG8+2K8/GK9/GO9+2C+/Ge9/GS+/GW++2i//W7C/duxhb+2ptW2etG3kNa5dprJ4+e+d+fAi8zGsMzGs+TJVcLLtpPU/8nNr5TV/+3KbefLd5XW//nHlPnJke3QeM3S2tDUvrjW9O7TebrW9fDTecjV4u7UffHUe9XWve7Vgc3W4fLWeu/SrPDStMHb+PbTrvXcXvXcX8Lc+MTd+fXfW/bdbPffY8Xf+ffhWsfg+sjg+ffiW8jg+8ng+/jiXcjh+8nh+8rh+sni+8vi+83j+83j/Onf0s7j+8/j/M/k/NDk+9Hk/PHjr9Xl/tPm/Nfm8tTm/NTm/fzgxPnjstPn/dXn/dbn/dbn/tfn/tbo/tfo/tjo/tzq9t7q9t7r9t/r9d/s9+Pt9+bw9+jx+Orx+Ory+uvy+Ozy9+zy+Ovz+uzz+e3z+O30+O30+e70+O/0+f/y4PD0+f32wv32xPH1+f/z5f33x/L2+vL3+/P3/PT3+/T4/PX5/Pf6/fj7/fj7//3+/v///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEKAP8ALAAAAAAQABAAAAj+AP/9I2GioAkUJ0qAiCCw4YZTrlitmojq1CMfKxr+83ArDyBBfO64CfOryg8lNQSKoFXoEKFBeuSMYQSlTS02Lv6FoIVIUaJCgeZcSTMpyhtJO3TGcgSJ0iJCYMzMqpOlRwyBHV5hslQpEhoxtuLsWcPjg0AOrTZt0iRFiy04eM7QMJRBoAZVmTRNcSLLjh8yM8qUuiAQg6lLS5g0oULHSw41gHBREGhhVKMUsG6MeNHiS58/vSAIrCBKRwMuXVRIgIHDhg1eDgROCJUEAAMWMp5swWLliC4FAh98QlLkiBEjQoYAIRLE1wCBC0iB8tSJE6dUqUrl2gUsQMMDCRAMiD9goEABAgQECAwIADs="}return e}}
function el(b){if(typeof qa[b]!="undefined"){b=qa[b].extra;if(b.length>64)b=b.substring(0,64);if((b=LP.getNoteValue("NoteType",K(b)))&&typeof Gf[b]!="undefined")return Gf[b]}return null}function Me(b,c,d){if(!Yg(b,{url:d.posturl,aid:d.id,postdata:d.postdata,handler:Me,param:d,newvalues:d.newvalues},"lpAddResponse"))if(4==b.readyState)if(200==b.status&&b.responseXML!=null&&b.responseXML.documentElement!=null){b=b.responseXML.documentElement;c=b.getElementsByTagName("error");var e=b.getElementsByTagName("result");
if(c.length>0){c=c[0].getAttribute("msg");c=="blacklisted"&&Ma("ErrorUnsafeSiteMsg")}else if(e.length>0){c=e[0].getAttribute("msg");if(c=="accountupdated"||c=="accountadded"||c=="accountreplaced"){b=parseInt(e[0].getAttribute("accts_version"));if(hd(b,Xa+(c=="accountreplaced"?2:1))){var f=e[0].getAttribute("aid"),g=e[0].getAttribute("urid"),h=e[0].getAttribute("submit_id"),j=e[0].getAttribute("captcha_id");e=e[0].getAttribute("custom_js");if(typeof d!="undefined"){if(typeof d.logins!="undefined")for(var l=
0;l<d.logins.length;l++){d.logins[l].submit_id=h;d.logins[l].captcha_id=j;d.logins[l].custom_js=e}if(typeof d.otherlogins!="undefined")for(l=0;l<d.otherlogins.length;l++){d.otherlogins[l].submit_id=h;d.otherlogins[l].captcha_id=j;d.otherlogins[l].custom_js=e}}e=null;if(c=="accountadded"||c=="accountreplaced"){e=new ub;e.pendingshare=false;e.url=d.url;h=Ua(e.url);e.tld=h;e.name=d.name;e.urid=g;e.id=f;e.manual="0";e.is_http="0";e.extra=d.extra;e.fav=d.fav;e.favico="0";e.autologin=d.autologin;e.basic_auth=
d.basic_auth;e.group=d.group!=""?d.group:LP.get_null_group();e.fiid=f;e.genpw=false;e.isbookmark=d.isbookmark;e.never_autofill=d.never_autofill;LP.SetLastTouch(e);e.sn=d.url=="http://sn"?true:false;e.username=d.username;e.password=d.password;e.unencryptedUsername=d.unencryptedUsername;e.save_all=typeof d.save_all!="undefined"?d.save_all:false;e.pwprotect=d.pwprotect;e.realm=d.realm;e.sharedfromaid="";e.logins=[];e.otherlogins=[];e.fields=[];h=new oc;h.urid=g;h.url=d.url;g=Ra(h.url);h.server=g.host;
h.tld=ob(g.host,h.url);g=Ta(h.url,g);h.submit_id=typeof d.logins!="undefined"&&d.logins.length>0?d.logins[0].submit_id:"";h.captcha_id=typeof d.logins!="undefined"&&d.logins.length>0?d.logins[0].captcha_id:"";h.custom_js=typeof d.logins!="undefined"&&d.logins.length>0?d.logins[0].custom_js:"";h.username=d.username;h.password=d.password;h.openid_url="";h.method="";h.action="";h.unencryptedUsername=d.unencryptedUsername;h.uname="";h.pname="";h.oname="";h.fields=[];j=RegExp(LP.lpgs("ff_captcha_regexp"),
"i");if(typeof d.logins!="undefined"&&d.logins.length>0&&typeof d.logins[0].fields!="undefined"){h.method=d.logins[0].method;h.action=d.logins[0].action;for(var o=false,n=false,p=0;p<d.logins[0].fields.length;p++){var q=d.logins[0].fields[p];if(("email"==q.type||q.type=="text")&&q.name!="openid_url")if(h.username!=""&&q.value==h.username){h.uname=q.name;o=true}else if(!o&&(h.pname==""||h.uname==""))h.uname=q.name;if(q.type=="password")if(h.password!=""&&q.value==h.password){h.pname=q.name;n=true}else if(!n)h.pname=
q.name;if(("email"==q.type||"text"==q.type)&&q.name=="openid_url")h.oname=q.name;if(h.captcha_id==""&&q.type=="text"&&j.exec(q.name))h.captcha_id=q.name;h.fields[h.fields.length]=q}}if(e.save_all&&typeof d.logins!="undefined"&&d.logins.length>0&&typeof d.logins[0].otherfields!="undefined"){h.otherfields=d.logins[0].otherfields;if(h.captcha_id=="")for(p=0;p<h.otherfields.length;p++)if(h.otherfields[p].type=="text"&&j.exec(h.otherfields[p].name)){h.captcha_id=h.otherfields[p].name;break}}else h.otherfields=
[];e.logins[0]=h;if(e.sn)qa[f]=e;else y[f]=e;LP.addAidIdentity(f);id++;Jb[Jb.length]=g}if(c=="accountadded"){h=e.tld;if(typeof sa[h]=="undefined")sa[h]=[];sa[h][f]=true;for(l=0;l<bb.length;l++)if(bb[l].id==f){bb.splice(l,1);break}if(parseInt(e.fav)==1){d=new Vb;d.id=f;d.command={aid:f,manual:e.manual,is_http:e.is_http};bb[bb.length]=d}if(typeof Ha[h]!="undefined"){d=Ha[h];if(typeof Ha[d]!="undefined")for(e=0;e<Ha[d].length;e++){h=Ha[d][e];if(typeof sa[h]=="undefined")sa[h]=[];sa[h][f]=true}}}rb=Xa=
b;e=true;h=vb();if(h==null)e=false;if((c=="accountupdated"||c=="accountreplaced")&&e&&!dc(h,f,false))e=false;if(e&&!kc(h,typeof y[f]!="undefined"?y[f]:qa[f],c=="accountadded"?true:false))e=false;if(c=="accountadded"&&e&&typeof y[f]!="undefined")for(l in y)if(y[l].genpw&&y[l].tld==y[f].tld&&K(y[l].password)==K(y[f].password))dc(h,y[l].id,true)||(e=false);if(e&&!vc(h,b))e=false;if(e&&!Ab(h,null,"lpAddResponse"))e=false;e?Bb():LP.lpGetAccounts()}else LP.lpGetAccounts();jc();LP.lpGetCurrentWindow().setTimeout('LP.saveGroupState(null,"lpAddResponse");',
500)}else if(c=="not logged in"){Ia();Ma("ErrorSessionMsg",false,true)}}else{l=b.getElementsByTagName("ok");if(l.length>0){b=parseInt(l[0].getAttribute("accts_version"));if(hd(b,Xa+1)){g=l[0].getAttribute("urid");if(d.logins[0].fields.length>0&&d.logins[0].urid==0)d.urid=d.logins[0].urid=g;else if(d.otherlogins.length>0&&d.otherlogins[d.otherlogins.length-1].urid==0)d.otherlogins[d.otherlogins.length-1].urid=g;rb=Xa=b;e=true;h=vb();if(h==null)e=false;if(e&&!dc(h,d.id,false))e=false;if(e&&!kc(h,d,
false))e=false;if(e&&!vc(h,b))e=false;if(e&&!Ab(h,null,"lpAddResponse"))e=false;e?Bb():LP.lpGetAccounts()}else LP.lpGetAccounts()}else LP.lpGetAccounts();jc()}}else{c="Problem in lpAddResponse. status="+b.status;U(c,null);Ma("ErrorAddAcctMsg")}}function Pi(b,c,d){if(4==b.readyState)if(200==b.status&&b.responseXML!=null&&b.responseXML.documentElement!=null){var e=b.responseXML.documentElement.getElementsByTagName("result");if(e.length>0){b=e[0].getAttribute("msg");if(b=="ffadded"||b=="ffupdated"||
b=="ffdeleted"){c=parseInt(e[0].getAttribute("accts_version"));if(hd(c,Xa+1)){var f=e[0].getAttribute("ffid"),g=e[0].getAttribute("cfids");if(b=="ffadded"){if(b=="ffupdated"||b=="ffdeleted")for(e=0;e<fa.length;e++)if(fa[e].ffid==f){fa.splice(e,1);break}if(b=="ffadded"||b=="ffupdated"){d.ffid=f;fa[fa.length]=d;fa.sort(Hf)}LP.addFfidIdentity(f)}if(b=="ffadded"||b=="ffupdated")if(g!=""){g=g.split(",");var h=0;for(e=0;e<d.customfields.length&&h<g.length;e++)if(d.customfields[e].cfid==0)d.customfields[e].cfid=
g[h++]}rb=Xa=c;e=true;g=vb();if(g==null)e=false;if(b=="ffupdated"||b=="ffdeleted")if(e&&!Qi(g,f,b=="ffdeleted"))e=false;if(b=="ffadded"||b=="ffupdated")if(e&&!Ri(g,d,b=="ffadded"))e=false;if(e&&!vc(g,c))e=false;if(e&&!Ab(g,null,"lpFormFillResponse"))e=false;e?Bb():LP.lpGetAccounts()}else LP.lpGetAccounts();jc()}}}else{b="Problem in lpFormFillResponse. status="+b.status;U(b,null);Ma("ErrorSendingMsg")}}function If(){if(!Cc){for(var b=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator(""),
c=0;b.hasMoreElements()&&!c;){var d=b.getNext();if(typeof d.getBrowser=="function"){d=d.getBrowser();if(null!=d){d=d.browsers;for(var e=0;d&&e<d.length;e++)if(typeof d[e].currentURI.spec!="undefined"&&d[e].currentURI.spec.indexOf("chrome://lastpass/content/home.xul")==0){c=1;break}}}}c||Zb("chrome://lastpass/content/home.xul")}}function jc(){var b=(new Date).getTime();if(!(Zg!=null&&b<Zg+2E3))if($g!=null&&b<$g+1E4)$g=null;else{Zg=b;for(b=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");b.hasMoreElements();){var c=
b.getNext();if(typeof c.getBrowser=="function"){c=c.getBrowser();if(null!=c){c=c.browsers;for(var d=0;c&&d<c.length;d++)if(typeof c[d]!="undefined"&&ic(c[d].currentURI.spec,null,c[d].currentURI.asciiHost)&&c[d].currentURI.spec.indexOf("lpnorefresh=1")==-1){var e=Components.interfaces.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY|Components.interfaces.nsIWebNavigation.LOAD_FLAGS_BYPASS_PROXY|Components.interfaces.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE,f=c[d].webNavigation.sessionHistory.getEntryAtIndex(c[d].webNavigation.sessionHistory.index,
false).QueryInterface(Components.interfaces.nsISHEntry).referrerURI;try{var g=c[d].webNavigation.currentURI.spec;g=g.replace("&nk=1","");c[d].webNavigation.loadURI(g,e,f,null,null)}catch(h){U("Error in lprefreshwindows:"+h+" ln: "+h.lineNumber,null)}}}}}}}function Zb(b,c,d){var e=LP.lpGetPageOpenSetting(""),f=LP.lpGetPageOpenSetting("same");if(c)f=false;if(ge)f=false;if(e){if(f)LP.mostRecent().getBrowser().selectedTab=LP.mostRecent().loadURI(b);else if(LP.isFennec)LP.mostRecent().getBrowser().selectedTab=
LP.fennecBrowser.addTab(b);else LP.mostRecent().getBrowser().selectedTab=LP.mostRecent().getBrowser().addTab(b);if(d){b=LP.mostRecent().getBrowser().getBrowserForTab(LP.mostRecent().getBrowser().selectedTab);if(typeof b!="undefined")b.loginAid=d}}else{fl++;LP.lpGetCurrentWindow().open(b).focus()}}function td(b,c){var d=Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("ProfD",Components.interfaces.nsIFile);try{if(LP.lpis_win&&!ud()){var e=
Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("LocalAppData",Components.interfaces.nsIFile);if(e.isDirectory()&&e.exists()){var f=e.clone();if(f.path.indexOf("\\Local")==f.path.length-6){f=f.parent;f.append("LocalLow");if(f.isDirectory()&&f.exists())e=f.clone();else f=e.clone()}else f=e.clone();f.append("LastPass");if(!f.exists()||!f.isDirectory())f.create(Components.interfaces.nsIFile.DIRECTORY_TYPE,511);e=f.clone();f.append(b);if(!f.exists()&&
c){var g=d.clone();g.append(b);g.exists()&&g.moveTo(e,b)}return e}}else if((LP.lpis_mac||LP.lpis_linux)&&!ud()){var h=Si();if(h!=null)if(h&&h!=""){var j=Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);j.initWithPath(h);if(!j.exists()||!j.isDirectory())j.create(Components.interfaces.nsIFile.DIRECTORY_TYPE,511);if(j.isDirectory()&&j.exists()){f=j.clone();e=f.clone();f.append(b);if(!f.exists()&&c){g=d.clone();g.append(b);g.exists()&&g.moveTo(e,b)}return e}}}}catch(l){U("Error in lpGetFileDir:"+
l+" ln: "+l.lineNumber,null)}return d}function Yb(b,c,d){if(xa&&b.indexOf("LPIS")!=0&&b!="rfdefaults"&&b!="singlefactortype")b="local_"+b;if(Vg)if(b.indexOf("_lpall.slps")>=0||b.indexOf("_lps.act.sxml")>=0||b.indexOf("_lp.act.xml")>=0||b.indexOf("_ff.sotp")>=0)return;c.length>20&&c.substring(0,20);try{var e=null;if(d==null){e=td(b,false);e.append(b)}else e=d;if(LP.lpis_mac&&xa&&b.length>=3&&(b.substring(b.length-3)=="lps"||b.substring(b.length-3)=="xml"||b.substring(b.length-3)=="cac")&&Aa()&&typeof ba.write_file==
"function")ba.write_file(e.path,c);else{var f=Components.classes["@mozilla.org/network/safe-file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);f.init(e,42,384,0);f.write(c,c.length);f instanceof Components.interfaces.nsISafeOutputStream?f.finish():f.close()}}catch(g){U("lpWriteFile : "+b+" "+g+" ln: "+g.lineNumber)}}function ib(b,c){try{if(xa&&b.indexOf("LPIS")!=0&&b!="rfdefaults"&&b!="singlefactortype")b="local_"+b;var d;if(typeof c=="undefined"||!c){d=td(b);d.append(b)}else{d=
Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);d.initWithPath(b)}if(!d.exists())return false;if(LP.lpis_mac&&xa&&b.length>=3&&(b.substring(b.length-3)=="lps"||b.substring(b.length-3)=="xml"||b.substring(b.length-3)=="cac")&&Aa()&&typeof ba.read_file=="function")return ba.read_file(d.path);else{var e=Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);e.init(d,-1,-1,false);var f=
Components.classes["@mozilla.org/binaryinputstream;1"].createInstance(Components.interfaces.nsIBinaryInputStream);f.setInputStream(e);var g=f.readBytes(f.available());e.close();return g}}catch(h){U("lpReadFile : "+b+" "+h+" ln: "+h.lineNumber);return false}}function Wa(b){if(xa&&b.indexOf("LPIS")!=0&&b!="rfdefaults"&&b!="singlefactortype")b="local_"+b;if(!(xa&&b.match(/(lps|xml|cac)$/)))try{var c=Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("ProfD",
Components.interfaces.nsIFile);c.append(b);c.exists()&&c.remove(false);var d=td(b,false);d.append(b);d.exists()&&d.remove(false)}catch(e){}}function Ae(b){if(!(xa&&b.match(/(lps|xml)$/)))for(var c=td("",false).directoryEntries;c.hasMoreElements();){var d=c.getNext();d.QueryInterface(Components.interfaces.nsIFile);d.isFile()&&d.leafName.toLowerCase().indexOf(b.toLowerCase())==d.leafName.length-b.length&&d.remove(false)}}function yb(b){try{var c=Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("ProfD",
Components.interfaces.nsIFile),d=td(b,false);c.append(b);d.append(b);return c.exists()||d.exists()}catch(e){}return false}function he(b,c){try{var d=Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("ProfD",Components.interfaces.nsIFile);if(LP.lpis_win&&!ud()){var e=Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("LocalAppData",Components.interfaces.nsIFile);if(e.isDirectory()&&
e.exists()){var f=e.clone();if(f.path.indexOf("\\Local")==f.path.length-6){f=f.parent;f.append("LocalLow");if(f.isDirectory()&&f.exists())e=f.clone();else f=e.clone()}else f=e.clone();f.append("LastPass");if(!f.exists()||!f.isDirectory())f.create(Components.interfaces.nsIFile.DIRECTORY_TYPE,511);e=f.clone();d=e.clone()}}else if((LP.lpis_mac||LP.lpis_linux)&&!ud()){var g=Si();if(g!=null)if(g&&g!=""){var h=Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
h.initWithPath(g);if(!h.exists()||!h.isDirectory())h.create(Components.interfaces.nsIFile.DIRECTORY_TYPE,511);if(h.isDirectory()&&h.exists())d=h.clone()}}d.append(b);d.exists()&&d.moveTo(null,c)}catch(j){}}function ah(b){if(!Wg){Wg=true;b?LP.lplogincheck("frompipes"):LP.httptest()}}function gl(){var b=ib("prefs_lp.txt");if(b){b=b.split("\r\n");for(var c=0;c<b.length;c++){var d=b[c],e=d.indexOf("=");if(e!=-1){var f=d.substring(0,e);e=d.substring(e+1);if(e=="true"||e=="false")LP.lpmainprefs.setBoolPref(f,
e=="true"?true:false);else if(e.match(/^\d+$/))LP.lpmainprefs.setIntPref(f,e);else(e=e.match(/^\"(.*)\"$/))?LP.lpmainprefs.setCharPref(f,e[1]):U("unknown pref type: "+d)}}LP.flush_prefs();Wa("prefs_lp.txt")}}function hl(b){for(var c=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");c.hasMoreElements();){var d=c.getNext();if(d!=this)if(d.document!=b)if(typeof d.LP!="undefined")return true}return false}function Bb(b){try{Wa(Z+
"_lp.act.xml");Wa(Z+"_lps.act.xml");Aa()&&Wa(ia+"_lp.act.xml");var c=vb(ia,true,false);if(c){var d=Components.classes["@mozilla.org/xmlextras/domparser;1"].createInstance(Components.interfaces.nsIDOMParser),e,f;if(c.substring(0,4)=="LPAV"){e=null;f=parseInt(bh(c))}else{e=d.parseFromString(c,"text/xml");if(!e){LP.lpGetAccounts();return}var g=e.documentElement.getElementsByTagName("accounts");f=-1;if(g.length>0)f=parseInt(g[0].getAttribute("accts_version"))}if(hd(f,rb)||rb==-1){d=[];d.responseXML=e;
d.responseText=c;d.readyState=4;d.status=0;if(typeof b=="undefined")b=false;LP.lpPopulateAccounts(d,true,true,b)}!hd(Xa,rb)&&rb!=-1&&LP.lpGetAccounts()}else LP.lpGetAccounts()}catch(h){U("lpGetAccountsLocal : "+h+" ln: "+h.lineNumber);LP.lpGetAccounts()}}function Ti(b,c){if(b.getAttribute("id").indexOf("_favorites_menu")==0)return-1;if(c.getAttribute("id").indexOf("_favorites_menu")==0)return 1;b=b.getAttribute("label").toLowerCase();c=c.getAttribute("label").toLowerCase();return b<c?-1:1}function Ui(b){if(!(!b||
typeof b.getAttribute=="undefined")){Dc=b.getAttribute("login_site_prompt")=="1"?true:false;jd=b.getAttribute("edit_site_prompt")=="1"?true:false;ie=b.getAttribute("edit_sn_prompt")=="1"?true:false;je=b.getAttribute("view_pw_prompt")=="1"?true:false;Ld=b.getAttribute("view_ff_prompt")=="1"?true:false;Jf=b.getAttribute("improve")=="1"?true:false;Kf=b.getAttribute("switch_identity_prompt")=="1"?true:false;Lf=b.getAttribute("multifactor_reprompt")=="1"?true:false;ch=b.getAttribute("generatedpw")=="1"?
true:false}}function Hf(b,c){return b.profilename.toLowerCase()<c.profilename.toLowerCase()?-1:1}function Vi(b,c){return b.iname.toLowerCase()<c.iname.toLowerCase()?-1:1}function Wi(b,c){return parseInt(b.ordernum)<parseInt(c.ordernum)?-1:1}function Di(b){if(typeof y[b]!="undefined"){if(dh&&parseInt(y[b].autologin)==1)if(cb()-y[b].last_touch>Xi){LP.SetLastTouch(y[b]);return true}return false}}function eh(b){if(!Pe||!Pe.privateBrowsingEnabled)if(y[b])if(!(cb()-y[b].last_touch<5)){vd&&LP.lpMakeRequest(LP.lp_base+
"loglogin.php","id="+LP.en(b)+"&method=ff",null);LP.SetLastTouch(y[b]);var c=ib(ia+"_lt.cac"),d="";if(c!=false){c=c.split("\n");for(var e=0;e<c.length;e++)if(c[e].indexOf(b+" ")!=0&&c[e]!="")d+=c[e]+"\n"}d+=b+" "+y[b].last_touch+"\n";Yb(ia+"_lt.cac",d)}}function il(b){if(b)if(b.readyState==4&&b.status==200)if(b.responseXML){if(b=b.responseXML.documentElement){b=b.getElementsByTagName("login");if(b.length!=0){for(var c=b[0].getAttribute("url"),d=0;d<b.length;d++){for(var e=b[d].getAttribute("aid"),
f=b[d].getAttribute("url"),g=b[d].getAttribute("submit_id"),h=b[d].getAttribute("captcha_id"),j=b[d].getAttribute("custom_js"),l=b[d].getAttribute("u"),o=b[d].getAttribute("p"),n=b[d].getAttribute("o"),p=0;p<wa.length;p++)if(f==wa[p].url)break;wa[p]=[];wa[p].aid=e;wa[p].multi=d<b.length-1?true:false;wa[p].secondary=d>0?true:false;wa[p].url=f;wa[p].submit_id=g;wa[p].captcha_id=h;wa[p].custom_js=j;wa[p].u=l;wa[p].p=o;wa[p].o=n;wa[p].uname="";wa[p].pname="";wa[p].oname="";wa[p].login=b[d];wa[p].create_time=
cb();wa[p].onlyfill=false;wa[p].fields=[];e=b[d].getElementsByTagName("field");f=false;for(g=0;g<e.length;g++){l=e[g].getAttribute("type");h=e[g].getAttribute("name");j=e[g].getAttribute("value");if(("text"==l||"email"==l)&&h!="openid_url")if(wa[p].u!=""&&j==wa[p].u){wa[p].uname=h;f=true}else if(!f&&(wa[p].pname==""||wa[p].uname==""))wa[p].uname=h;if(l=="password")wa[p].pname=h;if(("text"==l||"email"==l)&&h=="openid_url")wa[p].oname=h;if(l=="radio"||l=="checkbox"){l=e[g].getAttribute("checked");if(!l||
parseInt(l)!=1)continue}wa[p].fields[h]=j}}Zb(c)}}}else{U("Invalid response from server="+b.status+" text= "+b.responseText,null);Ma("ErrorServerMsg")}}function jl(b){try{for(var c=b.target.parentNode,d=c.childNodes.length,e=0;e<d;e++)c.childNodes[e].setAttribute("style","-moz-appearance:none !important;background-color: white !important;");b.target.setAttribute("style","-moz-appearance:none !important;background-color: #FAFAD2 !important;")}catch(f){}}function Ob(b,c,d,e,f,g,h,j,l,o){if(e!="change")b=
LP.lpgs(b);var n=true;if(e!="error"&&!Cf)n=false;try{if(typeof LP.getBrowser!="function"||typeof LP.getBrowser().getNotificationBox!="function")return}catch(p){return}var q=c?LP.getBrowser().getNotificationBox(c):LP.getBrowser().getNotificationBox(),r=LP.mostRecent().document;e||(e="autologin");var u=[],t=[];if(e=="login"){if(!n)return;if(!Cf)return;if(!Yi)return;if(LP.NO_LOGIN_NOTIFICATION_UNTIL_LOGIN&&!LP.lpprefsHasUserValue("ffhasloggedinsuccessfully",false))return;u.push({label:LP.lpgs("LastPassMasterLogin"),
accessKey:null,popup:null,callback:Zi});t[t.length]=LP.lpgs("TTLogin");u.push({label:LP.lpgs("NeverAskAgain"),accessKey:null,popup:null,callback:kl});t[t.length]=LP.lpgs("TTNeverAskAgain")}else if(e=="change"){u.push({label:LP.lpgs("Confirm"),accessKey:null,popup:null,callback:ll});t[t.length]=LP.lpgs("TTChange");if(typeof Ja[f.key]!="undefined"&&Ja[f.key]!=null){u.push({label:LP.lpgs("Save New Site"),accessKey:null,popup:null,callback:$i});t[t.length]=LP.lpgs("TTAdd")}}else if(e=="captcha"){if(!n)return}else if(e==
"offline"){if(xa)return}else if(e=="addconfirm"){u.push({label:LP.lpgs("SaveSite"),accessKey:null,popup:null,callback:$i});t[t.length]=LP.lpgs("TTAdd");n=Mf(0,r,f);u.push({label:LP.lpgs("Never For This ..."),accessKey:null,popup:n,callback:null});t[t.length]=LP.lpgs("TTNever");u.push({label:LP.lpgs("NotThisLogin"),accessKey:null,popup:null,callback:ml});t[t.length]=LP.lpgs("TTNotThisLogin")}else if(e=="addformfill"){u.push({label:LP.lpgs("AddProfile"),accessKey:null,popup:null,callback:nl});t[t.length]=
LP.lpgs("TTAddFormFill");u.push({label:LP.lpgs("NeverAskAgain"),accessKey:null,popup:null,callback:ol});t[t.length]=""}else if(e=="generate"){if(!n||!ga)return;if(h){c.contentDocument.ffidindex=-1;var C,A;n=LP.lpgs("FillForm")+" ("+fa.length+")";if(fh&&aj()){C=null;A=function(){LP.choose_profile_and_credit_card();return true}}else{C=bj(null,r);A=null}u.push({label:n,accessKey:null,popup:C,callback:A});t[t.length]=LP.lpgs("TTFillForm")}if(j&&d.length>0){n=LP.lpgs("Fill Current");if(d.length>1){n+=
" ("+d.length+")";C={};var J={};A=cj(d,false,C,J,r,true);C=A[0];A=null}else{C=null;A=pl}u.push({label:n,accessKey:null,popup:C,callback:A});t[t.length]=LP.lpgs("TTFillCurrent")}u.push({label:LP.lpgs("Generate"),accessKey:null,popup:null,callback:ql});t[t.length]=LP.lpgs("TTGenerate");n=Mf(1,r,f);u.push({label:LP.lpgs("Never For This ..."),accessKey:null,popup:n,callback:null});t[t.length]=LP.lpgs("TTNeverForThisSite")}else if(e=="error"){if(f.feedback){u.push({label:LP.lpgs("Feedback"),accessKey:null,
popup:null,callback:rl});t[t.length]=LP.lpgs("TTFeedback")}else if(f.login){u.push({label:LP.lpgs("TryAgain"),accessKey:null,popup:null,callback:Zi});t[t.length]=LP.lpgs("TTTryAgain")}if(f.createaccount&&!Nf){u.push({label:LP.lpgs("Create Account"),accessKey:null,popup:null,callback:LP.OpenCreateAccount});t[t.length]=LP.lpgs("TTCreateAccount")}if(f.multifactor_disable_url){u.push({label:LP.lpgs("Disable Multifactor Authentication"),accessKey:null,popup:null,callback:function(){LP.lpbaseopen(f.multifactor_disable_url)}});
t[t.length]=LP.lpgs("TTDisableMultifactorAuthentication")}}else if(e=="formfill"){if(!n||!ga)return;c.contentDocument.ffidindex=-1;n=LP.lpgs("FillForm")+" ("+fa.length+")";if(fh&&aj()){C=null;A=LP.choose_profile_and_credit_card}else{C=bj(null,r);A=null}u.push({label:n,accessKey:null,popup:C,callback:A});t[t.length]=LP.lpgs("TTFillForm");n=Mf(2,r,f);u.push({label:LP.lpgs("Never For This ..."),accessKey:null,popup:n,callback:null});t[t.length]=LP.lpgs("TTNeverForThisSite2")}else if(typeof d!="object"||
d.length==1||d.length>1){C={};J={};A=cj(d,!f,C,J,r);if(!f){var D=null;if(A!=null&&A[1]==null)for(n=0;n<d.length;n++){if(!d[n].onlyfill){var B=n;D=function(z){Of(d[B],z)}}}else if(d.length<=1)D=function(z){Of(d,z)};n=J.value>1?" ("+J.value+")":"";u.push({label:LP.lpgs("AutoLogin")+n,accessKey:null,popup:A!=null?A[1]:null,callback:D});t[t.length]=LP.lpgs("TTAutoLogin")}if(!h||d.length>1){n=C.value>1?" ("+C.value+")":"";u.push({label:LP.lpgs("AutoFill")+n,accessKey:null,popup:A!=null?A[0]:null,callback:d.length>
1?null:function(z){Of(d,z,true)}});t[t.length]=LP.lpgs("TTAutoFill")}n=Mf(3,r,f,h);u.push({label:LP.lpgs("Never ..."),accessKey:null,popup:n,callback:null});t[t.length]=LP.lpgs("TTNever2")}if(!(q.getNotificationWithValue("lp_notificationAction"+e)&&!l&&!o)){if(e!="captcha"&&!l)for(;q.currentNotification;)q.removeCurrentNotification();g=!g||g==0?q.PRIORITY_WARNING_MEDIUM:q.PRIORITY_CRITICAL_LOW;if(l){if((b=q.currentNotification)&&(typeof b.lock=="undefined"||b.lock==false)){b.lock=true;o=b.getElementsByTagName("button");
for(n=o.length-1;n>=0;n--)b.removeChild(o[n]);for(n=0;n<u.length;n++){o=r.createElement("button");o.setAttribute("label",u[n].label);o.setAttribute("popup",u[n].popup);o.tooltipText=t[n];if(u[n].callback!=null)if(u[n].label.indexOf(Hb("AutoLogin"))==0)o.setAttribute("oncommand","LP.lp_noteAcceptPre(null);");else if(u[n].label.indexOf(Hb("AutoFill"))==0)o.setAttribute("oncommand","LP.lp_noteAcceptPre(true);");else u[n].label.indexOf(Hb("NeverAutoFill"))==0&&o.setAttribute("oncommand","LP.lp_noteAcceptNeverPre();");
b.appendChild(o)}b.lock=false}}else{gh&&LP.patchNotificationBox(q,"bottom");b=q.appendNotification(b,"lp_notificationAction"+e,"chrome://lastpass/skin/icon.gif",g,u)}if(e=="addconfirm"||e=="change"||e=="addformfill")b.persistence=1;if(g&&g!=0)b.style.color="#000";if(e=="addconfirm"||e==="addformfill")if(!LP.lpis_mac)b.style.backgroundColor="#87d087";b.aid=d;b.browser=c;b.extra=f;b.extra2=h;b.extra3=j;b.nb=q;b.choices=e;if(!l){o=b.getElementsByTagName("button");if(o.length==t.length)for(n=0;n<o.length;n++)o.item(n).tooltipText=
t[n];else U("#Tooltips!=#Buttons: "+e+" "+o.length+" vs "+t.length)}b.addEventListener("command",sl,true)}}function Mf(b,c,d,e){var f=null,g=c.getElementById("mainPopupSet");f=c.createElement("popup");var h=Pf("popup");f.setAttribute("id",h);g.appendChild(f);g="";if(typeof d=="object"&&typeof d.key=="string")g=d.key;var j="";if(typeof d=="object"&&typeof d.tld=="string")j=d.tld;var l="";if(typeof d=="object"&&typeof d.currenturl!="undefined")l=d.currenturl;if(e){d=c.createElement("menuitem");d.setAttribute("label",
LP.lpgs("NeverAutoFill"));d.setAttribute("oncommand","LP.never_helper(null, null, null, null, null, '"+e+"');");f.appendChild(d)}d=c.createElement("menuitem");d.setAttribute("label",LP.lpgs("NeverForThisSite"));d.setAttribute("oncommand","LP.never_helper("+b+", false, '"+cd(g)+"', '"+cd(j)+"', '"+cd(l)+"');");f.appendChild(d);c=c.createElement("menuitem");c.setAttribute("label",LP.lpgs("Never For This Domain"));c.setAttribute("oncommand","LP.never_helper("+b+", true, '"+cd(g)+"', '"+cd(j)+"', '"+
cd(l)+"');");f.appendChild(c);return h}function cj(b,c,d,e,f,g){var h=[],j=null,l=null,o=f.getElementById("mainPopupSet");j=f.createElement("popup");h[0]=Pf("popup");j.setAttribute("id",h[0]);o.appendChild(j);if(c){l=f.createElement("popup");h[1]=Pf("popup");l.setAttribute("id",h[1]);o.appendChild(l)}for(var n=o=0;n<b.length;n++){var p=y[b[n].id];if(typeof p!="undefined"){p=ke(p);if(c&&!b[n].onlyfill){var q=f.createElement("menuitem");q.setAttribute("label",p);q.setAttribute("oncommand","LP.lp_noteAcceptHelper('"+
b[n].id+"',null,false);");l.appendChild(q);o++}q=f.createElement("menuitem");q.setAttribute("label",p);g?q.setAttribute("oncommand","LP.fill_current('"+b[n].id+"');"):q.setAttribute("oncommand","LP.lp_noteAcceptHelper('"+b[n].id+"',null,true);");if(!g){n==0&&q.setAttribute("key","lpt_key_lpPrevAutoFill");n==b.length-1&&q.setAttribute("key","lpt_key_lpNextAutoFill")}j.appendChild(q)}}if(b.length<=1)h[0]=null;if(o<=1)h[1]=null;d.value=h[0]&&j.hasChildNodes()?j.childNodes.length:0;e.value=h[1]&&l.hasChildNodes()?
l.childNodes.length:0;return h}function bj(b,c){var d=LP.lpprefsHasUserValue("defaultffid")?LP.lpprefsGetCharPref("defaultffid"):"0",e=c.getElementById("mainPopupSet"),f=c.createElement("popup"),g=Pf("popup");f.setAttribute("id",g);e.appendChild(f);for(var h=e=false,j=0;j<fa.length;j++){var l=fa[j];if(l.profiletype==0)e=true;if(l.ccnum!="")h=true;var o=c.createElement("menuitem");o.setAttribute("label",l.profilename);if(b)o.setAttribute("oncommand","LP.lp_generatePasswordAndFillFormsHelper("+l.ffid+
");");else{o.setAttribute("oncommand","LP.lp_fillFormsHelper("+l.ffid+");");l.ffid==d&&o.setAttribute("key","lpt_key_lpdefaultffid")}j==0&&o.setAttribute("key","lpt_key_lpPrevAutoFill");j==fa.length-1&&o.setAttribute("key","lpt_key_lpNextAutoFill");f.appendChild(o)}o=c.createElement("menuseparator");f.appendChild(o);o=c.createElement("menuitem");o.setAttribute("label",LP.lpgs("AddProfile"));o.setAttribute("oncommand","LP.lpEditFormFillProfile(0);");f.appendChild(o);o=c.createElement("menuitem");o.setAttribute("label",
LP.lpgs("Add Credit Card"));o.setAttribute("oncommand","LP.lpEditFormFillProfile(0, false, 1);");f.appendChild(o);o=c.createElement("menuitem");o.setAttribute("label",LP.lpgs("Clear Forms"));o.setAttribute("oncommand","LP.lpClearFormsHelper();");f.appendChild(o);if(e&&h){o=c.createElement("menuitem");o.setAttribute("label",LP.lpgs("Choose Profile and Credit Card"));o.setAttribute("oncommand","LP.choose_profile_and_credit_card();");f.appendChild(o)}return g}function Pf(b){for(var c=b+wd(1,1E4);LP.mostRecent().document.getElementById(c)!=
null;)c=b+wd(1,1E4);return c}function kl(){LP.lpprefsSetBoolPref("showLoginNotifications",false,false);LP.flush_prefs()}function rl(){LP.lpOpenPrefs("Feedback")}function ll(b){if(typeof b.extra.matchingaccts!="undefined")LP.lpGetCurrentWindow().openDialog(eb+"content/changepw.xul","_blank","chrome,titlebar,toolbar,centerscreen,modal",b.extra.matchingaccts,b.extra.password,"0",b.extra.tld);else y[b.extra.id]&&K(y[b.extra.id].password)==b.extra.password||dj(b.extra.username,b.extra.password,b.extra.id)}
function pl(b){LP.fill_current(b.aid[0].id);return true}function ql(b){LP.lpGetCurrentWindow().setTimeout(function(){LP.lpOpenGenPWWindow(b)},0);return b.extra2||b.extra3&&b.aid.length>0}function $i(b){var c=b.extra;if(typeof c.saveall!="undefined"&&c.saveall)LP.lpOpenEditWindow(0,false,false,null,true,c.postdata,c.fi);else{var d=c.key;c=c.tld;win=LP.lpGetCurrentWindow().openDialog(eb+"content/addconfirm.xul","_blank","chrome,titlebar,toolbar,centerscreen,modal",c,"",d,Ja[d].username,Ja[d].encryptedPassword,
le(Ja[d].url));Nc(b.browser,b.browser.contentDocument,false)}}function tl(b,c,d){c=b.extra;if(!(typeof c.saveall!="undefined"&&c.saveall)){var e=c.key,f=c.tld;if(e==""){c=typeof c.currenturl!="undefined"?c.currenturl:LP.lpgetcurrenturl(b.browser);var g;if(d){f=Ua(c);g="url="+LP.en(Ka(f));Pb[Pb.length]=f}else{d=Ta(c);g="url="+LP.en(Ka(d));Pb[Pb.length]=d}LP.lpGetCurrentWindow().setTimeout(function(){Oe(g)},100)}else{Ki(e,d);Qf(e,f)}Nc(b.browser,b.browser.contentDocument,false)}}function ml(b){var c=
b.extra;if(!(typeof c.saveall!="undefined"&&c.saveall)){Qf(c.key,c.tld);Nc(b.browser,b.browser.contentDocument,false)}}function nl(b){b=ej(b.extra);LP.lpGetCurrentWindow().openDialog(eb+"content/formfill.xul","_blank","resizable=yes,chrome,titlebar,toolbar,centerscreen,modal",-1,1,0,b)}function ol(){hh=false;LP.lpprefsSetBoolPref("capturenewformfill",false,true);LP.flush_prefs()}function Qf(b,c){if(Ja[b]!=null){var d=Ja[b].username,e=Ja[b].encryptedPassword,f=new Ik;f.username=d;f.encryptedPassword=
e;f.tld=c;f.rejectedTime=cb();od[od.length]=f;Ja[b]=null;bc=[]}}function ul(b){if(b)if(ga)if(b.readyState==4)if(b.status==200&&b.responseXML!=null&&b.responseXML.documentElement!=null){b=b.responseXML.documentElement;var c=b.getElementsByTagName("error");if(c.length>0){c=c[0].getAttribute("notloggedin");if(parseInt(c)==1){Ia();return}}var d=b.getElementsByTagName("ok");if(d.length>0){c=ih(d[0].getAttribute("url"));b=d[0].getAttribute("password");var e=K(b),f=d[0].getAttribute("nofill");if(!xd[c]){var g,
h,j;if(typeof LP!="undefined"){g=LP.getBrowser().selectedTab.linkedBrowser;h=g.contentDocument;j=null}else{g=null;h=document;j=window}xd[c]=be(g,h,true,j)}if(xd[c]){form=xd[c];h=Md[c]?Md[c]:fj(form);g=f=null;for(var l=1;l<=2;l++){j=false;f=g=null;var o=-1;if(l==1){if(h)for(var n=0;n<form.elements.length;n++)if(form.elements[n]==h){o=n+1;break}}else o=0;if(o!=-1){for(n=o;n<form.elements.length;n++){o=form.elements[n];if(o.type=="password"){if(!(!j&&f&&g)){g=f;f=o;if(j&&f&&g)break}j=true}else j=false}if(f&&
g)break}}if(f&&g){if((g.value!=""||g==h)&&f.value==""&&n<form.elements.length-1)for(n+=1;n<form.elements.length;n++){o=form.elements[n];if(o.type=="password"&&o.value==""){g=f;f=o;break}else if(o.type!="hidden")break}f.value=g.value=e;cc(f);cc(g);if(typeof LP!="undefined"){n={};n.target=f;LP.lpfieldchange(n);n.target=g;LP.lpfieldchange(n)}}else U("Couldn't find password fields after generating. form:"+form,null)}else f=="0"&&U("Could not find lpgenpassforms when generating pw",null);n=parseInt(d[0].getAttribute("accts_version"));
if(hd(n,Xa+1)){e=d[0].getAttribute("aid");d=new ub;d.pendingshare=false;d.url=c;f=Ua(d.url);d.tld=f;d.name=LP.lpgs("Generated Password for")+" "+d.tld;d.urid="0";d.id=e;d.manual="0";d.is_http="0";d.extra="";d.fav="0";d.favico="0";d.autologin="0";d.basic_auth=false;d.group=LP.get_null_group();d.fiid=e;d.genpw=true;d.isbookmark=false;d.never_autofill="0";LP.SetLastTouch(d);d.sn=false;d.username="";d.password=b;d.unencryptedUsername="";d.save_all=false;d.realm="";d.sharedfromaid="";d.logins=[];d.otherlogins=
[];d.fields=[];g=new oc;g.urid="0";g.url=c;c=Ra(g.url);g.server=c.host;g.tld=ob(c.host,g.url);Ta(g.url,c);g.submit_id="";g.captcha_id="";g.custom_js="";g.username="";g.password=b;g.openid_url="";g.method="";g.action="";g.unencryptedUsername="";g.uname="";g.pname="";g.oname="";g.fields=[];g.otherfields=[];d.logins[0]=g;y[e]=d;id++;if(typeof sa[f]=="undefined")sa[f]=[];sa[f][e]=true;LP.addAidIdentity(e);Nd[e]=true;if(typeof Ha[f]!="undefined"){b=Ha[f];if(typeof Ha[b]!="undefined")for(c=0;c<Ha[b].length;c++){f=
Ha[b][c];if(typeof sa[f]=="undefined")sa[f]=[];sa[f][e]=true}}rb=Xa=n;b=true;c=vb();if(c==null)b=false;if(b&&!kc(c,d,true))b=false;if(b&&!vc(c,n))b=false;if(b&&!Ab(c,null,"lpPopulateGeneratedPassword"))b=false;b?Bb():LP.lpGetAccounts()}else LP.lpGetAccounts();jc()}}else{U("Problem with save gen pw response. status="+b.status+" text= "+b.responseText,null);Ma("ErrorSaveGenPwMsg")}}function Of(b,c,d){if(typeof b=="object"&&b.length>=1)b=b[0];if(typeof d=="undefined"||d==null)d=c.extra;LP.lp_noteAcceptHelper(b.id,
c.browser,d)}function gj(b){var c="aid="+LP.en(b.extra2);LP.lpMakeRequest(LP.lp_base+"set_never_autofill.php",c,null);y[b.extra2].never_autofill="1";y[b.extra2].autologin="0";(c=vb())&&dc(c,b.extra2,false)&&kc(c,y[b.extra2],false)&&Ne(c)&&Ab(c,null,"lp_noteAcceptNever")&&Bb()}function sl(){LP.getBrowser().contentDocument.LPlpshowednote=2}function U(b){if(Jf!=false){jh++;if(!(jh>100)){var c=b.match(/^(.*)location:\s+/);if(c)b=c[1];c="msg=ff("+LP.lp_getFFVersion()+") lp("+Wb+") errors("+jh+"): "+LP.en(b);
var d=cb();c+="&secsrunning="+LP.en(d-vl);b.match(/NS_ERROR_NOT_INITIALIZED/)||b.indexOf("this.docShell is null")!=-1||b.indexOf("this._closedNotification.parentNode is null")!=-1||b.indexOf("browsers[i] is undefined")!=-1||LP.lpMakeRequest(LP.lp_base+"error.php",c,null)}}}function hj(b){if(b.getElementById("debug-btn")){b.getElementById("debug-btn").label=LP.lpgs(ae?"DisableDebug":"EnableDebug");b.getElementById("debug-btn").setAttribute("checked",ae?"true":"false")}}function Ma(b,c,d,e,f){var g=
[];if(c)g.feedback=1;else if(d)g.login=1;if(e)g.createaccount=1;if(f)g.multifactor_disable_url=f;Ob(b,null,0,"error",g,1)}function dj(b,c,d,e,f){LP.lpGetCurrentWindow().setTimeout(function(){var g="xml=1";g+=e?e:"&username="+LP.en(P(b==null?"":b))+"&password="+LP.en(P(c))+"&id="+LP.en(d);try{for(var h in y)if(y[h].genpw&&K(y[h].password)==c){g+="&delgenpwaid="+LP.en(h);break}}catch(j){}h=typeof f!="undefined"?f:[];b!=null&&h.push(b);h.push(c);var l={};if(d!=null&&typeof y[d]!="undefined")l=y[d];else l.aid=
d==null?0:d;l.postdata=g;l.posturl=LP.lp_base+"change_pw.php";l.newvalues=h;l.url=l.posturl;l.handler=ij;LP.lpMakeRequest(l.posturl,l.postdata,ij,null,l)},100)}function ij(b,c,d){if(!Yg(b,d,"lpChangePwResponse"))if(b)if(b.readyState==4)if(b.status==200&&b.responseXML!=null&&b.responseXML.documentElement!=null){var e=b.responseXML.documentElement.getElementsByTagName("ok");if(e.length>0){b=parseInt(e[0].getAttribute("accts_version"));if(hd(b,Xa+1)){c=e[0].getAttribute("newpassword");d=[];for(var f=
[],g="";e[0].hasAttribute("oldpassword"+g);){var h=parseInt(e[0].getAttribute("id"+g)),j=e[0].getAttribute("oldpassword"+g),l=y[h];if(!Qa(l.tld,f))f[f.length]=l.tld;if(l.password==j)l.password=c;if(l.logins){for(h=0;h<l.logins.length;h++){if(l.logins[h].password==j)l.logins[h].password=c;for(var o=0;o<l.logins[h].fields.length;o++)if(l.logins[h].fields[o].type=="password"&&l.logins[h].fields[o].value==j)l.logins[h].fields[o].value=c;for(o=0;o<l.logins[h].otherfields.length;o++)if(l.logins[h].otherfields[o].type==
"password"&&l.logins[h].otherfields[o].value==j)l.logins[h].otherfields[o].value=c}for(h=0;h<l.otherlogins.length;h++){if(l.otherlogins[h].password==j)l.otherlogins[h].password=c;for(o=0;o<l.otherlogins[h].fields.length;o++)if(l.otherlogins[h].fields[o].type=="password"&&l.otherlogins[h].fields[o].value==j)l.otherlogins[h].fields[o].value=c;for(o=0;o<l.otherlogins[h].otherfields.length;o++)if(l.otherlogins[h].otherfields[o].type=="password"&&l.otherlogins[h].otherfields[o].value==j)l.otherlogins[h].otherfields[o].value=
c}}d[d.length]=l;if(g=="")g=1;else g++}rb=Xa=b;e=true;g=vb();if(g==null)e=false;if(e){for(h=0;h<d.length;h++){if(!dc(g,d[h].id,false)){e=false;break}if(!kc(g,d[h],false)){e=false;break}}for(h in y)if(y[h].genpw&&Qa(y[h].tld,f)&&K(y[h].password)==K(c))dc(g,y[h].id,true)||(e=false)}if(e&&!vc(g,b))e=false;if(e&&!Ab(g,null,"lpChangePwResponse_win"))e=false;e?Bb():LP.lpGetAccounts()}else LP.lpGetAccounts()}else Ma("ErrorServerMsg")}else{U("Problem with change pw response. status="+b.status+" text= "+b.responseText,
null);Ma("ErrorChangePwMsg")}}function Rg(b,c){var d=mb(b),e=null;if(d)e=d.contentWindow;d=[];for(var f=1E3,g=b.getElementsByTagName("object"),h=0;h<g.length;h++)if(g[h].style.visibility==""||g[h].style.visibility=="visible"){var j=g[h].id;if(j==""){j="lpobj"+f++;g[h].id=j}g[h].style.visibility="hidden";d[d.length]=j}h=b.getElementsByTagName("embed");for(g=0;g<h.length;g++)if(h[g].style.visibility==""||h[g].style.visibility=="visible"){j=h[g].id;if(j==""){j="lpobj"+f++;h[g].id=j}h[g].style.visibility=
"hidden";d[d.length]=j}h=b.getElementsByTagName("applet");for(g=0;g<h.length;g++)if(h[g].style.visibility==""||h[g].style.visibility=="visible"){j=h[g].id;if(j==""){j="lpobj"+f++;h[g].id=j}h[g].style.visibility="hidden";d[d.length]=j}f=b.createElement("script");j='function lphideoverlay(user){try{document.getElementById("lpoverlay1").style.display="none";document.getElementById("lpmsgbox1").style.display="none";';for(g=0;g<d.length;g++)j+='document.getElementById("'+cd(d[g])+'").style.visibility="visible";';
j+="if(user){var i=document.createElement('image'); i.src='"+LP.lp_base+"error.php?msg=userCloseOverlay%20aid%20"+(c?c:"")+"'; i.style.display='none'; document.appendChild(i);}}catch(e){} }";j=b.createTextNode(j);f.appendChild(j);b.body&&b.body.appendChild(f);b.LPlphideIds=d;if(b.getElementById("lpoverlay1")&&b.getElementById("lpmsgbox1")){b.getElementById("lpoverlay1").style.display="";b.getElementById("lpmsgbox1").style.display=""}else{f=b.createElement("div");f.id="lpoverlay1";j=0;if(typeof b.documentElement!=
"undefined"&&typeof b.documentElement.scrollLeft!="undefined"&&b.documentElement.scrollLeft>0)j=b.documentElement.scrollLeft;else if(typeof b.body!="undefined"&&b.body&&typeof b.body.scrollLeft!="undefined"&&b.body.scrollLeft>0)j=b.body.scrollLeft;d=0;if(typeof b.documentElement!="undefined"&&typeof b.documentElement.scrollTop!="undefined"&&b.documentElement.scrollTop>0)d=b.documentElement.scrollTop;else if(typeof b.body!="undefined"&&b.body&&typeof b.body.scrollTop!="undefined"&&b.body.scrollTop>
0)d=b.body.scrollTop;f.style.cssText="position: absolute; left: "+j+"px; top: "+d+"px; width: 100%; height: 100%; background-color: #666666; opacity: .7; filter: alpha(opacity=70); z-index: 9980;";b.body&&b.body.appendChild(f);g=-1;f=200;if(e&&typeof e.innerWidth!="undefined"&&e.innerWidth>0)g=e.innerWidth;if(g<=0){if(typeof b.documentElement!="undefined"&&typeof b.documentElement.clientWidth!="undefined"&&b.documentElement.clientWidth>0)g=b.documentElement.clientWidth;if(typeof b.body!="undefined"&&
b.body&&typeof b.body.clientWidth!="undefined"&&b.body.clientWidth>0&&(g<=0||b.body.clientWidth<g))g=b.body.clientWidth}if(g>300)f=g/2-150;f+=j;g=-1;j=200;if(e&&typeof e.innerHeight!="undefined"&&e.innerHeight>0)g=e.innerHeight;if(g<=0){if(typeof b.documentElement!="undefined"&&typeof b.documentElement.clientHeight!="undefined"&&b.documentElement.clientHeight>0)g=b.documentElement.clientHeight;if(typeof b.body!="undefined"&&b.body&&typeof b.body.clientHeight!="undefined"&&b.body.clientHeight>0&&(g<=
0||b.body.clientHeight<g))g=b.body.clientHeight}if(g>0)j=g/2-20;j+=d;e=b.createElement("div");e.id="lpmsgbox1";e.style.cssText="background-color: white; color: black; border:1px solid #c01f2f; position:absolute; text-align:center; display:block; width:300px; height:auto; z-index: 9990; left: "+f+"px; top: "+j+"px; font-family:arial; font-size:13px;";d="<div style='float:right'><a style='WIDTH:16px;HEIGHT:16px;COLOR:black;BACKGROUND-COLOR:white' href='#' onclick='lphideoverlay(1); return false;'>";
d+='<img alt="x" src="data:image/gif;base64,R0lGODlhEAAQAIABAAAAAP///yH5BAEKAAEALAAAAAAQABAAAAIjjI+pq+DpAIwnSmRlbpmufjEbE4AiGFZWuWIe+7gpTNb2TRYAOw=="/ border=0>';d+="</a></div><br/>";d+='<img src="data:image/gif;base64,R0lGODlhEAAQAPZVADsBAkECBFEGCmQDBGoEB3UIDWcOEn0dHnZGRnhBQntbXIILEoIMEoENFI8QGI0UHJMQGKERGqURGq4QGIsaIZ4fJq8WI68YJrQXJLIZJbgZJ7gZKLwcK74dLa4gKq4iLLUgLaApMLwpNrwsOKUzOcAfL8EhMcUjM8YkNMgoOJw+QKY8QtA5Sdo/T6dARa5FS6tOUr9MUqRRVrRVWY9pa5BmaZBqbMRKVNlRYclud/14iLyIiKuoqNGbneyPmfOAkPeElNGvsNO3t+aorfGjq+y/w8zMzNXU1N3S0t7W1t3a2uLR0e3U1vLd4OLh4ejo6Png4/bx8ff09Pr5+f7+/v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAFYALAAAAAAQABAAAAfEgFaCVlCFhoWDgzk6QD+Oj0A6OYMyLSwdJR2amywtMoITKZgbFRsYIRqaKROCEpgZO1IkMFM7GJgSghGZKEVVQktVQyclJRG6JR8uM1NVVVEvKx7GyDHO11VUVTHUVgEECUlIR+RHSUoJBAGCAAMHKgpO8koIKgcDAIICCwwGRk89gjzhUYABAwGCGly4IIIIkxE3mvgAkeFCA0EPMBQ7gcNEio7FMDwQVAOCBQ6bNnGwAKHGIBoUHMicKZOCjUQ4cw4KBAA7"/>';
d+=" "+LP.lpgs("LoginOverlayText")+"<br/><span id='lpoverlaystatus' style='color:#c1243f;font-size:11px;'></span><br/><br/>";try{e.innerHTML=d}catch(l){Mg(b);return}b.body&&b.body.appendChild(e)}}function Mg(b){if(mb(b)){var c=b.getElementById("lpoverlay1");if(c)c.style.display="none";if(c=b.getElementById("lpmsgbox1"))c.style.display="none";if(typeof b.LPlphideIds!="undefined")for(c=0;c<b.LPlphideIds.length;c++){var d=b.getElementById(b.LPlphideIds[c]);if(d)d.style.visibility="visible"}}}function Sg(b,
c){if(b.getElementById("lpoverlaystatus"))b.getElementById("lpoverlaystatus").innerHTML=c}function Rf(b,c,d,e,f,g){for(var h=0;h<c.length;h++){var j=c[h];if(j==e)b.push({type:d,url:j,domain:0,title:g});else j==f&&b.push({type:d,url:j,domain:1,title:g})}}function jj(b,c){for(var d=-1,e=0;e<b.length;e++)if(b[e]==c){d=e;break}d!=-1&&b.splice(d,1)}function Aa(){if(!kj){kj=true;try{var b=Components.classes["@lastpass.com/XPCOM/LastPass;1"];if(b)ba=b.createInstance().QueryInterface(Components.interfaces.iLastPass)}catch(c){}}return ba!=
null}function Sf(){return Aa()}function K(b,c){if(kh!=na){kh=na;Pc=[];Pc[""]=""}if(typeof Pc=="undefined"){Pc=[];Pc[""]=""}if((c==null||c==na)&&Pc[b]!=null)return Pc[b];else{var d=lh(b,c);return Pc[b]=d}}function lh(b,c,d){if(null==b||0==b.length||typeof b!="string")return"";var e=null;if(typeof c=="undefined"||c==null){if(typeof na!="string"||0==na.length)return"";c=na;e=Od}if(e==null)e=Ka(c);if(b[0]=="!"?true:false)if(Aa()&&typeof ba.decryptcbc=="function")return ba.decryptcbc(e,b);else{d=Ya.StringToKeyIv(c,
256);c=[];for(i=0;i<d.key.length;++i)c[i]=d.key[i];b=b.split("|",2);if(b.length!==2)return"";return Ya.Decrypt({key:c,iv:Ya.B64ToBytes(b[0].substring(1)),data:b[1],b64:true,bits:256,mode:"cbc"})}return Aa()?ba.decrypt(e,b):Ya.Decrypt({pass:c,data:b,b64:true,mode:"ecb",bits:256},d)}function Xg(b){try{return wc(b)}catch(c){U("ERROR: lpatob: on string:"+b+" err:"+c+" ln: "+c.lineNumber,null)}return null}function rf(b){try{return xc(b)}catch(c){U("ERROR: lpbtoa : "+c+" ln: "+c.lineNumber,null)}return null}
function P(b,c){var d=null;if(typeof c=="undefined"){if(typeof na!="string"||0==na.length||null==b||0==b.length){if(null!=b&&0!=b.length&&ga){U("We're trying to encrypt a string, while logged in, but somehow we don't have the key, typeof:"+typeof na,null);Ia(false);return""}if(!(null==b||0==b.length)){d="Was going to return unenc string back. length: "+b.length+" typeof key: "+typeof na+" loggedin: "+ga+" called by: "+arguments.callee.caller.toString().substring(0,arguments.callee.caller.toString().indexOf("{"));
U(d,null)}return""}c=na;d=Od}else if(b==null||b.length==0)return"";if(d==null)d=Ka(c);if(typeof b!="string")return"";if(Qe)if(Aa()&&typeof ba.encryptcbc=="function")return ba.encryptcbc(d,b);else{var e=Ya.StringToKeyIv(c,256);d=[];for(i=0;i<e.key.length;++i)d[i]=e.key[i];e=Ya.CreateIV(16);return"!"+Ya.eb64(e.str)+"|"+Ya.Encrypt({key:d,iv:e.arr,data:b,b64:true,bits:256,mode:"cbc"})}return Aa()?ba.encrypt(d,b):Ya.Encrypt({pass:c,data:b,b64:true,mode:"ecb",bits:256})}function lj(b,c){return K(b,c)}function ih(b){return Da(b)}
function cd(b){b=b.replace(/\\/g,"\\\\");b=b.replace(/'/g,"\\'");return b.replace(/"/g,'\\"')}function wl(b){if(4==b.readyState)if(b.status==200&&b.responseXML!=null&&b.responseXML.documentElement!=null){b=b.responseXML.documentElement.getElementsByTagName("ok");if(b.length>0){Tf=b[0].getAttribute("logoff_other_ses")=="1"?true:false;b[0].getAttribute("accts_version")>Xa&&LP.lpGetAccounts()}}else U("Problem in poll_server_response. status="+b.status,null)}function xl(b){for(i=0;i<b.length;i++)if("0123456789".indexOf(b.charAt(i))==
-1)return false;return true}function ke(b){if(!b)return"";var c=b.name;b=Kb(b,0);if(b!="")c+=" ("+b+")";return c}function Kb(b,c){if(!b||!b.logins||b.logins.length==0)return"";if(b.save_all)for(var d=0;d<b.logins.length;d++)for(var e=b.logins[d],f=0;f<e.otherfields.length;f++){var g=e.otherfields[f];if(c==0&&("text"==g.type||"email"==g.type)&&g.value!="")return K(g.value);else if(c==1&&g.type=="password"&&g.value!="")return K(g.value)}else if(c==0)return b.logins[0].unencryptedUsername;else if(c==
1)return K(b.logins[0].password);return""}function yl(b,c){if(!b||!b.logins||b.logins.length==0)return false;if(b.save_all)for(var d=0;d<b.logins.length;d++)for(var e=b.logins[d],f=0;f<e.otherfields.length;f++){var g=e.otherfields[f];if(c==0&&("text"==g.type||"email"==g.type)&&g.value!="")return true;else if(c==1&&g.type=="password"&&g.value!="")return true}else if(c==0)return b.logins[0].unencryptedUsername!="";else if(c==1)return b.logins[0].password!="";return false}function mh(b,c){var d=0,e=
Components.classes["@mozilla.org/passwordmanager;1"],f,g;if(e)e=e.getService(Components.interfaces.nsIPasswordManager);else{f=Components.classes["@mozilla.org/login-manager;1"].getService(Components.interfaces.nsILoginManager);g=new Components.Constructor("@mozilla.org/login-manager/loginInfo;1",Components.interfaces.nsILoginInfo,"init")}for(var h in y)if(y[h].url!="http://group"){var j=y[h];if(!(j.sharedfromaid!=null&&j.sharedfromaid!=""&&j.sharedfromaid!="0")){var l=null;if(j.logins.length>0)l=
j.logins[0];if(j.url.length){if(!c)if(!b||!j.url.match(/^chrome:/))continue;var o=Kb(j,0),n=Kb(j,1),p=null,q=j.url,r=l.url;if(j.url.match(/^chrome:/)){l.uname="";l.pname=""}if(j=j.url.match(/^(.*) \(([^\)]+)\)/)){p=j[2];q=j[1];r=null}if(""!=n){if(j=q.match(/^(https?:\/\/[^\/]+)\//))q=j[1];if(r)if(j=r.match(/^(https?:\/\/[^\/]+)\//))r=j[1];try{e?e.addUser(q,o,n):f.addLogin(new g(q,r,p,o,n,l.uname,l.pname));d++}catch(u){}}}}}LP.lpalert_ex(LP.lpgs("LastPass accounts exported to Firefox")+": "+d)}function zl(b){if(b)if(b.readyState==
4){if(b.status==200)if(b.responseText.indexOf("OK")>0){LP.lpGetAccounts();jc();nh=true;oh||LP.lpConfirmYesNo(LP.lpgs("FFImportSuccessful"))&&mj(Uf)}else LP.lpalert_ex(LP.lpgs("FFImportFailed"));oh&&LP.welcome_accept_click(lb,yd)}}function mj(b){var c=Components.classes["@mozilla.org/passwordmanager;1"];if(c){pm=c.getService(Components.interfaces.nsIPasswordManager);for(c=0;c<b.length;c++)pm.removeUser(b[c].login.host,b[c].login.user)}else{var d=Components.classes["@mozilla.org/login-manager;1"].getService(Components.interfaces.nsILoginManager);
for(c=0;c<b.length;c++)d.removeLogin(b[c].login)}}function nj(b){var c=y[b],d=false,e=false;if(c==null){c=qa[b];d=true}if(c==null){c=lc[b];e=true}var f=c.tld;typeof sa[f]!="undefined"&&typeof sa[f][b]!="undefined"&&delete sa[f][b];c.genpw&&delete Nd[b];if(typeof Ha[f]!="undefined"){c=Ha[f];if(typeof Ha[c]!="undefined")for(f=0;f<Ha[c][f];f++){var g=Ha[c][f];typeof sa[g]!="undefined"&&typeof sa[g][b]!="undefined"&&delete sa[g][b]}}if(d)delete qa[b];else e||delete y[b];id--;LP.deleteAidIdentity(b);for(d=
0;d<bb.length;d++)if(bb[d].id==b){bb.splice(d,1);break}}function oj(b){if(4==b.readyState)if(b.status==200&&b.responseXML!=null&&b.responseXML.documentElement!=null){var c=b.responseXML.documentElement.getElementsByTagName("result");if(c.length>0&&c[0].getAttribute("action")=="delete"){b=parseInt(c[0].getAttribute("accts_version"));if(hd(b,Xa+1)){c=c[0].getAttribute("aid");rb=Xa=b;var d=true,e=vb();if(e==null)d=false;if(d&&!dc(e,c,true))d=false;if(d&&!vc(e,b))d=false;if(d&&!Ab(e,null,"lpDeleteResponse"))d=
false;d?Bb():LP.lpGetAccounts()}else LP.lpGetAccounts();jc()}else{b="Problem in lpDeleteResponse. status="+b.status;U(b,null);Ma("ErrorDeleteAcctMsg")}}else{b="Problem in lpDeleteResponse. status="+b.status;U(b,null);Ma("ErrorDeleteAcctMsg")}}function ph(b,c){try{var d=true;pj=c;var e=b.getElementById("nav-bar");if(e){var f=b.getElementById("lpt_lastpass-compact-btn");if(f&&f.parentNode==e&&!c)f.style.display="none";else if(f&&f.parentNode==e&&c)f.style.display="";else if((!f||f.parentNode.id=="BrowserToolbarPalette")&&
c)if(typeof e.insertItem!="undefined"){e.insertItem("lpt_lastpass-compact-btn",null,null,false);var g=e.currentSet;if(typeof g=="string"&&g!=""&&g!="lpt_lastpass-compact-btn"&&g.indexOf("lpt_lastpass-compact-btn")!=-1){e.setAttribute("currentset",g);b.persist("nav-bar","currentset")}else d=false}}try{e=["sxipper","onepass","keepass","clipperz","ewallet","fireform","pwcoral","passworddragon","hppwsafe","passwordsmax","pins","splashid","sticky","darnpasswords","lastpass","mypwsafe","passpack","pwsafe",
"roboform","turbopasswords","passkeep","csv","msi","pwagent"];LP.sr(b,"lpt_viewSidebar","label","LastPass Sites");LP.sr(b,"lpt_viewSidebar","sidebartitle","LastPass Sites");LP.sr(b,"lpt_lastpass-compact-btn","label","LastPass");LP.sr(b,"lpt_lastpass-compact-btn","tooltiptext","LastPass");LP.sr(b,"lpt_comp-bar-login","label","Login");LP.sr(b,"lpt_lpidentitiesmenu1","label","Identities");LP.sr(b,"lpt_lastpasshome","label","My LastPass Vault");LP.sr(b,"lpt_lastpasshome1","label","My LastPass Vault");
LP.sr(b,"lpt_lastpasshome","hidden",Cc);LP.sr(b,"lpt_comp-bar-recentlyused","label","Recently Used");LP.sr(b,"lpt_non-comp-bar-recentlyused","label","Recently Used");var h=0==LP.get_recentUsedCount();LP.sr(b,"lpt_comp-bar-recentlyused","hidden",h);LP.sr(b,"lpt_non-comp-bar-recentlyused","hidden",h);LP.sr(b,"lpt_comp-bar-accts","label","Sites");LP.sr(b,"lpt_compbaritem","label","Retrieving Sites...");LP.sr(b,"lpt_compbaritem2","label","Retrieving Sites...");LP.sr(b,"lpt_comp-bar-accts2","label","Sites");
LP.sr(b,"lpt_comp-bar-securenotes","label","SecureNotes");LP.sr(b,"lpt_fennec-securenotes","label","SecureNotes");LP.sr(b,"lpt_comp-bar-securenotes","hidden",yc);LP.sr(b,"lpt_comp-bar-fav","label","OpenFavorites");LP.sr(b,"lpt_lpfillformsmenu1","label","Fill Forms");LP.sr(b,"lpt_lppreferences","label","Preferences");LP.sr(b,"lpt_lphelp","label","Help...");LP.sr(b,"lpt_comp-bar-tools","label","Tools");LP.sr(b,"lpt_lpfeedback","label","Feedback");LP.sr(b,"lpt_lpgenpw","label","Generate Secure Password");
LP.sr(b,"lpt_lpsearch","label","Site Search");LP.sr(b,"lpt_lprecheck","label","Recheck Page");LP.sr(b,"lpt_lprefresh","label","RefreshAccounts");LP.sr(b,"lpt_lprefresh","hidden",xa);zd&&LP.sr(b,"lpt_lpimportfrom","hidden",zd);LP.sr(b,"lpt_lpimportfrom","label","Import From");LP.sr(b,"lpt_lpimportff","label","Firefox Password Manager");LP.sr(b,"lpt_lpimportsxipper","label","Sxipper");LP.sr(b,"lpt_lpimportonepass","label","1Password");LP.sr(b,"lpt_lpimportkeepass","label","KeePass");LP.sr(b,"lpt_lpimportclipperz",
"label","Clipperz");LP.sr(b,"lpt_lpimportewallet","label","eWallet");LP.sr(b,"lpt_lpimportfireform","label","FireForm");LP.sr(b,"lpt_lpimportpwcoral","label","Password Corral");LP.sr(b,"lpt_lpimportpassworddragon","label","Password Dragon");LP.sr(b,"lpt_lpimporthppwsafe","label","HP Password Safe");LP.sr(b,"lpt_lpimportpasswordsmax","label","Passwords Max");LP.sr(b,"lpt_lpimportpins","label","PINs Password Manager");LP.sr(b,"lpt_lpimportsplashid","label","SplashID");LP.sr(b,"lpt_lpimportsticky","label",
"Sticky Password");LP.sr(b,"lpt_lpimportdarnpasswords","label","Darn! Passwords!");LP.sr(b,"lpt_lpimportlastpass","label","LastPass");LP.sr(b,"lpt_lpimportmypwsafe","label","MyPasswordSafe");LP.sr(b,"lpt_lpimportpasspack","label","PassPack");LP.sr(b,"lpt_lpimportpwsafe","label","Password Safe");LP.sr(b,"lpt_lpimportroboform","label","RoboForm");LP.sr(b,"lpt_lpimportturbopasswords","label","TurboPasswords");LP.sr(b,"lpt_lpimportpasskeep","label","Password Keeper");LP.sr(b,"lpt_lpimportcsv","label",
"Generic CSV File");LP.sr(b,"lpt_lpimportmsi","label","MSI PasswordKeeper");LP.sr(b,"lpt_lpimportpwagent","label","Password Agent");if(xa)for(var j=0;j<e.length;j++)LP.sr(b,"lpt_lpimport"+e[j],"hidden",true);for(j=1;b.getElementById("lpt_lpimport"+j);j++){LP.sr(b,"lpt_lpimport"+j,"label","Import");LP.sr(b,"lpt_lpinstructions"+j,"label","Instructions")}Ad&&LP.sr(b,"lpt_lpexportto","hidden",Ad);LP.sr(b,"lpt_lpexportto","label","Export To");LP.sr(b,"lpt_lpexportcsv","label","LastPass CSV File");LP.sr(b,
"lpt_lpexportff","label","Firefox");LP.sr(b,"lpt_lpexportenc","label","LastPass Encrypted File");Pd&&LP.sr(b,"lpt_lpprint","hidden",Pd);LP.sr(b,"lpt_lpprint","label","Print");LP.sr(b,"lpt_lpprintaccounts","label","Sites");LP.sr(b,"lpt_lpprintsn","label","SecureNotes");LP.sr(b,"lpt_lpprintsn","hidden",yc);LP.sr(b,"lpt_lpabout","label","About...");LP.sr(b,"lpt_lpseccheck","label","Security Check");LP.sr(b,"lpt_lpseccheck","hidden",xa);LP.sr(b,"lpt_lpothersessions","label","Other Sessions");LP.sr(b,
"lpt_lpothersessions","hidden",xa);LP.sr(b,"lpt_lpclearcache1","label","Clear Local Cache");LP.sr(b,"lpt_lpclearcache1","hidden",xa);LP.sr(b,"lpt_lpclearcache2","label","Clear Local Cache");LP.sr(b,"lpt_lpclearcache2","hidden",xa);LP.sr(b,"lpt_lpsaveall","label","Save All Entered Data");LP.sr(b,"lpt_lpedit","label","Edit");LP.sr(b,"lpt_lpdelete","label","Delete");LP.sr(b,"lpt_lpgotourl","label","Go to URL");LP.sr(b,"lpt_lpcopyun","label","Copy Username");LP.sr(b,"lpt_lpcopypw","label","Copy Password");
LP.sr(b,"lpt_lastpass-toolbar","toolbarname","LastPassToolbar");LP.sr(b,"lpt_lastpass-login","label","Login");LP.sr(b,"lpt_lastpass-com","label","My LastPass Vault");LP.sr(b,"lpt_lastpass-com","hidden",Cc);LP.sr(b,"lpt_lastpass-com-sep","hidden",Cc);LP.sr(b,"lpt_lastpass-accts-btn","label","Sites");LP.sr(b,"lpt_lastpassitem","label","Retrieving Sites...");LP.sr(b,"lpt_lastpass-securenotes-btn","label","SecureNotes");LP.sr(b,"lpt_lastpass-securenotes-btn","hidden",yc);LP.sr(b,"lpt_lastpass-securenotes-sep",
"hidden",yc);LP.sr(b,"lpt_lastpassitem2","label","Retrieving Sites...");LP.sr(b,"lpt_lastpass-fav","label","OpenFavorites");LP.sr(b,"lpt_lpfillformsmenu2","label","Fill Forms");LP.sr(b,"lpt_lpfillformsmenu6","label","Fill Forms");LP.sr(b,"lpt_search-btn","label","Search");LP.sr(b,"lpt_tools-btn","label","Tools");LP.sr(b,"lpt_lpidentitiesmenu2","label","Identities");LP.sr(b,"lpt_feedback-btn","label","Feedback");LP.sr(b,"lpt_prefs-btn","label","Preferences");LP.sr(b,"lpt_lpncgenpw","label","Generate Secure Password");
LP.sr(b,"lpt_lpncrecheck","label","Recheck Page");LP.sr(b,"lpt_lpncrefresh","label","RefreshAccounts");LP.sr(b,"lpt_lpncrefresh","hidden",xa);zd&&LP.sr(b,"lpt_lpncimportfrom","hidden",zd);LP.sr(b,"lpt_lpncimportfrom","label","Import From");LP.sr(b,"lpt_lpncimportff","label","Firefox Password Manager");LP.sr(b,"lpt_lpncimportsxipper","label","Sxipper");LP.sr(b,"lpt_lpncimportonepass","label","1Password");LP.sr(b,"lpt_lpncimportkeepass","label","KeePass");LP.sr(b,"lpt_lpncimportclipperz","label","Clipperz");
LP.sr(b,"lpt_lpncimportewallet","label","eWallet");LP.sr(b,"lpt_lpncimportfireform","label","FireForm");LP.sr(b,"lpt_lpncimportpwcoral","label","Password Corral");LP.sr(b,"lpt_lpncimportpassworddragon","label","Password Dragon");LP.sr(b,"lpt_lpncimporthppwsafe","label","HP Password Safe");LP.sr(b,"lpt_lpncimportpasswordsmax","label","Passwords Max");LP.sr(b,"lpt_lpncimportpins","label","PINs Password Manager");LP.sr(b,"lpt_lpncimportsplashid","label","SplashID");LP.sr(b,"lpt_lpncimportsticky","label",
"Sticky Password");LP.sr(b,"lpt_lpncimportdarnpasswords","label","Darn! Passwords!");LP.sr(b,"lpt_lpncimportlastpass","label","LastPass");LP.sr(b,"lpt_lpncimportmypwsafe","label","MyPasswordSafe");LP.sr(b,"lpt_lpncimportpasspack","label","PassPack");LP.sr(b,"lpt_lpncimportpwsafe","label","Password Safe");LP.sr(b,"lpt_lpncimportroboform","label","RoboForm");LP.sr(b,"lpt_lpncimportturbopasswords","label","TurboPasswords");LP.sr(b,"lpt_lpncimportpasskeep","label","Password Keeper");LP.sr(b,"lpt_lpncimportcsv",
"label","Generic CSV File");LP.sr(b,"lpt_lpncimportmsi","label","MSI PasswordKeeper");for(j=1;b.getElementById("lpt_lpncimport"+j);j++){LP.sr(b,"lpt_lpncimport"+j,"label","Import");LP.sr(b,"lpt_lpncinstructions"+j,"label","Instructions")}LP.sr(b,"lpt_lpncimportpwagent","label","Password Agent");if(xa)for(j=0;j<e.length;j++)LP.sr(b,"lpt_lpncimport"+e[j],"hidden",true);Ad&&LP.sr(b,"lpt_lpncexportto","hidden",Ad);LP.sr(b,"lpt_lpncexportto","label","Export To");LP.sr(b,"lpt_lpncexportcsv","label","LastPass CSV File");
LP.sr(b,"lpt_lpncexportff","label","Firefox");LP.sr(b,"lpt_lpncexportenc","label","LastPass Encrypted File");Pd&&LP.sr(b,"lpt_lpncprint","hidden",Pd);LP.sr(b,"lpt_lpncprint","label","Print");LP.sr(b,"lpt_lpncprintaccounts","label","Sites");LP.sr(b,"lpt_lpncprintsn","label","SecureNotes");LP.sr(b,"lpt_lpncprintsn","hidden",yc);LP.sr(b,"lpt_lpnchelp","label","Help...");LP.sr(b,"lpt_lpncabout","label","About...");LP.sr(b,"lpt_lpncseccheck","label","Security Check");LP.sr(b,"lpt_lpncseccheck","hidden",
xa);LP.sr(b,"lpt_lpncothersessions","label","Other Sessions");LP.sr(b,"lpt_lpncothersessions","hidden",xa);LP.sr(b,"lpt_restart-btn","label","Restart Firefox");LP.sr(b,"lpt_admin-tools-btn","label","Admin Tools");LP.sr(b,"lpt_upload-btn","label","Upload Forms");LP.sr(b,"lpt_uploadall-btn","label","Upload All Forms");LP.sr(b,"lpt_debug-btn","label","EnableDebug");LP.sr(b,"lpt_adminpage-btn","label","Admin Page");LP.sr(b,"lpt_testxpcom-btn","label","Test XPCOM");LP.sr(b,"lpt_lpcontentareacontextmenu",
"label","LastPass");LP.sr(b,"lpt_lpcontextgenpw","label","Generate Secure Password");LP.sr(b,"lpt_lpcontextrecheck","label","Recheck Page");LP.sr(b,"lpt_lpcopyusernamemenu","label","Copy Username");LP.sr(b,"lpt_lpcopypasswordmenu","label","Copy Password");LP.sr(b,"lpt_lpautofillmenu","label","AutoFill");LP.sr(b,"lpt_lpfillformsmenu4","label","LastPass Fill Forms");LP.sr(b,"lpt_lplogintolastpass","label","Login to LastPass")}catch(l){U("set_toolbar_text: "+l+" ln: "+l.lineNumber)}var o=b.getElementById("lpt_lastpass-toolbar");
if(o)o.hidden=c;var n=b.getElementById("lpt_lp-statusbarpanel");if(n)n.hidden=Al||c;typeof LPSearch!="undefined"&&LPSearch.show_toolbar();if(ga){LP.lp_handle_buttons("in",b);LP.lpDisplayAccounts_win(b)}qh(b);qj(b);if(!LP.lpprefsHasUserValue("toolbarinitdone",false)||LP.lpprefsGetBoolPref("toolbarinitdone",false)!=d||!LP.lpprefsHasUserValue("toolbarinitversion",false)||LP.lpprefsGetIntPref("toolbarinitversion",false)!=3){LP.lpprefsSetBoolPref("toolbarinitdone",d,false);d&&LP.lpprefsSetIntPref("toolbarinitversion",
3,false);LP.flush_prefs()}}catch(p){U("lpChangeToolbarMode_win: "+p+" ln: "+p.lineNumber)}}function Ke(){var b=Re;b!=pj&&LP.lpUpdateAllToolbars(b)}function rh(){var b=Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);b=LP?b.newURI(LP.lp_base,null,null):b.newURI("https://lastpass.com",null,null);if(b=Components.classes["@mozilla.org/cookieService;1"].getService(Components.interfaces.nsICookieService).getCookieString(b,null))if(b=b.match(/PHPSESSID=([^;]+)/))return decodeURIComponent(b[1]);
return""}function sd(b,c){if(c&&!LP.lpis_win)return b;if(b.length==0)return b;if(ud())return b;if(Aa()&&typeof ba.protect_data=="function"){var d=ba.protect_data(b);if(d!=null&&(d!=""||b==""))return d}return b}function $d(b,c){if(c&&!LP.lpis_win)return b;if(b.match(/=[^=]/))return b;if(b.length==0)return b;if(ud())return b;if(Aa()&&typeof ba.unprotect_data=="function"){var d=ba.unprotect_data(b);if(d!=null&&(d!=""||b==""))return d}return b}function rj(b,c){var d=Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
c||(c=LP.lpGetCurrentWindow());return d.confirmEx(c,LP.lpgs("LastPass FF Toolbar"),b,d.STD_YES_NO_BUTTONS,null,null,null,null,{value:false})==0}function sj(b){if(""==b||null==b)return"";var c=Components.classes["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Components.interfaces.nsIScriptableUnicodeConverter);c.charset="UTF-8";var d=Components.classes["@mozilla.org/security/hash;1"].createInstance(Components.interfaces.nsICryptoHash);b=c.convertToByteArray(b,{});d.init(d.MD5);d.update(b,
b.length);return d.finish(true)}function za(b){if(""==b||null==b)return"";var c=Components.classes["@mozilla.org/intl/scriptableunicodeconverter"].createInstance(Components.interfaces.nsIScriptableUnicodeConverter);c.charset="UTF-8";var d=Components.classes["@mozilla.org/security/hash;1"].createInstance(Components.interfaces.nsICryptoHash);b=c.convertToByteArray(b,{});d.init(d.SHA256);d.update(b,b.length);d=d.finish(false);c="";for(b=0;b<d.length;b++){var e;e=("0"+d.charCodeAt(b).toString(16)).slice(-2);
c+=e}return c}function Ka(b){if(""==b||null==b)return"";return Ya.bin2hex(b)}function Da(b){if(""==b||null==b)return"";return Ya.hex2bin(b)}function ic(b){return b.indexOf("https://"+LP.lp_basehost+"/")==0||b.indexOf(LP.lp_base)==0?true:false}function Oc(b,c,d){if(typeof LP.getBrowser().getNotificationBox!="function")return false;return(b=LP.getBrowser().getNotificationBox(b).currentNotification)&&typeof b.choices!="undefined"&&b.choices==c&&(d||typeof b.lpoldnotification=="undefined")?true:false}
function me(){for(var b=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");b.hasMoreElements();){var c=b.getNext();qh(c.document)}}function qh(b,c){for(var d=LP.lpprefsHasUserValue("defaultffid")?LP.lpprefsGetCharPref("defaultffid"):"0",e=1;e<=6;e++){var f="lpt_lpfillformsmenu"+e;if(f=b.getElementById(f)){if(ga){f.disabled=false;f.setAttribute("disabled","false")}else{f.disabled=true;f.setAttribute("disabled","true")}f=
"lpt_lpfillformspopup"+e;if(f=b.getElementById(f)){for(var g=f.childNodes.length-1;g>=0;g--)f.removeChild(f.childNodes.item(g));var h=false,j=false;for(g=0;g<fa.length;g++){if(fa[g].profiletype==0)h=true;if(fa[g].ccnum!="")j=true;var l=b.createElement("menu");l.setAttribute("label",fa[g].profilename);l.setAttribute("class","");var o=b.createElement("menupopup");o.setAttribute("ignorekeys",false);if(typeof c=="undefined"||c!=1){var n=b.createElement("menuitem");n.setAttribute("label",LP.lpgs("FillForm"));
n.setAttribute("oncommand","LP.lp_fillFormsHelper("+fa[g].ffid+");");d==fa[g].ffid&&n.setAttribute("key","lpt_key_lpdefaultffid");o.appendChild(n)}n=b.createElement("menuitem");n.setAttribute("label",LP.lpgs("Edit"));n.setAttribute("oncommand","LP.lpEditFormFillProfile("+fa[g].ffid+");");o.appendChild(n);n=b.createElement("menuitem");n.setAttribute("label",LP.lpgs("Copy"));n.setAttribute("oncommand","LP.lpCopyFormFillProfile("+fa[g].ffid+");");o.appendChild(n);n=b.createElement("menuitem");n.setAttribute("label",
LP.lpgs("Delete"));n.setAttribute("oncommand","setTimeout('LP.lpDeleteFormFillProfile("+fa[g].ffid+");', 0);");o.appendChild(n);l.appendChild(o);f.appendChild(l)}if(fa.length>0){l=b.createElement("menuseparator");f.appendChild(l)}o=b.createElement("menuitem");o.setAttribute("label",LP.lpgs("AddProfile"));o.setAttribute("oncommand","LP.lpEditFormFillProfile(0);");o.setAttribute("class","");f.appendChild(o);n=b.createElement("menuitem");n.setAttribute("label",LP.lpgs("Add Credit Card"));n.setAttribute("oncommand",
"LP.lpEditFormFillProfile(0, false, 1);");n.setAttribute("class","");f.appendChild(n);if(typeof c=="undefined"||c!=1){n=b.createElement("menuitem");n.setAttribute("label",LP.lpgs("Clear Forms"));n.setAttribute("oncommand","LP.lpClearFormsHelper();");f.appendChild(n);if(h&&j){n=b.createElement("menuitem");n.setAttribute("label",LP.lpgs("Choose Profile and Credit Card"));n.setAttribute("oncommand","LP.choose_profile_and_credit_card();");f.appendChild(n)}}}}}}function sh(){for(var b=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");b.hasMoreElements();){var c=
b.getNext();qj(c.document)}}function qj(b){LP.GetIdentity();for(var c=1;c<=4;c++){var d="lpt_lpidentitiesmenu"+c,e=b.getElementById(d);if(e)if(ne)LP.sr(b,d,"hidden",ne);else{if(ga){e.disabled=false;e.setAttribute("disabled","false");e.setAttribute("label",LP.lpgs("Identities")+" ("+LP.GetIdentity(true)+")")}else{e.disabled=true;e.setAttribute("disabled","true");e.setAttribute("label",LP.lpgs("Identities"))}d="lpt_lpidentitiespopup"+c;if(d=b.getElementById(d)){for(var f=d.childNodes.length-1;f>=0;f--)d.removeChild(d.childNodes.item(f));
e="";var g=false;if(LP.lpprefsHasUserValue("identity"))e=LP.lpprefsGetCharPref("identity");for(f=0;f<La.length;f++)if(e==La[f].iid)g=true;f=b.createElement("menuitem");f.setAttribute("label",LP.lpgs("All"));f.setAttribute("oncommand",'LP.lpIdentityHelper("");');if(!g){f.setAttribute("checked","true");f.setAttribute("type","checkbox");f.setAttribute("autocheck","false")}d.appendChild(f);for(f=0;f<La.length;f++){g=b.createElement("menuitem");g.setAttribute("label",La[f].iname);g.setAttribute("oncommand",
"LP.lpIdentityHelper("+La[f].iid+");");if(e==La[f].iid){g.setAttribute("checked","true");g.setAttribute("type","checkbox");g.setAttribute("autocheck","false")}d.appendChild(g)}g=b.createElement("menuseparator");d.appendChild(g);e=b.createElement("menuitem");e.setAttribute("label",LP.lpgs("AddIdentity"));e.setAttribute("oncommand",'LP.lpIdentityHelper("add");');d.appendChild(e)}}}}function Qc(b,c,d){(c=d.getElementById(c))&&b.removeChild(c)}function Rc(b,c,d,e,f,g){if(e){g=g.createElement("key");g.setAttribute("command",
d);g.setAttribute("id",c);g.setAttribute("modifiers",f);if(e>=48&&e<=122)g.setAttribute("key",String.fromCharCode(e));else if(typeof LP.mostRecent().KeyEvent!="undefined")for(var h in LP.mostRecent().KeyEvent)LP.mostRecent().KeyEvent[h]==e&&g.setAttribute("keycode",h.replace("DOM_",""));b.appendChild(g)}}function oe(b,c,d){if(!Yg(b,d,"lpFieldsResponse"))if(b.readyState==4)if(b.status==200&&b.responseXML!=null&&b.responseXML.documentElement!=null){b=b.responseXML.documentElement.getElementsByTagName("result");
if(b.length>0){b=parseInt(b[0].getAttribute("accts_version"));if(hd(b,Xa))return}LP.lpGetAccounts();jc()}}function tj(b,c){b=b.toLowerCase();var d=LP.get_searchNotesB64Length(),e=[];for(var f in y){var g=y[f];if(!(!c&&g.url=="http://group")){if(typeof g.group!="undefined")g.group=LP.fix_group_name(g.group);if(!g.isbookmark){var h=g.logins.length>0?g.logins[0].unencryptedUsername:"";if(g.url.toLowerCase().indexOf(b)!=-1||g.name.toLowerCase().indexOf(b)!=-1||g.group.toLowerCase().indexOf(b)!=-1||h.toLowerCase().indexOf(b)!=
-1)e[e.length]=g;else if(d>0){h=K(g.extra.substring(0,d));if(h.toLowerCase().indexOf(b)!=-1)e[e.length]=g}}}}for(f in qa){g=qa[f];if(g.name.toLowerCase().indexOf(b)!=-1||g.group.toLowerCase().indexOf(b)!=-1)e[e.length]=g;else if(d>0){h=K(g.extra.substring(0,d));if(h.toLowerCase().indexOf(b)!=-1)e[e.length]=g}}for(f in lc){g=lc[f];if(g.shareautoaccept!=1&&(g.name.toLowerCase().indexOf(b)!=-1||g.group.toLowerCase().indexOf(b)!=-1))e[e.length]=g}return e}function Vf(b,c,d,e,f){if(typeof f=="undefined"||
""==f)f=c;var g=c.match(/^(.*)\\(.*)$/);if(g){var h=g[1];if(""==h)h=LP.get_null_group();f="_"+h;if(typeof e.c[f]=="undefined"){h=Vf(b,h,d,e);e.c[f]=h[0];e.i[f]=h[1]}h=Vf(b,g[2],d,e,c);c=null;for(d=0;d<e.c[f].childNodes.length;d++){b=e.c[f].childNodes[d];if(b.getAttribute("container")!="true"){c=b;break}else if(g[2].toLowerCase()<b.getAttribute("group").toLowerCase()){c=b;break}}c?e.c[f].insertBefore(h[1],c):e.c[f].appendChild(h[1]);return h}e=b.createElement("treeitem");e.setAttribute("container",
"true");e.setAttribute("group",c);e.setAttribute("orig_group",f);e.setAttribute("isgroup",true);f=b.createElement("treerow");f.setAttribute("allowevents","true");f.setAttribute("crop","end");g=b.createElement("treecell");g.setAttribute("label",LP.fix_group_name(c));g.setAttribute("properties","group");f.appendChild(g);e.appendChild(f);b=b.createElement("treechildren");e.appendChild(b);if(typeof d[c]!="undefined"&&d[c]){e.setAttribute("open","false");g.setAttribute("src","chrome://lastpass/skin/folder-closed.gif")}else{e.setAttribute("open",
"true");g.setAttribute("src","chrome://lastpass/skin/folder-open.gif")}return[b,e]}function Bl(b){if(b.save_all&&b.logins.length>0&&typeof b.logins[0].otherfields!="undefined"){for(var c=0;c<b.logins[0].otherfields.length;c++)if(("text"==b.logins[0].otherfields[c].type||"email"==b.logins[0].otherfields[c].type)&&b.logins[0].otherfields[c].value!="")return K(b.logins[0].otherfields[c].value);return""}else return b.logins.length>0?b.logins[0].unencryptedUsername:""}function Cl(b){if(0==b)return LP.lpgs("Never");
b=cb()-b;if(b<0)return LP.lpgs("just now");if(b<60)return b+" "+(b==1?LP.lpgs("second"):LP.lpgs("seconds"))+" "+LP.lpgs("ago");if(b<3600){b=Math.floor(b/60);return b+" "+(b==1?LP.lpgs("minute"):LP.lpgs("minutes"))+" "+LP.lpgs("ago")}if(b<86400){b=Math.floor(b/60/60);return b+" "+(b==1?LP.lpgs("hour"):LP.lpgs("hours"))+" "+LP.lpgs("ago")}if(b<604800){b=Math.floor(b/60/60/24);return b+" "+(b==1?LP.lpgs("day"):LP.lpgs("days"))+" "+LP.lpgs("ago")}if(b<2678400){b=Math.floor(b/60/60/24/7);return b+" "+
(b==1?LP.lpgs("week"):LP.lpgs("weeks"))+" "+LP.lpgs("ago")}if(b<31536E3){b=Math.floor(b/60/60/24/31);return b+" "+(b==1?LP.lpgs("month"):LP.lpgs("months"))+" "+LP.lpgs("ago")}b=Math.floor(b/60/60/24/365);return b+" "+(b==1?LP.lpgs("year"):LP.lpgs("years"))+" "+LP.lpgs("ago")}function vb(b,c,d){b=typeof b=="undefined"?ia:b;c=typeof c=="undefined"?true:c;d=typeof d=="undefined"?true:d;try{var e=b+(Aa()?"_lps.act.sxml":"_lp.act.xml"),f=ib(e);if(f)f=$d(f,true);else if(f=ib(b+"_lps.act.xml")){var g=sd(f,
true);Yb(b+"_lps.act.sxml",g);Wa(b+"_lps.act.xml")}if(!f)return null;if(!c)return f;if(Aa())f=lh(f);if(f&&f!=""){b=null;if(Tb("password_offline")&&Tb("password_offline")!=""&&f.substring(0,30).indexOf("type=sesameoffline\ndata=")==0){f=f.substring(24);b=Tb("password_offline")}else if(wb("password_offline")&&wb("password_offline")!=""&&f.substring(0,30).indexOf("type=trueapioffline\ndata=")==0){f=f.substring(25);b=wb("password_offline")}else if(qb("password_offline")&&qb("password_offline")!=""&&f.substring(0,
30).indexOf("type=yubikeyoffline\ndata=")==0){f=f.substring(25);b=qb("password_offline")}else if(qb("password_server")&&qb("password_server")!=""&&qb("password_keysline")&&qb("password_keysline")!=""&&f.substring(0,50).indexOf("type=yubikeyofflinemulti\nkeys=")==0){var h=f.indexOf("\n",30);if(h>0){f.substring(30,h);f=f.substring(h+6);b=qb("password_server")}}if(b)f=lh(f,Da(b));if(f&&f.substring(0,5)=="LPB64")f=wc(f.substring(5));if(f&&f.substring(0,5)!="<?xml"&&f.substring(0,4)!="LPAV"&&f.substring(0,
5)!="LPB64")f='<?xml version="1.0" encoding="UTF-8"?>'+f}if(!d)return f;if(f.substring(0,4)=="LPAV"){var j={};j.sites=[];j.securenotes=[];j.prompts=[];j.formfills=[];j.identities=[];j.equivalentdomains=[];j.neverurls=[];j.pendings=[];j.shareeautopushes=[];j.maxid=[];j.urlrules=[];j.groups=[];j.prefs=[];pe=0;xb=na;kd=Ka(xb);jb=Ya;var l=th(f,f.length,-1,0,Dl,j.sites,j.securenotes,j.prompts,j.formfills,j.identities,j.equivalentdomains,j.neverurls,true,true,null,j.pendings,j.shareeautopushes,j.maxid,
j.urlrules,j.groups,j.prefs);kd=xb="";if(l){j.encrypted_username=l;j.accts_version=parseInt(bh(f));j.premium_exp=pe}else j=null;return j}if(f.substring(0,5)!="<?xml")return null;return(j=Components.classes["@mozilla.org/xmlextras/domparser;1"].createInstance(Components.interfaces.nsIDOMParser).parseFromString(f,"text/xml"))?j:null}catch(o){return null}}function Dl(b,c,d,e,f,g,h,j,l,o,n,p,q,r){for(d=0;d<b.length;d++)b[d].url=Da(b[d].url);for(d=0;d<c.length;d++)c[d].url=Da(c[d].url);if(r.maxid>zc)zc=
r.maxid;return j?n:false}function Ab(b,c,d,e){try{var f;if(typeof b=="object"&&typeof b.accts_version!="undefined"){xb=na;kd=Ka(xb);jb=Ya;var g=b.accts_version,h=b.sites,j=b.securenotes,l=b.prompts,o=b.formfills,n=b.identities,p=b.equivalentdomains,q=b.neverurls,r=b.premium_exp,u=b.encrypted_username,t=b.pendings,C=b.shareeautopushes,A=b.urlrules,J=b.prefs;Cb=Math.max(zc,b.maxid.maxid);if(typeof Cb!="number")Cb=typeof Cb!="undefined"?parseInt(Cb):0;b="";b+="LPAV"+N(g);if(r&&r!=0)b+="PREM"+N(r);if(Wf&&
Wf!=0)b+="WOTE"+N(Wf);if(typeof u!="undefined"&&u!="")b+="ENCU"+N(u);b+="CBCU"+N(Qe?"1":"0");g={};r=0;for(var D in h){var B=parseInt(h[D].aid);if(B>Cb)Cb=B;var z=typeof h[D].group!="undefined"?h[D].group:"";if(z!=""){if(typeof g[z]=="undefined"){g[z]=r;++r}h[D].groupid=g[z]}b+=uj(h[D])}for(D in j){B=parseInt(j[D].aid);if(B>Cb)Cb=B;z=typeof j[D].group!="undefined"?j[D].group:"";if(z!=""){if(typeof g[z]=="undefined"){g[z]=r;++r}j[D].groupid=g[z]}b+=uj(j[D])}h="";h+=N(l.login_site_prompt?"1":"0");h+=
N(l.edit_site_prompt?"1":"0");h+=N(l.edit_sn_prompt?"1":"0");h+=N(l.view_pw_prompt?"1":"0");h+=N(l.view_ff_prompt?"1":"0");h+=N(l.improve?"1":"0");h+=N(l.switch_identity_prompt?"1":"0");h+=N(l.switch_f_prompt?"1":"0");h+=N(l.multifactor_reprompt?"1":"0");b+="SPMT"+N(h);if(J){l=false;for(D in J){l=true;break}if(l){h="";h+=N(J.allowmasterpasswordsave);h+=N(J.logoffclosebrowser);h+=N(J.logoffidle);b+="PREF"+N(h)}}if(o){var L=o.length;for(D=0;D<L;D++){var S=o[D];h="";var $=parseInt(S.ffid);if($>Cb)Cb=
$;h+=N(S.ffid);h+=N(S.profiletype);h+=N(S.profilename);h+=N(S.profilelanguage);h+=N(S.firstname);h+=N(S.middlename);h+=N(S.lastname);h+=N(S.email);h+=N(S.company);h+=N(S.ssn);h+=N(S.birthday);h+=N(S.address1);h+=N(S.address2);h+=N(S.city);h+=N(S.state);h+=N(S.state_name);h+=N(S.zip);h+=N(S.country);h+=N(S.country_cc3l);h+=N(S.country_name);h+=N(S.mobilephone);h+=N(S.mobilephone3lcc);h+=N(S.mobileext);h+=N(S.evephone);h+=N(S.evephone3lcc);h+=N(S.eveext);h+=N(S.phone);h+=N(S.phone3lcc);h+=N(S.phoneext);
h+=N(S.fax);h+=N(S.fax3lcc);h+=N(S.faxext);h+=N(S.ccnum);h+=N(S.ccexp);h+=N(S.cccsc);h+=N(S.username);h+=N(S.address3);h+=N(S.title);h+=N(S.gender);h+=N(S.driverlicensenum);h+=N(S.taxid);h+=N(S.pwprotect?"1":"0");h+=N(S.bankname);h+=N(S.bankacctnum);h+=N(S.bankroutingnum);h+=N(S.timezone);h+=N(S.county);h+=N(S.ccstart);h+=N(S.ccname);h+=N(S.ccissuenum);h+=N(S.notes);h+=N(S.lastname2);h+=N(S.mobileemail);h+=N(S.firstname2);h+=N(S.firstname3);h+=N(S.lastname3);b+="LPFF"+N(h);var E=S.custom_fields.length;
for(J=0;J<E;J++){var ea=S.custom_fields[J];h="";var v=parseInt(S.cfid);if(v>Cb)Cb=v;h+=N(ea.cfid);h+=N(ea.text);h+=N(ea.value);h+=N(ea.alttext);b+="FFCF"+N(h)}}}if(p)for(var F in p)if(!F.match(/^[0-9]+$/)){var M=p[F];h="";h+=N(M);h+=N(jb.bin2hex(F));b+="EQDN"+N(h)}if(r>0)for(var W in g){var da=uh(W,true);h="";h+=N(g[W]);h+=N(da);b+="GRPI"+N(h)}if(n){L=n.length;for(D=0;D<L;D++){var ta=n[D];h="";h+=N(ta.iid);h+=N(ta.iname);h+=N(ta.aids);h+=N(ta.ffids);h+=N(ta.pwprotect?"1":"0");b+="IDNT"+N(h)}}if(t){var pb=
t.length;for(D=0;D<pb;D++){var ua=t[D];h="";h+=N(ua.id);h+=N(ua.fiid);h+=N(ua.sharerusername);h+=N(ua.sharedfromaid);h+=N(ua.sharemessage);h+=N(ua.sharekeyenchex);h+=N(ua.sharekeyenchexsig);h+=N(ua.sharename);h+=N(ua.sharegroup);h+=N(ua.username);h+=N(ua.password);h+=N(ua.extra);h+=N(ua.shareautoaccept);o=0;n="";for(D in ua.shareafids){o++;n+=N(D);n+=N(ua.shareafids[D])}h+=N(o);h+=n;b+="PNDG"+N(h)}}if(C){pb=C.length;for(D=0;D<pb;D++){var V=C[D];h="";h+=N(V.aid);for(W in V)if(W!="aid"){h+=N(V[W]);
h+=N(V[value])}b+="SHAP"+N(h)}}if(q){for(D=0;typeof q.neveraccounts!="undefined"&&D<q.neveraccounts.length;D++){var aa=N("0")+N(jb.bin2hex(q.neveraccounts[D]));b+="NEVR"+N(aa)}for(D=0;typeof q.nevergenerates!="undefined"&&D<q.nevergenerates.length;D++){aa=N("1")+N(jb.bin2hex(q.nevergenerates[D]));b+="NEVR"+N(aa)}for(D=0;typeof q.neverformfills!="undefined"&&D<q.neverformfills.length;D++){aa=N("2")+N(jb.bin2hex(q.neverformfills[D]));b+="NEVR"+N(aa)}for(D=0;typeof q.neverautologins!="undefined"&&D<
q.neverautologins.length;D++){aa=N("3")+N(jb.bin2hex(q.neverautologins[D]));b+="NEVR"+N(aa)}for(D=0;typeof q.onlyaccounts!="undefined"&&D<q.onlyaccounts.length;D++){aa=N("10000")+N(jb.bin2hex(q.onlyaccounts[D]));b+="NEVR"+N(aa)}for(D=0;typeof q.onlygenerates!="undefined"&&D<q.onlygenerates.length;D++){aa=N("10001")+N(jb.bin2hex(q.onlygenerates[D]));b+="NEVR"+N(aa)}for(D=0;typeof q.onlyformfills!="undefined"&&D<q.onlyformfills.length;D++){aa=N("10002")+N(jb.bin2hex(q.onlyformfills[D]));b+="NEVR"+N(aa)}for(D=
0;typeof q.onlyautologins!="undefined"&&D<q.onlyautologins.length;D++){aa=N("10003")+N(jb.bin2hex(q.onlyautologins[D]));b+="NEVR"+N(aa)}}if(A){var pa=A.length;for(D=0;D<pa;D++){var x=A[D];h="";h+=N(jb.bin2hex(x.url));h+=N(x.exacthost);h+=N(x.exactport);b+="URUL"+N(h)}}b+="MXID"+N(Cb);b+="ENDM"+N("OK");f=b;kd=xb=""}else{f=Components.classes["@mozilla.org/xmlextras/xmlserializer;1"].getService(Components.interfaces.nsIDOMSerializer).serializeToString(b.documentElement);if(!f||f=="")return false}return e?
f:vh(f,c,d)}catch(ca){return false}}function vh(b,c,d){if(!b||b=="")return false;try{if(b.substring(0,4)=="LPAV"&&Aa())b="LPB64"+xc(b);var e=null,f="";if(Tb("password_offline")&&Tb("password_offline")!=""){e=Tb("password_offline");if(b.substring(0,38).indexOf('<?xml version="1.0" encoding="UTF-8"?>')==0)b=b.substring(38);f="type=sesameoffline\ndata="}else if(wb("password_offline")&&wb("password_offline")!=""){e=wb("password_offline");if(b.substring(0,38).indexOf('<?xml version="1.0" encoding="UTF-8"?>')==
0)b=b.substring(38);f="type=trueapioffline\ndata="}else if(qb("password_offline")&&qb("password_offline")!=""){if(!qb("password_keysline")||qb("password_keysline")==""||!qb("password_server")||qb("password_server")==""){e=qb("password_offline");f="type=yubikeyoffline\ndata="}else{e=qb("password_server");f="type=yubikeyofflinemulti\nkeys="+qb("password_keysline")+"\ndata="}if(b.substring(0,38).indexOf('<?xml version="1.0" encoding="UTF-8"?>')==0)b=b.substring(38)}if(e){b=P(b,Da(e));if(!b||b=="")return false;
b=f+b}e=null;if(Aa()){e=P(b);if(!e||e=="")return false;if(d!="lpOpenExport")e=sd(e,true);Yb(ia+"_lps.act.sxml",e,c)}else{e=b;Yb(ia+"_lp.act.xml",e,c)}xa&&d!="ChangeMasterPassword"&&Mc("refresh_local",{data0:ia});return true}catch(g){return false}}function vc(b,c){try{if(typeof b=="object"&&typeof b.accts_version!="undefined"){b.accts_version=c;return true}else{var d=b.getElementsByTagName("accounts");if(d.length>0){d[0].setAttribute("accts_version",c);return true}return false}}catch(e){return false}}
function Ne(b){try{var c;if(typeof b=="object"&&typeof b.accts_version!="undefined")c=b.accts_version;else{var d=b.getElementsByTagName("accounts");if(d.length>0)c=parseInt(d[0].getAttribute("accts_version"));else return false}rb=c+1;return vc(b,c+1)}catch(e){return false}}function dc(b,c,d){try{if(typeof b=="object"&&typeof b.accts_version!="undefined")for(var e=1;e<=2;e++)for(var f=e==1?b.sites:b.securenotes,g=0;g<f.length;g++){if(f[g].aid==c){f.splice(g,1);return d?vj(b,c):true}}else{g=b.getElementsByTagName("account");
for(e=0;e<g.length;e++)if(g[e].getAttribute("id")==c){var h=g[e].parentNode;if(h){h.removeChild(g[e]);return d?vj(b,c):true}break}}return false}catch(j){return false}}function kc(b,c,d){try{if(typeof b=="object"&&typeof b.accts_version!="undefined"){var e=[];e.aid=c.id;e.name=c.name;e.group=c.group!=LP.get_null_group()?c.group:"";e.url=c.url;e.extra=ya(c.extra);e.fav=c.fav;e.sharedfromaid=c.sharedfromaid;e.pwprotect=c.pwprotect;e.genpw=c.genpw;e.sn=c.sn;e.last_touch=c.last_touch;e.autologin=c.autologin==
"1";e.never_autofill=c.never_autofill=="1";e.realm_data=ya(P(c.realm));e.fiid=c.id;e.basic_auth=c.basic_auth?"1":"0";e.fields=[];for(var f=0;f<c.logins.length;f++){var g=c.logins[f];if(f==0){e.username=ya(g.username);e.password=ya(g.password);e.custom_js=g.custom_js;e.submit_id=g.submit_id;e.captcha_id=g.captcha_id;e.urid=g.urid;e.method=g.method;e.action=g.action}for(var h=0;h<g.fields.length;h++){var j=g.fields[h],l=[];l.otherfield=false;l.name=j.name;l.type=j.type;l.value=j.value;if("email"==l.type||
"text"==l.type||"password"==l.type||"textarea"==l.type)l.value=ya(l.value);l.checked=(j.type=="radio"||j.type=="checkbox")&&j.checked;l.formname="";l.urid=g.urid;l.otherlogin="0";l.url=f>0?Ka(g.url):"";e.fields.push(l)}for(h=0;h<g.otherfields.length;h++){j=g.otherfields[h];l=[];l.otherfield=true;l.name=j.name;l.type=j.type;l.value=j.value;if("email"==l.type||"text"==l.type||"password"==l.type||"textarea"==l.type)l.value=ya(l.value);l.checked=(j.type=="radio"||j.type=="checkbox")&&j.checked;l.formname=
j.formname;l.urid=g.urid;l.otherlogin="0";l.url=f>0?Ka(g.url):"";e.save_all=e.username.length==0&&e.password.length==0;e.fields.push(l)}}for(f=0;f<c.otherlogins.length;f++){g=c.otherlogins[f];for(h=0;h<g.fields.length;h++){j=g.fields[h];l=[];l.otherfield=false;l.name=j.name;l.type=j.type;l.value=j.value;if("email"==l.type||"text"==l.type||"password"==l.type||"textarea"==l.type)l.value=ya(l.value);l.checked=(j.type=="radio"||j.type=="checkbox")&&j.checked;l.formname="";l.urid=g.urid;l.otherlogin="1";
l.url="";e.fields.push(l)}for(h=0;h<g.otherfields.length;h++){j=g.otherfields[h];l=[];l.otherfield=true;l.name=j.name;l.type=j.type;l.value=j.value;if("email"==l.type||"text"==l.type||"password"==l.type||"textarea"==l.type)l.value=ya(l.value);l.checked=(j.type=="radio"||j.type=="checkbox")&&j.checked;l.formname=j.formname;l.urid=g.urid;l.otherlogin="1";l.url="";e.save_all=e.username.length==0&&e.password.length==0;e.fields.push(l)}}e.sn?b.securenotes.push(e):b.sites.push(e);return d?wj(b,c.id):true}else{e=
b.getElementsByTagName("accounts");if(e.length>0){var o=b.createElement("account");o.setAttribute("name",P(c.name));o.setAttribute("urid",c.urid);o.setAttribute("id",c.id);o.setAttribute("url",Ka(c.url));o.setAttribute("m",c.manual);o.setAttribute("http",c.is_http);o.setAttribute("fav",c.fav);o.setAttribute("favico","0");o.setAttribute("autologin",c.autologin);o.setAttribute("basic_auth",c.basic_auth?"1":"0");o.setAttribute("group",P(c.group));o.setAttribute("fiid",c.id);o.setAttribute("genpw",c.genpw?
"1":"0");o.setAttribute("extra",c.extra);o.setAttribute("isbookmark",c.isbookmark?"1":"0");o.setAttribute("never_autofill",c.never_autofill);o.setAttribute("last_touch",c.last_touch);o.setAttribute("sn",c.sn?"1":"0");o.setAttribute("realm",P(c.realm));o.setAttribute("sharedfromaid",c.sharedfromaid);o.setAttribute("pwprotect",c.pwprotect?"1":"0");for(f=0;f<c.logins.length;f++){g=c.logins[f];var n=b.createElement("login");n.setAttribute("urid",g.urid);n.setAttribute("url",Ka(g.url));n.setAttribute("submit_id",
g.submit_id);n.setAttribute("captcha_id",g.captcha_id);n.setAttribute("custom_js",g.custom_js);n.setAttribute("u",g.username);n.setAttribute("p",g.password);n.setAttribute("o",g.openid_url);n.setAttribute("method",g.method);for(h=0;h<g.fields.length;h++){j=g.fields[h];l=b.createElement("field");l.setAttribute("name",j.name);l.setAttribute("type",j.type);l.setAttribute("value",j.value);if(j.type=="radio"||j.type=="checkbox")l.setAttribute("checked",j.checked?"1":"0");n.appendChild(l)}for(h=0;h<g.otherfields.length;h++){j=
g.otherfields[h];l=b.createElement("otherfield");l.setAttribute("name",j.name);l.setAttribute("type",j.type);l.setAttribute("formname",j.formname);l.setAttribute("value",j.value);if(j.type=="radio"||j.type=="checkbox")l.setAttribute("checked",j.checked?"1":"0");n.appendChild(l)}o.appendChild(n)}for(f=0;f<c.otherlogins.length;f++){g=c.otherlogins[f];n=b.createElement("otherlogin");n.setAttribute("urid",g.urid);n.setAttribute("url",Ka(g.url));n.setAttribute("submit_id",g.submit_id);n.setAttribute("captcha_id",
g.captcha_id);n.setAttribute("custom_js",g.custom_js);n.setAttribute("u",g.username);n.setAttribute("p",g.password);n.setAttribute("o",g.openid_url);n.setAttribute("method",g.method);for(h=0;h<g.fields.length;h++){j=g.fields[h];l=b.createElement("field");l.setAttribute("name",j.name);l.setAttribute("type",j.type);l.setAttribute("value",j.value);if(j.type=="radio"||j.type=="checkbox")l.setAttribute("checked",j.checked?"1":"0");n.appendChild(l)}for(h=0;h<g.otherfields.length;h++){j=g.otherfields[h];
l=b.createElement("otherfield");l.setAttribute("name",j.name);l.setAttribute("type",j.type);l.setAttribute("formname",j.formname);l.setAttribute("value",j.value);if(j.type=="radio"||j.type=="checkbox")l.setAttribute("checked",j.checked?"1":"0");n.appendChild(l)}o.appendChild(n)}e[0].appendChild(o);return d?wj(b,c.id):true}}return false}catch(p){return false}}function vj(b,c){try{if(typeof b=="object"&&typeof b.accts_version!="undefined")for(var d=0;d<b.identities.length;d++){for(var e=b.identities[d].aids,
f=e.split(","),g="",h=0;h<f.length;h++)if(f[h]!=c)if(g=="")g=f[h];else g+=","+f[h];b.identities[d].aids=g}else{var j=b.getElementsByTagName("identity");for(d=0;d<j.length;d++){e=j[d].getAttribute("aids");f=e.split(",");g="";for(h=0;h<f.length;h++)if(f[h]!=c)if(g=="")g=f[h];else g+=","+f[h];j[d].setAttribute("aids",g)}}return true}catch(l){return false}}function wj(b,c){try{if(!LP.lpprefsHasUserValue("identity"))return true;var d=LP.lpprefsGetCharPref("identity");if(d=="")return true;if(typeof b==
"object"&&typeof b.accts_version!="undefined")for(var e=0;e<b.identities.length;e++){if(b.identities[e].iid==d){var f=b.identities[e].aids;if(f=="")f=c;else f+=","+c;b.identities[e].aids=f;return true}}else{var g=b.getElementsByTagName("identity");for(e=0;e<g.length;e++)if(g[e].getAttribute("iid")==d){f=g[e].getAttribute("aids");if(f=="")f=c;else f+=","+c;g[e].setAttribute("aids",f);return true}}return false}catch(h){return false}}function xj(b,c){try{if(typeof b=="object"&&typeof b.accts_version!=
"undefined")for(var d=0;d<b.identities.length;d++){var e=b.identities[d].ffids;if(e==null)e="";for(var f=e.split(","),g="",h=0;h<f.length;h++)if(f[h]!=c)if(g=="")g=f[h];else g+=","+f[h];b.identities[d].ffids=g}else{var j=b.getElementsByTagName("identity");for(d=0;d<j.length;d++){e=j[d].getAttribute("ffids");if(e==null)e="";f=e.split(",");g="";for(h=0;h<f.length;h++)if(f[h]!=c)if(g=="")g=f[h];else g+=","+f[h];j[d].setAttribute("ffids",g)}}return true}catch(l){return false}}function yj(b,c){try{if(!LP.lpprefsHasUserValue("identity"))return true;
var d=LP.lpprefsGetCharPref("identity");if(d=="")return true;if(typeof b=="object"&&typeof b.accts_version!="undefined")for(var e=0;e<b.identities.length;e++){if(b.identities[e].iid==d){var f=b.identities[e].ffids;if(f==null)f="";if(f=="")f=c;else f+=","+c;b.identities[e].ffids=f;return true}}else{var g=b.getElementsByTagName("identity");for(e=0;e<g.length;e++)if(g[e].getAttribute("iid")==d){f=g[e].getAttribute("ffids");if(f==null)f="";if(f=="")f=c;else f+=","+c;g[e].setAttribute("ffids",f);return true}}return false}catch(h){return false}}
function Qi(b,c,d){try{if(typeof b=="object"&&typeof b.accts_version!="undefined")for(var e=0;e<b.formfills.length;e++){if(b.formfills[e].ffid==c){b.formfills.splice(e,1);return d?xj(b,c):true}}else{var f=b.getElementsByTagName("formfill");for(e=0;e<f.length;e++)if(f[e].getAttribute("ffid")==c){var g=f[e].parentNode;if(g){g.removeChild(f[e]);return d?xj(b,c):true}break}}return false}catch(h){return false}}function Ri(b,c,d){try{if(typeof b=="object"&&typeof b.accts_version!="undefined"){var e=[];
e.ffid=c.ffid;e.profiletype=c.profiletype;e.profilename=ya(P(c.profilename));e.profilelanguage=ya(c.profilelanguage);e.firstname=ya(c.firstname);e.firstname2=ya(c.firstname2);e.firstname3=ya(c.firstname3);e.middlename=ya(c.middlename);e.lastname=ya(c.lastname);e.lastname2=ya(c.lastname2);e.lastname3=ya(c.lastname3);e.email=ya(c.email);e.mobileemail=ya(c.mobileemail);e.company=ya(c.company);e.ssn=ya(c.ssn);e.birthday=ya(c.birthday);e.address1=ya(c.address1);e.address2=ya(c.address2);e.address3=ya(c.address3);
e.city=ya(c.city);e.county=ya(c.county);e.state=ya(c.state);e.state_name=ya(c.state_name);e.zip=ya(c.zip);e.country=ya(c.country);e.country_cc3l=ya(c.country_cc3l);e.country_name=ya(c.country_name);e.phone3lcc=ya(c.countryphone);e.evephone3lcc=ya(c.countryevephone);e.fax3lcc=ya(c.countryfaxphone);e.mobilephone3lcc=ya(c.countrymobphone);e.phone=ya(c.phone);e.fax=ya(c.fax);e.mobilephone=ya(c.mobilephone);e.evephone=ya(c.evephone);e.phoneext=ya(c.phoneext);e.eveext=ya(c.evephoneext);e.mobileext=ya(c.mobilephoneext);
e.faxext=ya(c.faxphoneext);e.ccname=ya(c.ccname);e.ccnum=ya(c.ccnum);e.ccstart=ya(c.ccstart);e.ccexp=ya(c.ccexp);e.cccsc=ya(c.cccsc);e.ccissuenum=ya(c.ccissuenum);e.username=ya(c.username);e.gender=ya(c.gender);e.title=ya(c.title);e.pwprotect=c.pwprotect;e.timezone=ya(c.timezone);e.bankname=ya(c.bankname);e.bankacctnum=ya(c.bankacctnum);e.bankroutingnum=ya(c.bankroutingnum);e.custom_fields=[];for(var f=0;f<c.customfields.length;f++){var g=[];g.cfid=c.customfields[f].cfid;g.text=ya(c.customfields[f].text);
g.value=ya(c.customfields[f].value);g.alttext=ya(c.customfields[f].alttext);e.custom_fields.push(g)}e.notes=ya(c.notes);b.formfills.push(e);return d?yj(b,c.ffid):true}else{e=b.getElementsByTagName("formfills");if(e.length>0){var h=b.createElement("formfill");h.setAttribute("ffid",c.ffid);h.setAttribute("profiletype",c.profiletype);h.setAttribute("profilename",P(c.profilename));h.setAttribute("profilelanguage",c.profilelanguage);h.setAttribute("firstname",c.firstname);h.setAttribute("firstname2",c.firstname2);
h.setAttribute("firstname3",c.firstname3);h.setAttribute("middlename",c.middlename);h.setAttribute("lastname",c.lastname);h.setAttribute("lastname2",c.lastname2);h.setAttribute("lastname3",c.lastname3);h.setAttribute("email",c.email);h.setAttribute("mobileemail",c.mobileemail);h.setAttribute("company",c.company);h.setAttribute("ssn",c.ssn);h.setAttribute("birthday",c.birthday);h.setAttribute("address1",c.address1);h.setAttribute("address2",c.address2);h.setAttribute("address3",c.address3);h.setAttribute("city",
c.city);h.setAttribute("county",c.county);h.setAttribute("state",c.state);h.setAttribute("state_name",c.state_name);h.setAttribute("zip",c.zip);h.setAttribute("country",c.country);h.setAttribute("country_cc3l",c.country_cc3l);h.setAttribute("country_name",c.country_name);h.setAttribute("phone3lcc",c.countryphone);h.setAttribute("evephone3lcc",c.countryevephone);h.setAttribute("fax3lcc",c.countryfaxphone);h.setAttribute("mobilephone3lcc",c.countrymobphone);h.setAttribute("phone",c.phone);h.setAttribute("fax",
c.fax);h.setAttribute("mobilephone",c.mobilephone);h.setAttribute("evephone",c.evephone);h.setAttribute("phoneext",c.phoneext);h.setAttribute("eveext",c.evephoneext);h.setAttribute("mobileext",c.mobilephoneext);h.setAttribute("faxext",c.faxphoneext);h.setAttribute("ccname",c.ccname);h.setAttribute("ccnum",c.ccnum);h.setAttribute("ccstart",c.ccstart);h.setAttribute("ccexp",c.ccexp);h.setAttribute("cccsc",c.cccsc);h.setAttribute("ccissuenum",c.ccissuenum);h.setAttribute("username",c.username);h.setAttribute("gender",
c.gender);h.setAttribute("title",c.title);h.setAttribute("pwprotect",c.pwprotect?"1":"0");h.setAttribute("timezone",c.timezone);h.setAttribute("bankname",c.bankname);h.setAttribute("bankacctnum",c.bankacctnum);h.setAttribute("bankroutingnum",c.bankroutingnum);for(f=0;f<c.customfields.length;f++){g=b.createElement("customfield");g.setAttribute("cfid",c.customfields[f].cfid);g.setAttribute("text",c.customfields[f].text);g.setAttribute("value",c.customfields[f].value);g.setAttribute("alttext",c.customfields[f].alttext);
h.appendChild(g)}h.setAttribute("notes",c.notes);e[0].appendChild(h);return d?yj(b,c.ffid):true}return false}}catch(j){return false}}function El(b,c,d){try{if(typeof b=="object"&&typeof b.accts_version!="undefined"){var e=b.neverurls.neveraccounts;if(d==1)e=b.neverurls.nevergenerates;else if(d==2)e=b.neverurls.neverformfills;else if(d==3)e=b.neverurls.neverautologins;jj(e,c);return true}else return false}catch(f){return false}}function ud(){try{var b=Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("CurProcD",
Components.interfaces.nsIFile).path.toLowerCase();if(b.indexOf("portable")!=-1&&b.indexOf("firefox")!=-1)return true;else if(b.indexOf("\\app\\firefox")!=-1&&b.indexOf("\\app\\firefox")==b.length-12){var c=b.substring(0,b.length-11)+"firefoxportable.exe",d=Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);d.initWithPath(c);if(d.exists())return true}return false}catch(e){return false}}function zj(b,c){try{keyName="DOM_VK_"+b.toUpperCase();var d,e=LP.mostRecent().KeyEvent[keyName];
if(c===undefined)d=void 0;else{var f=c.ownerDocument.createEvent("KeyEvents");f.initKeyEvent("keydown",true,true,null,false,false,false,false,e,0);var g=c.dispatchEvent(f);if(g){f=c.ownerDocument.createEvent("KeyEvents");f.initKeyEvent("keypress",true,true,null,false,false,false,false,e,0);g=c.dispatchEvent(f)}f=c.ownerDocument.createEvent("KeyEvents");f.initKeyEvent("keyup",true,true,null,false,false,false,false,e,0);c.dispatchEvent(f);d=g}return d}catch(h){}}function Fl(){this.onUpdateStarted=function(){};
this.onUpdateEnded=function(){};this.onAddonUpdateEnded=function(b,c){if(c==1&&Qd&&Se){if(wh||LP.lpConfirmYesNo(LP.lpgs("An Update is Available. Would you like to install?"))){var d=[];d[0]=Se;try{Qd.addDownloads(d,1,true)}catch(e){Qd.addDownloads(d,1,null)}LP.mostRecent().setTimeout("LP.alert(LP.lpgs('MustRestartUpdate'))",1E4)}}else c==8&&LP.alert(LP.lpgs("No Updates are Available"))};this.onAddonUpdateStarted=function(){}}function Jd(b){if(typeof b=="string"&&b.length>45E3)b=b.substring(0,45E3);
return b}function sb(b){return b.toLowerCase().replace(/\s*/g,"")}function Aj(){}function Fd(b){if(""==b){na="";Od=Ka(na);Xf=""}else{na=b;Od=Ka(na);Xf=za(b)}}function aj(){for(var b=false,c=false,d=0;d<fa.length;d++){var e=fa[d];if(e.profiletype==0)b=true;if(e.ccnum!="")c=true;if(b&&c)return true}return false}function Bj(b){if(!(typeof b=="undefined"||typeof b.childNodes=="undefined"))for(;b.hasChildNodes();)b.removeChild(b.firstChild)}function Gl(b,c){var d={},e={},f={},g={},h={},j={},l={},o={};
d.value=0;e.value=false;f.value=0;g.value=0;h.value=false;j.value=false;l.value=false;o.value=false;var n=[];Cj(b.elements,c,d,[],n,e,true,null,null,null,g,Sc["en-US"],Bd,qe["en-US"],f,false,h,j,l,o,c.contentWindow);d=[];for(f=e=0;f<n.length;f++){g=n[f];if(g.elt.value!=""){d[g.regexpname]=g.elt.value;e++}}if(e>=5){if(!(n=fa.length==0))a:{n=ej(d);for(e=0;e<fa.length;e++){f=0;g=fa[e];Sa(n.firstname)&&n.firstname.length!=0&&n.firstname!=g.firstname&&f++;Sa(n.firstname2)&&n.firstname2.length!=0&&n.firstname2!=
g.firstname2&&f++;Sa(n.firstname3)&&n.firstname3.length!=0&&n.firstname3!=g.firstname3&&f++;Sa(n.middlename)&&n.middlename.length!=0&&n.middlename!=g.middlename&&f++;Sa(n.lastname)&&n.lastname.length!=0&&n.lastname!=g.lastname&&f++;Sa(n.lastname2)&&n.lastname2.length!=0&&n.lastname2!=g.lastname2&&f++;Sa(n.lastname3)&&n.lastname3.length!=0&&n.lastname3!=g.lastname3&&f++;Sa(n.email)&&n.email.length!=0&&n.email!=g.email&&f++;Sa(n.mobileemail)&&n.mobileemail.length!=0&&n.mobileemail!=g.mobileemail&&f++;
Sa(n.company)&&n.company.length!=0&&n.company!=g.company&&f++;Sa(n.ssn)&&n.ssn.length!=0&&n.ssn!=g.ssn&&f++;Sa(n.birthday)&&n.birthday.length!=0&&n.birthday!=g.birthday&&f++;Sa(n.address1)&&n.address1.length!=0&&n.address1!=g.address1&&f++;Sa(n.address2)&&n.address2.length!=0&&n.address2!=g.address2&&f++;Sa(n.address3)&&n.address3.length!=0&&n.address3!=g.address3&&f++;Sa(n.city)&&n.city.length!=0&&n.city!=g.city&&f++;Sa(n.county)&&n.county.length!=0&&n.county!=g.county&&f++;Sa(n.state_name)&&n.state_name.length!=
0&&n.state_name!=g.state_name&&f++;Sa(n.zip)&&n.zip.length!=0&&n.zip!=g.zip&&f++;Sa(n.country_name)&&n.country_name.length!=0&&n.country_name!=g.country_name&&f++;Sa(n.phone)&&n.phone.length!=0&&n.phone!=g.phone&&f++;Sa(n.phoneext)&&n.phoneext.length!=0&&n.phoneext!=g.phoneext&&f++;Sa(n.faxext)&&n.faxext.length!=0&&n.faxext!=g.faxext&&f++;Sa(n.mobileext)&&n.mobileext.length!=0&&n.mobileext!=g.mobileext&&f++;Sa(n.eveext)&&n.eveext.length!=0&&n.eveext!=g.eveext&&f++;Sa(n.fax)&&n.fax.length!=0&&n.fax!=
g.fax&&f++;Sa(n.mobilephone)&&n.mobilephone.length!=0&&n.mobilephone!=g.mobilephone&&f++;Sa(n.evephone)&&n.evephone.length!=0&&n.evephone!=g.evephone&&f++;Sa(n.ccname)&&n.ccname.length!=0&&n.ccname!=g.ccname&&f++;Sa(n.ccnum)&&n.ccnum.length!=0&&n.ccnum!=g.ccnum&&f++;Sa(n.ccstart)&&n.ccstart.length!=0&&n.ccstart!=g.ccstart&&f++;Sa(n.ccexp)&&n.ccexp.length!=0&&n.ccexp!=g.ccexp&&f++;Sa(n.cccsc)&&n.cccsc.length!=0&&n.cccsc!=g.cccsc&&f++;Sa(n.ccissuenum)&&n.ccissuenum.length!=0&&n.ccissuenum!=g.ccissuenum&&
f++;Sa(n.username)&&n.username.length!=0&&n.username!=g.username&&f++;Sa(n.gender)&&n.gender.length!=0&&n.gender!=g.gender&&f++;Sa(n.title)&&n.title.length!=0&&n.title!=g.title&&f++;Sa(n.timezone)&&n.timezone.length!=0&&n.timezone!=g.timezone&&f++;Sa(n.bankname)&&n.bankname.length!=0&&n.bankname!=g.bankname&&f++;Sa(n.bankacctnum)&&n.bankacctnum.length!=0&&n.bankacctnum!=g.bankacctnum&&f++;Sa(n.bankroutingnum)&&n.bankroutingnum.length!=0&&n.bankroutingnum!=g.bankroutingnum&&f++;if(f<4){n=false;break a}}n=
true}n&&Ob("Would you like to save this form data into a LastPass Form Fill Profile?",c,0,"addformfill",d)}}function ej(b){var c=new of;for(var d in b){var e=b[d];if(d=="firstname")c.firstname=P(e);else if(d=="firstname2")c.firstname2=P(e);else if(d=="firstname3")c.firstname3=P(e);else if(d=="lastname")c.lastname=P(e);else if(d=="lastname2")c.lastname2=P(e);else if(d=="lastname3")c.lastname3=P(e);else if(d=="city")c.city=P(e);else if(d=="county")c.county=P(e);else if(d=="state")c.state_name=P(e);
else if(d=="address"||d=="address1")c.address1=P(e);else if(d=="address2")c.address2=P(e);else if(d=="address3")c.address3=P(e);else if(d=="country")c.country_name=P(e);else if(d=="email")c.email=P(e);else if(d=="mobileemail")c.mobileemail=P(e);else if(d=="company")c.company=P(e);else if(d=="middlename"||d=="middleinitial")c.middlename=P(e);else if(d=="bankacctnum")c.bankacctnum=P(e);else if(d=="bankroutingnum")c.bankroutingnum=P(e);else if(d=="bankname")c.bankname=P(e);else if(d=="username")c.username=
P(e);else if(d=="phoneext")c.phoneext=P(e);else if(d=="faxext")c.faxphoneext=P(e);else if(d=="mobileext")c.mobilephoneext=P(e);else if(d=="eveext")c.evephoneext=P(e);else if(d=="ccname")c.ccname=P(e);else if(d=="cccsc")c.cccsc=P(e);else if(d=="ccissuenum")c.ccissuenum=P(e);else if(d=="timezone")c.timezone=P(e);else if(d=="title")c.title=P(e);else if(d=="gender")c.gender=P(e)}if(typeof b.ssn!="undefined")c.ssn=b.ssn;else if(typeof b.ssn1!="undefined"){c.ssn=b.ssn1;if(typeof b.ssn2!="undefined"){c.ssn+=
b.ssn2;if(typeof b.ssn3!="undefined")c.ssn+=b.ssn3}}c.ssn=P(c.ssn);if(typeof b.zip!="undefined")c.zip=b.zip;else if(typeof b.zip1!="undefined"){c.zip=b.zip1;if(typeof b.zip2!="undefined")c.zip+=b.zip2}c.zip=P(c.zip);if(typeof b.phone!="undefined")c.phone=b.phone;else if(typeof b.phone1!="undefined"){c.phone=b.phone1;if(typeof b.phone2!="undefined"){c.phone+=b.phone2;if(typeof b.phone3!="undefined")c.phone+=b.phone3}}else c.phone="";c.phone=c.phone.replace(/\D+/g,"");if(c.phone.match(/^(?:[2-9]\d{2}){2}\d{4}$/))c.phone=
"1"+c.phone;c.phone=P(c.phone);if(typeof b.mobilephone!="undefined")c.mobilephone=b.mobilephone;else if(typeof b.mobilephone1!="undefined"){c.mobilephone=b.mobilephone1;if(typeof b.mobilephone2!="undefined"){c.mobilephone+=b.mobilephone2;if(typeof b.mobilephone3!="undefined")c.mobilephone+=b.mobilephone3}}else c.mobilephone="";c.mobilephone=c.mobilephone.replace(/\D+/g,"");if(c.mobilephone.match(/^(?:[2-9]\d{2}){2}\d{4}$/))c.mobilephone="1"+c.mobilephone;c.mobilephone=P(c.mobilephone);if(typeof b.evephone!=
"undefined")c.evephone=b.evephone;else if(typeof b.evephone1!="undefined"){c.evephone=b.evephone1;if(typeof b.evephone2!="undefined"){c.evephone+=b.evephone2;if(typeof b.evephone3!="undefined")c.evephone+=b.evephone3}}else c.evephone="";c.evephone=c.evephone.replace(/\D+/g,"");if(c.evephone.match(/^(?:[2-9]\d{2}){2}\d{4}$/))c.evephone="1"+c.evephone;c.evephone=P(c.evephone);if(typeof b.fax!="undefined")c.fax=b.fax;else if(typeof b.fax1!="undefined"){c.fax=b.fax1;if(typeof b.fax2!="undefined"){c.fax+=
b.fax2;if(typeof b.fax3!="undefined")c.fax+=b.fax3}}else c.fax="";c.fax=c.fax.replace(/\D+/g,"");if(c.fax.match(/^(?:[2-9]\d{2}){2}\d{4}$/))c.fax="1"+c.fax;c.fax=P(c.fax);if(typeof b.ccnum!="undefined")c.ccnum=b.ccnum;else if(typeof b.ccnum1!="undefined"){c.ccnum=b.ccnum1;if(typeof b.ccnum2!="undefined"){c.ccnum+=b.ccnum2;if(typeof b.ccnum3!="undefined"){c.ccnum+=b.ccnum3;if(typeof fdata.ccnum4!="undefined")c.ccnum+=b.ccnum4}}}c.ccnum=P(c.ccnum);c.customfields=[];return c}function Sa(b){return typeof b!=
"undefined"}function Dj(b,c,d,e){var f=d.keyCode?d.keyCode:d.which;d=d.shiftKey?d.shiftKey:f==16?true:false;f=f>=65&&f<=90&&!d||f>=97&&f<=122&&d?true:false;d=b.getElementById(e).style.display;b.getElementById(e).style.display=f?"":"none";if(d!=b.getElementById(e).style.display)c.innerHeight+=f?+30:-30}function Hl(b,c,d){if(b.readyState==4&&b.status==200&&b.responseXML&&b.responseXML.documentElement){b=sd(d,true);Yb(ia+"_ff.sotp",b)}}function Si(){if(xh!=null)return xh;if(Aa()&&typeof ba.getappdatapath==
"function")return xh=ba.getappdatapath();return null}function Il(b,c,d){if(!b)return false;if(!ga)return false;if(b.readyState==4)if(b.status==200||b.status==0&&c){LP.lpacctsreq=b;y=[];lc=[];Tc=[];Ej={};id=0;qa=[];sa=[];Nd=[];Jb=[];Pb=[];tc=[];uc=[];pc=[];Yc=[];fd=[];gd=[];Zc=[];wa=[];bb=[];Fc=[];fa=[];La=[];Ha=[];ad=[];Yf=[];if(!b.responseXML){c=b.responseText;if(!d&&c.substring(0,4)!="LPAV")c=wc(c);if(c.substring(0,4)=="LPAV"){var e=[],f=[];b=[];pe=0;xb=na;kd=Ka(xb);jb=Ya;c=th(c,c.length,-1,0,Jl,
[],[],[],e,f,[],[],true,d,null,[],b,[],[],[],[]);kd=xb="";return c}}if(!Fj(b)){d&&LP.lpClearCache(true,false,false);return false}e=RegExp(LP.lpgs("ff_captcha_regexp"),"i");c=b.responseXML.documentElement;var g=c.getElementsByTagName("error");if(g.length>0){f=g[0].hasAttribute("notloggedin");g=g[0].hasAttribute("nosession");if(f||g){Ia();return false}}f=c.getElementsByTagName("accounts");if(!LP.adminoverride.length)if(f.length>0&&f[0].hasAttribute("encrypted_username")){g=f[0].getAttribute("encrypted_username");
var h=K(g);if(g!=""&&Z!=h){U("Encrypted username check failed: "+P(Z)+" vs "+g+" for "+Z+" local "+d,null);LP.lpClearCache(true,true,false);Ia();LP.alert(LP.lpgs("An error has been encountered while loading your sites. Please relogin."));return false}}if(f.length>0){g=yb(ia+"_lps.act.sxml")||yb(ia+"_lps.act.xml");LP.lpdolostpwotp&&!g&&!LP.lpprefsHasUserValue("StoreLostPWOTP")&&LP.lpprefsSetBoolPref("StoreLostPWOTP",true)}!d&&f.length>0&&vh(b.responseText,null,"parse_getaccts.js");if(f.length>0){b=
f[0].getAttribute("pd");Df=b!=null?b:0;Xa=parseInt(f[0].getAttribute("accts_version"));d||(rb=parseInt(f[0].getAttribute("accts_version")))}b="";g=false;if(LP.lpprefsHasUserValue("identity"))b=LP.lpprefsGetCharPref("identity");f=c.getElementsByTagName("identity");for(d=0;d<f.length;d++){h=new li;h.iid=f[d].getAttribute("iid");h.iname=K(f[d].getAttribute("iname"));h.aids=f[d].getAttribute("aids");h.ffids=f[d].getAttribute("ffids");if(h.ffids==null)h.ffids="";h.pwprotect=1==parseInt(f[d].getAttribute("pwprotect"));
La[La.length]=h;if(b==h.iid)g=true}La.sort(Vi);sh();if(!g&&b!=""){LP.lpIdentityHelper("",true);LP.lpClearCache(true,false,false);Ia();LP.lpalert_ex(LP.lpgs("Your selected Identity no longer exists. Defaulting to 'All' and logging off."));return false}f=c.getElementsByTagName("account");g=[];if(f)for(d=0;d<f.length;d++){if(!f[d].hasAttribute("decryption_done")){f[d].setAttribute("name",lj(f[d].getAttribute("name")));f[d].setAttribute("group",lj(f[d].getAttribute("group")));f[d].setAttribute("decryption_done",
true)}g[g.length]=f[d]}f=g;f.sort(Uk);for(d=0;f!=null&&d<f.length;d++){g=f[d].getAttribute("id");if(LP.IdentityIsOk(b,g)){var j=f[d].getAttribute("name"),l=f[d].getAttribute("urid"),o=ih(f[d].getAttribute("url")),n=f[d].getAttribute("m"),p=f[d].getAttribute("http"),q=f[d].getAttribute("fav"),r=f[d].getAttribute("favico"),u=f[d].getAttribute("extra"),t=f[d].getAttribute("autologin");h=1==parseInt(f[d].getAttribute("basic_auth"));var C=1==parseInt(f[d].getAttribute("sn")),A=f[d].getAttribute("group");
A=A==""&&!C?LP.get_null_group():A==""&&C?LP.lpgs("SecureNotes"):A;f[d].getAttribute("id");var J=1==parseInt(f[d].getAttribute("genpw")),D=1==parseInt(f[d].getAttribute("isbookmark")),B=f[d].getAttribute("never_autofill"),z=f[d].getAttribute("last_touch"),L=K(f[d].getAttribute("realm")),S=f[d].getAttribute("sharedfromaid"),$=1==parseInt(f[d].getAttribute("pwprotect")),E={aid:g,manual:n,is_http:p};if(parseInt(q)==1){var ea=new Vb;ea.id=g;ea.command=E;bb[bb.length]=ea}E=new ub;E.pendingshare=false;E.name=
j;E.urid=l;E.id=g;E.url=o;E.manual=n;E.is_http=p;E.extra=u;E.fav=q;E.favico=r;E.autologin=t;E.basic_auth=h;E.group=A;E.fiid=g;E.genpw=J;E.isbookmark=D;E.never_autofill=B;E.last_touch=z;E.sn=C;E.sharedfromaid=S;E.save_all=false;E.pwprotect=$;E.realm=L;E.logins=[];E.otherlogins=[];E.fields=[];r=f[d].getElementsByTagName("fld");for(j=0;j<r.length;j++){p=new Lc;p.name=r[j].getAttribute("name");p.type=r[j].getAttribute("type");p.value=r[j].getAttribute("value");p.aftersubmit=1==parseInt(f[j].getAttribute("aftersubmit"));
if(p.type=="radio"||p.type=="checkbox"){p.checked=parseInt(r[v].getAttribute("checked"))==1?true:false;if(p.type=="radio"&&!p.checked)continue}E.fields[E.fields.length]=p}for(o=1;o<=2;o++){l=f[d].getElementsByTagName(o==1?"login":"otherlogin");for(j=0;j<l.length;j++){n=new oc;n.urid=l[j].getAttribute("urid");n.url=ih(l[j].getAttribute("url"));v=Ra(n.url);n.server=v.host;n.tld=ob(v.host,n.url);v=Ta(n.url,v);J||(Jb[Jb.length]=v);n.submit_id=l[j].getAttribute("submit_id");n.captcha_id=l[j].getAttribute("captcha_id");
n.custom_js=l[j].getAttribute("custom_js");n.username=l[j].getAttribute("u");n.password=l[j].getAttribute("p");n.openid_url=l[j].getAttribute("o");n.method=l[j].getAttribute("method");n.action="";n.unencryptedUsername=K(n.username);if(j==0){E.username=n.username;E.password=n.password;E.unencryptedUsername=n.unencryptedUsername}n.uname="";n.pname="";n.oname="";n.fields=[];r=l[j].getElementsByTagName("field");t=u=false;q=true;for(var v=0;v<r.length;v++){p=new Lc;p.name=r[v].getAttribute("name");p.type=
r[v].getAttribute("type");p.value=r[v].getAttribute("value");p.ordernum=r[v].getAttribute("o");p.ordernum||(q=false);if(("email"==p.type||"text"==p.type)&&p.name!="openid_url")if(n.username!=""&&p.value==n.username){n.uname=p.name;u=true}else if(!u&&(n.pname==""||n.uname==""))n.uname=p.name;if(p.type=="password")if(n.password!=""&&p.value==n.password){n.pname=p.name;t=true}else if(!t)n.pname=p.name;if(("email"==p.type||"text"==p.type)&&p.name=="openid_url")n.oname=p.name;if(p.type=="radio"||p.type==
"checkbox"){p.checked=parseInt(r[v].getAttribute("checked"))==1?true:false;if(p.type=="radio"&&!p.checked)continue}if(n.captcha_id==""&&"text"==p.type&&e.exec(p.name))n.captcha_id=p.name;n.fields[n.fields.length]=p}q&&n.fields.sort(Wi);n.otherfields=[];r=l[j].getElementsByTagName("otherfield");q=true;for(v=0;v<r.length;v++){p=new Lc;p.name=r[v].getAttribute("name");p.type=r[v].getAttribute("type");p.value=r[v].getAttribute("value");p.formname=r[v].getAttribute("formname");p.ordernum=r[v].getAttribute("o");
p.ordernum||(q=false);if(p.type=="radio"||p.type=="checkbox"){p.checked=parseInt(r[v].getAttribute("checked"))==1?true:false;if(p.type=="radio"&&!p.checked)continue}if(n.urid=="0")E.save_all=true;if(n.captcha_id==""&&"text"==p.type&&e.exec(p.name))n.captcha_id=p.name;n.otherfields[n.otherfields.length]=p}q&&n.otherfields.sort(Wi);if(o==1)E.logins[E.logins.length]=n;else E.otherlogins[E.otherlogins.length]=n}}J=Ua(E.url);E.tld=J;if(h){Fc[g]=E;Fc[g].last_time=0;Fc[g].realm=L}if(E.sn)qa[g]=E;else y[g]=
E;id++;if(typeof sa[J]=="undefined")sa[J]=[];sa[J][g]=true;if(E.genpw)Nd[g]=true}}if(Uc&&typeof Uc=="function"){Uc();Uc=null}e=c.getElementsByTagName("neveraccount");for(d=0;e!=null&&d<e.length;d++){o=e[d].getAttribute("url");if(o.indexOf(".")==-1)o=Da(o);Pb[Pb.length]=o}e=c.getElementsByTagName("nevergenerate");for(d=0;e!=null&&d<e.length;d++){o=e[d].getAttribute("url");if(o.indexOf(".")==-1)o=Da(o);tc[tc.length]=o}e=c.getElementsByTagName("neverformfill");for(d=0;e!=null&&d<e.length;d++){o=e[d].getAttribute("url");
if(o.indexOf(".")==-1)o=Da(o);uc[uc.length]=o}e=c.getElementsByTagName("neverautologin");for(d=0;e!=null&&d<e.length;d++){o=e[d].getAttribute("url");if(o.indexOf(".")==-1)o=Da(o);pc[pc.length]=o}e=c.getElementsByTagName("onlyaccount");for(d=0;e!=null&&d<e.length;d++){o=e[d].getAttribute("url");if(o.indexOf(".")==-1)o=Da(o);Yc[Yc.length]=o}e=c.getElementsByTagName("onlygenerate");for(d=0;e!=null&&d<e.length;d++){o=e[d].getAttribute("url");if(o.indexOf(".")==-1)o=Da(o);fd[fd.length]=o}e=c.getElementsByTagName("onlyformfill");
for(d=0;e!=null&&d<e.length;d++){o=e[d].getAttribute("url");if(o.indexOf(".")==-1)o=Da(o);gd[gd.length]=o}e=c.getElementsByTagName("onlyautologin");for(d=0;e!=null&&d<e.length;d++){o=e[d].getAttribute("url");if(o.indexOf(".")==-1)o=Da(o);Zc[Zc.length]=o}e=c.getElementsByTagName("formfill");for(d=0;e!=null&&d<e.length;d++){f=e[d].getAttribute("ffid");if(LP.IdentityFfidIsOk(b,f)){v=new of;v.ffid=f;v.profiletype=e[d].getAttribute("profiletype");v.profilename=K(e[d].getAttribute("profilename"));v.profilelanguage=
e[d].getAttribute("profilelanguage");v.firstname=e[d].getAttribute("firstname");v.firstname2=e[d].getAttribute("firstname2");v.firstname3=e[d].getAttribute("firstname3");v.middlename=e[d].getAttribute("middlename");v.lastname=e[d].getAttribute("lastname");v.lastname2=e[d].getAttribute("lastname2");v.lastname3=e[d].getAttribute("lastname3");v.email=e[d].getAttribute("email");v.mobileemail=e[d].getAttribute("mobileemail");v.company=e[d].getAttribute("company");v.ssn=e[d].getAttribute("ssn");v.birthday=
e[d].getAttribute("birthday");v.address1=e[d].getAttribute("address1");v.address2=e[d].getAttribute("address2");v.address3=e[d].getAttribute("address3");v.title=e[d].getAttribute("title");v.city=e[d].getAttribute("city");v.county=e[d].getAttribute("county");v.state=e[d].getAttribute("state");v.state_name=e[d].getAttribute("state_name");v.zip=e[d].getAttribute("zip");v.country=e[d].getAttribute("country");v.country_cc3l=e[d].getAttribute("country_cc3l");v.country_name=e[d].getAttribute("country_name");
v.countryphone=e[d].getAttribute("phone3lcc");v.countryevephone=e[d].getAttribute("evephone3lcc");v.countryfaxphone=e[d].getAttribute("fax3lcc");v.countrymobphone=e[d].getAttribute("mobilephone3lcc");v.phone=e[d].getAttribute("phone");v.fax=e[d].getAttribute("fax");v.mobilephone=e[d].getAttribute("mobilephone");v.evephone=e[d].getAttribute("evephone");v.phoneext=e[d].getAttribute("phoneext");v.evephoneext=e[d].getAttribute("eveext");v.mobilephoneext=e[d].getAttribute("mobileext");v.faxphoneext=e[d].getAttribute("faxext");
v.ccname=e[d].getAttribute("ccname");v.ccnum=e[d].getAttribute("ccnum");v.ccstart=e[d].getAttribute("ccstart");v.ccexp=e[d].getAttribute("ccexp");v.cccsc=e[d].getAttribute("cccsc");v.ccissuenum=e[d].getAttribute("ccissuenum");v.username=e[d].getAttribute("username");v.gender=e[d].getAttribute("gender");v.pwprotect=1==parseInt(e[d].getAttribute("pwprotect"));v.timezone=e[d].getAttribute("timezone");v.bankname=e[d].getAttribute("bankname");v.bankacctnum=e[d].getAttribute("bankacctnum");v.bankroutingnum=
e[d].getAttribute("bankroutingnum");v.customfields=[];f=e[d].getElementsByTagName("customfield");for(j=0;j<f.length;j++){g=new Eg;g.cfid=f[j].getAttribute("cfid");g.text=f[j].getAttribute("text");g.value=f[j].getAttribute("value");g.alttext=f[j].getAttribute("alttext");v.customfields[v.customfields.length]=g}v.notes=e[d].getAttribute("notes");fa[fa.length]=v}}fa.sort(Hf);me();e=c.getElementsByTagName("equivdomain");for(d=0;e!=null&&d<e.length;d++){b=e[d].getAttribute("edid");v=Da(e[d].getAttribute("domain"));
if(typeof Ha[b]=="undefined")Ha[b]=[];Ha[b][Ha[b].length]=v;Ha[v]=b}for(d in y){J=y[d].tld;if(typeof Ha[J]!="undefined"){b=Ha[J];if(typeof Ha[b]!="undefined")for(j=0;j<Ha[b].length;j++){e=Ha[b][j];if(typeof sa[e]=="undefined")sa[e]=[];sa[e][d]=true}}}b=c.getElementsByTagName("pendingshare");for(d=0;b!=null&&d<b.length;d++){e=new ub;e.pendingshare=true;e.logins=[];e.otherlogins=[];e.fields=[];e.group=LP.lpgs("(New Pending Share Offers)");e.name=LP.lpgs("Share offer from")+" "+sb(Da(b[d].getAttribute("sharerusername")));
e.is_http=true;e.favico="";e.last_time=0;e.sn=false;e.tld="";e.unencryptedUsername="";e.save_all=false;e.realm="";e.url="";e.urid="";e.manual=0;e.basic_auth=false;e.genpw=false;e.pwprotect=false;e.isbookmark=false;e.last_touch=0;e.fav=false;e.autologin=0;e.never_autofill=0;e.id=b[d].getAttribute("aid");e.fiid=b[d].getAttribute("aid");e.sharerusername=sb(Da(b[d].getAttribute("sharerusername")));e.sharedfromaid=b[d].getAttribute("sharedfromaid");e.sharemessage=b[d].getAttribute("sharemessage");e.sharekeyenchex=
b[d].getAttribute("sharekeyenchex");e.sharekeyenchexsig=b[d].getAttribute("sharekeyenchexsig");e.sharename=b[d].getAttribute("name");e.sharegroup=b[d].getAttribute("group");e.username=b[d].getAttribute("username");e.password=b[d].getAttribute("password");e.extra=b[d].getAttribute("extra");e.shareautoaccept=b[d].getAttribute("shareautoaccept");e.shareafids={};if(v=b[d].getAttribute("numafids"))for(j=0;j<v;++j){f=b[d].getAttribute("afid"+j);g=b[d].getAttribute("afid"+j+"v");if(f!=null&&g!=null)e.shareafids[f]=
g}lc[e.id]=e}b=c.getElementsByTagName("shareeautopush");for(d=0;b!=null&&d<b.length;d++){e=new Xd;e.fields=[];e.otherfields=[];v=true;f=["id","aid","sharekeyhexenc","name","group","username","password","extra","url","rurl","fav","never_autofill","pwprotect","basic_auth","autologin","last_touch","last_modified","urid","last_pw_change","numf","numof","favico","nexturid","method","is_http","manual"];for(j in f)if(b[d].hasAttribute(f[j]))e[f[j]]=b[d].getAttribute(f[j]);else if(f[j]=="id"||f[j]=="aid"||
f[j]=="sharekeyhexenc"){U("SHARE: shareeautopushes : error missing required arg="+f[j],null);v=false;break}else e[f[j]]=null;if(v){v=e.numf!=null?e.numf:0;for(j=0;j<v;++j){f={};f.urid=b[d].getAttribute("f"+j+"urid");f.name=b[d].getAttribute("f"+j+"name");f.value=b[d].getAttribute("f"+j+"value");f.type=b[d].getAttribute("f"+j+"type");e.fields.push(f)}v=e.numof!=null?e.numof:0;for(j=0;j<v;++j){f={};f.urid=b[d].getAttribute("of"+j+"urid");f.name=b[d].getAttribute("of"+j+"name");f.value=b[d].getAttribute("of"+
j+"value");f.type=b[d].getAttribute("of"+j+"type");f.formname=b[d].getAttribute("of"+j+"formname");e.otherfields.push(f)}if(typeof Tc[e.aid]=="undefined")Tc[e.aid]=[];Tc[e.aid].push(e)}}Ui(c.getElementsByTagName("secprompts")[0],"xml");if(yb(ia+"_lt.cac")){c=ib(ia+"_lt.cac");if(c!=false){c=c.split("\n");for(d=0;d<c.length;d++){b=c[d].split(" ");if(b.length==2&&b[0]!=""&&b[1]!=""){j=b[0];b=b[1];if(y[j])if(b>y[j].last_touch)y[j].last_touch=b}}}}LP.lpGetCurrentWindow().setTimeout("LP.lpRebuildToolsMenu_all();",
0);LP.lpDisplayAccounts_win();Ec=true}else{U("Problem in populateResponse. status="+b.status+" ignorestatus: "+c,null);Ma("ErrorGetAcctsMsg")}return true}function Jl(b,c,d,e,f,g,h,j,l,o,n,p,q,r,u,t,C){t=RegExp(LP.lpgs("ff_captcha_regexp"),"i");if(!j){o&&LP.lpClearCache(true,false,false);return false}if(!LP.adminoverride.length)if(j&&n){var A=K(n);if(n!=""&&Z!=A){U("Encrypted username check failed: "+P(Z)+" vs "+n+" for "+Z+" local "+o,null);LP.lpClearCache(true,true,false);Ia();LP.alert(LP.lpgs("An error has been encountered while loading your sites. Please relogin."));
return false}}if(j){n=yb(ia+"_lps.act.sxml")||yb(ia+"_lps.act.xml");LP.lpdolostpwotp&&!n&&!LP.lpprefsHasUserValue("StoreLostPWOTP")&&LP.lpprefsSetBoolPref("StoreLostPWOTP",true)}zc=r.maxid;!o&&j&&vh(l,null,"parse_getaccts.js");if(j>0){j=pe;Df=j!=null?j:0;Xa=parseInt(bh(l));o||(rb=Xa)}o="";j=false;if(LP.lpprefsHasUserValue("identity"))o=LP.lpprefsGetCharPref("identity");for(l=0;l<f.length;l++){r=new li;r.iid=f[l].iid;r.iname=K(f[l].iname);r.aids=f[l].aids;r.ffids=f[l].ffids;if(r.ffids==null)r.ffids=
"";r.pwprotect=f[l].pw_prompt;La[La.length]=r;if(o==r.iid)j=true}La.sort(Vi);sh();if(!j&&o!=""){LP.lpIdentityHelper("",true);LP.lpClearCache(true,false,false);Ia();LP.lpalert_ex(LP.lpgs("Your selected Identity no longer exists. Defaulting to 'All' and logging off."));return false}b.sort(Ai);c.sort(Ai);for(f=1;f<=2;f++){j=f==1?b:c;for(l=0;j!=null&&l<j.length;l++){r=j[l].aid;if(LP.IdentityIsOk(o,r)){var J=j[l].name,D=j[l].urid,B=Da(j[l].url),z=j[l].fav,L=Ba(j[l].extra),S=j[l].autologin?"1":"0";n=1==
parseInt(j[l].basic_auth);var $=j[l].sn,E=j[l].group;E=E==""&&!$?LP.get_null_group():E==""&&$?LP.lpgs("SecureNotes"):E;A=j[l].genpw;var ea=j[l].never_autofill?"1":"0",v=j[l].last_touch,F=Gc(j[l].realm_data,true),M=j[l].sharedfromaid,W=j[l].pwprotect,da={aid:r,manual:"1",is_http:"0"};if(parseInt(z)==1){var ta=new Vb;ta.id=r;ta.command=da;bb[bb.length]=ta}da=new ub;da.pendingshare=false;da.name=J;da.urid=D;da.id=r;da.url=B;da.manual="1";da.is_http="0";da.extra=L;da.fav=z;da.favico="0";da.autologin=
S;da.basic_auth=n;da.group=E;da.fiid=r;da.genpw=A;da.isbookmark=false;da.never_autofill=ea;da.last_touch=v;da.sn=$;da.sharedfromaid=M;da.save_all=false;da.pwprotect=W;da.realm=F;da.logins=[];da.otherlogins=[];da.fields=[];J=Ua(da.url);if(xa&&J)try{ec||(ec=Te.parse(Da(ib("rfdefaults"))));if(ec&&typeof ec[J]!="undefined"){j[l].submit_id=ec[J].submit_id;j[l].captcha_id=ec[J].captcha_id;j[l].custom_js=ec[J].custom_js}}catch(pb){}for(D=0;D<j[l].fields.length;D++){B=j[l].fields[D];L=B.otherlogin=="1"?da.otherlogins:
da.logins;for(S=0;S<L.length;S++)if(L[S].urid==B.urid)break;if(S==L.length){z=new oc;z.urid=B.urid;z.url=B.url!=""?Da(B.url):da.url;$=Ra(z.url);z.server=$.host;z.tld=ob($.host,z.url);$=Ta(z.url,$);A||(Jb[Jb.length]=$);z.submit_id=j[l].submit_id;z.captcha_id=j[l].captcha_id;z.custom_js=j[l].custom_js;z.username=Ba(j[l].username);z.password=Ba(j[l].password);z.openid_url="";z.method=j[l].method;z.action=typeof j[l].action!="undefined"?j[l].action:"";z.unencryptedUsername=K(z.username);if(S==0){da.username=
z.username;da.password=z.password;da.unencryptedUsername=z.unencryptedUsername}z.uname="";z.pname="";z.oname="";z.exact_uname_found=false;z.exact_pname_found=false;z.fields=[];z.otherfields=[];L[L.length]=z}z=L[S];L=new Lc;L.name=B.name;L.type=B.type;L.value=B.value;if("email"==L.type||"text"==L.type||"password"==L.type||"textarea"==L.type)L.value=Ba(L.value);if(B.otherfield)L.formname=B.formname;L.ordernum=null;if(("email"==L.type||"text"==L.type)&&L.name!="openid_url")if(z.username!=""&&L.value==
z.username){z.uname=L.name;z.exact_uname_found=true}else if(!z.exact_uname_found&&(z.pname==""||z.uname==""))z.uname=L.name;if(L.type=="password")if(z.password!=""&&L.value==z.password){z.pname=L.name;z.exact_pname_found=true}else if(!z.exact_pname_found)z.pname=L.name;if(("email"==L.type||"text"==L.type)&&L.name=="openid_url")z.oname=L.name;if(L.type=="radio"||L.type=="checkbox"){L.checked=B.checked;if(L.type=="radio"&&!L.checked)continue}if(B.otherfield&&z.urid=="0")da.save_all=true;if(z.captcha_id==
""&&"text"==L.type&&t.exec(L.name))z.captcha_id=L.name;if(B.otherfield)z.otherfields[z.otherfields.length]=L;else z.fields[z.fields.length]=L}if(da.logins.length==0){z=new oc;z.urid="0";z.url=da.url;$=Ra(z.url);z.server=$.host;z.tld=ob($.host,z.url);$=Ta(z.url,$);A||(Jb[Jb.length]=$);z.submit_id=j[l].submit_id;z.captcha_id=j[l].captcha_id;z.custom_js=j[l].custom_js;z.username=Ba(j[l].username);z.password=Ba(j[l].password);z.openid_url="";z.method=j[l].method;z.action=typeof j[l].action!="undefined"?
j[l].action:"";z.unencryptedUsername=K(z.username);da.username=z.username;da.password=z.password;da.unencryptedUsername=z.unencryptedUsername;z.uname="";z.pname="";z.oname="";z.exact_uname_found=false;z.exact_pname_found=false;z.fields=[];z.otherfields=[];da.logins[da.logins.length]=z}da.tld=J;if(n){Fc[r]=da;Fc[r].last_time=0;Fc[r].realm=F}if(da.sn)qa[r]=da;else y[r]=da;id++;if(typeof sa[J]=="undefined")sa[J]=[];sa[J][r]=true;if(da.genpw)Nd[r]=true}}}if(Uc&&typeof Uc=="function"){Uc();Uc=null}for(l=
0;h.neveraccounts!=null&&l<h.neveraccounts.length;l++){B=h.neveraccounts[l];if(B.indexOf(".")==-1)B=Da(B);Pb[Pb.length]=B}for(l=0;h.nevergenerates!=null&&l<h.nevergenerates.length;l++){B=h.nevergenerates[l];if(B.indexOf(".")==-1)B=Da(B);tc[tc.length]=B}for(l=0;h.neverformfills!=null&&l<h.neverformfills.length;l++){B=h.neverformfills[l];if(B.indexOf(".")==-1)B=Da(B);uc[uc.length]=B}for(l=0;h.neverautologins!=null&&l<h.neverautologins.length;l++){B=h.neverautologins[l];if(B.indexOf(".")==-1)B=Da(B);
pc[pc.length]=B}for(l=0;h.onlyaccounts!=null&&l<h.onlyaccounts.length;l++){B=h.onlyaccounts[l];if(B.indexOf(".")==-1)B=Da(B);Yc[Yc.length]=B}for(l=0;h.onlygenerates!=null&&l<h.onlygenerates.length;l++){B=h.onlygenerates[l];if(B.indexOf(".")==-1)B=Da(B);fd[fd.length]=B}for(l=0;h.onlyformfills!=null&&l<h.onlyformfills.length;l++){B=h.onlyformfills[l];if(B.indexOf(".")==-1)B=Da(B);gd[gd.length]=B}for(l=0;h.onlyautologins!=null&&l<h.onlyautologins.length;l++){B=h.onlyautologins[l];if(B.indexOf(".")==
-1)B=Da(B);Zc[Zc.length]=B}for(l=0;e!=null&&l<e.length;l++){c=e[l].ffid;if(LP.IdentityFfidIsOk(o,c)){b=new of;b.ffid=c;b.profiletype=e[l].profiletype;b.profilename=Gc(e[l].profilename,true);b.profilelanguage=Ba(e[l].profilelanguage);b.firstname=Ba(e[l].firstname);b.firstname2=Ba(e[l].firstname2);b.firstname3=Ba(e[l].firstname3);b.middlename=Ba(e[l].middlename);b.lastname=Ba(e[l].lastname);b.lastname2=Ba(e[l].lastname2);b.lastname3=Ba(e[l].lastname3);b.email=Ba(e[l].email);b.mobileemail=Ba(e[l].mobileemail);
b.company=Ba(e[l].company);b.ssn=Ba(e[l].ssn);b.birthday=Ba(e[l].birthday);b.address1=Ba(e[l].address1);b.address2=Ba(e[l].address2);b.address3=Ba(e[l].address3);b.title=Ba(e[l].title);b.city=Ba(e[l].city);b.county=Ba(e[l].county);b.state=Ba(e[l].state);b.state_name=Ba(e[l].state_name);b.zip=Ba(e[l].zip);b.country=Ba(e[l].country);b.country_cc3l=Ba(e[l].country_cc3l);b.country_name=Ba(e[l].country_name);b.countryphone=Ba(e[l].phone3lcc);b.countryevephone=Ba(e[l].evephone3lcc);b.countryfaxphone=Ba(e[l].fax3lcc);
b.countrymobphone=Ba(e[l].mobilephone3lcc);b.phone=Ba(e[l].phone);b.fax=Ba(e[l].fax);b.mobilephone=Ba(e[l].mobilephone);b.evephone=Ba(e[l].evephone);b.phoneext=Ba(e[l].phoneext);b.evephoneext=Ba(e[l].eveext);b.mobilephoneext=Ba(e[l].mobileext);b.faxphoneext=Ba(e[l].faxext);b.ccname=Ba(e[l].ccname);b.ccnum=Ba(e[l].ccnum);b.ccstart=Ba(e[l].ccstart);b.ccexp=Ba(e[l].ccexp);b.cccsc=Ba(e[l].cccsc);b.ccissuenum=Ba(e[l].ccissuenum);b.username=Ba(e[l].username);b.gender=Ba(e[l].gender);b.pwprotect=e[l].pwprotect;
b.timezone=Ba(e[l].timezone);b.bankname=Ba(e[l].bankname);b.bankacctnum=Ba(e[l].bankacctnum);b.bankroutingnum=Ba(e[l].bankroutingnum);b.customfields=[];for(f=0;f<e[l].custom_fields.length;f++){c=new Eg;c.cfid=e[l].custom_fields[f].cfid;c.text=Ba(e[l].custom_fields[f].text);c.value=Ba(e[l].custom_fields[f].value);c.alttext=Ba(e[l].custom_fields[f].alttext);b.customfields[b.customfields.length]=c}b.notes=Ba(e[l].notes);fa[fa.length]=b}}fa.sort(Hf);me();Ha=g;ad=u;for(l in y){J=y[l].tld;if(typeof Ha[J]!=
"undefined"){e=Ha[J];if(typeof Ha[e]!="undefined")for(f=0;f<Ha[e].length;f++){g=Ha[e][f];if(typeof sa[g]=="undefined")sa[g]=[];sa[g][l]=true}}}for(l=0;p!=null&&l<p.length;l++){e=new ub;e.pendingshare=true;e.logins=[];e.otherlogins=[];e.fields=[];e.group=LP.lpgs("(New Pending Share Offers)");e.name=LP.lpgs("Share offer from")+" "+sb(Da(p[l].sharerusername));e.is_http=true;e.favico="";e.last_time=0;e.sn=false;e.tld="";e.unencryptedUsername="";e.save_all=false;e.realm="";e.url="";e.urid="";e.manual=
0;e.basic_auth=false;e.genpw=false;e.pwprotect=false;e.isbookmark=false;e.last_touch=0;e.fav=false;e.autologin=0;e.never_autofill=0;e.id=p[l].id;e.fiid=p[l].id;e.sharerusername=sb(Da(p[l].sharerusername));e.sharedfromaid=p[l].sharedfromaid;e.sharemessage=p[l].sharemessage;e.sharekeyenchex=p[l].sharekeyenchex;e.sharekeyenchexsig=p[l].sharekeyenchexsig;e.sharename=p[l].sharename;e.sharegroup=p[l].sharegroup;e.username=p[l].username;e.password=p[l].password;e.extra=p[l].extra;e.shareautoaccept=p[l].shareautoaccept;
e.shareafids=p[l].shareafids;lc[e.id]=e}p=Tc;for(e=0;q!=null&&e<q.length;e++){g=new Xd;g.fields=[];g.otherfields=[];u=true;b=["id","aid","sharekeyhexenc","name","group","username","password","extra","url","rurl","fav","never_autofill","pwprotect","basic_auth","autologin","last_touch","last_modified","urid","last_pw_change","numf","numof","favico","nexturid","method","is_http","manual"];for(var ua in b)if(typeof q[e][b[ua]]!="undefined")g[b[ua]]=q[e][b[ua]];else if(b[ua]=="id"||b[ua]=="aid"||b[ua]==
"sharekeyhexenc"){U("SHARE: shareeautopushes : error missing required arg="+b[ua],null);u=false;break}else g[b[ua]]=null;if(u){u=g.numf!=null?g.numf:0;for(ua=0;ua<u;++ua){b={};b.urid=q[e]["f"+ua+"urid"];b.name=q[e]["f"+ua+"name"];b.value=q[e]["f"+ua+"value"];b.type=q[e]["f"+ua+"type"];g.fields.push(b)}u=g.numof!=null?g.numof:0;for(ua=0;ua<u;++ua){b={};b.urid=q[e]["of"+ua+"urid"];b.name=q[e]["of"+ua+"name"];b.value=q[e]["of"+ua+"value"];b.type=q[e]["of"+ua+"type"];b.formname=q[e]["of"+ua+"formname"];
g.otherfields.push(b)}if(typeof p[g.aid]=="undefined")p[g.aid]=[];p[g.aid].push(g)}}Dc=d.login_site_prompt;jd=d.edit_site_prompt;ie=d.edit_sn_prompt;je=d.view_pw_prompt;Ld=d.view_ff_prompt;Jf=d.improve;Kf=d.switch_identity_prompt;Lf=d.multifactor_reprompt;d=Yf=C;if(typeof d.allowmasterpasswordsave&&d.allowmasterpasswordsave=="0"){LP.lpprefsSetBoolPref("rememberPassword",false,false);q=Cd();for(var V in q)if(Z==sb(V))q[V]=null;Ue(q)}if(typeof d.logoffclosebrowser!="undefined"&&d.logoffclosebrowser!=
"-1"){LP.lpprefsSetBoolPref("logOffWhenCloseBrowser",true);LP.lpprefsSetIntPref("logOffWhenCloseBrowserVal",parseInt(d.logoffclosebrowser))}if(typeof d.logoffidle!="undefined"&&d.logoffidle!="-1"){LP.lpprefsSetBoolPref("idleLogoff",true);LP.lpprefsSetIntPref("idleLogoffVal",parseInt(d.logoffidle))}if(yb(ia+"_lt.cac")){V=ib(ia+"_lt.cac");if(V!=false){V=V.split("\n");for(d=0;d<V.length;d++){C=V[d].split(" ");if(C.length==2&&C[0]!=""&&C[1]!=""){q=C[0];C=C[1];if(y[q])if(C>y[q].last_touch)y[q].last_touch=
C}}}}LP.lpGetCurrentWindow().setTimeout("LP.lpRebuildToolsMenu_all();",0);LP.lpDisplayAccounts_win();return Ec=true}function Gj(b,c,d){var e=Da(za(b+c)),f=[],g=[],h=[];if(!LP.reencrypt(f,y,e)||!LP.reencrypt(g,qa,e)||!LP.reencrypt(h,fa,e)){LP.alert(LP.lpgs("An error occurred"));return false}xb=na;kd=Ka(xb);var j=true,l=vb();if(l==null)LP.alert(LP.lpgs("An error occurred"));else{var o=Xa+1,n;if(d){n=na;na=e;Od=Ka(na)}else{y=f;qa=g;fa=h;lp_local_Accts_version=o;Xf=za(e);na=e;Od=Ka(na);Z=b;ia=za(b)}for(var p in f){if(j&&
!dc(l,p,false))j=false;if(j&&!kc(l,f[p],false))j=false}for(p in g){if(j&&!dc(l,p,false))j=false;if(j&&!kc(l,g[p],false))j=false}for(p in h){e=h[p].ffid;if(j&&!Qi(l,e,false))j=false;if(j&&!Ri(l,h[p],false))j=false}l.encrypted_username=P(b);if(j&&!vc(l,o))j=false;if(j)j=Ab(l,null,"ChangeMasterPassword",d);if(d){na=n;Od=Ka(na);return j}if(j){ed=na;ze();Mc("local_pwchange",{data0:b,data1:c});Bb();LP.alert(LP.lpgs("Password updated!"))}else LP.alert(LP.lpgs("An error occurred"))}}function Hj(b,c,d,e){try{for(var f in c)if(typeof c[f]==
"object"){var g=[];if(!Hj(g,c[f],d,f=="customfields"?2:e||f=="fields"||f=="otherfields"))return false;b[f]=g}else{var h;if(!(h=Qa(f,Kl))){var j;if(j=f=="value"){var l;if(!(l=e==2)){var o;if(o=e)a:{for(var n in c)if(n=="type"&&(c[n]=="password"||c[n]=="text"||c[n]=="hidden"||c[n]=="textarea")){o=true;break a}o=false}l=o}j=l}h=j}if(h){var p=K(c[f]);if((p==null||p=="")&&c[f]!=null&&c[f]!="")return false;var q=P(p,d);b[f]=q}else b[f]=c[f]}}catch(r){return false}return true}function pf(){Ve=We=Xe=""}function Ij(b,
c,d,e){if(Aa()){b=b.toUpperCase();var f=b==""?"":ba.xCryptoHash(b);b=b==""?"":ba.xCryptoHash(c);e=typeof e=="undefined"||e==0?0:e;c="privatekeyenc="+LP.en(c)+"&publickey="+LP.en(d)+"&forcewriteprivate="+LP.en(e)+"&userkeyhexhash="+LP.en(f)+"&privatekeyenchexhash="+LP.en(b)+"&from="+LP.en("ffplugin");LP.lpMakeRequest(LP.lp_base+"uploadrsakeys.php",c,Ll)}}function Ll(b){if(Aa())if(b.readyState==4)if(b.status!=200)U("lprsa_uploadrsakeysresponse : failed status="+b.status);else{if(b.responseXML!=null&&
b.responseXML.documentElement!=null){var c=b.responseXML.documentElement.getElementsByTagName("ok"),d="";if(c.length>0){d=c[0].getAttribute("privatekeyenchex");if(d!=null&&d!=""){Ml(d);return}}}b=b.responseText;if(b==null)b="null";U("lprsa_uploadrsakeysresponse : failed to process uploadrsakeys.php response. server returned responseText="+b,null)}}function Ml(b){if(!Aa())return false;if(Z==null||Z==""){U("lprsa_writersaprivatekeyenchextofile : lpusername is invalid");return false}var c=ba.xCryptoHash(Ka(Z))+
"_ff_lppri.lps";if(c==""||c==null){U("lprsa_writersaprivatekeyenchextofile : could not form filenamehex : lpusername="+Z);return false}Yb(c,b);var d=ib(c);if(b!=d){U("lprsa_writersaprivatekeyenchextofile : failed to write to a file. filenamehex="+c+" rsaprivatekeyenchex.length="+b.length+" readbackhex.length="+d.length,null);return false}if(re("writetofile",true)==""){U("lprsa_writersaprivatekeyenchextofile : failed to read back rsa file ===> THIS MEANS THAT WE SUCCESSFULLY DOWNLOADED THE RSA PRIVATE KEY FROM THE SERVER BUT FAILED TO DECRYPT IT!",
null);return false}return true}function re(b,c){if(!Aa())return"";if(na==null||na==""){U("lprsa_readrsaprivatekeyhexfromfile : lp_local_key is invalid");return""}if(Z==null||Z==""){U("lprsa_readrsaprivatekeyhexfromfile : lpusername is invalid");return""}if(!(typeof c=="undefined"?0:1)&&Xe!="")return Xe;pf();var d=ba.xCryptoHash(Ka(Z))+"_ff_lppri.lps";if(d==""||d==null){U("lprsa_readrsaprivatekeyhexfromfile : could not form filenamehex : reason="+b+" lpusername="+Z);return""}var e=false;try{var f=
td(d,true);f.append(d);if(f.exists())e=true}catch(g){}if(!e)return"";e=ib(d);if(!e||e==null||e==""){U("lprsa_readrsaprivatekeyhexfromfile : could not read file : reason="+b+" filenamehex="+d);return""}f=na;var h=Ka(f);h=h.toUpperCase();var j=ba.xCryptoDecrypt(h,e);if(j==""||j==null){U("lprsa_readrsaprivatekeyhexfromfile : failed to decrypt data reason="+b+" datahex.length="+e.length+" userkeyhex.length="+h.length);Wa(d);return""}var l=Da(j),o=Nl(l);if(o==null){U("lprsa_readrsaprivatekeyhexfromfile : failed to extract rsa key from file - did we change our password on another PC? reason="+
b+" userkeybin.length="+f.length+" userkeyhex.length="+h.length+" datahex.length="+e.length+" decryptedhex.length="+j.length+" decryptedbin.length="+l.length);Wa(d);return""}We=e;Xe=o;Ve=za(We);return Xe}function oi(){if(ia==null||ia=="")U("lprsa_clearcache : lpusername_hash is invalid");else{Wa(ia+"_lppri.lps");Wa(ia+"_ff_lppri.lps")}}function Nl(b){if(b.length<=38){U("lprsa_extractprivatekey : failed to extract rsaprivatekeyhex : length="+b.length+" is too short");return null}if(b.indexOf("LastPassPrivateKey<")!=
0){U("lprsa_extractprivatekey : failed to extract rsaprivatekeyhex : expected_prefix='LastPassPrivateKey<'   actual_prefix='"+b.substring(0,19)+"'");return null}var c=b.indexOf(">LastPassPrivateKey");if(c!=b.length-19){U("lprsa_extractprivatekey : failed to extract rsaprivatekeyhex : expected_prefix='LastPassPrivateKey<'   actual_prefix='"+b.substring(0,19)+"'");return null}b=b.substring(19,c);if(b.length<2E3){U("lprsa_extractprivatekey : failed to extract rsaprivatekeyhex : we expect a length of approx 2426    actual_length="+
b.length);return null}return b}function Mk(b){var c=b.getElementById("eventtype");b=b.getElementById("eventdata1");for(var d=Te.parse(b.value),e=0;e<d.length;++e){if(!Aa()){c.value="rsaerror";return}if(typeof d[e].valuehex=="undefined"||typeof d[e].publickeyhex=="undefined"||d[e].publickeyhex==""){c.value="rsaerror";return}d[e].valuehexenc=ba.xCryptoRSAEncrypt(d[e].publickeyhex,d[e].valuehex);if(""==d[e].valuehexenc||null==d[e].valuehexenc){c.value="rsaerror";return}}b.value=Te.stringify(d);c.value=
"ok"}function Lk(b){var c=b.getElementById("eventdata1").value,d=b.getElementById("eventdata2").value,e=b.getElementById("eventtype"),f=b.getElementById("eventdata4");b=b.getElementById("eventdata5");if(!c||!d||!e||!f||!b)e.value="rsaerror";else if(Aa()){c=ba.xCryptoRSAEncrypt(c,d);if(""==c||null==c)e.value="rsaerror";else{d=re("rsaencrypt");d=ba.xCryptoRSASign(d,c);if(d==""||d==null)e.value="rsaerror";else{f.value=c;b.value=d;e.value="ok"}}}else e.value="rsaerror"}function Nk(b){var c=b.getElementById("eventdata1").value;
b.getElementById("eventdata2");var d=b.getElementById("eventdata3").value,e=b.getElementById("eventtype");b=b.getElementById("eventdata4");if(!c||!d||!e||!b)e.value="rsaerror";else if(Aa()){c=re("rsadecrypt");d=ba.xCryptoRSADecrypt(c,d);if(d==""||d==null)e.value="rsaerror";else{b.value=d;e.value="ok"}}else e.value="rsaerror"}function Jj(b,c){if(!Aa()){U("lprsa_encryptdata : Failed to load XPCOM");return false}var d=ba.xCryptoRSAEncrypt(b,c);if(c!=""&&(d==null||d=="")){U("lprsa_encryptdata : Failed to rsaencrypt data using publickeyhex="+
b);return false}return d}function Zf(b){Kj=typeof b!="undefined"&&b?0:(new Date).getTime()}function Ol(b){if(b.readyState==4)if(b.status!=200)U("lprsa_acceptpendingsharesresponse : request failed status="+b.status);else if(b.responseXML==null||b.responseXML.documentElement==null)U("lprsa_acceptpendingsharesresponse : request failed xml invalid A text="+b.responseText);else{var c=b.responseXML.documentElement.getElementsByTagName("ok");!c||c.length==0?U("lprsa_acceptpendingsharesresponse : request failed xml invalid B text="+
b.responseText):LP.lpGetAccounts()}}function $f(b){Lj=typeof b!="undefined"&&b?0:(new Date).getTime()}function Pl(b){if(b.readyState==4)if(b.status!=200)U("lprsa_acceptshareeautopushesresponse : request failed status="+b.status);else if(b.responseXML==null||b.responseXML.documentElement==null)U("lprsa_acceptshareeautopushesresponse : request failed xml invalid A text="+b.responseText);else{var c=b.responseXML.documentElement.getElementsByTagName("ok");!c||c.length==0?U("lprsa_acceptshareeautopushesresponse : request failed xml invalid B text="+
b.responseText):LP.lpGetAccounts()}}function Yg(b,c){if(b.readyState!=4||b.status!=200||b.responseXML==null||b.responseXML.documentElement==null)return false;if(typeof c=="undefined"||c==null)return false;(new Date).getTime();var d=c.url,e=c.aid,f=c.handler,g=c.param;e=typeof y[e]!="undefined"?y[e]:typeof qa[e]!="undefined"?qa[e]:null;if(e==null){e={};e.name="";e.group="";e.username="";e.password="";e.extra=""}e=Ql(b,c,e);if(e==false)return false;(new Date).getTime();Ye=0;LP.lpMakeRequest(d,e,f,null,
g);return true}function Rl(){if(LP.lpprefsHasUserValue("enablenamedpipes",false)?LP.lpprefsGetBoolPref("enablenamedpipes",false):true)if(LP.gecko_version()<"1.9")se=false;else if(ud())se=false;else if(!LP.lpis_win&&!LP.lpis_mac&&!LP.lpis_linux)se=false;else if(ba){var b={observe:function(c,d,e){if(d=="lpxpcom"){c="";if(d=e.match(/^<([^ \/]+)/))c=d[1];if(!(xa&&c!="refresh_local"&&c!="local_pwchange"))switch(c){case "pipeinitdone":if(ba.NamedPipeNumClients()>1){LP.mostRecent().setTimeout(function(){Mc("internal_logincheck")},
0);LP.mostRecent().setTimeout(function(){ah()},500)}else ah();break;case "logout":Ia(true);break;case "login":var f=e.match(/data0=\"([^\"]*)\"/);d=e.match(/data1=\"([^\"]*)\"/);c=e.match(/data2=\"([^\"]*)\"/);e.match(/data3=\"([^\"]*)\"/);e.match(/data4=\"([^\"]*)\"/);if(f&&d){c=fc(f[1]);e=fc(d[1]);if(c!=""&&e!=""){Zf();$f();Mj(c,e,"namedpipes")}}break;case "refresh":jc();break;case "switchidentity":if(d=e.match(/data0=\"([^\"]*)\"/)){e=fc(d[1]);LP.lpprefsSetCharPref("identity",e);LP.flush_prefs();
Bb();jc()}break;case "launch":d=e.match(/id=\"([^\"]*)\"/);c=e.match(/existing=\"([^\"]*)\"/);if(d){e=fc(d[1]);d=[];d.data0=e;Mc("launchok",d);if(c){c=LP.getBrowser();if(c.webProgress.isLoadingDocument)return;LP.lp_noteAcceptHelper(e,c,false)}else LP.lpLaunchUrl(e,1)}break;case "internal_logincheck":if(ga){d=[];d.data0=Ib;d.data1=Z;d.data2=LP.GetIdentity();Mc("internal_logincheck_ack",d)}break;case "internal_logincheck_ack":d=e.match(/data0=\"([^\"]*)\"/);c=e.match(/data1=\"([^\"]*)\"/);e=e.match(/data2=\"([^\"]*)\"/);
if(!ga&&d&&c){f=Ed();for(var g=0;g<f.length;g++)if(f[g]==fc(c[1])){f.splice(g,1);break}f.unshift(fc(c[1]));ye(f);f=ia;g=Z;Z=fc(c[1]);ia=za(fc(c[1]));LP.lpprefsSetCharPref("identity",e?fc(e[1]):"");Z=g;ia=f;LP.flush_prefs();Ib=fc(d[1]);Zf();$f();ah(true)}else if(ga&&d&&c)if(Ib!=fc(d[1])||Z!=fc(c[1]))Ia();break;case "refresh_local":(e=e.match(/data0=\"([^\"]*)\"/))&&fc(e[1])==ia&&Bb();break;case "local_pwchange":Ia();break;default:break}}}};Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService).addObserver(b,
"lpxpcom",false);ba.StartNamedPipeServer();se=true}}function Mc(b,c){if(!(xa&&b!="refresh_local"&&b!="local_pwchange"))if(ba&&se){var d="<"+b,e;if(typeof c!="undefined")for(e in c)d+=" "+e+'="'+ag(c[e])+'"';d+="/>";ba.SendNamedPipeMessageToAll(d)}}function bg(b){Rb.active="1";b={otp:"",username:b};LP.lpGetCurrentWindow().openDialog(eb+"content/yubikey.xul","_blank","chrome,titlebar,toolbar,centerscreen,modal",b);if(typeof b.label!="undefined")Qb.label=b.label;Rb.active=null;return b.otp}function qb(b){if(typeof Qb[b]==
"undefined")return null;return Qb[b]}function yh(b){Rb.active="1";if(b&&sf){b=sf;sf=null;return b}var c;c="";for(var d=0;d<5;++d){if(c!="")break;for(var e=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("navigator:browser");e.hasMoreElements();){var f=e.getNext(),g=f.gBrowser,h=g.browsers.length;if(h>0)for(h-=1;h>=0;--h){var j=g.getBrowserAtIndex(h);if(j){var l=j.currentURI.spec;if(l.indexOf("sesameotp=")>0){if(c=="")c=
l;g.selectedTab=g.tabContainer.childNodes[h];f.focus();g.browsers.length>1?g.removeCurrentTab():j.loadURI("https://lastpass.com/home.php")}}}}}if(c!=""){d=c.indexOf("sesameotp=");e=c.indexOf("&",d+10);c=e!=-1?c.substring(d+10,e):c.substring(d+10)}else c="";if(c!="")return c;b={otp:"",username:b};LP.lpGetCurrentWindow().openDialog(eb+"content/sesame.xul","_blank","chrome,titlebar,toolbar,centerscreen,modal",b);if(typeof b.label!="undefined")rc.label=b.label;Rb.active=null;return b.otp}function Tb(b){if(typeof rc[b]==
"undefined")return null;return rc[b]}function Nj(b,c){Rb.active="1";if(b&&Oj)return Oj;var d={username:b,challenge:c};LP.lpGetCurrentWindow().openDialog(eb+"content/grid.xul","_blank","chrome,titlebar,toolbar,centerscreen,modal",d);if(typeof d.label!="undefined")Rb.label=d.label;Rb.active=null;return d.values}function Rd(b){if(typeof Rb[b]=="undefined")return null;return Rb[b]}function wb(b){if(typeof Sb[b]=="undefined")return null;return Sb[b]}function Sl(){}function Tl(b){if(b.readyState==4&&b.status==
200&&b.responseText){b=b.responseText;te=b.indexOf("ok")>=0?"ok":b.indexOf("emailinvalid")>=0?LP.lpgs("Invalid email address, try again"):LP.lpgs("Email already in use, have you forgotten your password?")}}function Pj(){lb.getElementById("progresslabel").value=LP.lpgs("Uploading Data");var b=sb(lb.getElementById("email").value),c=lb.getElementById("password").value;b="wxusername="+LP.en(b)+"&wxhash="+LP.en(za(za(b+c)+c))+"&data="+LP.en(xc(Ze));LP.lpMakeRequest(LP.lp_base+"import_local.php",b,Ul,Qj)}
function Vl(b){if(b.readyState==4&&b.status==200&&b.responseText){b=b.responseText;var c="";if(b.indexOf("ok")>=0)if(xa)Pj();else{lb.getElementById("progresslabel").value=LP.lpgs("Loggingin");zh=true;LP.lplogin(lb.getElementById("email").value,lb.getElementById("password").value,"createaccount");lb.getElementById("password").value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}else{if(b.indexOf("usernametaken")>=
0)c=LP.lpgs("Email already in use, have you forgotten your password?");else if(b.indexOf("usernameinvalid")>=0||b.indexOf("emailfailed")>=0)c=LP.lpgs("Invalid email address, try again");else{c=LP.lpgs("ErrorServerMsg");U("Got unknown response from create account: "+b)}c!=""&&Ah(c)}}}function Ul(b){if(b.readyState==4)b.status==200&&b.responseText&&b.responseText.indexOf("ok")>=0?Rj():Qj()}function Qj(){LP.lpConfirmYesNo(LP.lpgs("An error occurred while uploading your data.  Would you like to retry?"),
yd)&&Pj()}function Ah(b){LP.alert(b,yd);lb.welcomestate=0;lb.getElementById("reenter").setAttribute("hidden","true");lb.getElementById("createprogress").setAttribute("hidden","true");LP.welcome_accept_click(lb,yd);yd.focus()}function Rj(){if(lb){for(var b=lb.getElementById("email").value,c=Ed(),d=Cd(),e=0;e<c.length;e++)if(c[e]==b){c.splice(e,1);break}if(typeof d[b]!="undefined")d[b]=null;c.unshift(b);ye(c);Ue(d);lb.getElementById("disablemgr").checked&&LP.lpmainprefs.setBoolPref("signon.rememberSignons",
false);if(xa){ac&&Aa()&&LP.lpis_mac&&typeof ba.lpvt_store_data=="function"&&ba.lpvt_store_data(encodeURIComponent(sb(lb.getElementById("email").value))+"|"+encodeURIComponent(lb.getElementById("password").value),LP.lpgs("Swipe finger"),LP.lpgs("Swipe your finger on the fingerprint sensor"),LP.lpgs("Cancel"))&&LP.setsinglefactortype("vtapi");lb.getElementById("password").value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
Wa("LPISLOC");lb.welcomestate=7;lb.getElementById("createprogress").setAttribute("hidden","true")}LP.flush_prefs();LP.welcome_accept_click(lb,yd)}}function Wl(){Ah(LP.lpgs("ErrorServerMsg"))}function Xl(b,c){var d=b.getElementById("password").value,e=b.getElementById("email").value,f=b.getElementById("passwordreminder").value;if(te!=""&&te!="ok"){LP.alert(te,c);return false}else if(te==""&&e.length<5){LP.alert(LP.lpgs("Invalid email address, try again"),c);return false}if(!b.getElementById("terms").checked){LP.alert(LP.lpgs("You must agree to the terms to continue"),
c);return false}if(!b.getElementById("data").checked){LP.alert(LP.lpgs("AgreeUploadData"),c);return false}if(d.length<6){LP.alert(LP.lpgs("ShortPassword"),c);return false}if(d==e){LP.alert(LP.lpgs("PasswordEmailSame"),c);return false}if(d==f){LP.alert(LP.lpgs("Password reminder cannot match password"),c);return false}if(f.length==0){LP.alert(LP.lpgs("Please enter a Password Reminder"),c);return false}if(d=="password"||d=="123"||d=="1234"||d=="12345"||d=="123456"||d=="123123"||d=="letmein"||d=="pass"||
d=="lastpass"||d=="lastpass.com"||d=="abc123"){LP.alert(LP.lpgs("ObviousPassword"),c);return false}return true}function ye(b){for(var c="",d="",e=0;e<b.length;e++){c+=d+encodeURIComponent(b[e]);d="|"}LP.lpprefsSetCharPref("loginusers",c,false)}function Ue(b){var c="",d="";for(var e in b)if(b[e]!=null){var f=b[e],g=Da(za(e));f=P(f,g);c+=d+encodeURIComponent(e)+"="+encodeURIComponent(f);d="|"}b=sd(c);LP.lpprefsSetCharPref("loginpws",b,false)}function Sj(){if(typeof Y=="undefined"||Y==null){Y=[];var b;
b=new Fa;b.name="(-12:00) International Date Line West";b.value="-12:00,0";Y[Y.length]=b;b=new Fa;b.name="(-11:00) Midway Island, Samoa";b.value="-11:00,0";Y[Y.length]=b;b=new Fa;b.name="(-10:00) Hawaii";b.value="-10:00,0";Y[Y.length]=b;b=new Fa;b.name="(-09:00) Alaska";b.value="-09:00,1";Y[Y.length]=b;b=new Fa;b.name="(-08:00) Pacific Time (US & Canada)";b.value="-08:00,1";Y[Y.length]=b;b=new Fa;b.name="(-07:00) Arizona";b.value="-07:00,0";Y[Y.length]=b;b=new Fa;b.name="(-07:00) Mountain Time (US & Canada)";
b.value="-07:00,1";Y[Y.length]=b;b=new Fa;b.name="(-06:00) Central America, Saskatchewan";b.value="-06:00,0";Y[Y.length]=b;b=new Fa;b.name="(-06:00) Central Time (US & Canada), Guadalajara, Mexico City";b.value="-06:00,1";Y[Y.length]=b;b=new Fa;b.name="(-05:00) Indiana, Bogota, Lima, Quito, Rio Branco";b.value="-05:00,0";Y[Y.length]=b;b=new Fa;b.name="(-05:00) Eastern Time (US & Canada)";b.value="-05:00,1";Y[Y.length]=b;b=new Fa;b.name="(-04:00) Atlantic Time (Canada), Manaus, Santiago";b.value="-04:00,1";
Y[Y.length]=b;b=new Fa;b.name="(-04:00) Caracas, La Paz";b.value="-04:00,0";Y[Y.length]=b;b=new Fa;b.name="(-03:30) Newfoundland";b.value="-03:30,1";Y[Y.length]=b;b=new Fa;b.name="(-03:00) Greenland, Brasilia, Montevideo";b.value="-03:00,1";Y[Y.length]=b;b=new Fa;b.name="(-03:00) Buenos Aires, Georgetown";b.value="-03:00,0";Y[Y.length]=b;b=new Fa;b.name="(-02:00) Mid-Atlantic";b.value="-02:00,1";Y[Y.length]=b;b=new Fa;b.name="(-01:00) Azores";b.value="-01:00,1";Y[Y.length]=b;b=new Fa;b.name="(-01:00) Cape Verde Is.";
b.value="-01:00,0";Y[Y.length]=b;b=new Fa;b.name="(00:00) Casablanca, Monrovia, Reykjavik";b.value="00:00,0";Y[Y.length]=b;b=new Fa;b.name="(00:00) GMT: Dublin, Edinburgh, Lisbon, London";b.value="00:00,1";Y[Y.length]=b;b=new Fa;b.name="(+01:00) Amsterdam, Berlin, Rome, Vienna, Prague, Brussels";b.value="+01:00,1";Y[Y.length]=b;b=new Fa;b.name="(+01:00) West Central Africa";b.value="+01:00,0";Y[Y.length]=b;b=new Fa;b.name="(+02:00) Amman, Athens, Istanbul, Beirut, Cairo, Jerusalem";b.value="+02:00,1";
Y[Y.length]=b;b=new Fa;b.name="(+02:00) Harare, Pretoria";b.value="+02:00,0";Y[Y.length]=b;b=new Fa;b.name="(+03:00) Baghdad, Moscow, St. Petersburg, Volgograd";b.value="+03:00,1";Y[Y.length]=b;b=new Fa;b.name="(+03:00) Kuwait, Riyadh, Nairobi, Tbilisi";b.value="+03:00,0";Y[Y.length]=b;b=new Fa;b.name="(+03:30) Tehran";b.value="+03:30,0";Y[Y.length]=b;b=new Fa;b.name="(+04:00) Abu Dhadi, Muscat";b.value="+04:00,0";Y[Y.length]=b;b=new Fa;b.name="(+04:00) Baku, Yerevan";b.value="+04:00,1";Y[Y.length]=
b;b=new Fa;b.name="(+04:30) Kabul";b.value="+04:30,0";Y[Y.length]=b;b=new Fa;b.name="(+05:00) Ekaterinburg";b.value="+05:00,1";Y[Y.length]=b;b=new Fa;b.name="(+05:00) Islamabad, Karachi, Tashkent";b.value="+05:00,0";Y[Y.length]=b;b=new Fa;b.name="(+05:30) Chennai, Kolkata, Mumbai, New Delhi, Sri Jayawardenepura";b.value="+05:30,0";Y[Y.length]=b;b=new Fa;b.name="(+05:45) Kathmandu";b.value="+05:45,0";Y[Y.length]=b;b=new Fa;b.name="(+06:00) Astana, Dhaka";b.value="+06:00,0";Y[Y.length]=b;b=new Fa;b.name=
"(+06:00) Almaty, Novosibirsk";b.value="+06:00,1";Y[Y.length]=b;b=new Fa;b.name="(+06:30) Yangon (Rangoon)";b.value="+06:30,0";Y[Y.length]=b;b=new Fa;b.name="(+07:00) Krasnoyarsk";b.value="+07:00,1";Y[Y.length]=b;b=new Fa;b.name="(+07:00) Bangkok, Hanoi, Jakarta";b.value="+07:00,0";Y[Y.length]=b;b=new Fa;b.name="(+08:00) Beijing, Hong Kong, Singapore, Taipei";b.value="+08:00,0";Y[Y.length]=b;b=new Fa;b.name="(+08:00) Irkutsk, Ulaan Bataar, Perth";b.value="+08:00,1";Y[Y.length]=b;b=new Fa;b.name="(+09:00) Yakutsk";
b.value="+09:00,1";Y[Y.length]=b;b=new Fa;b.name="(+09:00) Seoul, Osaka, Sapporo, Tokyo";b.value="+09:00,0";Y[Y.length]=b;b=new Fa;b.name="(+09:30) Darwin";b.value="+09:30,0";Y[Y.length]=b;b=new Fa;b.name="(+09:30) Adelaide";b.value="+09:30,1";Y[Y.length]=b;b=new Fa;b.name="(+10:00) Brisbane, Guam, Port Moresby";b.value="+10:00,0";Y[Y.length]=b;b=new Fa;b.name="(+10:00) Canberra, Melbourne, Sydney, Hobart, Vladivostok";b.value="+10:00,1";Y[Y.length]=b;b=new Fa;b.name="(+11:00) Magadan, Solomon Is., New Caledonia";
b.value="+11:00,0";Y[Y.length]=b;b=new Fa;b.name="(+12:00) Auckland, Wellington";b.value="+12:00,1";Y[Y.length]=b;b=new Fa;b.name="(+12:00) Fiji, Kamchatka, Marshall Is.";b.value="+12:00,0";Y[Y.length]=b;b=new Fa;b.name="(+13:00) Nuku'alofa";b.value="+13:00,0";Y[Y.length]=b}}function Yl(){if(typeof Q=="undefined"||Q==null){Q=[];var b;b=new la;b.name="Alabama";b.code="AL";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Alaska";b.code="AK";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Arizona";b.code="AZ";
b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Arkansas";b.code="AR";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="California";b.code="CA";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Colorado";b.code="CO";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Connecticut";b.code="CT";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Delaware";b.code="DE";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="District of Columbia";b.code="DC";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Florida";b.code="FL";b.ordernum=0;Q[Q.length]=
b;b=new la;b.name="Georgia";b.code="GA";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Hawaii";b.code="HI";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Idaho";b.code="ID";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Illinois";b.code="IL";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Indiana";b.code="IN";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Iowa";b.code="IA";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Kansas";b.code="KS";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Kentucky";b.code="KY";b.ordernum=
0;Q[Q.length]=b;b=new la;b.name="Louisiana";b.code="LA";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Maine";b.code="ME";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Maryland";b.code="MD";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Massachusetts";b.code="MA";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Michigan";b.code="MI";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Minnesota";b.code="MN";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Mississippi";b.code="MS";b.ordernum=0;Q[Q.length]=b;b=new la;b.name=
"Missouri";b.code="MO";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Montana";b.code="MT";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Nebraska";b.code="NE";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Nevada";b.code="NV";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="New Hampshire";b.code="NH";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="New Jersey";b.code="NJ";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="New Mexico";b.code="NM";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="New York";b.code="NY";b.ordernum=
0;Q[Q.length]=b;b=new la;b.name="North Carolina";b.code="NC";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="North Dakota";b.code="ND";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Ohio";b.code="OH";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Oklahoma";b.code="OK";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Oregon";b.code="OR";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Pennsylvania";b.code="PA";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Rhode Island";b.code="RI";b.ordernum=0;Q[Q.length]=b;b=new la;b.name=
"South Carolina";b.code="SC";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="South Dakota";b.code="SD";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Tennessee";b.code="TN";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Texas";b.code="TX";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Utah";b.code="UT";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Vermont";b.code="VT";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Virginia";b.code="VA";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Washington";b.code="WA";b.ordernum=
0;Q[Q.length]=b;b=new la;b.name="West Virginia";b.code="WV";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Wisconsin";b.code="WI";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Wyoming";b.code="WY";b.ordernum=0;Q[Q.length]=b;b=new la;b.name="Armed Forces Americas";b.code="AA";b.ordernum=1;Q[Q.length]=b;b=new la;b.name="Armed Forces EMEAC";b.code="AE";b.ordernum=1;Q[Q.length]=b;b=new la;b.name="Armed Forces Pacific";b.code="AP";b.ordernum=1;Q[Q.length]=b;b=new la;b.name="American Samoa";b.code="AS";b.ordernum=
2;Q[Q.length]=b;b=new la;b.name="Federated States of Micronesia";b.code="FM";b.ordernum=2;Q[Q.length]=b;b=new la;b.name="Guam";b.code="GU";b.ordernum=2;Q[Q.length]=b;b=new la;b.name="Marshall Islands";b.code="MH";b.ordernum=2;Q[Q.length]=b;b=new la;b.name="Northern Mariana Islands";b.code="MP";b.ordernum=2;Q[Q.length]=b;b=new la;b.name="Palau";b.code="PW";b.ordernum=2;Q[Q.length]=b;b=new la;b.name="Puerto Rico";b.code="PR";b.ordernum=2;Q[Q.length]=b;b=new la;b.name="Virgin Islands";b.code="VI";b.ordernum=
2;Q[Q.length]=b;b=new la;b.name="Alberta";b.code="AB";b.ordernum=3;Q[Q.length]=b;b=new la;b.name="British Columbia";b.code="BC";b.ordernum=3;Q[Q.length]=b;b=new la;b.name="Manitoba";b.code="MB";b.ordernum=3;Q[Q.length]=b;b=new la;b.name="New Brunswick";b.code="NB";b.ordernum=3;Q[Q.length]=b;b=new la;b.name="Newfoundland and Labrador";b.code="NL";b.ordernum=3;Q[Q.length]=b;b=new la;b.name="Northwest Territories";b.code="NT";b.ordernum=3;Q[Q.length]=b;b=new la;b.name="Nova Scotia";b.code="NS";b.ordernum=
3;Q[Q.length]=b;b=new la;b.name="Nunavut";b.code="NU";b.ordernum=3;Q[Q.length]=b;b=new la;b.name="Ontario";b.code="ON";b.ordernum=3;Q[Q.length]=b;b=new la;b.name="Prince Edward Island";b.code="PE";b.ordernum=3;Q[Q.length]=b;b=new la;b.name="Quebec";b.code="QC";b.ordernum=3;Q[Q.length]=b;b=new la;b.name="Saskatchewan";b.code="SK";b.ordernum=3;Q[Q.length]=b;b=new la;b.name="Yukon";b.code="YT";b.ordernum=3;Q[Q.length]=b}}function Zl(){if(typeof s=="undefined"||s==null){s=[];var b;b=new H;b.name="Afghanistan";
b.cc2l="AF";b.cc3l="AFG";b.num="4";b.phone="93";s[s.length]=b;b=new H;b.name="Aland Islands";b.cc2l="AX";b.cc3l="ALA";b.num="248";b.phone="358";s[s.length]=b;b=new H;b.name="Albania";b.cc2l="AL";b.cc3l="ALB";b.num="8";b.phone="355";s[s.length]=b;b=new H;b.name="Algeria";b.cc2l="DZ";b.cc3l="DZA";b.num="12";b.phone="213";s[s.length]=b;b=new H;b.name="American Samoa";b.cc2l="AS";b.cc3l="ASM";b.num="16";b.phone="1";s[s.length]=b;b=new H;b.name="Andorra";b.cc2l="AD";b.cc3l="AND";b.num="20";b.phone="376";
s[s.length]=b;b=new H;b.name="Angola";b.cc2l="AO";b.cc3l="AGO";b.num="24";b.phone="244";s[s.length]=b;b=new H;b.name="Anguilla";b.cc2l="AI";b.cc3l="AIA";b.num="660";b.phone="1";s[s.length]=b;b=new H;b.name="Antarctica";b.cc2l="AQ";b.cc3l="ATA";b.num="10";b.phone="672";s[s.length]=b;b=new H;b.name="Antigua and Barbuda";b.cc2l="AG";b.cc3l="ATG";b.num="28";b.phone="1";s[s.length]=b;b=new H;b.name="Argentina";b.cc2l="AR";b.cc3l="ARG";b.num="32";b.phone="54";s[s.length]=b;b=new H;b.name="Armenia";b.cc2l=
"AM";b.cc3l="ARM";b.num="51";b.phone="374";s[s.length]=b;b=new H;b.name="Aruba";b.cc2l="AW";b.cc3l="ABW";b.num="533";b.phone="297";s[s.length]=b;b=new H;b.name="Australia";b.cc2l="AU";b.cc3l="AUS";b.num="36";b.phone="61";s[s.length]=b;b=new H;b.name="Austria";b.cc2l="AT";b.cc3l="AUT";b.num="40";b.phone="43";s[s.length]=b;b=new H;b.name="Azerbaijan";b.cc2l="AZ";b.cc3l="AZE";b.num="31";b.phone="994";s[s.length]=b;b=new H;b.name="Bahamas";b.cc2l="BS";b.cc3l="BHS";b.num="44";b.phone="1";s[s.length]=b;
b=new H;b.name="Bahrain";b.cc2l="BH";b.cc3l="BHR";b.num="48";b.phone="973";s[s.length]=b;b=new H;b.name="Bangladesh";b.cc2l="BD";b.cc3l="BGD";b.num="50";b.phone="880";s[s.length]=b;b=new H;b.name="Barbados";b.cc2l="BB";b.cc3l="BRB";b.num="52";b.phone="1";s[s.length]=b;b=new H;b.name="Belarus";b.cc2l="BY";b.cc3l="BLR";b.num="112";b.phone="375";s[s.length]=b;b=new H;b.name="Belgium";b.cc2l="BE";b.cc3l="BEL";b.num="56";b.phone="32";s[s.length]=b;b=new H;b.name="Belize";b.cc2l="BZ";b.cc3l="BLZ";b.num=
"84";b.phone="501";s[s.length]=b;b=new H;b.name="Benin";b.cc2l="BJ";b.cc3l="BEN";b.num="204";b.phone="229";s[s.length]=b;b=new H;b.name="Bermuda";b.cc2l="BM";b.cc3l="BMU";b.num="60";b.phone="1";s[s.length]=b;b=new H;b.name="Bhutan";b.cc2l="BT";b.cc3l="BTN";b.num="64";b.phone="975";s[s.length]=b;b=new H;b.name="Bolivia";b.cc2l="BO";b.cc3l="BOL";b.num="68";b.phone="591";s[s.length]=b;b=new H;b.name="Bosnia and Herzegovina";b.cc2l="BA";b.cc3l="BIH";b.num="70";b.phone="387";s[s.length]=b;b=new H;b.name=
"Botswana";b.cc2l="BW";b.cc3l="BWA";b.num="72";b.phone="267";s[s.length]=b;b=new H;b.name="Bouvet Island";b.cc2l="BV";b.cc3l="BVT";b.num="74";b.phone="47";s[s.length]=b;b=new H;b.name="Brazil";b.cc2l="BR";b.cc3l="BRA";b.num="76";b.phone="55";s[s.length]=b;b=new H;b.name="British Indian Ocean Territory";b.cc2l="IO";b.cc3l="IOT";b.num="86";b.phone="246";s[s.length]=b;b=new H;b.name="Brunei Darussalam";b.cc2l="BN";b.cc3l="BRN";b.num="96";b.phone="673";s[s.length]=b;b=new H;b.name="Bulgaria";b.cc2l="BG";
b.cc3l="BGR";b.num="100";b.phone="359";s[s.length]=b;b=new H;b.name="Burkina Faso";b.cc2l="BF";b.cc3l="BFA";b.num="854";b.phone="226";s[s.length]=b;b=new H;b.name="Burundi";b.cc2l="BI";b.cc3l="BDI";b.num="108";b.phone="257";s[s.length]=b;b=new H;b.name="Cambodia";b.cc2l="KH";b.cc3l="KHM";b.num="116";b.phone="855";s[s.length]=b;b=new H;b.name="Cameroon";b.cc2l="CM";b.cc3l="CMR";b.num="120";b.phone="237";s[s.length]=b;b=new H;b.name="Canada";b.cc2l="CA";b.cc3l="CAN";b.num="124";b.phone="1";s[s.length]=
b;b=new H;b.name="Cape Verde";b.cc2l="CV";b.cc3l="CPV";b.num="132";b.phone="238";s[s.length]=b;b=new H;b.name="Cayman Islands";b.cc2l="KY";b.cc3l="CYM";b.num="136";b.phone="1";s[s.length]=b;b=new H;b.name="Central African Republic";b.cc2l="CF";b.cc3l="CAF";b.num="140";b.phone="236";s[s.length]=b;b=new H;b.name="Chad";b.cc2l="TD";b.cc3l="TCD";b.num="148";b.phone="235";s[s.length]=b;b=new H;b.name="Chile";b.cc2l="CL";b.cc3l="CHL";b.num="152";b.phone="56";s[s.length]=b;b=new H;b.name="China";b.cc2l=
"CN";b.cc3l="CHN";b.num="156";b.phone="86";s[s.length]=b;b=new H;b.name="Christmas Island";b.cc2l="CX";b.cc3l="CXR";b.num="162";b.phone="61";s[s.length]=b;b=new H;b.name="Cocos (Keeling) Islands";b.cc2l="CC";b.cc3l="CCK";b.num="166";b.phone="61";s[s.length]=b;b=new H;b.name="Colombia";b.cc2l="CO";b.cc3l="COL";b.num="170";b.phone="57";s[s.length]=b;b=new H;b.name="Comoros";b.cc2l="KM";b.cc3l="COM";b.num="174";b.phone="269";s[s.length]=b;b=new H;b.name="Congo";b.cc2l="CG";b.cc3l="COG";b.num="178";b.phone=
"242";s[s.length]=b;b=new H;b.name="Congo, the Democratic Republic of The";b.cc2l="CD";b.cc3l="COD";b.num="180";b.phone="243";s[s.length]=b;b=new H;b.name="Cook Islands";b.cc2l="CK";b.cc3l="COK";b.num="184";b.phone="682";s[s.length]=b;b=new H;b.name="Costa Rica";b.cc2l="CR";b.cc3l="CRI";b.num="188";b.phone="506";s[s.length]=b;b=new H;b.name="Cote D'ivoire";b.cc2l="CI";b.cc3l="CIV";b.num="384";b.phone="225";s[s.length]=b;b=new H;b.name="Croatia";b.cc2l="HR";b.cc3l="HRV";b.num="191";b.phone="385";s[s.length]=
b;b=new H;b.name="Cuba";b.cc2l="CU";b.cc3l="CUB";b.num="192";b.phone="53";s[s.length]=b;b=new H;b.name="Cyprus";b.cc2l="CY";b.cc3l="CYP";b.num="196";b.phone="357";s[s.length]=b;b=new H;b.name="Czech Republic";b.cc2l="CZ";b.cc3l="CZE";b.num="203";b.phone="420";s[s.length]=b;b=new H;b.name="Denmark";b.cc2l="DK";b.cc3l="DNK";b.num="208";b.phone="45";s[s.length]=b;b=new H;b.name="Djibouti";b.cc2l="DJ";b.cc3l="DJI";b.num="262";b.phone="253";s[s.length]=b;b=new H;b.name="Dominica";b.cc2l="DM";b.cc3l="DMA";
b.num="212";b.phone="1";s[s.length]=b;b=new H;b.name="Dominican Republic";b.cc2l="DO";b.cc3l="DOM";b.num="214";b.phone="1";s[s.length]=b;b=new H;b.name="Ecuador";b.cc2l="EC";b.cc3l="ECU";b.num="218";b.phone="593";s[s.length]=b;b=new H;b.name="Egypt";b.cc2l="EG";b.cc3l="EGY";b.num="818";b.phone="20";s[s.length]=b;b=new H;b.name="El Salvador";b.cc2l="SV";b.cc3l="SLV";b.num="222";b.phone="503";s[s.length]=b;b=new H;b.name="Equatorial Guinea";b.cc2l="GQ";b.cc3l="GNQ";b.num="226";b.phone="240";s[s.length]=
b;b=new H;b.name="Eritrea";b.cc2l="ER";b.cc3l="ERI";b.num="232";b.phone="291";s[s.length]=b;b=new H;b.name="Estonia";b.cc2l="EE";b.cc3l="EST";b.num="233";b.phone="372";s[s.length]=b;b=new H;b.name="Ethiopia";b.cc2l="ET";b.cc3l="ETH";b.num="231";b.phone="251";s[s.length]=b;b=new H;b.name="Falkland Islands (Malvinas)";b.cc2l="FK";b.cc3l="FLK";b.num="238";b.phone="500";s[s.length]=b;b=new H;b.name="Faroe Islands";b.cc2l="FO";b.cc3l="FRO";b.num="234";b.phone="298";s[s.length]=b;b=new H;b.name="Fiji";
b.cc2l="FJ";b.cc3l="FJI";b.num="242";b.phone="679";s[s.length]=b;b=new H;b.name="Finland";b.cc2l="FI";b.cc3l="FIN";b.num="246";b.phone="358";s[s.length]=b;b=new H;b.name="France";b.cc2l="FR";b.cc3l="FRA";b.num="250";b.phone="33";s[s.length]=b;b=new H;b.name="French Guiana";b.cc2l="GF";b.cc3l="GUF";b.num="254";b.phone="594";s[s.length]=b;b=new H;b.name="French Polynesia";b.cc2l="PF";b.cc3l="PYF";b.num="258";b.phone="689";s[s.length]=b;b=new H;b.name="French Southern Territories";b.cc2l="TF";b.cc3l=
"ATF";b.num="260";b.phone="596";s[s.length]=b;b=new H;b.name="Gabon";b.cc2l="GA";b.cc3l="GAB";b.num="266";b.phone="241";s[s.length]=b;b=new H;b.name="Gambia";b.cc2l="GM";b.cc3l="GMB";b.num="270";b.phone="220";s[s.length]=b;b=new H;b.name="Georgia";b.cc2l="GE";b.cc3l="GEO";b.num="268";b.phone="995";s[s.length]=b;b=new H;b.name="Germany";b.cc2l="DE";b.cc3l="DEU";b.num="276";b.phone="49";s[s.length]=b;b=new H;b.name="Ghana";b.cc2l="GH";b.cc3l="GHA";b.num="288";b.phone="233";s[s.length]=b;b=new H;b.name=
"Gibraltar";b.cc2l="GI";b.cc3l="GIB";b.num="292";b.phone="350";s[s.length]=b;b=new H;b.name="Greece";b.cc2l="GR";b.cc3l="GRC";b.num="300";b.phone="30";s[s.length]=b;b=new H;b.name="Greenland";b.cc2l="GL";b.cc3l="GRL";b.num="304";b.phone="299";s[s.length]=b;b=new H;b.name="Grenada";b.cc2l="GD";b.cc3l="GRD";b.num="308";b.phone="1";s[s.length]=b;b=new H;b.name="Guadeloupe";b.cc2l="GP";b.cc3l="GLP";b.num="312";b.phone="590";s[s.length]=b;b=new H;b.name="Guam";b.cc2l="GU";b.cc3l="GUM";b.num="316";b.phone=
"1";s[s.length]=b;b=new H;b.name="Guatemala";b.cc2l="GT";b.cc3l="GTM";b.num="320";b.phone="502";s[s.length]=b;b=new H;b.name="Guernsey";b.cc2l="GG";b.cc3l="GGY";b.num="831";b.phone="44";s[s.length]=b;b=new H;b.name="Guinea";b.cc2l="GN";b.cc3l="GIN";b.num="324";b.phone="224";s[s.length]=b;b=new H;b.name="Guinea-Bissau";b.cc2l="GW";b.cc3l="GNB";b.num="624";b.phone="245";s[s.length]=b;b=new H;b.name="Guyana";b.cc2l="GY";b.cc3l="GUY";b.num="328";b.phone="592";s[s.length]=b;b=new H;b.name="Haiti";b.cc2l=
"HT";b.cc3l="HTI";b.num="332";b.phone="509";s[s.length]=b;b=new H;b.name="Heard Island and Mcdonald Islands";b.cc2l="HM";b.cc3l="HMD";b.num="334";b.phone="672";s[s.length]=b;b=new H;b.name="Holy See (Vatican City State)";b.cc2l="VA";b.cc3l="VAT";b.num="336";b.phone="379";s[s.length]=b;b=new H;b.name="Honduras";b.cc2l="HN";b.cc3l="HND";b.num="340";b.phone="504";s[s.length]=b;b=new H;b.name="Hong Kong";b.cc2l="HK";b.cc3l="HKG";b.num="344";b.phone="852";s[s.length]=b;b=new H;b.name="Hungary";b.cc2l=
"HU";b.cc3l="HUN";b.num="348";b.phone="36";s[s.length]=b;b=new H;b.name="Iceland";b.cc2l="IS";b.cc3l="ISL";b.num="352";b.phone="354";s[s.length]=b;b=new H;b.name="India";b.cc2l="IN";b.cc3l="IND";b.num="356";b.phone="91";s[s.length]=b;b=new H;b.name="Indonesia";b.cc2l="ID";b.cc3l="IDN";b.num="360";b.phone="62";s[s.length]=b;b=new H;b.name="Iran (Islamic Republic Of)";b.cc2l="IR";b.cc3l="IRN";b.num="364";b.phone="98";s[s.length]=b;b=new H;b.name="Iraq";b.cc2l="IQ";b.cc3l="IRQ";b.num="368";b.phone="964";
s[s.length]=b;b=new H;b.name="Ireland";b.cc2l="IE";b.cc3l="IRL";b.num="372";b.phone="353";s[s.length]=b;b=new H;b.name="Isle of Man";b.cc2l="IM";b.cc3l="IMM";b.num="833";b.phone="44";s[s.length]=b;b=new H;b.name="Israel";b.cc2l="IL";b.cc3l="ISR";b.num="376";b.phone="972";s[s.length]=b;b=new H;b.name="Italy";b.cc2l="IT";b.cc3l="ITA";b.num="380";b.phone="39";s[s.length]=b;b=new H;b.name="Jamaica";b.cc2l="JM";b.cc3l="JAM";b.num="388";b.phone="1";s[s.length]=b;b=new H;b.name="Japan";b.cc2l="JP";b.cc3l=
"JPN";b.num="392";b.phone="81";s[s.length]=b;b=new H;b.name="Jersey";b.cc2l="JE";b.cc3l="JEY";b.num="832";b.phone="44";s[s.length]=b;b=new H;b.name="Jordan";b.cc2l="JO";b.cc3l="JOR";b.num="400";b.phone="962";s[s.length]=b;b=new H;b.name="Kazakhstan";b.cc2l="KZ";b.cc3l="KAZ";b.num="398";b.phone="7";s[s.length]=b;b=new H;b.name="Kenya";b.cc2l="KE";b.cc3l="KEN";b.num="404";b.phone="254";s[s.length]=b;b=new H;b.name="Kiribati";b.cc2l="KI";b.cc3l="KIR";b.num="296";b.phone="686";s[s.length]=b;b=new H;b.name=
"Korea, Democratic People's Republic Of";b.cc2l="KP";b.cc3l="PRK";b.num="408";b.phone="850";s[s.length]=b;b=new H;b.name="Korea, Republic Of";b.cc2l="KR";b.cc3l="KOR";b.num="410";b.phone="82";s[s.length]=b;b=new H;b.name="Kuwait";b.cc2l="KW";b.cc3l="KWT";b.num="414";b.phone="965";s[s.length]=b;b=new H;b.name="Kyrgyzstan";b.cc2l="KG";b.cc3l="KGZ";b.num="417";b.phone="996";s[s.length]=b;b=new H;b.name="Lao People's Democratic Republic";b.cc2l="LA";b.cc3l="LAO";b.num="418";b.phone="856";s[s.length]=
b;b=new H;b.name="Latvia";b.cc2l="LV";b.cc3l="LVA";b.num="428";b.phone="371";s[s.length]=b;b=new H;b.name="Lebanon";b.cc2l="LB";b.cc3l="LBN";b.num="422";b.phone="961";s[s.length]=b;b=new H;b.name="Lesotho";b.cc2l="LS";b.cc3l="LSO";b.num="426";b.phone="266";s[s.length]=b;b=new H;b.name="Liberia";b.cc2l="LR";b.cc3l="LBR";b.num="430";b.phone="231";s[s.length]=b;b=new H;b.name="Libyan Arab Jamahiriya";b.cc2l="LY";b.cc3l="LBY";b.num="434";b.phone="218";s[s.length]=b;b=new H;b.name="Liechtenstein";b.cc2l=
"LI";b.cc3l="LIE";b.num="438";b.phone="423";s[s.length]=b;b=new H;b.name="Lithuania";b.cc2l="LT";b.cc3l="LTU";b.num="440";b.phone="370";s[s.length]=b;b=new H;b.name="Luxembourg";b.cc2l="LU";b.cc3l="LUX";b.num="442";b.phone="352";s[s.length]=b;b=new H;b.name="Macao";b.cc2l="MO";b.cc3l="MAC";b.num="446";b.phone="853";s[s.length]=b;b=new H;b.name="Macedonia, the Former Yugoslav Republic Of";b.cc2l="MK";b.cc3l="MKD";b.num="807";b.phone="389";s[s.length]=b;b=new H;b.name="Madagascar";b.cc2l="MG";b.cc3l=
"MDG";b.num="450";b.phone="261";s[s.length]=b;b=new H;b.name="Malawi";b.cc2l="MW";b.cc3l="MWI";b.num="454";b.phone="265";s[s.length]=b;b=new H;b.name="Malaysia";b.cc2l="MY";b.cc3l="MYS";b.num="458";b.phone="60";s[s.length]=b;b=new H;b.name="Maldives";b.cc2l="MV";b.cc3l="MDV";b.num="462";b.phone="960";s[s.length]=b;b=new H;b.name="Mali";b.cc2l="ML";b.cc3l="MLI";b.num="466";b.phone="223";s[s.length]=b;b=new H;b.name="Malta";b.cc2l="MT";b.cc3l="MLT";b.num="470";b.phone="356";s[s.length]=b;b=new H;b.name=
"Marshall Islands";b.cc2l="MH";b.cc3l="MHL";b.num="584";b.phone="692";s[s.length]=b;b=new H;b.name="Martinique";b.cc2l="MQ";b.cc3l="MTQ";b.num="474";b.phone="596";s[s.length]=b;b=new H;b.name="Mauritania";b.cc2l="MR";b.cc3l="MRT";b.num="478";b.phone="222";s[s.length]=b;b=new H;b.name="Mauritius";b.cc2l="MU";b.cc3l="MUS";b.num="480";b.phone="230";s[s.length]=b;b=new H;b.name="Mayotte";b.cc2l="YT";b.cc3l="MYT";b.num="175";b.phone="262";s[s.length]=b;b=new H;b.name="Mexico";b.cc2l="MX";b.cc3l="MEX";
b.num="484";b.phone="52";s[s.length]=b;b=new H;b.name="Micronesia, Federated States Of";b.cc2l="FM";b.cc3l="FSM";b.num="583";b.phone="691";s[s.length]=b;b=new H;b.name="Moldova, Republic Of";b.cc2l="MD";b.cc3l="MDA";b.num="498";b.phone="373";s[s.length]=b;b=new H;b.name="Monaco";b.cc2l="MC";b.cc3l="MCO";b.num="492";b.phone="377";s[s.length]=b;b=new H;b.name="Mongolia";b.cc2l="MN";b.cc3l="MNG";b.num="496";b.phone="976";s[s.length]=b;b=new H;b.name="Montenegro";b.cc2l="ME";b.cc3l="MNE";b.num="499";
b.phone="382";s[s.length]=b;b=new H;b.name="Montserrat";b.cc2l="MS";b.cc3l="MSR";b.num="500";b.phone="1";s[s.length]=b;b=new H;b.name="Morocco";b.cc2l="MA";b.cc3l="MAR";b.num="504";b.phone="212";s[s.length]=b;b=new H;b.name="Mozambique";b.cc2l="MZ";b.cc3l="MOZ";b.num="508";b.phone="258";s[s.length]=b;b=new H;b.name="Myanmar";b.cc2l="MM";b.cc3l="MMR";b.num="104";b.phone="95";s[s.length]=b;b=new H;b.name="Namibia";b.cc2l="NA";b.cc3l="NAM";b.num="516";b.phone="264";s[s.length]=b;b=new H;b.name="Nauru";
b.cc2l="NR";b.cc3l="NRU";b.num="520";b.phone="674";s[s.length]=b;b=new H;b.name="Nepal";b.cc2l="NP";b.cc3l="NPL";b.num="524";b.phone="977";s[s.length]=b;b=new H;b.name="Netherlands";b.cc2l="NL";b.cc3l="NLD";b.num="528";b.phone="31";s[s.length]=b;b=new H;b.name="Netherlands Antilles";b.cc2l="AN";b.cc3l="ANT";b.num="530";b.phone="599";s[s.length]=b;b=new H;b.name="New Caledonia";b.cc2l="NC";b.cc3l="NCL";b.num="540";b.phone="687";s[s.length]=b;b=new H;b.name="New Zealand";b.cc2l="NZ";b.cc3l="NZL";b.num=
"554";b.phone="64";s[s.length]=b;b=new H;b.name="Nicaragua";b.cc2l="NI";b.cc3l="NIC";b.num="558";b.phone="505";s[s.length]=b;b=new H;b.name="Niger";b.cc2l="NE";b.cc3l="NER";b.num="562";b.phone="227";s[s.length]=b;b=new H;b.name="Nigeria";b.cc2l="NG";b.cc3l="NGA";b.num="566";b.phone="234";s[s.length]=b;b=new H;b.name="Niue";b.cc2l="NU";b.cc3l="NIU";b.num="570";b.phone="683";s[s.length]=b;b=new H;b.name="Norfolk Island";b.cc2l="NF";b.cc3l="NFK";b.num="574";b.phone="672";s[s.length]=b;b=new H;b.name=
"Northern Mariana Islands";b.cc2l="MP";b.cc3l="MNP";b.num="580";b.phone="1";s[s.length]=b;b=new H;b.name="Norway";b.cc2l="NO";b.cc3l="NOR";b.num="578";b.phone="47";s[s.length]=b;b=new H;b.name="Oman";b.cc2l="OM";b.cc3l="OMN";b.num="512";b.phone="968";s[s.length]=b;b=new H;b.name="Pakistan";b.cc2l="PK";b.cc3l="PAK";b.num="586";b.phone="92";s[s.length]=b;b=new H;b.name="Palau";b.cc2l="PW";b.cc3l="PLW";b.num="585";b.phone="680";s[s.length]=b;b=new H;b.name="Palestinian Territories";b.cc2l="PS";b.cc3l=
"PSE";b.num="275";b.phone="970";s[s.length]=b;b=new H;b.name="Panama";b.cc2l="PA";b.cc3l="PAN";b.num="591";b.phone="507";s[s.length]=b;b=new H;b.name="Papua New Guinea";b.cc2l="PG";b.cc3l="PNG";b.num="598";b.phone="675";s[s.length]=b;b=new H;b.name="Paraguay";b.cc2l="PY";b.cc3l="PRY";b.num="600";b.phone="595";s[s.length]=b;b=new H;b.name="Peru";b.cc2l="PE";b.cc3l="PER";b.num="604";b.phone="51";s[s.length]=b;b=new H;b.name="Philippines";b.cc2l="PH";b.cc3l="PHL";b.num="608";b.phone="63";s[s.length]=
b;b=new H;b.name="Pitcairn";b.cc2l="PN";b.cc3l="PCN";b.num="612";b.phone="872";s[s.length]=b;b=new H;b.name="Poland";b.cc2l="PL";b.cc3l="POL";b.num="616";b.phone="48";s[s.length]=b;b=new H;b.name="Portugal";b.cc2l="PT";b.cc3l="PRT";b.num="620";b.phone="351";s[s.length]=b;b=new H;b.name="Puerto Rico";b.cc2l="PR";b.cc3l="PRI";b.num="630";b.phone="1";s[s.length]=b;b=new H;b.name="Qatar";b.cc2l="QA";b.cc3l="QAT";b.num="634";b.phone="974";s[s.length]=b;b=new H;b.name="Reunion";b.cc2l="RE";b.cc3l="REU";
b.num="638";b.phone="262";s[s.length]=b;b=new H;b.name="Romania";b.cc2l="RO";b.cc3l="ROU";b.num="642";b.phone="40";s[s.length]=b;b=new H;b.name="Russian Federation";b.cc2l="RU";b.cc3l="RUS";b.num="643";b.phone="7";s[s.length]=b;b=new H;b.name="Rwanda";b.cc2l="RW";b.cc3l="RWA";b.num="646";b.phone="250";s[s.length]=b;b=new H;b.name="Saint Barthelemy";b.cc2l="BL";b.cc3l="BLM";b.num="652";b.phone="590";s[s.length]=b;b=new H;b.name="Saint Helena";b.cc2l="SH";b.cc3l="SHN";b.num="654";b.phone="290";s[s.length]=
b;b=new H;b.name="Saint Kitts and Nevis";b.cc2l="KN";b.cc3l="KNA";b.num="659";b.phone="1";s[s.length]=b;b=new H;b.name="Saint Lucia";b.cc2l="LC";b.cc3l="LCA";b.num="662";b.phone="1";s[s.length]=b;b=new H;b.name="Saint Martin (French Part)";b.cc2l="MF";b.cc3l="MAF";b.num="663";b.phone="590";s[s.length]=b;b=new H;b.name="Saint Pierre and Miquelon";b.cc2l="PM";b.cc3l="SPM";b.num="666";b.phone="508";s[s.length]=b;b=new H;b.name="Saint Vincent and the Grenadines";b.cc2l="VC";b.cc3l="VCT";b.num="670";b.phone=
"1";s[s.length]=b;b=new H;b.name="Samoa";b.cc2l="WS";b.cc3l="WSM";b.num="882";b.phone="685";s[s.length]=b;b=new H;b.name="San Marino";b.cc2l="SM";b.cc3l="SMR";b.num="674";b.phone="378";s[s.length]=b;b=new H;b.name="Sao Tome and Principe";b.cc2l="ST";b.cc3l="STP";b.num="678";b.phone="239";s[s.length]=b;b=new H;b.name="Saudi Arabia";b.cc2l="SA";b.cc3l="SAU";b.num="682";b.phone="966";s[s.length]=b;b=new H;b.name="Senegal";b.cc2l="SN";b.cc3l="SEN";b.num="686";b.phone="221";s[s.length]=b;b=new H;b.name=
"Serbia";b.cc2l="RS";b.cc3l="SRB";b.num="688";b.phone="381";s[s.length]=b;b=new H;b.name="Seychelles";b.cc2l="SC";b.cc3l="SYC";b.num="690";b.phone="248";s[s.length]=b;b=new H;b.name="Sierra Leone";b.cc2l="SL";b.cc3l="SLE";b.num="694";b.phone="232";s[s.length]=b;b=new H;b.name="Singapore";b.cc2l="SG";b.cc3l="SGP";b.num="702";b.phone="65";s[s.length]=b;b=new H;b.name="Slovakia";b.cc2l="SK";b.cc3l="SVK";b.num="703";b.phone="421";s[s.length]=b;b=new H;b.name="Slovenia";b.cc2l="SI";b.cc3l="SVN";b.num=
"705";b.phone="386";s[s.length]=b;b=new H;b.name="Solomon Islands";b.cc2l="SB";b.cc3l="SLB";b.num="90";b.phone="677";s[s.length]=b;b=new H;b.name="Somalia";b.cc2l="SO";b.cc3l="SOM";b.num="706";b.phone="252";s[s.length]=b;b=new H;b.name="South Africa";b.cc2l="ZA";b.cc3l="ZAF";b.num="710";b.phone="27";s[s.length]=b;b=new H;b.name="South Georgia and the South Sandwich Islands";b.cc2l="GS";b.cc3l="SGS";b.num="239";b.phone="995";s[s.length]=b;b=new H;b.name="Spain";b.cc2l="ES";b.cc3l="ESP";b.num="724";
b.phone="34";s[s.length]=b;b=new H;b.name="Sri Lanka";b.cc2l="LK";b.cc3l="LKA";b.num="144";b.phone="94";s[s.length]=b;b=new H;b.name="Sudan";b.cc2l="SD";b.cc3l="SDN";b.num="736";b.phone="249";s[s.length]=b;b=new H;b.name="Suriname";b.cc2l="SR";b.cc3l="SUR";b.num="740";b.phone="597";s[s.length]=b;b=new H;b.name="Svalbard and Jan Mayen";b.cc2l="SJ";b.cc3l="SJM";b.num="744";b.phone="47";s[s.length]=b;b=new H;b.name="Swaziland";b.cc2l="SZ";b.cc3l="SWZ";b.num="748";b.phone="268";s[s.length]=b;b=new H;
b.name="Sweden";b.cc2l="SE";b.cc3l="SWE";b.num="752";b.phone="46";s[s.length]=b;b=new H;b.name="Switzerland";b.cc2l="CH";b.cc3l="CHE";b.num="756";b.phone="41";s[s.length]=b;b=new H;b.name="Syrian Arab Republic";b.cc2l="SY";b.cc3l="SYR";b.num="760";b.phone="963";s[s.length]=b;b=new H;b.name="Taiwan";b.cc2l="TW";b.cc3l="TWN";b.num="158";b.phone="886";s[s.length]=b;b=new H;b.name="Tajikistan";b.cc2l="TJ";b.cc3l="TJK";b.num="762";b.phone="992";s[s.length]=b;b=new H;b.name="Tanzania, United Republic Of";
b.cc2l="TZ";b.cc3l="TZA";b.num="834";b.phone="255";s[s.length]=b;b=new H;b.name="Thailand";b.cc2l="TH";b.cc3l="THA";b.num="764";b.phone="66";s[s.length]=b;b=new H;b.name="Timor-Leste";b.cc2l="TL";b.cc3l="TLS";b.num="626";b.phone="670";s[s.length]=b;b=new H;b.name="Togo";b.cc2l="TG";b.cc3l="TGO";b.num="768";b.phone="228";s[s.length]=b;b=new H;b.name="Tokelau";b.cc2l="TK";b.cc3l="TKL";b.num="772";b.phone="690";s[s.length]=b;b=new H;b.name="Tonga";b.cc2l="TO";b.cc3l="TON";b.num="776";b.phone="676";s[s.length]=
b;b=new H;b.name="Trinidad and Tobago";b.cc2l="TT";b.cc3l="TTO";b.num="780";b.phone="1";s[s.length]=b;b=new H;b.name="Tunisia";b.cc2l="TN";b.cc3l="TUN";b.num="788";b.phone="216";s[s.length]=b;b=new H;b.name="Turkey";b.cc2l="TR";b.cc3l="TUR";b.num="792";b.phone="90";s[s.length]=b;b=new H;b.name="Turkmenistan";b.cc2l="TM";b.cc3l="TKM";b.num="795";b.phone="993";s[s.length]=b;b=new H;b.name="Turks and Caicos Islands";b.cc2l="TC";b.cc3l="TCA";b.num="796";b.phone="1";s[s.length]=b;b=new H;b.name="Tuvalu";
b.cc2l="TV";b.cc3l="TUV";b.num="798";b.phone="688";s[s.length]=b;b=new H;b.name="Uganda";b.cc2l="UG";b.cc3l="UGA";b.num="800";b.phone="256";s[s.length]=b;b=new H;b.name="Ukraine";b.cc2l="UA";b.cc3l="UKR";b.num="804";b.phone="380";s[s.length]=b;b=new H;b.name="United Arab Emirates";b.cc2l="AE";b.cc3l="ARE";b.num="784";b.phone="971";s[s.length]=b;b=new H;b.name="United Kingdom";b.cc2l="GB";b.cc3l="GBR";b.num="826";b.phone="44";s[s.length]=b;b=new H;b.name="United States";b.cc2l="US";b.cc3l="USA";b.num=
"840";b.phone="1";s[s.length]=b;b=new H;b.name="United States Minor Outlying Islands";b.cc2l="UM";b.cc3l="UMI";b.num="581";b.phone="1";s[s.length]=b;b=new H;b.name="Uruguay";b.cc2l="UY";b.cc3l="URY";b.num="858";b.phone="598";s[s.length]=b;b=new H;b.name="Uzbekistan";b.cc2l="UZ";b.cc3l="UZB";b.num="860";b.phone="998";s[s.length]=b;b=new H;b.name="Vanuatu";b.cc2l="VU";b.cc3l="VUT";b.num="548";b.phone="678";s[s.length]=b;b=new H;b.name="Venezuela";b.cc2l="VE";b.cc3l="VEN";b.num="862";b.phone="58";s[s.length]=
b;b=new H;b.name="Viet Nam";b.cc2l="VN";b.cc3l="VNM";b.num="704";b.phone="84";s[s.length]=b;b=new H;b.name="Virgin Islands (British)";b.cc2l="VG";b.cc3l="VGB";b.num="92";b.phone="1";s[s.length]=b;b=new H;b.name="Virgin Islands (U.S.)";b.cc2l="VI";b.cc3l="VIR";b.num="850";b.phone="1";s[s.length]=b;b=new H;b.name="Wallis and Futuna";b.cc2l="WF";b.cc3l="WLF";b.num="876";b.phone="681";s[s.length]=b;b=new H;b.name="Western Sahara";b.cc2l="EH";b.cc3l="ESH";b.num="732";b.phone="212";s[s.length]=b;b=new H;
b.name="Yemen";b.cc2l="YE";b.cc3l="YEM";b.num="887";b.phone="967";s[s.length]=b;b=new H;b.name="Yugoslavia";b.cc2l="YU";b.cc3l="YUG";b.num="891";b.phone="381";s[s.length]=b;b=new H;b.name="Zambia";b.cc2l="ZM";b.cc3l="ZMB";b.num="894";b.phone="260";s[s.length]=b;b=new H;b.name="Zimbabwe";b.cc2l="ZW";b.cc3l="ZWE";b.num="716";b.phone="263";s[s.length]=b}}function Tj(b,c){var d=b.getElementById("lpstatepopup"),e=0,f=Q;if(typeof locale_states[c]!="undefined")f=locale_states[c];for(var g=d.childNodes.length-
1;g>=0;g--)d.removeChild(d.childNodes.item(g));for(g=0;g<f.length;g++){if(f[g].ordernum!=e){var h=b.createElement("menuitem");h.setAttribute("label","-----");h.setAttribute("value","");d.appendChild(h);e=f[g].ordernum}h=b.createElement("menuitem");h.setAttribute("label",f[g].name);h.setAttribute("value",f[g].code);d.appendChild(h)}}function Dd(b,c){var d,e,f,g,h,j;if(c=="phone"){d="lpphone";e="lpcountryphone";f="lpphone_npa";g="lpphone_nxx";h="lpphone_xxxx";j="lpphone_intl"}else if(c=="evephone"){d=
"lpevephone";e="lpcountryevephone";f="lpevephone_npa";g="lpevephone_nxx";h="lpevephone_xxxx";j="lpevephone_intl"}else if(c=="fax"){d="lpfax";e="lpcountryfaxphone";f="lpfax_npa";g="lpfax_nxx";h="lpfax_xxxx";j="lpfax_intl"}else if(c=="mobilephone"){d="lpmobilephone";e="lpcountrymobphone";f="lpmobilephone_npa";g="lpmobilephone_nxx";h="lpmobilephone_xxxx";j="lpmobilephone_intl"}else return;b.getElementById(d).style.display="none";d=b.getElementById(d).value;var l=b.getElementById(e).value,o="";if(d==
""){e=b.getElementById(e);a:{for(f=0;f<s.length;f++)if(s[f].cc2l==b.defaultcountry){f=s[f].cc3l;break a}f=s[0].cc3l}e.value=f}else{for(var n=0;n<s.length;++n)if(s[n].cc3l==l){o=s[n].phone;break}if(o==""||d.indexOf(o)!=0)if(o=="1"||d.indexOf("1")==0){b.getElementById(f).value=d.substring(1,4);b.getElementById(g).value=d.substring(4,7);b.getElementById(h).value=d.substring(7,11);b.getElementById(e).value="USA"}else{for(n=0;n<s.length;++n)if(d.indexOf(s[n].phone)==0){d=d.substring(s[n].phone.length);
b.getElementById(j).value=d;b.getElementById(e).value=s[n].cc3l;LP.formfill_fix(b,c);return}b.getElementById(e).value=""}else{if(o=="1"){b.getElementById(f).value=d.substring(1,4);b.getElementById(g).value=d.substring(4,7);b.getElementById(h).value=d.substring(7,11)}else{d=d.substring(o.length);b.getElementById(j).value=d}b.getElementById(e).value=l}}LP.formfill_fix(b,c)}function ue(b,c){var d;if(c=="phone")d="lpcountryphone";else if(c=="evephone")d="lpcountryevephone";else if(c=="fax")d="lpcountryfaxphone";
else if(c=="mobilephone")d="lpcountrymobphone";else return"";return b.getElementById(d).value}function cg(b,c){var d=ue(b,c);if(d=="")return"";var e,f,g,h;if(c=="phone"){e="lpphone_npa";f="lpphone_nxx";g="lpphone_xxxx";h="lpphone_intl"}else if(c=="evephone"){e="lpevephone_npa";f="lpevephone_nxx";g="lpevephone_xxxx";h="lpevephone_intl"}else if(c=="fax"){e="lpfax_npa";f="lpfax_nxx";g="lpfax_xxxx";h="lpfax_intl"}else if(c=="mobilephone"){e="lpmobilephone_npa";f="lpmobilephone_nxx";g="lpmobilephone_xxxx";
h="lpmobilephone_intl"}else return;for(var j=0;j<s.length;++j)if(s[j].cc3l==d){d=s[j].phone;if(d=="1")if(b.getElementById(e).value==""&&b.getElementById(f).value==""&&b.getElementById(g).value=="")return"";else{e=d+b.getElementById(e).value+b.getElementById(f).value+b.getElementById(g).value;if(e.length!=11)e="invalid";return e}else return b.getElementById(h).value==""?"":d+b.getElementById(h).value}return""}function dg(b){return b.match(/^\d+$/)?b.match(/^1/)&&!b.match(/^1(?:[2-9]\d{2}){2}\d{4}$/)?
false:true:false}function eg(b,c,d){for(var e=[],f=0;f<b.length;f++){var g=b[f];if(g.name!=c||!(g.value==d?true:g.value==null&&d==""?true:g.value==""&&d==null?true:false))e[e.length]=g}return e}function Bh(b){var c;c=b.getElementById("info.box");if(null==c){c=b.getElementById("infoContainer");b=c.getElementsByTagName("description");if(b.length==3)return b[1+LP.lpis_mac].firstChild.nodeValue;else if(b.length==2)return b[1].firstChild.nodeValue}return c.getElementsByTagName("description")[0].firstChild.nodeValue}
function Uj(b){if(b=b.match(/"(.*)"/))return Hc(b[1].replace(/\s*\[[0-9:]+\]\s*/g,""));return""}function Vj(b){b=Bh(b);b=b.replace(/\u201E|\u201C|\u201A|\u2018|\u203A|\u2039|\u2019|\u00AB|\u00BB/g,"");var c="",d=b.match(/\s+((https?|ftps?):\/\/\S+)\.?/i);if(d)c=d[1];else if(d=b.match(/^((https?|ftps?):\/\/\S+)\.?\s+/i))c=d[1];else if(d=b.match(/\s+(\S+:\d+)\s+/i))c=d[1];return c.replace(/\.\s*$/,"")}function Ra(b){if(typeof b!="string")return"";if($e[b]!=null)return $e[b];var c=null,d=null,e=b;if(b.indexOf("#")!=
-1){d=b.substring(b.indexOf("#")+1);b=b.substring(0,b.indexOf("#"))}if(b.indexOf("?")!=-1){c=b.substring(b.indexOf("?")+1);b=b.substring(0,b.indexOf("?"))}var f=b.match(/^(.*:\/\/[^\/]+\/.*)@/);if(f)b=b.substring(0,f[1].length)+b.substring(f[1].length).replace(/@/g,"%40");if(b.length>2047)return"";var g=Ra.options;b=g.parser[g.strictMode?"strict":"loose"].exec(b);var h={};for(f=14;f--;)h[g.key[f]]=b[f]||"";h[g.q.name]={};h[g.key[12]].replace(g.q.parser,function(l,o,n){if(o)h[g.q.name][o]=n});if(c!=
null){h.query=c;if(d!=null)h.anchor=d}if(Ch>500){for(var j in $e){delete $e[j];break}Ch=0}$e[e]=h;Ch++;return h}function Ta(b,c){if("about:blank"==b)return"";if(af[b]!=null)return af[b];if(c==null)c=Ra(b);var d="";if(c.port!="")if(c.port!=fg(c.protocol))d=":"+c.port;if(c.host)d=c.host.toLowerCase()+d+c.path;else{if(!b)return"";d=b}if(d.indexOf(";")!=-1)d=d.substring(0,d.indexOf(";"));if(Dh>500){for(var e in af){delete af[e];break}Dh=0}af[b]=d;Dh++;return d}function ob(b,c){if(typeof O=="undefined"||
O==null)if(typeof O=="undefined"||O==null){O=[];O.hu=Array("2000","agrar","bolt","casino","city","co","com","erotica","erotika","film","forum","games","hotel","info","ingatlan","jogasz","konyvelo","lakas","media","news","nui","org","priv","reklam","sex","shop","sport","suli","szex","tm","tozsde","utazas","video");O.nl=Array("752");O.ca=Array("ab","bc","gc","mb","nb","nf","nl","ns","nt","nu","on","pe","qc","sk","yk");O.pa=Array("abo","ac","com","edu","gob","ing","med","net","nom","org","sld");O.se=
Array("ab","ac","bd","brand","com","c","d","e","fh","fhsk","fhv","f","g","h","i","komforb","kommunalforbund","komvux","k","lanarb","lanbib","mil","m","naturbruksgymn","net","n","org","o","parti","pp","press","s","sshn","tm","t","u","w","x","y","z");O.ac=Array("ac","co","com","edu","gov","gv","mil","net","or","org");O.ae=Array("ac","com","gov","mil","name","net","org","pro","sch");O.at=Array("ac","co","gv","or","priv");O.be=Array("ac","ap","co","com","fgov","to","xa");O.cn=Array("ac","ah","bj","com",
"cq","edu","fj","gd","gov","gs","gx","gz","ha","hb","he","hi","hk","hl","hn","jl","js","jx","ln","mo","net","nm","nx","org","qh","sc","sd","sh","sn","sx","tj","tw","xj","xz","yn","zj");O.cr=Array("ac","co","ed","fi","go","or","sa");O.cy=Array("ac","biz","com","ekloges","gov","info","ltd","name","net","org","parliament","press","pro","tm");O.fj=Array("ac","biz","com","gov","id","info","mil","name","net","org","pro","school");O.fk=Array("ac","co","gov","net","nom","org");O.gg=Array("ac","alderney",
"co","gov","guernsey","ind","ltd","net","org","sark","sch");O.gn=Array("ac","com","gov","net","org");O.id=Array("ac","co","go","mil","net","or","sch","web");O.il=Array("ac","co","gov","idf","k12","muni","net","org");O.im=Array("ac","co","gov","net","nic","org");O["in"]=Array("ac","co","edu","ernet","firm","gen","gov","ind","mil","net","nic","org","res");O.ir=Array("ac","co","gov","net","org","sch");O.is=Array("ac","org");O.je=Array("ac","co","gov","ind","jersey","ltd","net","org","sch");O.jp=Array("ac",
"ad","aichi","akita","aomori","chiba","co","ed","ehime","fukui","fukuoka","fukushima","gifu","go","gov","gr","gunma","hiroshima","hokkaido","hyogo","ibaraki","ishikawa","iwate","kagawa","kagoshima","kanagawa","kawasaki","kitakyushu","kobe","kochi","kumamoto","kyoto","lg","mie","miyagi","miyazaki","nagano","nagasaki","nagoya","nara","ne","net","niigata","oita","okayama","okinawa","org","or","osaka","saga","saitama","sapporo","sendai","shiga","shimane","shizuoka","tochigi","tokushima","tokyo","tottori",
"toyama","wakayama","yamagata","yamaguchi","yamanashi","yokohama");O.kr=Array("ac","co","go","ne","nm","or","re");O.mw=Array("ac","com","co","coop","edu","gov","int","museum","net","org");O.nz=Array("ac","co","cri","geek","gen","govt","iwi","maori","mil","net","org","school");O.ru=Array("ac","com","int","msk","net","org","pp");O.rw=Array("ac","com","co","edu","gouv","gov","int","mil","net");O.au=Array("act","asn","com","conf","csiro","edu","gov","id","info","net","nsw","nt","org","oz","qld","sa",
"tas","telememo","vic","wa");O.th=Array("ac","co","go","in","mi","net","or");O.tj=Array("ac","biz","com","co","edu","go","gov","int","mil","name","net","org","web");O.tz=Array("ac","co","go","ne","or");O.ug=Array("ac","co","go","ne","or","sc");O.uk=Array("ac","bl","british-library","com","co","gov","icnet","jet","ltd","me","mil","mod","national-library-scotland","nel","net","nhs","nic","nls","org","parliament","plc","police","sch");O.vn=Array("ac","biz","com","edu","gov","health","info","int","name",
"net","org","pro");O.yu=Array("ac","co","edu","org");O.za=Array("ac","alt","city","com","co","edu","gov","law","mil","net","ngo","nom","org","school","tm","web");O.zm=Array("ac","co","gov","org","sch");O.zw=Array("ac","co","gov","org");O.br=Array("adm","adv","agr","am","arq","art","ato","bio","bmd","cim","cng","cnt","com","coop","dpn","ecn","edu","eng","esp","etc","eti","far","fm","fnd","fot","fst","g12","ggf","gov","imb","ind","inf","jor","lel","mat","med","mil","mus","net","nom","not","ntr","odo",
"org","ppg","pro","psc","psi","qsl","rec","slg","srv","tmp","trd","tur","tv","vet","zlg");O.ht=Array("adult","art","asso","com","coop","edu","firm","gouv","info","med","net","org","perso","pol","pro","rel","shop");O.mv=Array("aero","biz","com","coop","edu","gov","info","int","mil","museum","name","net","org","pro");O.pl=Array("agro","aid","art","atm","auto","bialystok","biz","com","edu","gdansk","gda","gmina","gov","gsm","info","krakow","lodz","lublin","mail","media","miasta","mil","net","ngo","nom",
"olsztyn","org","pc","poznan","priv","realestate","rel","shop","sklep","slupsk","sos","szczecin","targi","tm","torun","tourism","travel","turystyka","warszawa","waw","wroclaw","wroc");O.us=Array("ak","al","ar","az","ca","com","co","ct","dc","de","dni","fed","fl","ga","hi","ia","id","il","in","isa","kids","ks","ky","la","ma","md","me","mi","mn","mo","ms","mt","nc","nd","ne","nh","nj","nm","nsn","nv","ny","oh","ok","or","pa","ri","sc","sd","tn","tx","ut","va","vt","wa","wi","wv","wy");O.fi=Array("aland");
O.mil=Array("army","navy");O["do"]=Array("art","com","edu","gob","gov","mil","net","org","sld","web");O.dz=Array("art","asso","com","edu","gov","net","org","pol");O.co=Array("arts","com","edu","firm","gov","info","int","mil","net","nom","org","rec","store","uk","web");O.ro=Array("arts","com","firm","info","nom","nt","org","rec","store","tm","www");O.ve=Array("arts","bib","com","co","edu","firm","gov","info","int","mil","net","nom","org","rec","store","tec","web");O.lv=Array("asn","com","conf","edu",
"eu","gov","id","mil","net","org");O.lk=Array("assn","com","edu","gov","grp","hotel","int","ltd","net","ngo","org","sch","soc","web");O.fr=Array("asso","com","gouv","nom","prd","presse","tm");O.gp=Array("asso","com","edu","net","org");O.mc=Array("asso","tm");O.tr=Array("av","bbs","bel","biz","com","dr","edu","gen","gov","info","k12","mil","name","net","org","pol","tel","web");O.az=Array("biz","com","edu","gov","info","int","mil","name","net","org","pp");O.et=Array("biz","com","edu","gov","info","name",
"net","org");O.nr=Array("biz","com","co","edu","gov","info","net","org");O.om=Array("biz","com","co","edu","gov","med","mil","museum","net","org","pro","sch");O.pk=Array("biz","com","edu","fam","gob","gok","gon","gop","gos","gov","net","org","web");O.pr=Array("biz","com","edu","gov","info","isla","name","net","org","pro");O.tt=Array("biz","com","co","edu","gov","info","name","net","org","pro","us");O.ua=Array("cherkassy","chernigov","chernovtsy","ck","cn","com","crimea","cv","dnepropetrovsk","dn",
"donetsk","dp","edu","gov","if","ivano-frankivsk","kharkov","kherson","khmelnitskiy","kh","kiev","kirovograd","km","kr","ks","kv","lg","lugansk","lutsk","lviv","mk","net","nikolaev","odessa","od","org","pl","poltava","rovno","rv","sebastopol","sumy","ternopil","te","uzhgorod","vinnica","vn","zaporizhzhe","zhitomir","zp","zt");O.tw=Array("club","com","ebiz","edu","game","gove","gov","idv","mil","net","org");O.ag=Array("co","com","net","nom","org");O.ao=Array("co","ed","gv","it","og","pb");O.bw=Array("co",
"org");O.ck=Array("co");O.ls=Array("co","org");O.ma=Array("co","gov","net","org");O.af=Array("com","edu","gov","net");O.ai=Array("com","net","off","org");O.al=Array("com","edu","gov","inima","net","org","soros","tirana","uniti","upt");O.an=Array("com","edu","net","org");O.ar=Array("com","gov","int","mil","net","org");O.aw=Array("com");O.bb=Array("com","edu","gov","net","org");O.bd=Array("com","edu","gov","mil","net","org");O.bm=Array("com","edu","gov","net","org");O.bn=Array("com","edu","net","org");
O.bo=Array("com","edu","gob","gov","int","mil","net","org","tv");O.bs=Array("com","net","org");O.bt=Array("com","edu","gov","net","org");O.cd=Array("com","net","org");O.ch=Array("com","gov","net","org");O.cu=Array("com","edu","gov","inf","net","org");O.dm=Array("com","edu","gov","net","org");O.ec=Array("com","edu","fin","gov","info","k12","med","mil","net","org","pro");O.ee=Array("com","fie","org","pri");O.eg=Array("com","edu","eun","gov","mil","net","org","sci");O.es=Array("com","edu","gob","nom",
"org");O.eu=Array("com");O.gb=Array("com","net");O.ge=Array("com","edu","gov","mil","net","org","pvt");O.gh=Array("com","edu","gov","mil","org");O.gi=Array("com","edu","gov","ltd","mod","org");O.gr=Array("com","edu","gov","net","org");O.gu=Array("com","edu","gov","mil","net","org");O.hk=Array("com","edu","gov","idv","net","org");O.hn=Array("com","edu","gob","mil","net","org");O.hr=Array("com","from","iz","name");O.jm=Array("com","edu","gov","net","org");O.jo=Array("com","edu","gov","mil","net","org");
O.kh=Array("com","edu","gov","mil","net","org","per");O.kw=Array("com","edu","gov","mil","net","org");O.ky=Array("com","edu","gov","net","org");O.kz=Array("com","edu","gov","mil","net","org");O.la=Array("com","net","org");O.lb=Array("com","edu","gov","mil","net","org");O.lc=Array("com","edu","gov","net","org");O.li=Array("com","gov","net","org");O.lr=Array("com","edu","gov","net","org");O.ly=Array("com","edu","gov","id","med","net","org","plc","sch");O.mg=Array("com","edu","gov","mil","nom","org",
"prd","tm");O.mk=Array("com","org");O.mm=Array("com","edu","gov","net","org");O.mo=Array("com","edu","gov","net","org");O.mt=Array("com","edu","gov","net","org");O.mu=Array("com","co");O.mx=Array("com","edu","gob","gov","net","org");O.my=Array("com","edu","gov","mil","name","net","org");O.na=Array("com","net","org");O.nc=Array("com","net","org");O.ng=Array("com","edu","gov","net","org");O.ni=Array("com","edu","gob","net","nom","org");O.no=Array("com","fhs","folkebibl","fylkesbibl","herad","idrett",
"kommune","mil","museum","priv","stat","vgs");O.np=Array("com","edu","gov","mil","net","org","ort");O.pe=Array("com","edu","gob","mil","net","nom","org");O.pf=Array("com","edu","org");O.pg=Array("com","net");O.ph=Array("com","gov","mil","net","ngo","org");O.ps=Array("com","edu","gov","net","org","plo","sec");O.pt=Array("com","edu","gov","int","net","nome","org","publ");O.py=Array("com","edu","gov","net","org");O.qc=Array("com");O.sa=Array("com","edu","gov","med","net","org","pub","sch");O.sb=Array("com",
"edu","gov","net");O.sc=Array("com","edu","gov","net","org");O.sd=Array("com","edu","gov","info","med","net","org","tv");O.sg=Array("com","edu","gov","idn","net","org","per");O.sh=Array("com","edu","gov","mil","net","org");O.sv=Array("com","co","edu","gob","org","red");O.sy=Array("com","gov","net","org");O.tn=Array("com","edunet","ens","fin","gov","ind","info","intl","nat","net","org","rnrt","rns","rnu","tourism");O.uy=Array("com","edu","gub","mil","net","org");O.vi=Array("com","co","edu","gov","net",
"org");O.ye=Array("com","net");O.pro=Array("cpa","law","med");O.arpa=Array("e164","in-addr","ip6","iris","uri","urn");O["int"]=Array("eu");O.bf=Array("gov");O.by=Array("gov","mil");O.cx=Array("gov");O.ie=Array("gov");O.it=Array("gov","pisa");O.lt=Array("gov","mil");O.lu=Array("gov","mil","net","org");O.to=Array("gov");O.tp=Array("gov");O.tv=Array("gov");O.mobi=Array("music","weather");O.mh=Array("net");O.ad=Array("nom");O.sr=Array("rs");O.va=Array("vatican")}if(typeof b!="string")return"";if(b==""&&
typeof c=="string"&&c.indexOf("file://")==0)return"file:";b=b.toLowerCase();b=b.replace(/\.$/,"");var d=b.split("."),e;if(b.match(/^\d+\.\d+\.\d+\.\d+$/))e=4;else{e=2;if(d.length>=2){var f=d[d.length-1];if(typeof O[f]!="undefined")if(Qa(d[d.length-2],O[f]))e=3}}for(;d.length>e;)d.shift();return d.join(".")}function Ua(b){var c=Ra(b);return ob(c.host,b)}function le(b){b=Ra(b);return(typeof b.host=="string"?b.host:"").replace(/^www\./,"")}function Hc(b){if(typeof b!="string")return b;return b.replace(/^\s+|\s+$/g,
"")}function gg(b){return(b+"").replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!<>\|\:])/g,"\\$1")}function ka(b,c){if(c&&typeof b.id!="undefined"&&b.id!="")return b.id;if(typeof b!="undefined"&&b!=null)if(typeof b.name!="undefined"&&b.name!="")return b.name;else if(typeof b.id!="undefined")return b.id;return""}function dd(b,c){for(;b&&b.tagName!="BODY";b=b.parentNode){if(typeof b.style!="undefined"&&(b.style.visibility=="hidden"||b.style.display=="none"))return false;try{var d=b.ownerDocument.defaultView.getComputedStyle(b,
"");if(d.visibility=="hidden"||d.display=="none")return false}catch(e){}if(c)return true}return true}function Qa(b,c){for(var d=c.length,e=0;e<=d;e++)if(typeof c[e]!="undefined"&&c[e]==b){$l=e;return true}return false}function ld(b){if(!b.length)return b;b=b.replace(/\s+/g," ");b=b.replace(/^\s+|\s+$/g,"");b=b.replace(/[\|]+$/g,"");var c=b.match(/\|([^\|]+)$/);if(c){b=c[1];b=b.replace(/^\s+|\s+$/g,"")}return b}function ag(b){if(typeof b=="number")b=""+b;b=b.replace(/&/g,"&amp;");b=b.replace(/</g,
"&lt;");b=b.replace(/>/g,"&gt;");return b.replace(/"/g,"&quot;")}function fc(b){if(typeof b=="number")b=""+b;b=b.replace(/&lt;/g,"<");b=b.replace(/&gt;/g,">");b=b.replace(/&quot;/g,'"');return b.replace(/&amp;/g,"&")}function cc(b,c){try{if(b){if(b.ownerDocument&&typeof b.ownerDocument.createEvent=="function"){var d=b.ownerDocument.createEvent("Events");d.initEvent("change",true,true);b.dispatchEvent(d)}else typeof b.fireEvent!="undefined"&&b.fireEvent("onchange");if(typeof c=="undefined"||c==null||
c)typeof zj=="function"&&zj("SHIFT",b);if(typeof mb=="function"){var e=mb(b.ownerDocument);if(e)e.lpfieldchanged=true}}}catch(f){}}function fg(b){switch(b){case "http":return 80;case "https":return 443;case "ftp":return 21;default:return 0}}function ce(b){var c=0;if(typeof b.port!="undefined"&&b.port)c=b.port;else if(typeof b.protocol!="undefined"&&b.protocol)c=fg(b.protocol);return c}function Pg(b,c){var d=b.port!=""?b.port:fg(b.protocol),e=c.port!=""?c.port:fg(c.protocol);return d==e}function Eh(b){var c=
b.length?--b.length:-1;for(var d in b)c++;return c}function cb(){var b=(new Date).getTime();return parseInt(b/1E3)}function Bf(b,c,d,e,f,g,h){if(c.length==0)return c;for(var j=[],l=[],o=0;o<b.length;o++){if(typeof b[o].tld=="undefined"){b[o].tld=Ua(b[o].url);b[o].parts=Ra(b[o].url);b[o].path=typeof b[o].parts.path=="string"?b[o].parts.path:""}if(d==b[o].tld)if(b[o].path!=""&&e.indexOf(b[o].path)!=0)l[l.length]=b[o];else if(f==b[o].parts.host||b[o].exacthost==1&&f.indexOf("."+b[o].parts.host)!=-1||
b[o].exacthost==0)j[j.length]=b[o];else l[l.length]=b[o]}if(j.length==0&&l.length==0)return c;if(j.length>0){g=c;for(o=0;o<j.length;o++){l=c;b=j[o];d=e;var n=f,p=h,q=b.path;if(!(q!=""&&d.indexOf(q)!=0)){for(var r=q.split("/").length,u=[],t=false,C=0;C<l.length;C++){var A=l[C],J=A.pathlevelmatch,D=A.servermatch,B=A.portmatch;if(typeof J=="undefined"){J=d.split("/");A=Ra(A.url);A.path=typeof A.path!="undefined"?A.path:"";D=A.path.split("/");for(B=0;B<J.length&&B<D.length;B++)if(D[B]!=J[B])break;J=B;
D=n==A.host;B=p==ce(A)}if(!(q!=""&&J<r)){t=t||b.exacthost==1||b.exactport==1?true:false;if((D||b.exacthost==0)&&(B||b.exactport==0)){t=true;u[u.length]=l[C]}}}l=t?u:l}if(l.length<g.length)g=l}return g}else{for(o=0;o<l.length;o++){e=c;j=l[o];b=g;d=f;n=h;p=j.path;for(q=0;q<e.length;q++){r=typeof e[q].id!="undefined"?e[q].id:e[q].aid;if(typeof b[r]!="undefined"){r=Ra(b[r].url);r.path=typeof r.path!="undefined"?r.path:"";if(p!="")if(r.path.indexOf(p)!=0)continue;if((j.exacthost=="0"||d==r.host)&&(j.exactport==
"0"||n==ce(r))){e.splice(q,1);q-=1}}}}return c}}function dl(b,c,d){var e="",f=d-c;for(d=0;d<f;++d)e+=b[d+c];return e}function Wj(b){for(var c="",d=0;d<b;d++){var e=wd(0,15);c+="0123456789ABCDEF".substring(e,e+1)}return c}function am(b,c){var d=["name","group","username","password","extra"],e={},f=true;for(m in d){var g=d[m];if(c[g]!=null){e[g]=K(c[g],b);if(c[g]!=""&&(e[g]==null||e[g]=="")){U("lprsa_acceptshareeautopushes : failing id="+c.id+" because we failed to decrypt : "+g+"="+c[g]);f=false;break}var h=
P(e[g]);if(e[g]!=""&&(h==null||h=="")){U("lprsa_acceptshareeautopushes : failing aid="+aid+" id="+c.id+" because we failed to reencrypt : "+g);f=false;break}e[g]=h}}if(!f)return null;for(var j in c.fields){d=c.fields[j];if("email"==d.type||d.type=="text"||d.type=="password"||d.type=="textarea"||d.type=="hidden"){g=d.value;d=K(g,b);if(g!=""&&(d==null||d=="")){U("lprsa_acceptshareeautopushes : failing aid="+aid+" id="+c.id+" because we failed to decrypt field"+j+"="+g);f=false;break}g=P(d);if(d!=""&&
(g==null||g=="")){U("lprsa_acceptshareeautopushes : failing aid="+aid+" id="+c.id+" because we failed to reencrypt field"+j+"="+d);f=false;break}c.fields[j].value=g}}if(!f)return null;for(j in c.otherfields){d=c.otherfields[j];if("email"==d.type||d.type=="text"||d.type=="password"||d.type=="textarea"||d.type=="hidden"){g=d.value;d=K(g,b);if(g!=""&&(d==null||d=="")){U("lprsa_acceptshareeautopushes : failing aid="+aid+" id="+c.id+" because we failed to decrypt otherfield"+j+"="+g);f=false;break}g=P(d);
if(d!=""&&(g==null||g=="")){U("lprsa_acceptshareeautopushes : failing aid="+aid+" id="+c.id+" because we failed to reencrypt otherfield"+j+"="+d);f=false;break}c.otherfields[j].value=g}}if(!f)return null;f={};for(i in c)if(i=="fields"){f.numf=c.fields.length;for(j in c.fields){f["f"+j+"urid"]=c.fields[j].urid;f["f"+j+"name"]=c.fields[j].name;f["f"+j+"value"]=c.fields[j].value;f["f"+j+"type"]=c.fields[j].type}}else if(i=="otherfields"){f.numof=c.otherfields.length;for(j in c.otherfields){f["of"+j+
"urid"]=c.otherfields[j].urid;f["of"+j+"name"]=c.otherfields[j].name;f["of"+j+"value"]=c.otherfields[j].value;f["of"+j+"type"]=c.otherfields[j].type;f["of"+j+"formname"]=c.otherfields[j].formname}}else if(i!="sharekeyhexenc"&&c[i]!=null)f[i]=typeof e[i]!="undefined"?e[i]:c[i];return f}function Ql(b,c,d){b=b.responseXML.documentElement;var e=b.getElementsByTagName("sharerpublickeys"),f=b.getElementsByTagName("shareepublickeys"),g=b.getElementsByTagName("encfields"),h=b.getElementsByTagName("encofields");
if(e.length<=0&&f.length<=0)return false;b=c.aid;var j=c.postdata;c=typeof c.newvalues=="undefined"?[]:c.newvalues;if(typeof d=="undefined"||d==null){U("SHARE : createShareeAutoPushesResponse failed for aid="+b,null);return false}var l={},o=g[0].getElementsByTagName("encfield");j+="&numencf="+LP.en(o.length);for(g=0;g<o.length;++g){var n=o[g].getAttribute("afid"),p=o[g].getAttribute("value");l[n]=p}o={};h=h[0].getElementsByTagName("encofield");j+="&numencof="+LP.en(h.length);for(g=0;g<h.length;++g){n=
h[g].getAttribute("afid");p=h[g].getAttribute("value");o[n]=p}j+="&numvalueenc="+LP.en(c.length);for(t=0;t<c.length;++t){g=P(c[t]);j+="&valueenc"+t+"="+LP.en(g)}if(f.length>0){h=f[0].getElementsByTagName("sharee");j+="&numsharees="+LP.en(h.length);for(g=0;g<h.length;++g){var q=h[g].getAttribute("uid");t=h[g].getAttribute("key");p=Wj(64);f=Da(p);p=Jj(t,p);if(p==false){U("SHARE : lprsa_encryptdata failed for shareeuid="+q+" using shareepublickeyhex="+t,null);return false}j+="&sharee"+g+"uid="+LP.en(q);
j+="&sharee"+g+"sharekeyhexenc="+LP.en(p);p={name:d.name,grouping:d.group,username:typeof g_sites!="undefined"?Gc(d.username,true):K(d.username),password:typeof g_sites!="undefined"?Gc(d.password,true):K(d.password),extra:typeof g_sites!="undefined"?Gc(d.extra,true):K(d.extra)};for(var r in p){var u=P(p[r],f);if(p[r]!=""&&(u==null||u=="")){U("SHARE : error AES encrypting aid="+b+" for shareeuid="+q,null);return false}j+="&sharee"+g+r+"="+LP.en(u)}var t=0;for(n in l){p=K(l[n]);u=P(p,f);if(p!=""&&(u==
null||u=="")){U("SHARE : error AES encrypting field afid="+n+" aid="+b+" for shareeuid="+q,null);return false}j+="&sharee"+g+"fafid"+t+"="+LP.en(n);j+="&sharee"+g+"fvalue"+t+"="+LP.en(u);++t}t=0;for(n in o){p=K(o[n]);u=P(p,f);if(p!=""&&(u==null||u=="")){U("SHARE : error AES encrypting otherfield afid="+n+" aid="+b+" for shareeuid="+q,null);return false}j+="&sharee"+g+"ofafid"+t+"="+LP.en(n);j+="&sharee"+g+"ofvalue"+t+"="+LP.en(u);++t}for(t=0;t<c.length;++t){p=c[t];u=P(p,f);if(p!=""&&(u==null||u==
"")){U("SHARE : error AES encrypting newvalues k="+t+" aid="+b+" for shareeuid="+q,null);return false}j+="&sharee"+g+"valueenc"+t+"="+LP.en(u)}}}if(e.length>0){e=e[0].getElementsByTagName("sharer");j+="&numsharers="+LP.en(e.length);for(g=0;g<e.length;++g){h=e[g].getAttribute("uid");q=e[g].getAttribute("key");p=Wj(64);f=Da(p);p=Jj(q,p);if(p==false){U("SHARE : lprsa_encryptdata failed for shareruid="+h+" using sharerpublickeyhex="+q,null);return false}j+="&sharer"+g+"uid="+LP.en(h);j+="&sharer"+g+"sharekeyhexenc="+
LP.en(p);p={name:d.name,grouping:d.group,username:typeof g_sites!="undefined"?Gc(d.username,true):K(d.username),password:typeof g_sites!="undefined"?Gc(d.password,true):K(d.password),extra:typeof g_sites!="undefined"?Gc(d.extra,true):K(d.extra)};for(r in p){u=P(p[r],f);if(p[r]!=""&&(u==null||u=="")){U("SHARE : error AES encrypting aid="+b+" for shareruid="+h,null);return false}j+="&sharer"+g+r+"="+LP.en(u)}t=0;for(n in l){p=K(l[n]);u=P(p,f);if(p!=""&&(u==null||u=="")){U("SHARE : error AES encrypting field afid="+
n+" aid="+b+" for shareruid="+h,null);return false}j+="&sharer"+g+"fafid"+t+"="+LP.en(n);j+="&sharer"+g+"fvalue"+t+"="+LP.en(u);++t}t=0;for(n in o){p=K(o[n]);u=P(p,f);if(p!=""&&(u==null||u=="")){U("SHARE : error AES encrypting otherfield afid="+n+" aid="+b+" for shareruid="+h,null);return false}j+="&sharer"+g+"ofafid"+t+"="+LP.en(n);j+="&sharer"+g+"ofvalue"+t+"="+LP.en(u);++t}for(t=0;t<c.length;++t){p=c[t];u=P(p,f);if(p!=""&&(u==null||u=="")){U("SHARE : error AES encrypting newvalues k="+t+" aid="+
b+" for shareruid="+h,null);return false}j+="&sharer"+g+"valueenc"+t+"="+LP.en(u)}}}return j}function ya(b){if(b&&b.length>=17&&b.charAt(0)=="!"){var c=b.indexOf("|");if(c!=-1)return"!"+wc(b.substring(1,c))+wc(b.substring(c+1))}return wc(b)}function Ba(b){return b&&b.length>=33&&b.length%16==1&&b.charAt(0)=="!"?"!"+xc(b.substring(1,17))+"|"+xc(b.substring(17)):xc(b)}function bm(){}function Nc(b,c,d,e,f,g,h,j){if(typeof g=="undefined"||g==null)g=1;if(g>10)return false;if(!b&&!h)return false;var l=
null;if(typeof LP=="object"&&!LP.isFennec&&LP.getBrowser().selectedTab==null)return false;var o=null;if(typeof LP=="object")o=LP.isFennec?b:LP.getBrowser().selectedTab.linkedBrowser;var n=o&&o.contentDocument?o.contentDocument:null;try{if(typeof h=="undefined"||h==null)h=b.contentWindow;l=b?LP.lpgetcurrenturl(b):h.location.href;if(typeof fa!="undefined"&&fa.length==0){if(o){var p=o.contentDocument;if(p)p.m_abortedFormFillChecking=true}return false}var q=c.getElementsByTagName("form");if(n&&!d)if(typeof n.m_checkfillformresult!=
"undefined"&&n.m_checkfillformnumforms==q.length)return n.m_checkfillformresult;if(!d&&typeof Fh!="undefined"&&!Fh){if(o)if(p=o.contentDocument)p.m_abortedFormFillChecking=true;if(n){n.m_checkfillformresult=false;n.m_checkfillformnumforms=q.length}return false}if(!d&&!e&&typeof Oc!="undefined"&&(Oc(b,"autologin")||Oc(b,"generate")||Oc(b,"formfill"))){if(o)if(p=o.contentDocument)p.m_abortedFormFillChecking=true;if(n){n.m_checkfillformresult=false;n.m_checkfillformnumforms=q.length}return false}o=null;
if(f)for(var r=0;r<fa.length;r++){if(fa[r].ffid==f){o=fa[r];break}}else if(typeof fa!="undefined")o=fa[0];var u,t;u=l.indexOf("https://")==0?t=true:t=false;if(!d){var C=Ra(l),A=Ta(l,C),J=ob(C.host,l);if(typeof Mi!="undefined"&&Mi(A,J)){if(n){n.m_checkfillformresult=false;n.m_checkfillformnumforms=q.length}return false}}Xj("en-US");C=null;var D=Sc["en-US"],B=qe["en-US"];A=Bd;if(f)for(r=0;r<fa.length;r++)if(fa[r].ffid==f){o=fa[r];var z=K(o.profilelanguage);if(z.length==5)C=z;Xj(C);D=Sc[C];B=qe[C];if(typeof o.customfields!=
"undefined"&&o.customfields.length>0){D=[];B=[];A=[];for(var L=0;L<Sc[C].length;L++){D[L]=Sc[C][L];B[L]=qe[C][L];A[L]=Bd[L]}for(L=0;L<o.customfields.length;L++){var S=K(o.customfields[L].text),$=K(o.customfields[L].alttext).split(/\r\n|\r|\n/g);$.unshift(S);J=z="";for(var E=0;E<$.length;E++){S=Hc($[E]);if(S!=""){z+=J+gg(S);J="|"}}if(z!=""){D[D.length]=RegExp(z,"i");B[B.length]=RegExp(z,"i");A[A.length]="customfield"+L}}}break}z=$=S=null;try{if(d)if(h.getSelection){S=h.getSelection();if(S.toString()==
"")S=$=z=null;else{if(S.getRangeAt)$=S.getRangeAt(0);if(c.createRange)z=c.createRange()}}else if(c.selection){S=c.selection.createRange();z=c.body.createTextRange();if(S.text=="")S=$=z=null}}catch(ea){S=$=z=null}J={};J.value=0;p={};p.value=0;var v={},F={},M={},W={};v.value=false;F.value=false;M.value=false;W.value=false;for(r=0;r<q.length+1;r++){var da=r<q.length?q[r]:null,ta;if(da!=null)ta=da.elements;else{ta=[];var pb=Array("input","select","textarea");for(L=0;L<pb.length;L++){var ua=c.getElementsByTagName(pb[L]);
for(E=0;E<ua.length;E++)if(typeof ua[E].form=="unknown"||ua[E].form==null)ta[ta.length]=ua[E]}}if(typeof ta!="undefined"){var V={};V.value=0;var aa=[];for(E=0;E<D.length;E++)aa[A[E]]=0;var pa=[],x={};x.value=false;var ca=Cj(ta,b,V,aa,pa,x,d,S,$,z,p,D,A,B,J,e,v,F,M,W,h);if(ca==0){if(n){n.m_checkfillformresult=false;n.m_checkfillformnumforms=q.length}return false}else if(ca==1){if(n){n.m_checkfillformresult=true;n.m_checkfillformnumforms=q.length}return true}if(d){x="birthday";var w="birthmonth";if(o&&
K(o.country)=="US"){x="birthmonth";w="birthday"}V=[];if(Gh==-1||D[Gh]==null||Hh==-1||D[Hh]==null){V[V.length]=Array("name","name","name","firstname","middlename","lastname");V[V.length]=Array("firstname","firstname","lastname","firstname","middlename","lastname");V[V.length]=Array("firstname","lastname","lastname","firstname","middlename","lastname");V[V.length]=Array("name","name","firstname","lastname");V[V.length]=Array("name","lastname","firstname","lastname");V[V.length]=Array("lastname","lastname",
"lastname","firstname","middlename","lastname");V[V.length]=Array("lastname","lastname","firstname","lastname");V[V.length]=Array("firstname","firstname","firstname","lastname");V[V.length]=Array("firstname","lastname","firstname","firstname","middlename","lastname")}else{V[V.length]=Array("name","lastname","lastname","firstname","lastname","lastname2");V[V.length]=Array("name","lastname","lastname2","firstname","lastname","lastname2");V[V.length]=Array("name","lastname","firstname","fulllastname");
V[V.length]=Array("firstname","lastname","lastname","firstname","lastname","lastname2");V[V.length]=Array("fulllastname","fulllastname","lastname","lastname2")}V[V.length]=Array("address","address","address","address1","address2","address3");V[V.length]=Array("address2","address2","address","address1","address2","address3");V[V.length]=Array("address1","address3","address2","address1","address2","address3");V[V.length]=Array("address","address","address1","address2");V[V.length]=Array("address","address2",
"address1","address2");V[V.length]=Array("address1","address1","address1","address2");V[V.length]=Array("address","address1","address1","address2");V[V.length]=Array("address2","address2","address1","address2");V[V.length]=Array("address1","address3","address1","address2");V[V.length]=Array("address","address3","address1","address2");V[V.length]=Array("ssn","ssn","ssn","ssn1","ssn2","ssn3");V[V.length]=Array("zip","zip","zip1","zip2");V[V.length]=Array("birthmonth","birthdate","birthyear",x,w,"birthyear");
V[V.length]=Array("birthday","birthday","birthday",x,w,"birthyear");V[V.length]=Array("birthdate","birthdate","birthdate",x,w,"birthyear");V[V.length]=Array("birthdate","birthdate","birthyear",x,w,"birthyear");V[V.length]=Array("birthday","birthday",x,w);V[V.length]=Array("birthdate","birthdate",x,w);for(x=1;x<=4;x++){w="evephone";if(2==x)w="phone";if(3==x)w="fax";if(4==x)w="mobilephone";V[V.length]=Array(w,w,w,w+"1",w+"2",w+"3");V[V.length]=Array(w+"1",w+"2",w,w+"1",w+"2",w+"3");V[V.length]=Array(w+
"1",w+"1",w+"2",w+"1",w+"2",w+"3");V[V.length]=Array(w+"1",w+"1",w+"1",w+"1",w+"2",w+"3");V[V.length]=Array(w+"1",w,w,w+"1",w+"2",w+"3");V[V.length]=Array(w,w,w+"2",w+"1",w+"2",w+"3");V[V.length]=Array(w,w+"2",w,w+"1",w+"2",w+"3");V[V.length]=Array(w,w+"3",w,w+"1",w+"2",w+"3");V[V.length]=Array(w,w,w+"1",w+"23")}V[V.length]=Array("ccnum","ccnum","ccnum","ccnum","ccnum1","ccnum2","ccnum3","ccnum4");V[V.length]=Array("ccnum","ccnum","ccnum","ccnum1","amexccnum2","amexccnum3");V[V.length]=Array("ccexp",
"ccexp","ccexpmonth","ccexpyear");V[V.length]=Array("ccexp","ccexpyear","ccexpmonth","ccexpyear");V[V.length]=Array("ccexpyear","ccexpyear","ccexpmonth","ccexpyear");V[V.length]=Array("ccstart","ccstart","ccstartmonth","ccstartyear");V[V.length]=Array("ccstart","ccstartyear","ccstartmonth","ccstartyear");V[V.length]=Array("cctype","cctype","cctype","firstname","middlename","lastname");if(F.value||v.value||W.value||M.value){x=true;for(L=0;L<pa.length;L++){if(pa[L].namematch=="country"&&pa[L].textmatch==
"country")x=false;if(pa[L].namematch=="state"&&pa[L].textmatch=="state")x=false}if(x){x=[];w=[];for(L=0;L<pa.length;L++){var va=pa[L].namematch,gb=pa[L].textmatch;if(""!=va)w[va]=1;if(""!=gb)x[gb]=1}var Ca=Eh(w),Va=Eh(x);if(Ca>Va)for(L=0;L<pa.length;L++)if(pa[L].namematch)pa[L].regexpname=pa[L].namematch}}for(L=0;L<pa.length;L++){var Xb=pa[L],Ga=Xb.elt;if(dd(Ga)){var Oa=Xb.regexpname;x=false;for(E=0;E<V.length;E++){var db=V[E];if(db.length%2==0)if(Oa==db[0]){var kb=db.length/2;if(!(L>=pa.length-(kb-
1)))if(!(db[0]=="cctype"&&db[3]=="firstname"&&(Ga.type=="select-one"||Ga.type=="radio"))){for(w=0;w<kb;w++){if(!Ih(pa[L+w].elt,db[kb+w]))break;if(w>=1)if(pa[L+w].regexpname!=db[w]||!pa[L+w].last_field_filled)break}if(!(w<kb)){Oa=db[kb];for(w=1;w<kb;w++)pa[L+w].regexpname=db[kb+w];x=true;break}}}}if(!x&&Oa=="cctype"&&Ga.type!="select-one"&&Ga.type!="radio"){for(var ma=false,Ea=0;Ea<pa.length;Ea++)if(pa[Ea].regexpname.indexOf("ccnum")==0){ma=true;break}ma||(Oa="ccnum")}else if(!x&&Oa=="bankacctnum"){w=
x=ma=false;for(Ea=0;Ea<pa.length;Ea++)if(pa[Ea].regexpname.indexOf("ccnum")==0){ma=true;break}else if(pa[Ea].regexpname.indexOf("cc")==0)x=true;else if(pa[Ea].regexpname.indexOf("bank")==0&&pa[Ea].regexpname!="bankacctnum"){w=true;break}if(!ma&&x&&!w)Oa="ccnum"}else if(!x&&Oa=="cccsc"){ma=false;for(Ea=0;Ea<pa.length;Ea++)if(pa[Ea].regexpname.indexOf("ccnum")==0){ma=true;break}if(!ma)continue}else if(!x&&Oa.indexOf("ccnum")==0&&Ga.type=="select-one")Oa="cctype";else if(Oa=="address3"&&o.address3==
""&&o.city!=""){x=false;for(Ea=0;Ea<pa.length;Ea++)if(pa[Ea].regexpname=="city"){x=true;break}x||(Oa="city")}else if(Oa=="address"&&Ga.type=="textarea"){x=false;for(Ea=0;Ea<pa.length;Ea++)if(pa[Ea].regexpname=="city"||pa[Ea].regexpname=="county"||pa[Ea].regexpname=="state"){x=true;break}x||(Oa="fulladdress")}if(typeof Jh!="undefined"&&Jh)if(("email"==Ga.type||"text"==Ga.type||"password"==Ga.type||"textarea"==Ga.type)&&Ga.value!="")continue;else if(Ga.type=="select-one"&&Ga.selectedIndex!=0)continue;
else if((Ga.type=="checkbox"||Ga.type=="radio")&&Ga.checked)continue;if(Oa.indexOf("cc")==0)if(u&&!t)continue;else if(!u||!t){x=Oa;if(typeof Na[Oa]!="undefined")x=Na[Oa];else if(Oa=="cctype")x="ccnum";if(o&&typeof o[x]!="undefined"&&o[x]!=""){if(!u){t=rj(Hb("InsecureSite",C))?true:false;u=true}if(!t)continue}}var X=Ga.value;x=Ga;w=Oa;var ha=f,R=j,ab=C;try{if(R&&w.indexOf("cc")==0)ha=R;R=null;if(ha)for(var G=0;G<fa.length;G++){if(fa[G].ffid==ha){R=fa[G];break}}else R=fa[0];if(R)if(!(x.readOnly||x.disabled)){var Lb=
0;ha=0;if(typeof x.size!="undefined")Lb=parseInt(x.size);if(typeof x.maxLength!="undefined")ha=parseInt(x.maxLength);Ih(x,w)||(w=w.replace(/\d+$/,""));var oa=x.value;if(w.indexOf("customfield")==0){var bd=parseInt(w.substring(11));R.customfields.length>bd&&ja(x,K(R.customfields[bd].value))}if(w=="birthmonth"&&x.type=="select-one"&&x.options.length>=28)w=x.options[0].value.match(/^\d{4}$/)?"birthyear":"birthday";else if(w=="birthday"&&x.type=="select-one"&&x.options.length<28)w="birthmonth";else if(w==
"birthyear"&&x.type=="select-one"&&x.options.length>0&&x.options[0].value.match(/^\d$/)&&x.options[0].value!=0)w="birthday";if(w=="ccexpmonth"&&x.type=="select-one"&&x.options.length>0&&(x.options[x.options.length-1].value.match(/^\d{4}$/)||x.options[x.options.length-1].text.match(/^\d{4}$/)))w="ccexpyear";if(w=="cctype"&&x.type=="select-one"&&x.options.length>=100)for(G=0;G<x.options.length;G++)if(x.options[G].value=="US"||x.options[G].value=="USA"){w="country";break}switch(w){case "firstname":ja(x,
K(R.firstname));break;case "firstname2":ja(x,K(R.firstname2));break;case "firstname3":ja(x,K(R.firstname3));break;case "lastname":ja(x,K(R.lastname));break;case "lastname2":ja(x,K(R.lastname2));break;case "lastname3":ja(x,K(R.lastname3));break;case "email":ja(x,K(R.email));break;case "mobileemail":ja(x,K(R.mobileemail));break;case "company":ja(x,K(R.company));break;case "address1":ja(x,K(R.address1));break;case "address2":ja(x,K(R.address2),false,false,R.address1!=""?true:false);break;case "address3":ja(x,
K(R.address3),false,false,R.address1!=""?true:false);break;case "username":ja(x,K(R.username),true);break;case "phoneext":ja(x,K(R.phoneext),false,false,R.phone!="");break;case "bankname":ja(x,K(R.bankname));break;case "bankacctnum":ja(x,K(R.bankacctnum));break;case "bankroutingnum":ja(x,K(R.bankroutingnum));break;case "county":ja(x,K(R.county));break;case "ccname":ja(x,K(R.ccname));break;case "ccissuenum":ja(x,K(R.ccissuenum),true);break;case "securityanswer":ja(x,"");break;case "promocode":ja(x,
"");break;case "maiden":ja(x,"");break;case "ccphone":ja(x,"");break;case "comments":ja(x,"");break;case "invoice":ja(x,"");break;case "addrbookname":ja(x,"");break;case "emailalert":ja(x,"");break;case "combineddummy":ja(x,"");break;case "timezone":var I=K(R.timezone);if(x.type=="select-one"){if(I=="")break;var tb=I.match(/^([-+]?\d{2}):(\d{2}),(\d)$/);if(tb){var hg=parseInt(tb[1]),Kh=parseInt(tb[2]);parseInt(tb[3]);var ra=hg+Kh/60,nb="GMT\\s*"+(hg<0?"-":"\\+")+"\\s*"+(Math.abs(hg)<10?"0?":"")+Math.abs(hg);
if(Kh!=0)nb+=":"+Kh;var Yj=RegExp(nb);for(G=0;G<x.options.length;G++)if(x.options[G].value==I||x.options[G].text==I||x.options[G].value==ra||x.options[G].text==ra||Yj.exec(x.options[G].value)||Yj.exec(x.options[G].text)){x.selectedIndex=G;break}}}else ja(x,I);break;case "ccnum":w=false;if(4==ha||3==ha)w=true;if(!w){var cm=K(R.ccnum);ja(x,cm);break}case "cccsc":ja(x,K(R.cccsc),true);break;case "zip":I=K(R.zip);if(I.match(/^\d{5}-?(?:\d{4})?$/)){if(ha>0&&ha<I.length)I=ha==9&&I.length==10?I.substring(0,
5)+I.substring(6,10):ha==4?I.length>=9?I.substring(I.length-4):"":I.substring(0,5)}else if(ha>0&&ha<I.length)I=I.replace(/[^A-Za-z0-9]/g,"");ja(x,I);break;case "city":I=K(R.city);if(x.type=="select-one"){if(I=="")break;I=I.toLowerCase();for(G=0;G<x.options.length;G++)if(x.options[G].value.toLowerCase()==I||x.options[G].text.toLowerCase()==I){x.selectedIndex=G;break}}else ja(x,I);break;case "ssn":var Ic=K(R.ssn);if(4==ha){var Pa=Ic.replace(/\D/g,"");if(Pa.length==9)Ic=Pa.substring(5,9);else break}else if(ha>
0&&ha<11)Ic=Ic.replace(/-/g,"");ja(x,Ic);break;case "name":I=K(R.firstname)+(R.firstname!=""&&R.lastname!=""?" ":"")+K(R.lastname);ja(x,I);break;case "fulllastname":I=K(R.lastname)+(R.lastname!=""&&R.lastname2!=""?" ":"")+K(R.lastname2);ja(x,I);break;case "ssn1":Ic=K(R.ssn);Pa=Ic.replace(/\D/g,"");if(Pa.length==9){I=Pa.substring(0,3);ja(x,I)}break;case "ssn2":Ic=K(R.ssn);Pa=Ic.replace(/\D/g,"");if(Pa.length==9){I=Pa.substring(3,5);ja(x,I)}break;case "ssn3":Ic=K(R.ssn);Pa=Ic.replace(/\D/g,"");if(Pa.length==
9){I=Pa.substring(5,9);ja(x,I)}break;case "birthmonth":if(R.birthday=="")break;I=K(R.birthday).substring(5,7);if(x.type=="select-one"){ra=I;if(ra.charAt(0)=="0")ra=ra.substring(1);nb=Hb("month"+ra,ab).toLowerCase();var gc=Hb("mon"+ra,ab).toLowerCase();for(G=0;G<x.options.length;G++)if(x.options[G].value.toLowerCase().indexOf(nb)!=-1||x.options[G].value.toLowerCase().indexOf(gc)!=-1||x.options[G].text.toLowerCase().indexOf(nb)!=-1||x.options[G].text.toLowerCase().indexOf(gc)!=-1){x.selectedIndex=G;
break}if(G==x.options.length)for(G=0;G<x.options.length;G++)if(x.options[G].value==I||x.options[G].value==ra||x.options[G].text==I||x.options[G].text==ra){x.selectedIndex=G;break}}else ja(x,I);break;case "birthday":if(R.birthday=="")break;I=K(R.birthday).substring(8,10);if(x.type=="select-one"){ra=I;if(ra.charAt(0)=="0")ra=ra.substring(1);for(G=0;G<x.options.length;G++)if(x.options[G].value==I||x.options[G].value==ra||x.options[G].text==I||x.options[G].text==ra){x.selectedIndex=G;break}}else ja(x,
I);break;case "birthyear":if(R.birthday=="")break;var Ub=K(R.birthday);I=Ub.substring(0,4);ra=Ub.substring(2,4);if(x.type=="select-one")for(G=0;G<x.options.length;G++){if(x.options[G].value==I||x.options[G].value==ra||x.options[G].text==I||x.options[G].text==ra){x.selectedIndex=G;break}}else{if(2==ha)I=ra;ja(x,I)}break;case "birthdate":Ub=K(R.birthday);R&&K(R.country);if(Ub.length>=4){Ub=4==ha?Ub.substring(0,4):2==ha?Ub.substring(2,4):K(R.country)=="US"?Ub.substring(5,7)+"/"+Ub.substring(8,10)+"/"+
Ub.substring(0,4):Ub.substring(8,10)+"/"+Ub.substring(5,7)+"/"+Ub.substring(0,4);ja(x,Ub)}break;case "address":case "fulladdress":var dm=x.type=="textarea"?"\n":" ",md=Array(R.address1,R.address2,R.address3);if(w=="fulladdress"){md[md.length]=R.city;md[md.length]=R.county;md[md.length]=R.state}I="";for(G=0;G<md.length;G++)if(md[G]!="")I+=(I!=""?dm:"")+K(md[G]);ja(x,I);break;case "title":I=K(R.title);if(x.type=="select-one"){if(I=="")break;ab=w="";for(G=0;G<x.options.length;G++)if(x.options[G].value.toLowerCase()==
I||x.options[G].value.toLowerCase().indexOf(I)!=-1||x.options[G].text.toLowerCase()==I||x.options[G].text.toLowerCase().indexOf(I)!=-1){if(!(""==w&&""==ab))if(x.options[G].value.length<=w.length&&x.options[G].text.length<=ab.length){if(!(x.options[G].value.length<w.length||x.options[G].text.length<ab.length))continue}else continue;w=x.options[G].value;ab=x.options[G].text;x.selectedIndex=G}}else{I=I.substring(0,1).toUpperCase()+I.substring(1);ja(x,I)}break;case "state":I=K(R.state);if(x.type=="select-one"){I=
I.toLowerCase();ra=K(R.state_name).toLowerCase();if(I==""&&ra=="")break;for(G=0;G<x.options.length;G++)if(x.options[G].value.toLowerCase()==I||x.options[G].value.toLowerCase()==ra||x.options[G].text.toLowerCase()==I||x.options[G].text.toLowerCase()==ra){x.selectedIndex=G;break}if(G==x.options.length){for(G=0;G<x.options.length;G++)if(x.options[G].value.toLowerCase().indexOf(ra)!=-1||x.options[G].text.toLowerCase().indexOf(ra)!=-1){x.selectedIndex=G;break}if(G==x.options.length){for(G=0;G<x.options.length;G++)if(x.options[G].value.toLowerCase().indexOf(I)!=
-1||x.options[G].text.toLowerCase().indexOf(I)!=-1){x.selectedIndex=G;break}if(G==x.options.length&&I.length==2){nb=I.charAt(0)+"."+I.charAt(1)+".";for(G=0;G<x.options.length;G++)if(x.options[G].value.toLowerCase().indexOf(nb)!=-1||x.options[G].text.toLowerCase().indexOf(nb)!=-1){x.selectedIndex=G;break}}}}}else ja(x,I);break;case "country":I=K(R.country_name);if(x.type=="select-one"){I=I.toLowerCase();ra=K(R.country).toLowerCase();nb=K(R.country_cc3l).toLowerCase();if(I==""&&ra==""&&nb=="")break;
for(G=0;G<x.options.length;G++)if(x.options[G].value.toLowerCase()==I||x.options[G].value.toLowerCase()==ra||x.options[G].value.toLowerCase()==nb||x.options[G].text.toLowerCase()==I||x.options[G].text.toLowerCase()==ra||x.options[G].text.toLowerCase()==nb){x.selectedIndex=G;break}}else if(ha==3)ja(x,K(R.country_cc3l));else ha==2?ja(x,K(R.country)):ja(x,I);break;case "cctype":var $a=K(R.ccnum);w="UNK";if(($a.substring(0,2)=="34"||$a.substring(0,2)=="37")&&$a.length==15)w="AMEX";else if(($a.substring(0,
4)=="6011"||$a.substring(0,2)=="65")&&$a.length==16)w="DISC";else if(($a.substring(0,2)=="51"||$a.substring(0,2)=="52"||$a.substring(0,2)=="53"||$a.substring(0,2)=="54"||$a.substring(0,2)=="55")&&$a.length==16)w="MC";else if(($a.substring(0,6)=="417500"||$a.substring(0,4)=="4917"||$a.substring(0,4)=="4913"||$a.substring(0,4)=="4508"||$a.substring(0,4)=="4844")&&$a.length==16)w="ELECTRON";else if($a.substring(0,1)=="4"&&$a.length==16)w="VISA";else if(($a.substring(0,4)=="5018"||$a.substring(0,4)==
"5020"||$a.substring(0,4)=="5038"||$a.substring(0,4)=="6304"||$a.substring(0,4)=="6759"||$a.substring(0,4)=="6761")&&$a.length>=12&&$a.length<=19)w="MAESTRO";else if(($a.substring(0,4)=="6334"||$a.substring(0,4)=="6767")&&($a.length==16||$a.length==18||$a.length==19))w="SOLO";I=w;if(I!="UNK")if(x.type=="select-one"){w=-1;for(G=0;G<x.options.length;G++){var ig=x.options[G].value.toUpperCase(),jg=x.options[G].text.toUpperCase();if(ig==I||jg==I){x.selectedIndex=G;break}if(Sd(I,ig)||Sd(I,jg))w=G}if(G==
x.options.length&&w!=-1)x.selectedIndex=w}else if(x.type=="radio"){ig=x.value.toUpperCase();jg=x.id.toUpperCase();w=false;if(Sd(I,ig)||Sd(I,jg))w=true;if(!w){var Db=x.parentNode;if(Db&&Db.childNodes){for(G=0;G<Db.childNodes.length;G++)if(Db.childNodes[G]==x)break;if(G<Db.childNodes.length-1){var Jc=Db.childNodes[G+1];if(Jc.nodeType==3&&Sd(I,Jc.nodeValue))w=true;else if(Jc.nodeType==3&&G<Db.childNodes.length-2||Jc.nodeType==1){var Mb=Jc.nodeType==1?Db.childNodes[G+1]:Db.childNodes[G+2];if(Mb.nodeType==
1&&Mb.tagName=="LABEL"&&Mb.htmlFor==x.id){var Td=nd(Mb,x);if(Sd(I,Td))w=true}else if(Mb.nodeType==1&&Mb.tagName=="IMG"&&typeof Mb.alt=="string"){Td=Mb.alt;if(Sd(I,Td))w=true}}}}}if(w){x.checked=true;x.click()}}else ja(x,I);break;case "ccexpmonth":if(R.ccexp=="")break;I=K(R.ccexp).substring(5,7);if(x.type=="select-one"){ra=I;if(ra.charAt(0)=="0")ra=ra.substring(1);nb=Hb("month"+ra,ab).toLowerCase();gc=Hb("mon"+ra,ab).toLowerCase();for(G=0;G<x.options.length;G++)if(x.options[G].value.toLowerCase().indexOf(nb)!=
-1||x.options[G].value.toLowerCase().indexOf(gc)!=-1||x.options[G].text.toLowerCase().indexOf(nb)!=-1||x.options[G].text.toLowerCase().indexOf(gc)!=-1){x.selectedIndex=G;break}if(G==x.options.length)for(G=0;G<x.options.length;G++)if(x.options[G].value==I||x.options[G].value==ra||x.options[G].text==I||x.options[G].text==ra){x.selectedIndex=G;break}}else ja(x,I);break;case "ccexpyear":if(R.ccexp=="")break;var Eb=K(R.ccexp);I=Eb.substring(0,4);if(x.type=="select-one"){ra=Eb.substring(2,4);for(G=0;G<
x.options.length;G++)if(x.options[G].value==I||x.options[G].value==ra||x.options[G].text==I||x.options[G].text==ra){x.selectedIndex=G;break}}else ja(x,I,false,true);break;case "ccexp":Eb=K(R.ccexp);I=Eb.length==10?Eb.substring(5,7)+"/"+Eb.substring(2,4):"";if(x.type=="select-one"){if(I=="")break;ra=Eb.length==10?Eb.substring(5,7)+"/"+Eb.substring(0,4):"";nb=Eb.length==10?Eb.substring(5,7)+Eb.substring(2,4):"";gc=Eb.length==10?Eb.substring(5,7)+Eb.substring(0,4):"";for(G=0;G<x.options.length;G++)if(x.options[G].value==
I||x.options[G].value==ra||x.options[G].value==nb||x.options[G].value==gc||x.options[G].text==I||x.options[G].text==ra||x.options[G].text==nb||x.options[G].text==gc){x.selectedIndex=G;break}}else{if(Eb.length==10)if(4==ha)I=Eb.substring(5,7)+Eb.substring(2,4);ja(x,I)}break;case "ccstartmonth":if(R.ccstart=="")break;I=K(R.ccstart).substring(5,7);if(x.type=="select-one"){ra=I;if(ra.charAt(0)=="0")ra=ra.substring(1);nb=Hb("month"+ra,ab).toLowerCase();gc=Hb("mon"+ra,ab).toLowerCase();for(G=0;G<x.options.length;G++)if(x.options[G].value.toLowerCase().indexOf(nb)!=
-1||x.options[G].value.toLowerCase().indexOf(gc)!=-1||x.options[G].text.toLowerCase().indexOf(nb)!=-1||x.options[G].text.toLowerCase().indexOf(gc)!=-1){x.selectedIndex=G;break}if(G==x.options.length)for(G=0;G<x.options.length;G++)if(x.options[G].value==I||x.options[G].value==ra||x.options[G].text==I||x.options[G].text==ra){x.selectedIndex=G;break}}else ja(x,I);break;case "ccstartyear":if(R.ccstart=="")break;var Fb=K(R.ccstart);I=Fb.substring(0,4);if(x.type=="select-one"){ra=Fb.substring(2,4);for(G=
0;G<x.options.length;G++)if(x.options[G].value==I||x.options[G].value==ra||x.options[G].text==I||x.options[G].text==ra){x.selectedIndex=G;break}}else ja(x,I,false,true);break;case "ccstart":Fb=K(R.ccstart);I=Fb.length==10?Fb.substring(5,7)+"/"+Fb.substring(2,4):"";if(x.type=="select-one"){if(I=="")break;ra=Fb.length==10?Fb.substring(5,7)+"/"+Fb.substring(0,4):"";nb=Fb.length==10?Fb.substring(5,7)+Fb.substring(2,4):"";gc=Fb.length==10?Fb.substring(5,7)+Fb.substring(0,4):"";for(G=0;G<x.options.length;G++)if(x.options[G].value==
I||x.options[G].value==ra||x.options[G].value==nb||x.options[G].value==gc||x.options[G].text==I||x.options[G].text==ra||x.options[G].text==nb||x.options[G].text==gc){x.selectedIndex=G;break}}else{if(Fb.length==10)if(4==ha)I=Fb.substring(5,7)+Fb.substring(2,4);ja(x,I)}break;case "ccnum1":I=K(R.ccnum).substring(0,4);ja(x,I);break;case "ccnum2":I=K(R.ccnum).substring(4,8);ja(x,I);break;case "ccnum3":I=K(R.ccnum).substring(8,12);ja(x,I);break;case "ccnum4":I=K(R.ccnum).substring(12);ja(x,I);break;case "amexccnum2":I=
K(R.ccnum).substring(4,10);ja(x,I);break;case "amexccnum3":I=K(R.ccnum).substring(10,15);ja(x,I);break;case "middlename":I=K(R.middlename);var em=I.substring(0,1);1==ha||2==ha?ja(x,em):ja(x,I);break;case "middleinitial":I=K(R.middlename).substring(0,1);ja(x,I);break;case "mobilephone1":case "mobilephone2":case "mobilephone3":case "evephone1":case "evephone2":case "evephone3":case "phone1":case "phone2":case "phone3":case "fax1":case "fax2":case "fax3":var Kc=w.substring(0,w.length-1),fm=w.substring(w.length-
1),hc=R.phone;if("evephone"==Kc)hc=R.evephone;if("mobilephone"==Kc)hc=R.mobilephone;if("fax"==Kc)hc=R.fax;I=K(hc);if(I.length<=3)I="";Pa=I.replace(/\D/g,"");if(Pa.length==10&&Pa.charAt(0)>="2"&&Pa.charAt(3)>="2")Pa="1"+Pa;if(Pa.length==11&&Pa.charAt(0)=="1"&&Pa.charAt(1)>="2"&&Pa.charAt(4)>="2")switch(fm){case "1":ja(x,Pa.substring(1,4));break;case "2":ja(x,Pa.substring(4,7));break;case "3":ja(x,Pa.substring(7,11));break}else ja(x,I,true);break;case "mobilephone23":case "evephone23":case "phone23":case "fax23":Kc=
w.substring(0,w.length-2);hc=R.phone;if("evephone"==Kc)hc=R.evephone;if("fax"==Kc)hc=R.fax;if("mobilephone"==Kc)hc=R.mobilephone;I=K(hc);if(I.length<=3)I="";Pa=I.replace(/\D/g,"");if(Pa.length==10&&Pa.charAt(0)>="2"&&Pa.charAt(3)>="2")Pa="1"+Pa;if(Pa.length==11&&Pa.charAt(0)=="1"&&Pa.charAt(1)>="2"&&Pa.charAt(4)>="2"){w=(Lb<=0||Lb>=8)&&(ha<=0||ha>=8)?true:false;ja(x,Pa.substring(4,7)+(w?"-":"")+Pa.substring(7,11))}else ja(x,I,true);break;case "mobilephone":case "evephone":case "phone":case "fax":Kc=
w;hc=R.phone;var kg=R.countryphone;if("evephone"==Kc){hc=R.evephone;kg=R.countryevephone}if("fax"==Kc){hc=R.fax;kg=R.countryfaxphone}if("mobilephone"==Kc){hc=R.mobilephone;kg=R.countrymobphone}I=K(hc);if(I.length<=3)I="";if(I.length==11&&I.match(/^\d+$/)&&I.charAt(0)=="1"&&I.charAt(1)>="2"&&I.charAt(4)>="2"){I=I.substring(1);if(ha<=0||ha>=12)I=I.substring(0,3)+"-"+I.substring(3,6)+"-"+I.substring(6,10)}else if(I.length>=2){var lg,Zj=K(kg);w=[];w.AND=376;w.ARE=971;w.AFG=93;w.ATG=1;w.AIA=1;w.ALB=355;
w.ARM=374;w.ANT=599;w.AGO=244;w.ATA=672;w.ARG=54;w.ASM=1;w.AUT=43;w.AUS=61;w.ABW=297;w.ALA=358;w.AZE=994;w.BIH=387;w.BRB=1;w.BGD=880;w.BEL=32;w.BFA=226;w.BGR=359;w.BHR=973;w.BDI=257;w.BEN=229;w.BLM=590;w.BMU=1;w.BRN=673;w.BOL=591;w.BRA=55;w.BHS=1;w.BTN=975;w.BVT=47;w.BWA=267;w.BLR=375;w.BLZ=501;w.CAN=1;w.CCK=61;w.COD=243;w.CAF=236;w.COG=242;w.CHE=41;w.CIV=225;w.COK=682;w.CHL=56;w.CMR=237;w.CHN=86;w.COL=57;w.CRI=506;w.CUB=53;w.CPV=238;w.CXR=61;w.CYP=357;w.CZE=420;w.DEU=49;w.DJI=253;w.DNK=45;w.DMA=
1;w.DOM=1;w.DZA=213;w.ECU=593;w.EST=372;w.EGY=20;w.ESH=212;w.ERI=291;w.ESP=34;w.ETH=251;w.FIN=358;w.FJI=679;w.FLK=500;w.FSM=691;w.FRO=298;w.FRA=33;w.GAB=241;w.GBR=44;w.GRD=1;w.GEO=995;w.GUF=594;w.GGY=44;w.GHA=233;w.GIB=350;w.GRL=299;w.GMB=220;w.GIN=224;w.GLP=590;w.GNQ=240;w.GRC=30;w.SGS=995;w.GTM=502;w.GUM=1;w.GNB=245;w.GUY=592;w.HKG=852;w.HMD=672;w.HND=504;w.HRV=385;w.HTI=509;w.HUN=36;w.IDN=62;w.IRL=353;w.ISR=972;w.IMM=44;w.IND=91;w.IOT=246;w.IRQ=964;w.IRN=98;w.ISL=354;w.ITA=39;w.JEY=44;w.JAM=1;
w.JOR=962;w.JPN=81;w.KEN=254;w.KGZ=996;w.KHM=855;w.KIR=686;w.COM=269;w.KNA=1;w.PRK=850;w.KOR=82;w.KWT=965;w.CYM=1;w.KAZ=7;w.LAO=856;w.LBN=961;w.LCA=1;w.LIE=423;w.LKA=94;w.LBR=231;w.LSO=266;w.LTU=370;w.LUX=352;w.LVA=371;w.LBY=218;w.MAR=212;w.MCO=377;w.MDA=373;w.MNE=382;w.MAF=590;w.MDG=261;w.MHL=692;w.MKD=389;w.MLI=223;w.MMR=95;w.MNG=976;w.MAC=853;w.MNP=1;w.MTQ=596;w.MRT=222;w.MSR=1;w.MLT=356;w.MUS=230;w.MDV=960;w.MWI=265;w.MEX=52;w.MYS=60;w.MOZ=258;w.NAM=264;w.NCL=687;w.NER=227;w.NFK=672;w.NGA=234;
w.NIC=505;w.NLD=31;w.NOR=47;w.NPL=977;w.NRU=674;w.NIU=683;w.NZL=64;w.OMN=968;w.PAN=507;w.PER=51;w.PYF=689;w.PNG=675;w.PHL=63;w.PAK=92;w.POL=48;w.SPM=508;w.PCN=872;w.PRI=1;w.PSE=970;w.PRT=351;w.PLW=680;w.PRY=595;w.QAT=974;w.REU=262;w.ROU=40;w.SRB=381;w.RUS=7;w.RWA=250;w.SAU=966;w.SLB=677;w.SYC=248;w.SDN=249;w.SWE=46;w.SGP=65;w.SHN=290;w.SVN=386;w.SJM=47;w.SVK=421;w.SLE=232;w.SMR=378;w.SEN=221;w.SOM=252;w.SUR=597;w.STP=239;w.SLV=503;w.SYR=963;w.SWZ=268;w.TCA=1;w.TCD=235;w.ATF=596;w.TGO=228;w.THA=66;
w.TJK=992;w.TKL=690;w.TLS=670;w.TKM=993;w.TUN=216;w.TON=676;w.TUR=90;w.TTO=1;w.TUV=688;w.TWN=886;w.TZA=255;w.UKR=380;w.UGA=256;w.UMI=1;w.USA=1;w.URY=598;w.UZB=998;w.VAT=379;w.VCT=1;w.VEN=58;w.VGB=1;w.VIR=1;w.VNM=84;w.VUT=678;w.WLF=681;w.WSM=685;w.YEM=967;w.MYT=262;w.YUG=381;w.ZAF=27;w.ZMB=260;w.ZWE=263;if((lg=typeof w[Zj]!="undefined"?""+w[Zj]:null)&&I.indexOf(lg)==0&&I.charAt(lg.length)=="0")I=I.substring(lg.length)}ja(x,I,true);break;case "zip1":I=K(R.zip);Pa=I.replace(/\D/g,"");if(Pa.length==5||
Pa.length==9)I=Pa.substring(0,5);else{var mc=I.replace(/[^A-Za-z0-9]/g,"");if(mc.match(/^(?:[A-Za-z]\d){3}$/))I=mc.substring(0,3);else if(mc.match(/^[A-Za-z]{1,2}\d[A-Za-z0-9]?\d[A-Za-z]{2}$/))I=mc.substring(0,mc.length-3);else if(mc.length<I.length){var Lh=I.split(/[^A-Za-z0-9]+/);I=Lh[0]}}ja(x,I);break;case "zip2":I=K(R.zip);Pa=I.replace(/\D/g,"");w=false;if(Pa.length==5){I="";w=true}else if(Pa.length==9)I=Pa.substring(5,9);else{mc=I.replace(/[^A-Za-z0-9]/g,"");if(mc.match(/^(?:[A-Za-z]\d){3}$/))I=
mc.substring(3,6);else if(mc.match(/^[A-Za-z]{1,2}\d[A-Za-z0-9]?\d[A-Za-z]{2}$/))I=mc.substring(mc.length-3);else if(mc.length<I.length){Lh=I.split(/[^A-Za-z0-9]+/);I=Lh[1]}}ja(x,I,false,false,w);break;case "gender":I=K(R.gender).toUpperCase();if(I!=""){ra=I;if(I=="M")ra=Hb("Male",ab);if(I=="F")ra=Hb("Female",ab);ra=ra.toUpperCase();if(x.type=="select-one")for(G=0;G<x.options.length;G++){var $j=Hc(x.options[G].text).toUpperCase(),bf=Hc(x.options[G].value).toUpperCase();if(bf.indexOf(I)==0||$j.indexOf(I)==
0||bf.indexOf(ra)==0||$j.indexOf(ra)==0){x.selectedIndex=G;break}}else if(x.type=="radio"){bf=Hc(x.value).toUpperCase();if(bf.indexOf(I)==0||bf.indexOf(ra)==0)x.checked=true;else if((Db=x.parentNode)&&Db.childNodes){for(G=0;G<Db.childNodes.length;G++)if(Db.childNodes[G]==x)break;if(G<Db.childNodes.length-1){Jc=Db.childNodes[G+1];var ak=Hc(Jc.nodeValue).toUpperCase();if(Jc.nodeType==3&&(ak.indexOf(I)==0||ak.indexOf(ra)==0))x.checked=true;else if(Jc.nodeType==3&&G<Db.childNodes.length-2||Jc.nodeType==
1){Mb=Jc.nodeType==1?Db.childNodes[G+1]:Db.childNodes[G+2];if(Mb.nodeType==1&&Mb.tagName=="LABEL"&&Mb.htmlFor==x.id){Td=nd(Mb,x);var bk=Hc(Td).toUpperCase();if(bk.indexOf(I)==0||bk.indexOf(ra)==0)x.checked=true}else if(Mb.nodeType==1&&Mb.tagName=="IMG"&&typeof Mb.alt=="string"){Td=Mb.alt;var ck=Hc(Td).toUpperCase();if(ck.indexOf(I)==0||ck.indexOf(ra)==0)x.checked=true}}}}}else ja(x,I)}break;case "age":var mg=K(R.birthday);if(mg!=""){var gm=parseInt(mg.substring(0,4)),dk=parseInt(mg.substring(5,7));
Ub=parseInt(mg.substring(8,10));var Mh=new Date,hm=Mh.getFullYear(),ek=Mh.getMonth()+1,im=Mh.getDate();w=hm-gm;if(ek<dk||ek==dk&&im<Ub)w--;if(x.type=="select-one")for(G=0;G<x.options.length;G++){var Nh=x.options[G].text;R=ab=-1;if(tb=Nh.match(/(\d+)\D+(\d+)/)){ab=parseInt(tb[1]);R=parseInt(tb[2])}else if(tb=Nh.match(/^\d+/)){var cf=parseInt(tb[0]);if(G<x.options.length/2){ab=0;R=cf}else{ab=cf;R=99999}}else if(tb=Nh.match(/\d+$/)){cf=parseInt(tb[0]);if(G<x.options.length/2){ab=0;R=cf-1}else{ab=cf+
1;R=99999}}if(ab!=-1&&R!=-1&&w>=ab&&w<=R){x.selectedIndex=G;break}}else ja(x,w)}break;case "housenumber":case "housenumbername":I=K(R.address1);tb=I.match(/^\d+/);if(!tb){I=K(R.address2);tb=I.match(/^\d+/)}if(!tb){I=K(R.address3);tb=I.match(/^\d+/)}if(tb){ja(x,tb[0]);break}else if(w=="housenumber")break;case "housename":I=K(R.address1);I=I.replace(/^\d+\s*/,"");ja(x,I);break}x.value!=oa&&cc(x)}}catch(fk){U("Failure with filling form field: "+fk+" ln: "+fk.lineNumber)}if(Ga.value!=X){if(typeof aa[Oa]==
"undefined")aa[Oa]=0;aa[Oa]++}}}}}}if(h&&h.frames&&(!d||S==null))for(r=0;r<h.frames.length;r++)try{if(h.frames[r].document){var Oh=Nc(b,h.frames[r].document,d,e,f,g+1,h.frames[r].window,j);if(Oh&&!d){if(n){n.m_checkfillformresult=Oh;n.m_checkfillformnumforms=q.length}return Oh}}}catch(um){}if(d&&typeof vd!="undefined"&&vd&&g==1)if(!Pe||!Pe.privateBrowsingEnabled)vd&&LP.lpMakeRequest(LP.lp_base+"logformfill.php","ffid="+LP.en(f),null)}catch(gk){U("Failure with checking formfill: "+gk+" ln: "+gk.lineNumber,
l)}if(!d){if(n){n.m_checkfillformresult=false;n.m_checkfillformnumforms=q.length}return false}}function Cj(b,c,d,e,f,g,h,j,l,o,n,p,q,r,u,t,C,A,J,D,B){for(var z=b.length,L=0,S=0;S<z;S++){var $=false,E=b[S];if("email"==E.type||E.type=="text"||E.type=="password"||E.type=="select-one"||E.type=="textarea"||E.type=="radio"){if(++L>100)break;var ea=ka(E),v=false;if(ea!=""){try{if(h&&j!=null)if(B.navigator.userAgent.indexOf("Opera")!=-1){o.setStart(E,0);o.setEnd(E,0);var F=l.compareBoundaryPoints(Range.START_TO_START,
o),M=l.compareBoundaryPoints(Range.END_TO_END,o);if(F>0||M<0)continue}else if(typeof j.containsNode=="function"){if(!j.containsNode(E,true))continue}else if(o!=null&&typeof o.moveToElementText!="undefined"){var W=E;if(W.type=="select-one"){for(var da=W.previousSibling,ta=false;da;){if(da.nodeType==1&&da.tagName!="SELECT"){W=da;ta=true;break}da=da.previousSibling}if(!ta)W=W.parentNode}o.moveToElementText(W);F=j.compareEndPoints("StartToStart",o);M=j.compareEndPoints("EndToEnd",o);if(F>0||M<0)continue}}catch(pb){}var ua=
0,V=0;if(typeof E.size!="undefined")ua=parseInt(E.size);if(typeof E.maxLength!="undefined")V=parseInt(E.maxLength);if(ua<=0&&V<=0&&E.style){W=E.style.width;if(W.match(/^\d+px$/)){W=parseInt(W.substring(0,W.length-2));if(W%10==0)ua=W/10}}ta=false;W=[];var aa=[],pa=false,x=true,ca="";if(h||++n.value<=5)if(h)ca=Le(E);if(!h&&n.value>20)return false;var w=2,va=1;h||(w=va=ca!=""?2:1);if(typeof p!="undefined"&&typeof p.length!="undefined")for(var gb=0;gb<p.length&&x&&!ta;gb++)if(p[gb]!=null){var Ca=q[gb];
if(!(E.type=="radio"&&Ca!="gender"&&Ca!="cctype"&&Ca.indexOf("customfield")!=0))if(!(E.type=="select-one"&&Ca!="state"&&Ca!="country"&&Ca!="cctype"&&Ca!="timezone"&&Ca!="city"&&Ca.indexOf("birth")!=0&&Ca!="title"&&Ca.indexOf("ccexp")!=0&&Ca.indexOf("ccstart")!=0&&Ca!="gender"&&Ca!="age"&&Ca.indexOf("customfield")!=0))if(!(E.type=="password"&&Ca.indexOf("ccnum")!=0&&Ca!="cccsc"&&Ca!="ccissuenum"&&Ca!="cctype"&&Ca!="bankacctnum"&&Ca.indexOf("customfield")!=0))if(!((E.type=="text"||E.type=="textarea"||
"email"==E.type)&&(Ca=="cctype"||Ca=="timezone"||Ca=="gender")))if(Ih(E,Ca,true,ua,V))if(!(Ca.indexOf("address")==0&&V>0&&V<15)){for(var Va=false,Xb=false,Ga=w;Ga>=va;Ga--){if(Ga==1&&!Va&&aa.length>0&&E.type!="select-one")break;var Oa;if(Ga==1)Oa=ea;else if(Ga==2){Oa=ca;if(Oa=="")continue}var db=1==Ga?p[gb]:r[gb],kb;if(kb=typeof e[Ca]=="undefined"||e[Ca]<2){kb=db;var ma=Oa;db=kb.toString()+"_"+ma;if(db.length>80)if(typeof sj=="function")db=sj(db);else if(typeof SHA256=="function")db=SHA256(db);if(df[db]!=
null)kb=df[db]=="1";else{kb=kb.exec(ma);if(Ph>2500){for(var Ea in df){delete df[Ea];break}Ph=0}df[db]=kb?"1":"0";Ph++}}if(kb){if(Ga==2&&(Ca=="evephone"||Ca=="mobilephone"))pa=true;if(Ga==2&&Ca=="phone"&&pa)break;if(!h&&!v){if(!dd(E)){x=false;$=g.value;break}v=true}if(!Qa(Ca,jm)){u.value++;d.value++}if(h)if(Ga==1){W[W.length]=Ca;Xb=true}else{aa[aa.length]=Ca;Va=true}else{if(typeof e[Ca]=="undefined")e[Ca]=0;e[Ca]++;if(u.value>=3){if(!t&&(typeof Oc=="undefined"||!Oc(c,"addconfirm")))if(Ee){b=typeof LP!=
"undefined"?LP.getBrowser().selectedTab.linkedBrowser.contentDocument:document;b.LPlpfillforms=true;vf(b)}else Ob("FillableFormDetected",c,0,"formfill");if(c)c.contentDocument.ffidindex=-1;else document.ffidindex=-1;return true}ta=true;break}}}if(Va&&Xb)break}}if(h&&x){v=[];for(ta=0;ta<aa.length;ta++)if(Qa(aa[ta],W))v[v.length]=aa[ta];else if(typeof Na[aa[ta]]!="undefined"&&Qa(Na[aa[ta]],W))v[v.length]=aa[ta];ta=null;if(v.length>0)ta=v[0];else if(aa.length>0)ta=aa[0];else if(W.length>0){if(W[0].indexOf("ccnum")==
0&&E.type=="select-one")for(ta=1;ta<W.length;ta++)if(W[ta].indexOf("ccexp")==0){W.shift();break}ta=W[0]}if(ta!=null){if(ta=="name"&&Qa("name",v)&&Qa("company",aa))ta="company";if(ta=="ccexp"&&E.type=="select-one"&&Qa("ccexp",aa)&&Qa("cctype",W))if(E.options.length!=12&&E.options.length!=13){for($=0;$<E.options.length;$++)if(E.options[$].value.match(/^(?:\d{1,2}|\d{4}|\d{2}\/?(?:\d{2}|\d{4}))$/)||E.options[$].text.match(/^(?:\d{1,2}|\d{4}|\d{2}\/?(?:\d{2}|\d{4}))$/))break;if($==E.options.length)ta=
"cctype"}if(ta=="ccexp"&&E.type=="text"&&Qa("ccexp",aa)&&Qa("cccsc",W)&&typeof E.maxLength!="undefined"&&E.maxLength>=3&&E.maxLength<=4)ta="cccsc";$=new bm;$.elt=E;$.regexpname=ta;$.last_field_filled=g.value;ta=v="";if(aa.length>0)ta=aa[0];if(W.length>0){if("state"==W[0]&&ta!="state"&&"select-one"==E.type)A.value=true;if("country"==W[0]&&ta!="country"&&"select-one"==E.type)C.value=true;if("ccexpmonth"==W[0]&&ta!="ccexpmonth"&&ta!="ccexp"&&"select-one"==E.type)J.value=true;if("ccexpyear"==W[0]&&ta!=
"ccexpyear"&&ta!="ccexp"&&"select-one"==E.type)D.value=true;v=W[0]}$.namematch=v;$.textmatch=ta;f[f.length]=$;$=true}}}g.value=$}}return 2}function hk(b,c,d,e){if(typeof d=="undefined"||d==null)d=1;if(d>10)return false;if(!b&&!e||!c)return false;for(var f=Array("input","select"),g=0;g<f.length;g++)for(var h=c.getElementsByTagName(f[g]),j=0;j<h.length;j++){var l=h[j];if(!l.readOnly&&!l.disabled)if("email"==l.type||l.type=="text"||l.type=="password"){if(l.value!=""){l.value="";cc(l)}}else if(l.type==
"select-one"){if(l.selectedIndex!=0){l.selectedIndex=0;cc(l)}}else if(l.type=="radio"||l.type=="checkbox")if(l.checked){l.checked=false;cc(l)}}if(typeof e=="undefined"||e==null)e=b.contentWindow;if(e&&e.frames)for(g=0;g<e.frames.length;g++)e.frames[g].document&&hk(b,e.frames[g].document,d+1,e.frames[g].window)}function Xj(b){if(typeof Sc[b]=="undefined"){Sc[b]=[];qe[b]=[]}if(!(Sc[b].length>0))for(var c=0;c<Bd.length;c++){var d=Hb("ff_"+Bd[c]+"_regexp",b,true);Sc[b][c]=d.length?RegExp(d,"i"):null;
if(Bd[c]=="lastname2")Gh=c;if(Bd[c]=="lastname3")Hh=c;d="ff_text_"+Bd[c]+"_regexp";var e=Hb(d,b,true);qe[b][c]=e.length&&e!=d?RegExp(e,"i"):Sc[b][c]}}function Le(b){var c="";try{if(b.id!=""&&typeof b.ownerDocument!="undefined"&&b.ownerDocument!=null)for(var d=b.ownerDocument.getElementsByTagName("label"),e=0;e<d.length;e++)if(d[e].htmlFor==b.id){var f=ld(nd(d[e],b,false,true));if(f.length>=2)return f;break}var g=b.parentNode;if(g&&(g.tagName=="DIV"||g.tagName=="SPAN"))g=g.parentNode;if(g&&"TD"==g.tagName){var h=
ld(nd(g,b,false,true));if(h.length>=2)return h;var j=g.parentNode,l=ld(nd(j,b,false,true));if(l.length>=2)return l;h=d=-1;var o=g.offsetParent;if(o)for(l=0;l<o.rows.length;l++)if(j==o.rows[l]){d=l;break}for(l=0;l<j.cells.length;l++)if(typeof j.cells[l]!="undefined"&&g==j.cells[l]){h=l;break}g=0;if(d>0&&h!=-1){for(e=l=j=0;e<=h;e++){var n=o.rows[d].cells[e],p=1;if(n&&typeof n.colSpan=="number")p=n.colSpan;if(e<h)j+=p;else l=j+p-1}var q=0;for(e=0;e<=l;e++){n=o.rows[d-1].cells[e];p=1;if(n&&typeof n.colSpan==
"number")p=n.colSpan;var r=1;if(n&&typeof n.rowSpan=="number")r=n.rowSpan;if(r>1){j+=r-1;l+=r-1}r=q;var u=q+p-1;if(j>=r&&j<=u||l>=r&&l<=u)if(n){f=ld(nd(n,b,false,true));if(f.length>=2){c=f;g=1;break}}q+=p}}if(!g&&d!=-1&&h!=-1)if(n=o.rows[d].cells[0]){f=ld(nd(n,b,false,true));if(f.length>=2)c=f}}}catch(t){}if(c=="")a:if(ka(b)=="")c="";else{c=b;e="";for(f=0;f<10;f++){if(!c.parentNode)break;c=c.parentNode;e=ld(nd(c,b));if(e.length>200){c=km(c,b);break a}if(e.length>=2)break}c=e}return c}function km(b,
c){var d="",e=b.innerHTML,f=RegExp("<(input|select|textarea)[^>]+name=[\"']?"+gg(ag(ka(c)))+"[\"']?[^>]*>","i");f=f.exec(e);if(!f){f=RegExp("<(input|select|textarea)[^>]+id=[\"']?"+gg(ag(ka(c)))+"[\"']?[^>]*>","i");f=f.exec(e);if(!f)return""}var g=e.indexOf(f[0]);f=0;var h=g>1001?g-1001:0;for(g-=1;g>=h;g--){var j=e.charAt(g);if(j==">"){if(f<=0){d=d.replace(/&nbsp;/," ");d=ld(d);if(d.length>2)return d;d=""}f++}else if(j=="<")f>0&&f--;else if(f<=0)d=j+d}d=d.replace(/&nbsp;/," ");d=ld(d);if(d.length>
2)return d;else d="";return d}function Ih(b,c,d,e,f){if(c=="ssn1"||c=="ssn2"||c=="ssn3"||c=="ccnum1"||c=="ccnum2"||c=="ccnum3"||c=="ccnum4"||c=="phone1"||c=="phone2"||c=="phone3"||c=="phone23"||c=="evephone1"||c=="evephone2"||c=="evephone3"||c=="evephone23"||c=="mobilephone1"||c=="mobilephone2"||c=="mobilephone3"||c=="mobilephone23"||c=="fax1"||c=="fax2"||c=="fax3"||c=="fax23"||c=="zip1"||c=="zip2"||c=="amexccnum2"||c=="amexccnum3"){if(typeof e=="undefined"||typeof f=="undefined"){f=e=0;if(typeof b.size!=
"undefined")e=parseInt(b.size);if(typeof b.maxLength!="undefined")f=parseInt(b.maxLength);if(e<=0&&f<=0&&b.style){b=b.style.width;if(b.match(/^\d+px$/)){b=parseInt(b.substring(0,b.length-2));if(b%10==0)e=b/10}}}if(c=="ssn2")c=b=2;else if(c=="ssn1"||c=="phone1"||c=="phone2"||c=="fax1"||c=="fax2"||c=="evephone1"||c=="evephone2"||c=="mobilephone1"||c=="mobilephone2")c=b=3;else if(c=="zip1"){c=5;b=2}else if(c=="phone23"||c=="fax23"||c=="evephone23"||c=="mobilephone23"){c=8;b=7}else if(c=="ccnum4"||c==
"zip2"){c=4;b=3}else if(c=="amexccnum2")c=b=6;else if(c=="amexccnum3")c=b=5;else if(c=="phone3"||c=="fax3"||c=="mobilephone3"||c=="evephone3"){c=5;b=4}else c=b=4;if((e<=0||e>c)&&(f<=0||f>c))return false;if(d&&f>0&&f<b)return false}return true}function Sd(b,c){b=b.toUpperCase();c=c.toUpperCase();if(b=="AMEX"&&c.indexOf("BANAMEX")!=-1)return false;if(c.indexOf(b)!=-1)return true;else switch(b){case "AMEX":return c.indexOf("AMERICAN")!=-1||c.indexOf("AMX")!=-1;case "DISC":return c.indexOf("DIS")!=-1;
case "MC":return c.indexOf("MASTER")!=-1;case "VISA":return c.indexOf("VSA")!=-1;default:return false}}function ja(b,c,d,e,f){if(c!=""||f){if(typeof b.maxLength!="undefined"){f=parseInt(b.maxLength);if(f>0&&c.length>f){if(d)return;c=e?c.substring(c.length-f):c.substring(0,f)}}b.value=c}}function nd(b,c,d,e){d||(Qh=false);if(b==c){Qh=true;return""}if(b.nodeType==3)return ld(b.nodeValue).length>2?b.nodeValue:"";d=[];var f=0,g=typeof b.tagName=="string"?b.tagName:"";if(b.lp_too_many)return"";var h=b&&
b.style&&!dd(b,true);e=false;if(g=="LABEL")e=true;f=0;if(g!="OPTION"&&g!="SCRIPT"&&g!="TEXTAREA"&&!h)for(;typeof b.childNodes[f]!="undefined";){d[d.length]=nd(b.childNodes[f],c,true,e);if(Qh)break;if(f++>50){b.lp_too_many=1;return""}}b="|";if(typeof e!="undefined"&&e)b="";return d.join(b)}function be(b,c,d,e,f){if(typeof f=="undefined")f=1;if(f>10)return null;var g=typeof LP!="undefined"&&typeof LP.getBrowser().getBrowserForDocument=="function"?LP.getBrowser().getBrowserForDocument(c):null;if(g)b=
g;if(typeof LP!="undefined"&&!b)return null;g=null;try{if(!d&&typeof Oc!="undefined"&&(Oc(b,"autologin")||Oc(b,"generate")))return null;g=c.location.href;var h=Ra(g),j=Ta(g,h),l=ob(h.host,g);if((typeof ga=="undefined"||ga)&&(d||(typeof Rh=="undefined"||Rh)&&(typeof Li=="undefined"||!Li(j,l))))for(var o=c.getElementsByTagName("form"),n=0;n<o.length;n++)if(!(typeof n.offsetLeft!="undefined"&&n.offsetLeft<0||typeof n.offsetTop!="undefined"&&n.offsetTop<0)){var p=wf(o[n]);if(2<=p.password&&p.password<=
4&&2<=p.passwordvisible&&p.passwordvisible<=4&&p.passwordsContiguous==true){if(!d){var q=typeof LP!="undefined"?LP.lpgetcurrenturl(b):document.location.href;xd[q]=o[n];var r=Nc(b,c,false,true,null,1,e);c=false;var u=fj(o[n]);p=[];if(u){c=true;Md[q]=u;var t=typeof h.path=="string"?h.path.split("/"):[],C=typeof sa!="undefined"&&typeof sa[l]!="undefined"?sa[l]:[];for(var A in C)if(!(typeof y[A]=="undefined"||y[A].genpw||y[A].isbookmark))if(yl(y[A],1)){var J=new Dg;J.realmmatch=false;J.id=y[A].id;var D=
Ra(y[A].url);J.urlmatch=Ta(y[A].url,D)==j?true:false;J.servermatch=D.host==h.host?true:false;J.portmatch=Pg(D,h);J.serverportmatch=J.servermatch&&J.portmatch;var B=typeof D.path=="string"?D.path.split("/"):[],z;for(z=0;z<t.length&&z<B.length;z++)if(B[z]!=t[z])break;J.pathlevelmatch=z;J.url=g;J.fieldmatchcount=0;p[p.length]=J}if(typeof Af!="undefined"){p.sort(Af);p=Bf(ad,p,l,typeof h.path=="string"?h.path:"",h.host,y,ce(h))}}typeof LP!="undefined"&&LP.lpshowHelpDlg("genpw");if(Ee){var L=typeof LP!=
"undefined"?LP.getBrowser().selectedTab.linkedBrowser.contentDocument:document;L.LPlpgenerateandfill=r;L.LPlpgenerateAids=p;L.LPlpfillcurrent=c;L.LPlpgenerateForm=o[n];vf(L,!r)}else Ob("GeneratePassword",b,p,"generate",o[n],null,r,c);if(r)if(b)b.contentDocument.ffidindex=-1;else document.ffidindex=-1}return o[n]}}}catch(S){U("Failure with checking generate password: "+S+" ln: "+S.lineNumber,g)}if(typeof e=="undefined"||e==null)e=b.contentWindow;if(e&&e.frames)for(A=0;A<e.frames.length;A++)try{if(e.frames[A].document)return be(b,
e.frames[A].document,d,e.frames[A].window,f+1)}catch($){}return null}function fj(b){for(var c=RegExp(Hb("ff_currpass_regexp"),"i"),d=0;d<b.elements.length;d++){var e=b.elements[d];if(e.type=="password")if(dd(e))if(c.exec(ka(e)))return e;else{var f=Le(e);if(f!=""&&c.exec(f))return e}}return null}function wf(b,c){var d=[];d.text=d.password=d["select-one"]=d.textarea=d.passwordValues=d.passwordvisible=d.uniquepasswords=0;d.uname=d.pname=d.oname="";for(var e=b.elements,f=false,g=false,h=[],j=typeof e!=
"undefined"?e.length:0,l=0;l<j;l++){var o=e[l].type,n=ka(e[l]),p=e[l].value;if(o=="password"||o=="text"||o=="select-one"||o=="textarea"||"email"==o)d[o]++;if(o=="password"){c||dd(e[l])&&++d.passwordvisible;p!=""&&d.passwordValues++;if(f)g=true;f=true;Qa(p,h)||(h[h.length]=p)}else if(o!="hidden")f=false;if(("text"==o||"email"==o)&&n!="openid_url"&&(d.uname==""||d.pname==""))d.uname=n;if(o=="password")d.pname=n;if(("text"==o||"email"==o)&&n=="openid_url")d.oname=n}d.passwordsContiguous=g;d.uniquepasswords=
h.length;return d}function vf(b,c,d,e){if(typeof e=="undefined")e=1;if(e>10)return null;var f=typeof LP!="undefined"?LP.getBrowser().selectedTab.linkedBrowser.contentDocument:document;if(!(b==f&&typeof f.LPlpm_setupFocusHandler!="undefined"&&f.LPlpm_setupFocusHandler==true)){if(b==f)f.LPlpm_setupFocusHandler=true;f=Array("input","select");for(var g=0;g<f.length;g++)for(var h=b.getElementsByTagName(f[g]),j=0,l=0;l<h.length;l++)if(!(c&&h[l].type!="password"))if(h[l].type=="text"||"email"==h[l].type||
h[l].type=="password"||h[l].type=="select-one"||h[l].type=="textarea"||h[l].type=="radio"){if("text"==h[l].type||"email"==h[l].type){var o=RegExp(Hb("ff_search_regexp"),"i");if(h[l].name!=""&&o.exec(h[l].name))continue}if(j>20)break;else j++;h[l].addEventListener("focus",function(p){typeof LP!="undefined"?LP.FieldFocus(p):FieldFocus(p)},false)}if(typeof d=="undefined"||d==null)d=typeof LP!="undefined"?LP.getBrowser().selectedTab.linkedBrowser.contentWindow:window;if(d&&d.frames)for(g=0;g<d.frames.length;g++)try{d.frames[g].document&&
vf(d.frames[g].document,c,d.frames[g].window,e+1)}catch(n){}}}function Gg(b,c,d,e){var f=(new Date).getTime();if(!(f-ik<1E3)){ik=f;Je();Qb={};rc={};Rb={};Sb={};ng(true,b);!ga&&!$b&&LP.lp_handle_buttons_all("loggingin");f="version="+LP.en(Wb)+"&method=ff&hp="+(LP.IsHomePage()?"1":"0");f+=c?"&sessionid="+LP.en(c):"";f+=d?"&wxusername="+LP.en(d):"";f+=e?"&wxhash="+LP.en(e):"";f+="&uuid="+LP.en(LP.getuuid());rc.logincheckpostdata=f;LP.lpMakeRequest(LP.lp_base+"login_check.php",f,ef,function(){Vc(b,"makerequest")},
b)}}function Vc(b,c){var d=(new Date).getTime();if(!(d-jk<1E3)){jk=d;!ga&&!$b&&LP.lp_handle_buttons_all("off");if(d=kk()){LP.lplogin(d.username,d.password,b);d=true}else d=false;if(!d)if(!$b)if(b=="httptest"&&Sh)LP.lpOpenLogin();else if(!(c=="noexistingsession"||c=="nokeyfileA"||c=="nokeyfileB"))if(c=="invalidresponse"||c=="exception")Ma("LoginError",false,true);else c=="makerequest"?Ma("ErrorLoginMsg"):Ma("LoginError",false,true)}}function Mj(b,c,d,e){lk&&Mc("login",{data0:b,data1:c});if(typeof Wa==
"function"){Wa(b+"_lp.act.xml");Wa(b+"_lps.act.xml")}Je();Qb={};rc={};Rb={};e||(Sb={});Z=b.toLowerCase().replace(/\s*/g,"");ia=za(Z);Zd=za(za(Z+c)+c);Ke();Fd(Da(za(Z+c)));c="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";c="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";he(ia+"_lp.key",ia+"_lp.act.key");
he(ia+"_lp.act.key",ia+"_lp.act.lps");he(ia+"_lp.act.lps",ia+"_lpall.lps");$b||ng(true,d);!ga&&!$b&&LP.lp_handle_buttons_all("loggingin");b="xml=2&username="+LP.en(Z)+"&method=ff&hash="+Zd+"&version="+LP.en(Wb);b+="&hp="+(LP.IsHomePage()?"1":"0");b+="&encrypted_username="+LP.en(P(Z));b+="&uuid="+LP.en(LP.getuuid());if(LP.lpdolostpwotp&&(!LP.lpprefsHasUserValue("StoreLostPWOTP")||LP.lpprefsGetBoolPref("StoreLostPWOTP")))b+="&lostpwotphash="+LP.en(LP.GetOTPHash());else LP.DeleteOTP();rc={};rc.postdata=
b;rc.from=d;Qb={};Qb.postdata=b;Qb.from=d;Rb={};Rb.postdata=b;Rb.from=d;e||(Sb={});Sb.postdata=b;Sb.from=d;b+="&otp=";b+="&sesameotp=";b+="&gridresponse=";b+="&multifactorresponse=";LP.lpMakeRequest(LP.lp_base+"login.php",b,ff,function(){Ud(d)},d)}function Ud(b){var c=(new Date).getTime();if(!(c-mk<1E3)){mk=c;!ga&&!$b&&LP.lp_handle_buttons_all("off");ng(false,b)}}function ng(b,c){if(na==""||Z==""||ia==""){if(c=="frompipes")return;var d=kk();if(!d){if(xa)if(c!="httptest")Ma("LoginError",false,true);
else Sh&&LP.setTimeout(function(){LP.lpOpenLogin()},0);return}var e=d.password;Z=d.username.toLowerCase().replace(/\s*/g,"");ia=za(Z);Zd=za(za(Z+e)+e);Ke();Fd(Da(za(Z+e)));e="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";e="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";d.password="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
d.password="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}if(b){if(!$b){var f=gf(Z);if(f)if(f=vb(ia,true,false)){f=f.substring(0,200);f.indexOf("type=sesameoffline\ndata=")>=0||f.indexOf("type=trueapioffline\ndata=")>=0||f.indexOf("type=yubikeyoffline\ndata=")>=0||f.indexOf("type=yubikeyofflinemulti\nkeys=")>=0||nk(c,true)}else xa&&Ma("LoginError",false,true);else xa&&Ma("LoginError",false,true)}}else if(!$b){LP.lp_handle_buttons_all("off");
if(f=gf(Z))if(f=vb(ia,true,false)){f=f.substring(0,1200);if(f.indexOf("type=sesameoffline\ndata=")>=0){for(d="";;){d=yh(null);if(d==""||d.length!=64){if(d.length>64){LP.alert(LP.lpgs("SesameWrongButton"));continue}Ia();Ma("LoginError",false,true);return}break}rc.password_offline=d}else if(f.indexOf("type=trueapioffline\ndata=")>=0){d="";if(wb("type")=="trueapi")d=wb("password_offline");if(!d||d.length!=64)d=za(za(sb(Z)+"trueapi"));if(!d||d.length!=64)for(;;){if(Aa()&&LP.lpis_win&&typeof ba.trueapi_get_hash==
"function")d=ba.trueapi_get_hash(Z);if(d==""||d.length!=64){d=og(Z,"trueapi");Ia();Ma("LoginError",false,true,false,d);return}break}Sb.password_offline=d;Sb.type="trueapi"}else if(f.indexOf("type=yubikeyoffline\ndata=")>=0){d=bg(null);if(d==""||d.length!=44){Ia();Ma("LoginError",false,true);return}d=d.substring(0,12);d=za(za(za(sb("LastPassIsGreat")+d)+d));Qb.password_offline=d}else if(f.indexOf("type=yubikeyofflinemulti\nkeys=")>=0){d=bg(null);if(d==""||d.length!=44){Ia();Ma("LoginError",false,true);
return}d=d.substring(0,12);d=za(za(za(sb("LastPassIsGreat")+d)+d));e=f.indexOf("type=yubikeyofflinemulti\nkeys=");f=f.substring(e);e=false;var g=f.indexOf("\n",30);if(g>0){var h=za(d),j=f.substring(30,g);f=f.substring(g+6);f=j.split("&");var l;for(g=0;g<f.length;++g){l=f[g].split("#");if(l.length==2){var o=l[1];if(h==l[0]){l=K(o,Da(d));if(l!=""){e=true;Qb.password_offline=d;Qb.password_keysline=j;Qb.password_server=l}}}}}if(!e){Ia();Ma("LoginError",false,true);return}}nk(c,false)}else Ma("LoginError",
false,true);else Ma("LoginError",false,true)}}function nk(b,c){if(xa&&b=="pluginlogin"&&(!LP.lpprefsHasUserValue("showHomepageAfterLogin",false)||LP.lpprefsGetBoolPref("showHomepageAfterLogin",false)))If();ok();rd="";$b=ga=true;ve=false;vd=xa;Th="";rb=Xa=-1;de=0;Ke();LP.lp_handle_buttons_all("in");Bb(true);if(Wc){LP.mostRecent().clearTimeout(Wc);Wc=null}var d=c?3E4:0;Wc=LP.mostRecent().setTimeout('LP.notifyoffline("'+b+'");',d);if(Xc){LP.mostRecent().clearTimeout(Xc);Xc=null}Xc=LP.mostRecent().setTimeout("LP.retryonlinelogin(30000);",
3E4)}function ok(){LP.lpprefsSetBoolPref("ffhasloggedin",true,false);LP.SetupUserPreferences();LP.lpSetupIdleTimer();if(!LP.lpprefsHasUserValue("ffhasloggedinsuccessfully",false)){LP.lpprefsSetBoolPref("ffhasloggedinsuccessfully",true,false);LP.flush_prefs()}}function lm(b){b=gf(b,null,false);if(!b)return null;return b.split("\n")[0]}function gf(b,c,d,e){var f=typeof c=="undefined"||c==null?na:c,g=typeof d=="undefined"||d?true:false,h=za(b),j=ib(h+"_lpall.slps");if(j)j=$d(j,true);else if(j=ib(h+"_lpall.lps")){b=
sd(j,true);Yb(h+"_lpall.slps",b);Wa(h+"_lpall.lps")}else{j=ib(b+"_lp.act.lps");if(!j)if(xa&&ac&&!e&&Da(za(b+""))!=na){ed=na;ze();f={};f.accts_version=0;f.sites=[];f.securenotes=[];f.prompts=[];if(ac){f.prompts.login_site_prompt=true;f.prompts.edit_site_prompt=true;f.prompts.edit_sn_prompt=true;f.prompts.view_pw_prompt=true;f.prompts.view_ff_prompt=true;f.prompts.switch_identity_prompt=true;f.prompts.switch_f_prompt=true;f.prompts.multifactor_reprompt=true}f.formfills=[];f.identities=[];f.equivalentdomains=
[];f.neverurls=[];f.premium_exp=0;f.encrypted_username=P(Z);f.pendings=[];f.shareeautopushes=[];f.maxid=[];f.maxid.maxid=0;f.urlrules=[];Ab(f,null,"readkeyfile");return gf(b,c,d,true)}else return null;he(b+"_lp.act.lps",h+"_lpall.lps")}b=j.split("\n");if(b.length!=2)return null;if(g){if(f=="")return null;if(K(b[1],f,true)!="lastpass rocks")return null}return j}function ef(b,c,d){try{if(!(!b||b.readyState!=4))if(b.status!=200||b.responseXML==null||b.responseXML.documentElement==null)typeof c=="function"&&
c();else{var e=b.responseXML.documentElement,f=e.getElementsByTagName("ok");if(!f||f.length==0){var g=e.getElementsByTagName("error");if(g&&g.length>0&&g[0].hasAttribute("invalidsession")){Ia();LP.lpClearCache(true,false,false);Zb(LP.lp_base+"invalidsession.php",true);Ma("LoginError",false,true)}else if(g&&g.length>0&&g[0].hasAttribute("silent")&&parseInt(g[0].getAttribute("silent"))==1){if(!LP.lpprefsHasUserValue("ffhasloggedin",false)){LP.lpprefsSetBoolPref("ffhasloggedin",true,false);LP.flush_prefs();
Nf||LP.OpenCreateAccount()}Vc(d,"noexistingsession")}else{U("login_check.php returned invalid response text="+b.responseText);Vc(d,"invalidresponse")}}else{ed=Da(za(f[0].getAttribute("pwdeckey")));Z=f[0].getAttribute("lpusername");ia=za(Z);rd=f[0].getAttribute("uid");if(!(d=="websitelogin"||d==ni||d=="websiterefresh"||d=="websiterefreshrsa"||d=="frompipes"?true:false)&&d!="preferences"&&LP.lpprefsHasUserValue("logOffWhenCloseBrowser")&&LP.lpprefsGetBoolPref("logOffWhenCloseBrowser")){var h=LP.lpprefsHasUserValue("lastpollcheck")?
LP.lpprefsGetIntPref("lastpollcheck"):0,j=LP.lpprefsHasUserValue("logOffWhenCloseBrowserVal")?LP.lpprefsGetIntPref("logOffWhenCloseBrowserVal"):0;if(cb()-h>=j*60){Ia();return}}var l;if(na==""){var o=lm(Z);if(!o){Vc(d,"nokeyfileA");return}l=Da(K(o,ed,true));if(!gf(Z,l)){Vc(d,"nokeyfileB");return}}if(d=="httptest"){var n=f[0].getAttribute("sesamepassword")!=null&&f[0].getAttribute("sesamepassword")!=""?true:false,p=f[0].getAttribute("yubikeyenabled")!=null&&f[0].getAttribute("yubikeyenabled")=="1"?
true:false,q=f[0].getAttribute("multifactorenabled")!=null&&f[0].getAttribute("multifactorenabled")!=""?true:false,r=f[0].getAttribute("sesameotpok")!=null&&f[0].getAttribute("sesameotpok")!=""?true:false,u=f[0].getAttribute("yubikeyotpok")!=null&&f[0].getAttribute("yubikeyotpok")!=""?true:false,t=f[0].getAttribute("multifactorresponseok")!=null&&f[0].getAttribute("multifactorresponseok")!=""?true:false;if(n)if(!r){var C=yh(Z);if(C==""){Ia();Ma("LoginError",false,true);return}var A=Tb("logincheckpostdata")+
"&sesameotp="+encodeURIComponent(C);if(Tb("label"))A+="&trustlabel="+LP.en(Tb("label"));LP.lpMakeRequest(LP.lp_base+"login_check.php",A,ef,function(){Vc(d,"makerequest")},d);return}if(p)if(!u){C=bg(Z);if(C==""){Ia();Ma("LoginError",false,true);return}A=Tb("logincheckpostdata")+"&otp="+encodeURIComponent(C);if(qb("label"))A+="&trustlabel="+LP.en(qb("label"));LP.lpMakeRequest(LP.lp_base+"login_check.php",A,ef,function(){Vc(d,"makerequest")},d);return}if(!mm(f,d))return;if(q)if(!t){var J=f[0].getAttribute("type");
b="";if(J=="trueapi"){var D=za(za(sb(Z)+J));if(D.length!=64)if(Aa()&&LP.lpis_win&&typeof ba.trueapi_get_hash=="function")D=ba.trueapi_get_hash(Z);Sb.password_offline=D;Sb.type=J;b=D!=""?za(D+f[0].getAttribute("challenge")):""}if(b==""){var B=og(Z,J);Ia();Ma("LoginError",false,true,false,B);return}A=Tb("logincheckpostdata")+"&multifactorresponse="+encodeURIComponent(b);if(wb("label"))A+="&trustlabel="+LP.en(wb("label"));if(f[0].getAttribute("wxsessid"))A+="&wxsessid="+LP.en(f[0].getAttribute("wxsessid"));
LP.lpMakeRequest(LP.lp_base+"login_check.php",A,ef,function(){Vc(d,"makerequest")},d);return}}if(na==null||na=="")Fd(l);pk(f,d,true)}}}catch(z){U("Failure in lpLoginCheckResponse: "+z+" ln: "+z.lineNumber);Vc(d,"exception")}}function mm(b,c){if(c!="httptest")return true;var d=b[0].getAttribute("gridenabled")!=null&&b[0].getAttribute("gridenabled")!=""?true:false,e=b[0].getAttribute("gridresponseok")!=null&&b[0].getAttribute("gridresponseok")!=""?true:false;if(d)if(!e){d=Nj(Z,b[0].getAttribute("challenge"));
if(d==""){Ia();Ma("LoginError",false,true);return}d=Tb("logincheckpostdata")+"&gridresponse="+encodeURIComponent(d);if(Rd("label"))d+="&trustlabel="+LP.en(Rd("label"));if(b[0].getAttribute("wxsessid"))d+="&wxsessid="+LP.en(b[0].getAttribute("wxsessid"));LP.lpMakeRequest(LP.lp_base+"login_check.php",d,ef,function(){Vc(c,"makerequest")},c);return false}return true}function ff(b,c,d){try{if(!(!b||b.readyState!=4))if(b.status!=200||b.responseXML==null||b.responseXML.documentElement==null){U("Problem with login response. status="+
b.status+" text="+b.responseText,null);typeof c=="function"&&c()}else{var e=b.responseXML.documentElement,f=e.getElementsByTagName("ok");if(!f||f.length==0){var g=e.getElementsByTagName("error"),h=g.length==0?"":b.responseText;if(g&&g.length>0&&g[0].hasAttribute("invalidsession")){Ia();LP.lpClearCache(true,false,false);Zb(LP.lp_base+"invalidsession.php",true);Ma("LoginError",false,true)}else if(h&&h.indexOf("blacklist")>0){Ia();LP.lpClearCache(true,false,false);Ma("Blacklist",false,true)}else if(h&&
h.indexOf("sesameotprequired")>0){LP.lpClearCache(true,false,false);var j=yh(Z);if(j==""){Ia();Ma("LoginError",false,true)}else{var l=Tb("postdata")+"&sesameotp="+encodeURIComponent(j),o=Tb("from");if(Tb("label"))l+="&trustlabel="+LP.en(Tb("label"));LP.lpMakeRequest(LP.lp_base+"login.php",l,ff,function(){Ud(o)},o)}}else if(h&&h.indexOf("sesameotpfailed")>0){LP.lpClearCache(true,false,false);Ia();Ma("LoginError",false,true)}else if(h&&h.indexOf("otprequired")>0){LP.lpClearCache(true,false,false);j=
bg(Z);if(j==""){Ia();Ma("LoginError",false,true)}else{l=qb("postdata")+"&otp="+encodeURIComponent(j);o=qb("from");if(qb("label"))l+="&trustlabel="+LP.en(qb("label"));LP.lpMakeRequest(LP.lp_base+"login.php",l,ff,function(){Ud(o)},o)}}else if(h&&h.indexOf("otpfailed")>0){LP.lpClearCache(true,false,false);Ia();Ma("LoginError",false,true)}else if(h&&h.indexOf("gridresponserequired")>0){LP.lpClearCache(true,false,false);var n=Nj(Z,g[0].getAttribute("challenge"));if(n==""){Ia();Ma("LoginError",false,true)}else{l=
Rd("postdata")+"&gridresponse="+encodeURIComponent(n);o=Rd("from");if(Rd("label"))l+="&trustlabel="+LP.en(Rd("label"));if(g[0].getAttribute("wxsessid"))l+="&wxsessid="+LP.en(g[0].getAttribute("wxsessid"));LP.lpMakeRequest(LP.lp_base+"login.php",l,ff,function(){Ud(o)},o)}}else if(h&&h.indexOf("gridresponsefailed")>0){LP.lpClearCache(true,false,false);Ia();Ma("LoginError",false,true)}else if(h&&h.indexOf("multifactorresponserequired")>0){LP.lpClearCache(true,false,false);var p=g[0].getAttribute("type");
n="";if(p=="trueapi"){b="";if(wb("type")=="trueapi")b=wb("password_offline");if(!b||b.length!=64)b=za(za(sb(Z)+p));if(!b||b.length!=64)if(Aa()&&LP.lpis_win&&typeof ba.trueapi_get_hash=="function")b=ba.trueapi_get_hash(Z);Sb.password_offline=b;Sb.type=p;n=b!=""?za(b+g[0].getAttribute("challenge")):""}if(n==""){var q=og(Z,p);Ia();Ma("LoginError",false,true,false,q)}else{l=wb("postdata")+"&multifactorresponse="+encodeURIComponent(n);o=wb("from");if(wb("label"))l+="&trustlabel="+LP.en(wb("label"));if(g[0].getAttribute("wxsessid"))l+=
"&wxsessid="+LP.en(g[0].getAttribute("wxsessid"));LP.lpMakeRequest(LP.lp_base+"login.php",l,ff,function(){Ud(o)},o)}}else if(h&&h.indexOf("multifactorresponsefailed")>0){q=og(Z,g[0].getAttribute("type"));LP.lpClearCache(true,false,false);Ia();Ma("LoginError",false,true,false,q)}else if(h&&h.indexOf("unknownemail")>0){Ia();Ma(g[0].getAttribute("message")?g[0].getAttribute("message"):"LoginError",false,true,true)}else if(h&&h.indexOf("unknownpassword")>0){Ia();Ma(g[0].getAttribute("message")?g[0].getAttribute("message"):
"LoginError",false,true)}else if(h&&h.indexOf("iprestriction")>0){LP.lpClearCache(true,false,false);Ia();Ma(g[0].getAttribute("message")?g[0].getAttribute("message"):"LoginError",false,true)}else if(g&&g.length>0&&g[0].hasAttribute("cause")){g[0].getAttribute("cause");Ia();Ma(g.length>0&&g[0].getAttribute("message")?g[0].getAttribute("message"):"LoginError",false,true)}else{U("login.php returned invalid response text="+b.responseText);Ud(d)}}else{ed=Da(za(f[0].getAttribute("pwdeckey")));Z=f[0].getAttribute("lpusername");
ia=za(Z);rd=f[0].getAttribute("uid");ze();pk(f,d,false)}}}catch(r){U("Failure in lpLoginResponse: "+r+" ln: "+r.lineNumber);Ud(d)}}function pk(b,c,d){if(na==null||na==""){U("lpLoginCommon : WTF! We are in lpLoginCommon but our key has not been set -- INVESTIGATE! from="+c+" logincheck="+(typeof d=="undefined"?"undefined":d));Ia()}$b=false;if(d==null||typeof d=="undefined")d=true;if(Wc){LP.mostRecent().clearTimeout(Wc);Wc=null}if(Xc){LP.mostRecent().clearTimeout(Xc);Xc=null}he(ia+"_lp.key",ia+"_lp.act.key");
he(ia+"_lp.act.key",ia+"_lp.act.lps");var e=b[0].getAttribute("sesamepassword");rc.password_offline=e;e=b[0].getAttribute("yubikeyhash");Qb.password_offline=e;e=b[0].getAttribute("yubikeykeysline");Qb.password_keysline=e;e=b[0].getAttribute("yubikeyserverpassword");Qb.password_server=e;e=b[0].getAttribute("gridpassword");Rb.password_offline=e;(Vg=b[0].getAttribute("disableoffline")==1?1:0)&&LP.lpClearCache(true,false,false);Ke();Ve=b[0].getAttribute("privatekeyenchash");LP.lphelpstats=new ki;LP.lphelpstats.currentlyopen=
false;LP.lphelpstats.wino=null;LP.lphelpstats.highlighthelp=b[0].getAttribute("hih")=="1"?true:false;LP.lphelpstats.genpwhelp=b[0].getAttribute("genh")=="1"?true:false;LP.lphelpstats.addsitehelp=b[0].getAttribute("addh")=="1"?true:false;we=b[0].getAttribute("country");wh=b[0].getAttribute("upgrade")=="1"?true:false;Tf=b[0].getAttribute("logoff_other_ses")=="1"?true:false;Ui(b[0],"login");e=LP.getsinglefactortype();if(b[0].getAttribute("multifactor_singlefactor")=="1"){if(e=="")if(wb("type")=="trueapi")Aa()&&
LP.lpis_win&&typeof ba.trueapi_default_login_exists=="function"&&ba.trueapi_default_login_exists(Z)&&LP.setsinglefactortype(wb("type"));else if(b[0].getAttribute("singlefactortype")=="vtapi")Aa()&&LP.lpis_mac&&typeof ba.lpvt_has_data=="function"&&ba.lpvt_has_data()&&LP.setsinglefactortype(b[0].getAttribute("singlefactortype"));else b[0].getAttribute("singlefactortype")=="validity"&&Aa()&&LP.lpis_win&&typeof ba.validity_has_data=="function"&&ba.validity_has_data()&&LP.setsinglefactortype(b[0].getAttribute("singlefactortype"))}else e!=
""&&LP.disable_single_factor();ga=true;ve=parseInt(b[0].getAttribute("isadmin"))==1;vd=parseInt(b[0].getAttribute("loglogins"))==1;Th=b[0].getAttribute("email");rb=parseInt(b[0].getAttribute("accts_version"));if(rb!=Xa)Xa=-1;LP.lp_handle_buttons_all("in");var f=c=="websiterefreshrsa"?true:false;if(Aa())if(na==null||na=="")U("lprsa_login : lp_local_key is invalid");else if(b[0].getAttribute("donotregeneratekeys")!="1"){e=0;if(f){pf();e=2}if(Ve==""){b[0].setAttribute("donotregeneratekeys","1");f=Ka(na);
f=f.toUpperCase();var g={},h={};ba.xGenerateKeys(f,g,h)!=true||g.value==null||g.value==""||h.value==null||h.value==""?U("lprsa_login : failed to generating new rsa key pair",null):Ij(f,g.value,h.value,e)}else if(re("readfromfile")==""||We==""||za(We)!=Ve)Ij("","","")}if(LP.lpdolostpwotp&&b[0].hasAttribute("lostpwotpresult"))if((yb(ia+"_lps.act.sxml")||yb(ia+"_lps.act.xml"))&&!LP.lpprefsHasUserValue("StoreLostPWOTP"))LP.lpprefsSetBoolPref("StoreLostPWOTP",true);else LP.lpprefsHasUserValue("StoreLostPWOTP")||
LP.lpprefsSetBoolPref("StoreLostPWOTP",true);if(LP.lpdolostpwotp&&(!LP.lpprefsHasUserValue("StoreLostPWOTP")||LP.lpprefsGetBoolPref("StoreLostPWOTP")))if(b[0].hasAttribute("lostpwotpresult")&&b[0].getAttribute("lostpwotpresult")!="ok"){LP.DeleteOTP();LP.MakeOTP()}LP.lpCloseNotifications();Ib=rh();e=b[0].getAttribute("sessionid");if(Ib!=e&&e!="")Ib=e;if((!d||c=="websitelogin")&&!lk)Mc("internal_logincheck_ack",{data0:Ib,data1:Z,data2:LP.GetIdentity()});try{var j=b[0].getAttribute("ignoreminor")=="0"?
false:true,l=b[0].getAttribute("reqdversion");if(Wb!=""&&l!=""&&Ii(Wb,l,j)<0){LP.alert(LP.lpgs("A required update is available for LastPass. Please press OK to begin download and installation."));LP.lpUpdate()}}catch(o){}ok();pg=true;LP.numsites()==0||rb!=Xa?Bb():LP.lpRecheckTabs(true);if(c=="pluginlogin"||c=="createaccount")jc();d=cb();LP.lpprefsSetIntPref("lastpollcheck",d);LP.flush_prefs();Uh=d;LP.lpdopoll&&LP.setupPollTimer();if(zh){zh=false;Rj()}else if((c=="pluginlogin"||c=="createaccount")&&
(!LP.lpprefsHasUserValue("showHomepageAfterLogin",false)||LP.lpprefsGetBoolPref("showHomepageAfterLogin",false)==true))If();c=Ni();if(c=="")c="0";parseInt(c)<parseInt(b[0].getAttribute("iconsversion"))&&LP.lpMakeRequest(LP.lp_base+"geticon.php","versionff="+LP.en(c),Oi);LP.lpretryrequests()}function kk(){if(xa&&ac)return null;var b=Ed();if(b.length==0)return null;b=b[0];var c=Cd();if(typeof c[b]=="undefined")return null;return{username:b,password:c[b]}}function Ed(b){var c="";if(LP.lpprefsHasUserValue("loginusers",
false))c=LP.lpprefsGetCharPref("loginusers",false);var d=[],e=encodeURIComponent(b);if(typeof b!="undefined"&&b!=""&&c.indexOf(e)==-1)c=e+"|"+c;if(c!=""){d=c.split("|");for(b=0;b<d.length;b++)try{d[b]=decodeURIComponent(d[b])}catch(f){d[b]=""}}return d}function Cd(){var b="";if(LP.lpprefsHasUserValue("loginpws",false))b=$d(LP.lpprefsGetCharPref("loginpws",false));var c=[],d=[];if(b!=""){c=b.split("|");for(b=0;b<c.length;b++){var e=c[b].split("=");if(typeof e[1]!="undefined"){var f;try{f=decodeURIComponent(e[0])}catch(g){f=
""}var h;try{h=decodeURIComponent(e[1])}catch(j){h=""}e=Da(za(f));h=K(h,e);d[f]=h}}}return d}function Zi(b){ga||LP.lpGetCurrentWindow().setTimeout(function(){ga||LP.lpOpenLogin(b.extra)},500)}function nm(b){try{if(b&&b.readyState==4){if(b.status==200&&b.responseXML!=null&&b.responseXML.documentElement!=null){var c=b.responseXML.documentElement.getElementsByTagName("ok");if(c.length>0)if(c[0].getAttribute("lastpass")=="1"){LP.lplogincheck("httptest");return}}Vh()}}catch(d){Vh()}}function Vh(){LP.setTimeout(function(){LP.httptest()},
3E5)}function og(b,c){return"multifactordisable.php?cmd=sendemail&username="+encodeURIComponent(b)+"&type="+encodeURIComponent(c)}function qg(b,c,d){Wh=false;if(d)a:{b=xe();var e=c.rid,f=c.ts;d=null;for(var g in b){if(b[g].rid==e){U("SK:We tried to append a row with an idential rid value",null);break a}if(d==null){var h=parseInt(b[g].ts);if(f<h)d=g}}if(d==null)b[b.length]=c;else{e=[];for(g in b){if(g==d)e[e.length]=c;e[e.length]=b[g]}b=e}qk(b)||U("SK:Could not write to retry file in lpretryinsert",
null)}else if(b=="invalidresponse"||b=="onerror"||b=="exception"||b=="objectcreation"){c=c.url;c.indexOf("loglogin.php")==-1&&c.indexOf("logformfill.php")==-1&&c.indexOf("error.php")==-1&&c.indexOf("poll_server.php")==-1&&c.indexOf("httptest.php")==-1&&c.indexOf("geticon.php")==-1&&c.indexOf("logout.php")==-1&&Ma("ErrorSendingMsg")}}function hd(b,c){return xa?true:b==c}function rk(b){var c=[];if(typeof b=="string"&&b!=""){b=b.split("&");for(var d=0;d<b.length;d++){var e=b[d].split("=");c[e[0]]=e.length>=
2?decodeURIComponent(e[1]):""}}return c}function om(b,c,d,e,f){if(typeof d=="function"){var g=(typeof document!="undefined"?document:LP.getBrowser().contentDocument).implementation.createDocument("","x",null),h,j=null;c=rk(c);if(b.indexOf("change_pw.php")!=-1){h=g.createElement("ok");h.setAttribute("newpassword",c.password);for(b="";typeof c["id"+b]!="undefined";){var l=c["id"+b];h.setAttribute("id"+b,l);var o;o=typeof g_sites!="undefined"&&typeof g_sites[l]!="undefined"?Ba(g_sites[l].password):typeof y!=
"undefined"&&typeof y[l]!="undefined"?y[l].password:"";h.setAttribute("oldpassword"+b,o);if(b=="")b=1;else b++}}else if(b.indexOf("deliver_and_add.php")!=-1||b.indexOf("show.php")!=-1&&c["delete"]!="1"){h=null;if(typeof c.url!="undefined")h=c.url;else if(typeof c.ref!="undefined")h=c.ref;var n=o="",p="";if(h)if(h=Ua(Da(h)))try{ec||(ec=Te.parse(Da(ib("rfdefaults"))));if(ec&&typeof ec[h]!="undefined"){o=ec[h].submit_id;n=ec[h].captcha_id;p=ec[h].custom_js}}catch(q){}h=g.createElement("result");var r;
if(c.replacing==1){r="accountreplaced";l=c.aid}else if(typeof c.aid!="undefined"&&c.aid!="0"){r="accountupdated";l=c.aid}else{r="accountadded";l=++zc}h.setAttribute("msg",r);h.setAttribute("aid",l);c=b.indexOf("deliver_and_add.php")!=-1?++zc:typeof g_sites!="undefined"&&typeof g_sites[l]!="undefined"?g_sites[l].urid:typeof y!="undefined"&&typeof y[l]!="undefined"?y[l].urid:"0";h.setAttribute("urid",c);h.setAttribute("submit_id",o);h.setAttribute("captcha_id",n);h.setAttribute("custom_js",p)}else if(b.indexOf("fields.php")!=
-1)h=g.createElement("result");else if(b.indexOf("formfill.php")!=-1&&b.indexOf("logformfill.php")==-1){h=g.createElement("result");if(c.deleteext=="1"){r="ffdeleted";b=c.ffid}else if(c.ffid=="0"){r="ffadded";b=++zc}else{r="ffupdated";b=c.ffid}h.setAttribute("msg",r);h.setAttribute("ffid",b);o=b="";for(n=1;typeof c["customfield"+n+"cfid"]!="undefined";n++)if(c["customfield"+n+"cfid"]=="0"){b+=o+ ++zc;o=","}h.setAttribute("cfids",b)}else if(b.indexOf("gm_deliver.php")!=-1){h=g.createElement("ok");
h.setAttribute("urid",++zc)}else if(b.indexOf("groups.php")!=-1)h=g.createElement("ok");else if(b.indexOf("save_gen_pw.php")!=-1){h=g.createElement("ok");h.setAttribute("url",c.url);h.setAttribute("password",c.password);h.setAttribute("nofill",typeof c.nofill!="undefined"?c.nofill:"0");h.setAttribute("aid",++zc)}else if(b.indexOf("show.php")!=-1&&c["delete"]=="1"){h=g.createElement("result");h.setAttribute("action","delete");h.setAttribute("aid",c.aid)}else if(b.indexOf("api.php")!=-1){h=g.createElement("OK");
j="A-OK"}else return;h.setAttribute("accts_version",typeof g_local_accts_version!="undefined"?g_local_accts_version+1:typeof Xa!="undefined"?Xa+1:1);g.documentElement.appendChild(h);var u=[];u.responseXML=g;u.readyState=4;u.status=200;if(j)u.responseText=j;typeof setTimeout=="function"?setTimeout(function(){d(u,e,f)},0):LP.setTimeout(function(){d(u,e,f)},0)}}function qm(){var b=Z;if((b==""||b==null)&&typeof g_username!="undefined")b=g_username;var c=typeof g_ischrome=="undefined"?"ff":"cr";if(b==
""||b==null)return c+"unknown1";b=b.toLowerCase().replace(/\s*/g,"");if(b=="")return c+"unknown2";b=P(b);if(b=="")return c+"unknown3";return b}function Fj(b){return b.responseXML&&b.responseXML.documentElement?typeof b.responseXML.documentElement.nodeName!="undefined"&&b.responseXML.documentElement.nodeName=="parsererror"&&typeof b.responseXML.documentElement.namespaceURI!=undefined&&b.responseXML.documentElement.namespaceURI=="http://www.mozilla.org/newlayout/xml/parsererror.xml"?false:true:false}
function Xh(b){return b.indexOf("?rid=")>0||b.indexOf("&rid=")>0}function rm(b){if(Xh(b))return false;var c=["add_never.php","change_pw.php","deliver_and_add.php","formfill.php","gm_deliver.php","save_gen_pw.php","set_autologin.php","set_never_autofill.php","show.php","fields.php"],d;for(d in c)if(b.indexOf(c[d])>=0)return true;return false}function Yh(b,c){if(c)if(sk(b)){hb.status="done";hb.donems=(new Date).getTime();Zh(false)}else{U("SK:lpremovefromretryfile failed for rid="+b,null);tk("SK:lpremovefromretryfile failed for rid="+
b+". Contents of retry file:");hb.exit=true}else{hb.status="failed";hb.donems=(new Date).getTime();Zh(true,true,b)}}function Zh(b,c,d){if(b){b=c?864E5:6E5;var e=2*hb.retryintervalms;if(e==0)e=2E3;else if(e>b)e=b;hb.retryintervalms=e;if(c){if(typeof hf[d]=="undefined")hf[d]=0;hf[d]++;if(hf[d]==16){hf[d]=0;sk(d)}}}else hb.retryintervalms=hb.initretryintervalms}function sk(b){var c=xe();if(c.length==0){c=xe(true);if(c.length==0)return true}var d,e=false,f=[];for(d=0;d<c.length;++d)if(c[d].rid==b)e=true;
else f[f.length]=c[d];if(!e){tk("SK:lpremovefromretryfile : ERROR could not find rid="+b+". Contents of retry file:");return false}if(!qk(f))return false;f.length==0&&LP.lpGetAccounts();return true}function tk(b){var c=xe();for(var d in c){b+="\n["+d+"] :";for(var e in c[d])b+=" "+e+"->"+c[d][e]}}function xe(b){if(jf==null||b){b=[];var c;c=tf();c=c==""?[]:ib(c);if(c==null)return b;else if(c=="")return jf=b;c=K(c);if(c==""||c==null){U("Failed to decrypt retry data",null);Jg();return b}c=Xg(c);if(c==
null){U("Failed to lpatob decrypted retry data (so perhaps decryption failed)",null);Jg();return b}var d=c.indexOf(">LastPassRetry");if(c.length<28||c.indexOf("LastPassRetry<")!=0||d!=c.length-14){U("Retry data format after decryption invalid: end="+d+" data="+c,null);Jg();return b}c=c.substring(14,d);if(c!=""){c=c.split("\n");for(d=0;d<c.length;++d){var e=b,f=b.length,g;g=[];var h=/<([^ ]+) ?(.*)\/>/;h=h.exec(c[d]);if(!(!h||h.length!=3)){var j=h[2];h=/([^=]+)="([^"]*)"/;for(var l=null;(l=h.exec(j))!=
null;){if(l.length!=3)break;var o=l[1].toString();l=l[2].toString();j=j.replace(o+'="'+l+'"',"");o=Hc(o);l=fc(l);if(o=="null")l=null;else if(o=="false")l=false;g[o]=l}}e[f]=g}}jf=b}return jf}function qk(b){var c="",d;for(d=0;d<b.length;++d){var e=d==0?"":"\n",f=b[d],g="<row",h=void 0;for(h in f){if(f[h]==null)f[h]="null";if(typeof f[h]=="object")f[h]="null";g+=" "+h+'="'+ag(f[h].toString())+'"'}g+="/>";c+=e+g}b=rf("LastPassRetry<"+c+">LastPassRetry");if(b==null)return false;b=P(b);if(b==""||b==null)return false;
jf=null;d=tf();if(d=="")b=false;else{Yb(d,b);b=true}xe();return b}function Tg(b,c,d){for(var e=b.getElementsByTagName("input"),f=0,g=0;g<e.length;g++)if(e[g].form==c)if("password"==e[g].type&&e[g].value!="")f=1;else if(d==e[g].type)if(f&&d!="button"){e[g].click();return 1}if("button"==d){d=null;e=b.getElementsByTagName("button");for(g=0;g<e.length;g++)if(e[g].form==c)if("button"==e[g].type||"submit"==e[g].type||"image"==e[g].type)if(f)if(d){if("submit"==e[g].type)d=e[g]}else d=e[g];if(d){d.click();
return 1}}return 0}function th(b,c,d,e,f,g,h,j,l,o,n,p,q,r,u,t,C,A,J,D,B){Qe=false;if(p){if(typeof p.neveraccounts=="undefined")p.neveraccounts=[];if(typeof p.nevergenerates=="undefined")p.nevergenerates=[];if(typeof p.neverformfills=="undefined")p.neverformfills=[];if(typeof p.neverautologins=="undefined")p.neverautologins=[];if(typeof p.onlyaccounts=="undefined")p.onlyaccounts=[];if(typeof p.onlygenerates=="undefined")p.onlygenerates=[];if(typeof p.onlyformfills=="undefined")p.onlyformfills=[];
if(typeof p.onlyautologins=="undefined")p.onlyautologins=[]}var z=0,L=g&&g.length>0?g.length-1:0,S=l&&l.length>0?l.length-1:0,$=false;if(b.substring(0,4)!="LPAV")e=c;A||(A=[]);for(A.maxid=0;e<c;){var E=b.substring(e,e+4),ea=$h(b.substring(e+4,e+8));if(E=="ACCT"){var v=e+8,F=[];v+=T(b,v,F,"aid");E=parseInt(F.aid);if(E>A.maxid)A.maxid=E;v+=typeof parsedonotdecryptnames=="undefined"?T(b,v,F,"name",1):T(b,v,F,"name");v+=T(b,v,F,"group");v+=T(b,v,F,"url");v+=T(b,v,F,"extra");v+=T(b,v,F,"fav");v+=T(b,v,
F,"sharedfromaid");v+=T(b,v,F,"username");v+=T(b,v,F,"password");v+=T(b,v,F,"pwprotect");F.pwprotect=F.pwprotect=="1";v+=T(b,v,F,"genpw");F.genpw=F.genpw=="1";v+=T(b,v,F,"sn");F.sn=F.sn=="1";v+=T(b,v,F,"last_touch");v+=T(b,v,F,"autologin");F.autologin=F.autologin=="1";v+=T(b,v,F,"never_autofill");F.never_autofill=F.never_autofill=="1";v+=T(b,v,F,"realm_data");v+=T(b,v,F,"fiid");v+=T(b,v,F,"custom_js");if(v<e+ea+8)v+=T(b,v,F,"submit_id");if(v<e+ea+8)v+=T(b,v,F,"captcha_id");if(v<e+ea+8){v+=T(b,v,F,
"urid");E=parseInt(F.urid);if(E>A.maxid)A.maxid=E}if(v<e+ea+8)v+=T(b,v,F,"basic_auth");if(v<e+ea+8)v+=T(b,v,F,"method");if(v<e+ea+8)v+=T(b,v,F,"action");if(v<e+ea+8)v+=T(b,v,F,"groupid");if(v<e+ea+8)v+=T(b,v,F,"deleted");F.fields=[];if(F.sn)h&&h.push(F);else if(g){L=g.length;g.push(F)}z++}else if("SPMT"==E){if(j){v=e+8;v+=T(b,v,j,"login_site_prompt");j.login_site_prompt=j.login_site_prompt=="1";v+=T(b,v,j,"edit_site_prompt");j.edit_site_prompt=j.edit_site_prompt=="1";v+=T(b,v,j,"edit_sn_prompt");
j.edit_sn_prompt=j.edit_sn_prompt=="1";v+=T(b,v,j,"view_pw_prompt");j.view_pw_prompt=j.view_pw_prompt=="1";v+=T(b,v,j,"view_ff_prompt");j.view_ff_prompt=j.view_ff_prompt=="1";v+=T(b,v,j,"improve");j.improve=j.improve=="1";v+=T(b,v,j,"switch_identity_prompt");j.switch_identity_prompt=j.switch_identity_prompt=="1";v+=T(b,v,j,"switch_f_prompt");j.switch_f_prompt=j.switch_f_prompt=="1";if(v<e+ea+8){v+=T(b,v,j,"multifactor_reprompt");j.multifactor_reprompt=j.multifactor_reprompt=="1"}else j.multifactor_reprompt=
false}}else if("PREF"==E){if(B){v=e+8;v+=T(b,v,B,"allowmasterpasswordsave");v+=T(b,v,B,"logoffclosebrowser");v+=T(b,v,B,"logoffidle")}}else if("LPFF"==E){if(l){v=e+8;var M=[];v+=T(b,v,M,"ffid");S=parseInt(M.ffid);if(S>A.maxid)A.maxid=S;v+=T(b,v,M,"profiletype");v+=T(b,v,M,"profilename");v+=T(b,v,M,"profilelanguage");v+=T(b,v,M,"firstname");v+=T(b,v,M,"middlename");v+=T(b,v,M,"lastname");v+=T(b,v,M,"email");v+=T(b,v,M,"company");v+=T(b,v,M,"ssn");v+=T(b,v,M,"birthday");v+=T(b,v,M,"address1");v+=T(b,
v,M,"address2");v+=T(b,v,M,"city");v+=T(b,v,M,"state");v+=T(b,v,M,"state_name");v+=T(b,v,M,"zip");v+=T(b,v,M,"country");v+=T(b,v,M,"country_cc3l");v+=T(b,v,M,"country_name");v+=T(b,v,M,"mobilephone");v+=T(b,v,M,"mobilephone3lcc");v+=T(b,v,M,"mobileext");v+=T(b,v,M,"evephone");v+=T(b,v,M,"evephone3lcc");v+=T(b,v,M,"eveext");v+=T(b,v,M,"phone");v+=T(b,v,M,"phone3lcc");v+=T(b,v,M,"phoneext");v+=T(b,v,M,"fax");v+=T(b,v,M,"fax3lcc");v+=T(b,v,M,"faxext");v+=T(b,v,M,"ccnum");v+=T(b,v,M,"ccexp");v+=T(b,v,
M,"cccsc");v+=T(b,v,M,"username");v+=T(b,v,M,"address3");v+=T(b,v,M,"title");v+=T(b,v,M,"gender");v+=T(b,v,M,"driverlicensenum");v+=T(b,v,M,"taxid");v+=T(b,v,M,"pwprotect");M.pwprotect=M.pwprotect=="1";v+=T(b,v,M,"bankname");v+=T(b,v,M,"bankacctnum");v+=T(b,v,M,"bankroutingnum");v+=T(b,v,M,"timezone");v+=T(b,v,M,"county");v+=T(b,v,M,"ccstart");v+=T(b,v,M,"ccname");v+=T(b,v,M,"ccissuenum");v+=T(b,v,M,"notes");if(v<e+ea+8)v+=T(b,v,M,"lastname2");if(v<e+ea+8){v+=T(b,v,M,"mobileemail");v+=T(b,v,M,"firstname2");
v+=T(b,v,M,"firstname3");v+=T(b,v,M,"lastname3")}M.custom_fields=[];S=l.length;l.push(M)}}else if("IDNT"==E){if(o){v=e+8;F=[];v+=T(b,v,F,"iid");v+=T(b,v,F,"iname");v+=T(b,v,F,"aids");v+=T(b,v,F,"ffids");v+=T(b,v,F,"pw_prompt");F.pw_prompt=F.pw_prompt=="1";o.push(F)}}else if("PNDG"==E){if(t){v=e+8;E=[];v+=T(b,v,E,"id");v+=T(b,v,E,"fiid");v+=T(b,v,E,"sharerusername");v+=T(b,v,E,"sharedfromaid");v+=T(b,v,E,"sharemessage");v+=T(b,v,E,"sharekeyenchex");v+=T(b,v,E,"sharekeyenchexsig");v+=T(b,v,E,"sharename");
v+=T(b,v,E,"sharegroup");v+=T(b,v,E,"username");v+=T(b,v,E,"password");v+=T(b,v,E,"extra");v+=T(b,v,E,"shareautoaccept");E.shareafids={};var W=[];v+=T(b,v,W,"numafids");for(var da=0;da<W.numafids;da++){F=[];v+=T(b,v,F,"afid");v+=T(b,v,F,"value");E.shareafids[F.afid]=F.value}t.push(E)}}else if("SHAP"==E){if(C){v=e+8;E=[];for(v+=T(b,v,E,"aid");v<e+ea+8;){F=[];v+=T(b,v,F,"name");v+=T(b,v,F,"value");E[F.name]=F.value}C.push(E)}}else if("FFCF"==E){if(l){v=e+8;F=[];v+=T(b,v,F,"cfid");E=parseInt(M.cfid);
if(E>A.maxid)A.maxid=E;v+=T(b,v,F,"text");v+=T(b,v,F,"value");v+=T(b,v,F,"alttext");l[S].custom_fields.push(F)}}else if("EQDN"==E){if(n){v=e+8;F=[];v+=T(b,v,F,"edid");v+=T(b,v,F,"domain");F.domain=jb.hex2bin(F.domain);if(typeof n[F.edid]=="undefined")n[F.edid]=[];n[F.edid][n[F.edid].length]=F.domain;n[F.domain]=F.edid}}else if("URUL"==E){if(J){v=e+8;F=[];v+=T(b,v,F,"url");v+=T(b,v,F,"exacthost");if(v<e+ea+8)v+=T(b,v,F,"exactport");else F.exactport="0";F.url=jb.hex2bin(F.url);J.push(F)}}else if("GRPI"==
E){if(D){v=e+8;F=[];v+=T(b,v,F,"id");v+=T(b,v,F,"name",1);D.push(F)}}else if("NEVR"==E){if(p){v=e+8;F=[];v+=T(b,v,F,"type");v+=T(b,v,F,"url");F.url=jb.hex2bin(F.url);if(F.type=="0")p.neveraccounts.push(F.url);else if(F.type=="1")p.nevergenerates.push(F.url);else if(F.type=="2")p.neverformfills.push(F.url);else if(F.type=="3")p.neverautologins.push(F.url);else if(F.type=="10000")p.onlyaccounts.push(F.url);else if(F.type=="10001")p.onlygenerates.push(F.url);else if(F.type=="10002")p.onlyformfills.push(F.url);
else F.type=="10003"&&p.onlyautologins.push(F.url)}}else if("ACFL"==E||"ACOF"==E){if(q){v=e+8;F=[];F.otherfield="ACOF"==E;v+=T(b,v,F,"name");v+=T(b,v,F,"type");v+=T(b,v,F,"value");v+=T(b,v,F,"checked");F.checked=F.checked=="1";v+=T(b,v,F,"formname");if(v<e+ea+8){v+=T(b,v,F,"urid");E=parseInt(F.urid);if(E>A.maxid)A.maxid=E}if(v<e+ea+8)v+=T(b,v,F,"otherlogin");if(v<e+ea+8)v+=T(b,v,F,"url");g[L].save_all=F.otherfield&&g[L].username.length==0&&g[L].password.length==0;g[L].fields.push(F)}}else if(E=="PREM")pe=
b.substring(e+8,e+8+ea);else if("WOTE"==E)Wf=b.substring(e+8,e+8+ea);else if("ENCU"==E)u=b.substring(e+8,e+8+ea);else if("CBCU"==E)Qe=b.substring(e+8,e+8+ea)=="1";else if("MXID"==E){v=parseInt(b.substring(e+8,e+8+ea));if(v>A.maxid)A.maxid=v}else if("ENDM"==E)$=true;e+=ea+8;if(d!=-1&&z>=d){setTimeout(function(){th(b,c,d,e,f,g,h,j,l,o,n,p,q,r,u,t,C,A,J,D,B)},0);return}}if(f){z={};if(D)for(L=0;L<D.length;++L)z[D[L].id]=D[L].name;for(L=0;L<g.length;++L)if(typeof(g[L].groupid!="undefined")&&D&&D.length>
0){ea=g[L].groupid;if(typeof z[ea]!="undefined")g[L].group=z[ea]}else g[L].group=Gc(g[L].group,1);for(L=0;L<h.length;++L)if(typeof(h[L].groupid!="undefined")&&D&&D.length>0){ea=h[L].groupid;if(typeof z[ea]!="undefined")h[L].group=z[ea]}else h[L].group=Gc(h[L].group,1);return f(g,h,j,l,o,n,p,$,b,r,u,t,C,A,J,D,B)}}function T(b,c,d,e,f){var g=$h(b.substring(c,c+4));d[e]=b.substring(c+4,c+4+g);if(f)d[e]=Gc(d[e],1);return 4+g}function Gc(b,c){if(typeof b=="undefined"||0==b.length)return"";if(typeof xb!=
"undefined"&&uk!=xb){rg=[];uk=xb}if(typeof rg[b]=="undefined")rg[b]=sm(b,c);return rg[b]}function sm(b,c){if(0==b.length)return"";if(typeof xb!="string"||0==xb.length){if(typeof ischrome=="undefined"||ga){LP.lpalert_ex("No encryption key found, forcing logout!",void 0);window.location.href="../logout.php?nk_dec=1&mobile=1"}return""}try{var d,e;if(c?b[0]=="!"&&b.length%16==1&&b.length>32?true:false:b[0]=="!")if(typeof Sf=="function"&&Aa()&&typeof ba.decryptcbc=="function"){if(c)b="!"+xc(b.substring(1,
17))+"|"+xc(b.substring(17));return ba.decryptcbc(kd,b)}else{var f=jb.StringToKeyIv(xb,256);e=[];for(g=0;g<f.key.length;++g)e[g]=f.key[g];f=[];if(c){for(var g=1;g<17;++g)f[g-1]=b.charCodeAt(g);d=[];for(g=17;g<b.length;g++)d[g-17]=b.charCodeAt(g)}else{var h=b.indexOf("|");if(h!=-1){var j=wc(b.substring(1,h));for(g=0;g<16;++g)f[g]=j.charCodeAt(g);d=b.substring(h+1)}}return jb.Decrypt({key:e,iv:f,data:d,b64:!c,bits:256,mode:"cbc"})}if(typeof Sf=="function"&&Aa())return ba.decrypt(kd,c?xc(b):b);else{if(c){d=
[];for(g=0;g<b.length;g++)d[g]=b.charCodeAt(g);e=false}else{d=b;e=true}return jb.Decrypt({pass:xb,data:d,b64:e,mode:"ecb",bits:256})}}catch(l){return"ERROR: AES mobile bug 2"}}function $h(b){for(var c=0,d=0,e=3;e>=0;e--){var f=b.charCodeAt(e);c+=f<<d;d+=8}return c}function bh(b){var c=-1;if(b&&b.indexOf("LPAV")==0){c=$h(b.substring(4,8));c=b.substring(8,8+c)}return c}function uh(b,c,d){if(typeof b=="undefined"||0==b.length)return"";return tm(b,c,d?d:xb)}function tm(b,c,d){d=d?d:xb;if(0==b.length)return"";
if(typeof d!="string"||0==d.length)return"";try{if(Qe)if(typeof Sf=="function"&&Aa()&&typeof ba.encryptcbc=="function"){b=ba.encryptcbc(Ka(d),b);if(c){var e=b.indexOf("|");if(e!=-1)b="!"+wc(b.substring(1,e))+wc(b.substring(e+1))}return b}else{var f=jb.StringToKeyIv(d,256),g=[];for(j=0;j<f.key.length;++j)g[j]=f.key[j];var h=jb.CreateIV(16);b=jb.Encrypt({key:g,iv:h.arr,data:b,b64:!c,bits:256,mode:"cbc"});g="!";if(c){g+=h.str;for(var j=0;j<b.length;j++){var l=b[j];if(l<0)l+=256;g+=String.fromCharCode(l)}}else g+=
xc(h.str)+"|"+b;return g}f=b;if(typeof Sf=="function"&&Aa()){g=ba.encrypt(Ka(d),b);return c?wc(g):g}else{b=!c;g=jb.Encrypt({pass:d,data:f,b64:b,mode:"ecb",bits:256});if(b)return g;else{b="";for(j=0;j<g.length;j++){l=g[j];if(l<0)l+=256;b+=String.fromCharCode(l)}return b}}}catch(o){return"ERROR: AES mobile bug"}}function N(b){if(b==null)b="";if(typeof b=="number")b=""+b;for(var c=b.length,d="",e=1;e<=4;e++){d=String.fromCharCode(c%256)+d;c>>=8}return d+b}function uj(b){var c="";c+=N(b.aid);c+=N(uh(b.name,
true));c+=N(uh(b.group,true));c+=N(jb.bin2hex(b.url));c+=N(b.extra);c+=N(b.fav);c+=N(b.sharedfromaid);c+=N(b.username);c+=N(b.password);c+=N(b.pwprotect?"1":"0");c+=N(b.genpw?"1":"0");c+=N(b.sn?"1":"0");c+=N(b.last_touch);c+=N(b.autologin?"1":"0");c+=N(b.never_autofill?"1":"0");c+=N(b.realm_data);c+=N(b.fiid);c+=N(b.custom_js);if(typeof b.submit_id=="undefined")b.submit_id="";c+=N(b.submit_id);if(typeof b.captcha_id=="undefined")b.captcha_id="";c+=N(b.captcha_id);if(typeof b.urid=="undefined")b.urid=
"0";var d=parseInt(b.urid);if(d>Cb)Cb=d;c+=N(b.urid);if(typeof b.basic_auth=="undefined")b.basic_auth="0";c+=N(b.basic_auth);if(typeof b.method=="undefined")b.method="";c+=N(b.method);if(typeof b.action=="undefined")b.action="";c+=N(b.action);if(typeof b.groupid=="undefined")b.groupid="";c+=N(b.groupid);c="ACCT"+N(c);if(typeof b.fields!="undefined")for(var e=0;e<b.fields.length;e++){var f=b.fields[e],g=N(f.name);g+=N(f.type);g+=N(f.value);g+=N(f.checked?"1":"0");g+=N(f.formname);if(typeof f.urid==
"undefined")f.urid="0";d=parseInt(f.urid);if(d>Cb)Cb=d;g+=N(f.urid);if(typeof f.otherlogin=="undefined")f.otherlogin="0";g+=N(f.otherlogin);if(typeof f.url=="undefined")f.url="";g+=N(f.url);c+=(f.otherfield?"ACOF":"ACFL")+N(g)}return c}function vk(b){var c=new Date,d=new Date(c.getFullYear(),0,1,0,0,0,0);c=new Date(c.getFullYear(),6,1,0,0,0,0);var e=d.toGMTString(),f=new Date(e.substring(0,e.lastIndexOf(" ")-1));e=c.toGMTString();e=new Date(e.substring(0,e.lastIndexOf(" ")-1));d=(d-f)/36E5;c=(c-e)/
36E5;if(d==c)c="0";else{if(d-c>=0)d=c;c="1"}if(b==null)for(b=0;b<document.getElementById("timezone").options.length;b++)if(document.getElementById("timezone").options[b].value==wk(d)+","+c){document.getElementById("timezone").selectedIndex=b;break}return wk(d)+","+c}function wk(b){var c=parseInt(b);b-=parseInt(b);b*=60;var d=parseInt(b);b-=parseInt(b);b*=60;parseInt(b);b=c<10&&c>0?"+0"+c:"+"+c;b=c==0?"0"+c:b;b=c<0&&c>-10?"-0"+Math.abs(c):b;d=d<10?"0"+d:d;return b+":"+d}function ai(){this.j=this.i=
0;this.S=[]}function sg(){var b=(new Date).getTime();Ac[Nb++]^=b&255;Ac[Nb++]^=b>>8&255;Ac[Nb++]^=b>>16&255;Ac[Nb++]^=b>>24&255;if(Nb>=bi)Nb-=bi}function xk(b){var c;for(c=0;c<b.length;++c){var d=b,e=c,f;if(tg==null){sg();tg=new ai;tg.init(Ac);for(Nb=0;Nb<Ac.length;++Nb)Ac[Nb]=0;Nb=0}f=tg.next();d[e]=f}}function wd(b,c){var d=c-b+1;sg();for(var e=[],f=0;f<4;f++)e[f]=0;xk(e);var g=0;for(f=0;f<4;f++){g*=256;g+=e[f]}g%=d;g+=b;return g}var Fg="webrootaso",ni="webrootwebsitelogin",Ok="/sso/webroot/",Pk=
"/webroot/",Qk="webrootaso.html",Rk="webrootaso2.html";(new Date).getTime();this.lpgenpwlist=[];if(typeof Components!="undefined"){this.lpis_mac="Darwin"==Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).OS;this.lpis_win="WINNT"==Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).OS;this.lpis_linux="Linux"==Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).OS;
this.lpmainprefs=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);this.lpprefs=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("extensions.lastpass.")}this.lphelpstats=null;this.lpbuilt="Unknown";this.lp_basehost="lastpass.com";this.lp_base="https://"+this.lp_basehost+"/";this.last_dialog_close=this.lpcurrcontextmenusite=0;this.lpacctsreq=null;this.LANGS=[["Default",""],["Afrikaans",
"af-ZA"],["Arabic","ar-SA"],["Arabic (Egypt)","ar-EG"],["Azerbaijani","az-AZ"],["Bulgarian","bg-BG"],["Catalan","ca-ES"],["Chinese (Simplified)","zh-CN"],["Chinese (Traditional)","zh-TW"],["Croatian","hr-HR"],["Czech","cs-CZ"],["Danish","da-DK"],["Dutch","nl-NL"],["English","en-US"],["English (United Kingdom)","en-GB"],["Estonian","et-EE"],["Finnish","fi-FI"],["French","fr-FR"],["French (Canada)","fr-CA"],["German","de-DE"],["Greek","el-GR"],["Hebrew","he-IL"],["Hungarian","hu-HU"],["Icelandic","is-IS"],
["Indonesian","id-ID"],["Italian","it-IT"],["Japanese","ja-JP"],["Korean","ko-KR"],["Latvian","lv-LV"],["Lithuanian","lt-LT"],["Malay","ms-MY"],["Norwegian","nb-NO"],["Norwegian Nyorsk","nn-NO"],["Persian","fa-IR"],["Polish","pl-PL"],["Portuguese","pt-PT"],["Portuguese (Brazilian)","pt-BR"],["Romanian","ro-RO"],["Russian","ru-RU"],["Serbian","sr-RS"],["Slovak","sk-SK"],["Slovenian","sl-SI"],["Spanish","es-ES"],["Spanish (Mexico)","es-MX"],["Swedish","sv-SE"],["Thai","th-TH"],["Turkish","tr-TR"],["Ukrainian",
"uk-UA"],["Vietnamese","vi-VN"]];var Wb="1.70.0",ga=false,ve=false,vd=false,na="",Od="",xb="",kd="",Xf="",Th="",Wc=null,Xc=null,ae=false,Lg=false,y=[],qa=[],id=0,sa=[],Nd=[],Fc=[],Jb=[],Pb=[],tc=[],uc=[],pc=[],Yc=[],fd=[],gd=[],Zc=[],wa=[],Ja=[],od=[],bc=[],bb=[],fe=null,Za=[],fl=0,Uc=null,Gd=null,uf=null,Ge=[],pg=false,ed=null,Vg=false,$b=false,Z="",ia="",Zd="",rd="",xd=[],Md=[],Xa=-1,rb=-1,Bi=false,qf="",Be="",kj=false,ba=null,kf=null,ug=0,yk=null,ci=0,lf=null,Uh=0,Uf=[],qc=[],Ng=[],xf=[],yf=[],
qd=[],fa=[],La=[],Vd=[],ge=false,Pc=[],kh=null,vg=null,Dc=false,jd=false,ie=false,je=false,Ld=false,ch=false,Jf=true,Ha=[],ad=[],pe=0,Ec=false,Kf=false,Lf=false,pj=true,de=0,we="",wh=false,Gb=[],lc=[],Kj=0,Yf=[],Tc=[],Lj=0,Id=[],Ej={},Tf=false,Ib=null;if(typeof rh=="function")Ib=rh();var fb=null,Wh=false,Df=0,di=true,Fi=false,Ee,Hd,yi,Cf,Yi,Fh,Qg,zi,Rh,Ci,ui,mf,ei,dh,Xi,zk,wg,fh,gh,Re,Sh,hh,yc=false,ne=false,Cc=false,Nf=false,Ad=false,zd=false,xg=false,Pd=false,Al=false,Wg=false,lk=false,Jh=false,
Yd=[],vl=cb(),Q=null,s=null,Y=null,O=null,$g=null,Ak=0,Zg=null,$l=-1,jb=typeof jb=="undefined"?null:jb,xa=false,ac=false,zc=0,ec=null;this.DISABLE_HKS=this.HIDE_SEARCH_HK=this.HIDE_HOME_HK=0;this.lpdohelptranslate=this.lpdolostpwotp=this.lpdopoll=true;this.NO_LOGIN_NOTIFICATION_UNTIL_LOGIN=0;this.althelpurl="";this.HIDE_SHARE=false;this.islastpass=true;this.LPISLOC=xa;this.LPISUPEK=ac;var nc={Generic:{"":"textarea"},"Bank Account":{"Bank Name":"text","Account Type":"text","Account Number":"text",
"Routing Number":"text","SWIFT Code":"text","IBAN Number":"text",Pin:"text","Branch Address":"text","Branch Phone":"text",Notes:"textarea"},"Credit Card":{"Name on Card":"text",Type:"text",Number:"text","Security Code":"text","Start Date":"datemoyr","Expiration Date":"datemoyr",Notes:"textarea"},Database:{Type:"text",Hostname:"text",Port:"text",Database:"text",Username:"text",Password:"text",SID:"text",Alias:"text",Notes:"textarea"},"Driver's License":{Number:"text","Expiration Date":"date","License Class":"text",
Name:"text",Address:"text",State:"text",Country:"text","Date of Birth":"date",Sex:"text",Height:"text",Notes:"textarea"},"Email Account":{Username:"text",Password:"text",Server:"text",Port:"text",Type:"text","SMTP Server":"text","SMTP Port":"text",Notes:"textarea"},"Instant Messenger":{Type:"text",Username:"text",Password:"text",Server:"text",Port:"text",Notes:"textarea"},Membership:{Organization:"text","Membership Number":"text","Member Name":"text","Start Date":"date","Expiration Date":"date",Website:"text",
Telephone:"text",Password:"text",Notes:"textarea"},Passport:{Type:"text",Name:"text",Country:"text",Number:"text",Sex:"text",Nationality:"text","Issuing Authority":"text","Date of Birth":"date","Issued Date":"date","Expiration Date":"date",Notes:"textarea"},Server:{Hostname:"text",Username:"text",Password:"text",Notes:"textarea"},"Social Security":{Name:"text",Number:"text",Notes:"textarea"},"Software License":{"License Key":"text",Version:"text",Publisher:"text","Support Email":"text",Website:"text",
Price:"text","Purchase Date":"date","Order Number":"text","Number of Licenses":"text","Order Total":"text",Notes:"textarea"}},Gf={"Bank Account":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAZ9JREFUeNrEk80rRFEYxp8z95q5mSHfJiU2StNEmZooFlPWNixINlYiEhsLSVI2KCmFRiILkYX8BRaKlXxslJTyGV3DYq7mfDjnjO8FaRZOnfu85733ffs97+kSIQRSWS6kuFJuQCKRiFA2OOf4rL/l3mJTBYvrC6CM6o5KmWDggssPksreVRbLzQTVxZ1NPTBVQFkCrX0tsLIseHxueNLdMD0GXKYBwbg0SuDEHBhpBuKPDqhDMdQ1/EEgQOAPFKC6ohqVJSEEi4OIPccwGB1ARr4PHfXdyLQyNeHx9QGiy9EkjazVBJxT5JRmo7GmGe1jbfAX+VFVFoKv0IdAYRCndyeYWZpBoLYcEw3TWMlakZZYsoF6UOnRPrdxFbvAZM8UHpwHHF7uw96zsXe7izpvHcb7JpHrzcPO2TbidlwSfBqiGtDl4Q1G70eQiCfgPD1rdXs9MNwurB6tYTN7C1aGBeKShgmRttlXC3Nj86Bq+vzbtGVzRajzr+/1jTCuYxIOh8VP9/xbzlQ40Y1ZffgLgdLepv7UCci//40vAgwAaCyazZH/mHYAAAAASUVORK5CYII=",
"Credit Card":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAStJREFUeNrEUzFOwzAUfW4dqQ0VUceKoQMMZciC0s5hZOYYmXKBnCURR2DhBIz0BkgsjZQgFRCNhCLysZ3aJEArQQa+FP3/bf+n954dRkToEqwrAE+ShOI4RlVVkGD6a/a79sIwBHzfp7+G67rEJZrScnoFDA8AKYk1OEqF7Es9sEG3F4oJNx6czMBt++dBVdC3Ws4aALqeq/xYAG8D4GFdk7H6wLvIXOS50zawBaBj9QqkOVCW9VCvXwPJPhX1ZPR5VkroaQ90TJ2tTMHCFpZYohkJZeNDIC/2Mbg/AooMDmM4x9gcemZncF7uYGGNUq7nQttG0FlQGyBdrrAptG9Zw8cbPBnrMmPj8WLLQEuYXP7+RaprDIIAnuftfXG79qIo6v4v/D/AhwADANLdDGCUdcgBAAAAAElFTkSuQmCC",
Database:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWVJREFUeNqUksFKw0AQhmdLzcGCPTRe+gapB8lFkF4MCHoQvCkI+pA+hS32bJNDBKHQmDZQk01CNmT9J60RpGgdSMjOfP8/s7sRjuPobVFV1dZ8G89kMhF1tFot8RVbv3u9Hgssy9qFRgRBwALXdXehEd1ulwWDwWAXGjGbzTYd/qSxzLLMNE0xHA6J6Hc6z/PRaOQkt2/Hz9zB87yGwLb6/f4P7/l8DvqjTPlYcd7NHnzfv1QPsGk0oMfj8Vl8A3oqw8Oq+t4DvEGjgGUcx8jgjblBr5ScpmGkUnN9cYZhoHBR3IN+Sd7P87sn8xHeJ8EVZGyRLiIlSaWbmz56dQSJVSmnSRiVEsTp4honwUOTduViWSRUpqQkzFkQlxnKGJFt6lmtjtBErgyRX9ZJ0FSgwx4LQOAN73UhUvsYDGiEJUJtaFKJ1gcs4I6C6hQKktqdSPPVMEq6oUllgIVt2//6vT8FGAC3BG3hw3ENjQAAAABJRU5ErkJggg==",
"Driver's License":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWFJREFUeNpi/P//PwMlgJFiA6zd/X4DaRYy9f8BaWTu7+xgEBESIEnng8fPGWqbGplBBjDy8XAxyEgIMBw8fJBBU0ObQVpKFlXxgwcMCgoKKGJPnr0A+wDs9N+/fjHcvH6doa40m8HM3IqhZ9JcBhYWNobGxkaGDx8+gDX09/ejGPD9+3cwDTbgJ9AAGXFRhgR3OwZhWSUGZhZIkNjb2zMICAgwXLhwAcML35AN+P37FwOXgASDmLImw68v3xluPfrIoC4nyODg4ABWZGBgwLBgwQIwDfJOQEAAqgt+/frNMHnuAQatF18YVD89Y5g5ZztDX1MUQ2FhIYqtDx8+ZNDX12cwNDRkyC2pQjbgJ8ONW/cY7IFJQgUYqSxvHoMl4+PjUQwAeQeEQeHy9fs3iCAwHfzfsnPPf1JB18Rp/0F6QS74f/b8Rca/f/6SlA5u370Hov5TnBIZBz4zUWoAQIABAANEuylMPpz5AAAAAElFTkSuQmCC",
"Email Account":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAhRJREFUeNrEU71uE0EYnF2vz3fG55/YsQPGDrEUaJGggIaH4AHgCSgp8hpU1EgU0CGBhKAgEhQoCiCQkFKkCWdh+fA5ic355/Zul+/WJgJaF6w02u9W+83N7swyrTVWGRwrDnbn/kPZ3r4qRjKLcJ5AkSAFjYQKReoSglKLb4NEQ+s5wqCLoy8fY3Fps5PZuXsdUQzYuczf7P/WbDFP5zHCqcTtnTDDE3uDSWJ9/KYHbxCRCo2jQMEbKnRPFHqnCv5YYxBqyAToBhEePO/hlAjq29cYDyOFXJajeb6IVx98nPyUaBQZsiTGyjBYIgVQdhiCUYSn7/oorxVRLedIDgOfzGIjsbNRwMVGES/3fRyPJWoFbhotIirZDMNx2uyjVi2i0yyALc3j4SwxhaCNnQsFrFfyeLLrmYa00SUEVD967aFUyps9jvjDxnC6UEBqEMsYtlBoN8t4seejO5gZPHvvo0VrrpWA69go+32zYkLWpWoisqE/HKPVcGFZWfSGNt4ejExQLrcqaFQdhLMIvcEYtYoLkz/NUgJp/PUDal534dhZpIxb9TzahNQ2tsyGyFsQdRfff4wwLTu0mEAcf/usp7Ob7ErThpvnYDwxf02PxBg7ywA7C4NAq3QOh94Q/cNPmm3duifdzRvCqaxB5AQE3SYn+zLEwjnZJJYEy1Qx0i7nE4z6HvoHX2P23x/TygS/BBgAbjbqksNysxwAAAAASUVORK5CYII=",
"Instant Messenger":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAmZJREFUeNqEUs9LFGEYfmZ/zI6z07pprZvoEmGxbdGKUBcNJbrlyUN2DCQQEf+AiIjoULe6hEFBh6ig/gDD2KxDbEblhkRUWsg2acW2jruzuzPffF/vrB50R/CDF2bgfX687/NKQgg0vsFrH8+nEtGReFRNW4xj/sdyLjP77Z7+eOh+Y29gO/Cp7vbr/alwmxr0wyGB3sPhPk1RDwYGJsFmRreQ+BoJkqTsgptVPyo2h2lxROh7qDfe1p06MLKjg1hESSukbJgctgMwR8CscWiKhMT+jvSOBFULcAhkMyouiAD18pHXapV59uUZYe6LniuYNkKyhJotUKVSQxJWVhlmXs/ndiTIZD9P351aqhoVjorlloMSjXDjYY5VZrPvG/ulzTH2TGSH+47FrpzolJKcPP8yAmAUYzRkIsAtPMquFl4+eHVL6BevenZwdDSTHuhJXB4+2ZZs1QIoWwIpvr6LcrUZcpBjYl+sJb9cmpB8Y28Ev/1sywgtEXX8zPFYajdF9segrdWNSSAOWESyoNcQonQuDHa1InnokmcHXe0t/c1hH34XbQILAlK5KfD1byEkfF0y0d6qIBiLH/EQaJrSKUs+5FcqdVXHjW9jBEbpcQ4Yawyy3w9ZUXd5dmBZTKLEKG8JzoYyI3CNrtEmNHfHcYtEXDKPg8W88XNBN6E1SfV/h7osh9cJ3EOi8ZHYG8SH72VUCsU1D8F0Jj8+Orl4Z+ptAYLUg+SkSQbCdEQy+XT38OTFCm4+zRt4N3d62ztwX8e558vxWJTtichhulxNL5jQ/1qlct74h5JZFJ/O9mzu/y/AAFelNJcRkA54AAAAAElFTkSuQmCC",
Membership:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAw1JREFUeNqMkltIFFEcxr8zl92ZVXdXnW0rNXXTNqXIypJSiYiEAqunbnSBqLC3opQKeohuEBVlmEq9WPiQXYhAHypLDAtUuhiVBUUulpfdNlnH3XXncjpLhFsP0Qf/OcPMOb//d853eKsICPxUcQRwyOydjUkWwM7+O9hY5hEdVSvT9W/BGC3PsyA0YSA7VQSXn8FmJ4jjAHXyF+xHBFCclnUby9y9u9bnffDkKHclK1/yx4LXVxZhXo6MuJPEiqt4lvVkx2Gvpt6qoPRpJaUdm1ltpVtLkp9lpBDMczMHgQkNzTUFSHRimKyzDWVH12QfKi1WhKhp4mzt8+5T51ofD3S+QXPT3mUiTzb9csw2mwgxKHPAvhW6LZsX5Hutgmcu0jdcREFe5iKPJ2PV+Qdv2+jLzzi+xdNksrmcGuWQCCnMkjHdzkGNxoKZWQ5QUYPxqg6VNccE3jRig6p0Br7XWFyUYXk3qslcSBOQCLleXYDiXJmfPSN50JJpA0mWQIzvMPofYuORPeKOpY5Okm5HV89wJFWAnSOERZIA+R7WsH9b/or5BanVIcsngDfAKQo4KQLz6yds2LeWvAiA9vX5Gm08RgQQESxyBmEPosPKGyWabjRUrU7LsxkaaHQEJJgCoikgwz70vhkwT7R8fMTirq+cL0GgdBKEWFkBwTAqZtjJpVzFzHeRMNpv+CjncdMDF7607yhKWhxQOa31/dhpl2TeVJzyiH/ShIBJlR07EDUsS9JS+NqFuYZX4cfQ3ROiFzsm2tvq+vewVL/c4XX0fdVdYQP+IjeHpKgGWRIZQDMQ0caXuFypTeVeh9dpDuPm/SHt8qPxlu5B/SBbPBLP+5lPB9uz3yYA7/wmTKphlpPd2PGoUTLdTq4vz4rNcUb86OweovVP1JauAX0b/hLrjmQGENh17w8wNNjBbS+1nw00FlLzaja9sTMtmunkd0sCPPiH4pB4SQwkjI7pYW00iDtvQ2ZDV+z2NJleGxzDP6XqU06Q4yRyaY54r9DFnf7duXgmh/9RHPJTgAEAkc04zw0/bxUAAAAASUVORK5CYII=",
Passport:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAZBJREFUeNqUk7FO21AUhj9fO44dJyEohCJEpA6tSuEJWBh4gI59xqpDp47MlVi60A5AWyBNUkJiHGwnTuzU7qnaDCStHK5k+epY//f/PkdHZVnG7+exZ64zFusr6rX5ZRHA6zc9nm9Z1NcKrDsGVUthmxqGSCZxxqvmQ8kSwNZiNu0izapGw1FUBGDpfzy7/4iyBPD9EUZq87RsU7PFWcS22E9SmCZpPiDwAr7dlBhMMl5ul3nRMDkdpugKvOkyQC0Wxq6H5wbUxf3wmUVzXbG7oRPEKYPRbAXAD5dBb0i1rPDla19qiQm3QUK3H+X/Qtju4DsmRWeP279DTeV9H0a0v7r5gGh4xfiuzPu3nzg42qdWK3F17XFy0mIarpBg7LeI/Bo3lyWO34X8TGUMukEiDXS7vfweJMF3Ru41TmFGQ9yL6YSdjQomY8L+l/wEYkU47HF/1yYa+VTqT+i0zrg8v5B03XxANoulazGfP35Aydh1y0FTBYmqiKfB8lLMN1HTtEct01xn/G/LVj2/BBgAErims0BRkyAAAAAASUVORK5CYII=",
Server:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAeRJREFUeNqck7tPIlEUxj8GxkgGRXSNRmQ7LLXQ2Pja2KiNJYmlMZFy/4UNDYmJQkIFyVYW2lkZYqO2PkqzCUt8FEYDKqhIYBjm3j13dhYHGC32ZE7OvZNzf+c79+HgnCOTyXDGGITrum54vV5vRKtrmtaIoVDI4QKZSBwaGsbz6ytAQPz9jDE3Am+MRfT5epBO74sZGoDnlxesb/+C6u3GZ+a5u8fW6hhqtdo7QEgSeE1RsDwzAo8s2S4+uCmhmsuDMw5VVd8Boh9DJllVB7597bIFpK9LMLtoViAAzEzKlWu4eHizBVR1BqGNcdYOoGMwfjyqHL9L3Bag6hxuoYDZAGC2cFvWye0VaFTDbShoaUFMJKeEzmIRmrk5dtZBLlExp8vZDuiQXdhcCdKRcsiyjHwuB8XTbWxusfiIwYFBVCoVyu6hfWBtgK3j46M5yy3rJT/0+/1rYp7NZn9SnKd/Bcut3BNrHf+Oz2qxWOw7JSxPTc/Oe70+7O5sV2j+IxqNbrTmNgESiUQ/VckHgyPo7fsCve6ARtUUxY2rywxOT0/K8XjcYwW4mo5JVScCgQCWlhYNmQIuXJIkTIyPolB4UsLh8EIymTywVSAsEomck4rx1ldovsyzVCo1+WEL/2N/BBgAUvhXraPcU94AAAAASUVORK5CYII=",
"Social Security":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAsRJREFUeNqMkV1IFFEUx/93ZnbH3dkdcf1qjY3NyDZaP0pRwxVS+0AKJMwsgswIQ6HyIXoIevOpXnwoQgpCQyqKSqIgk740ssS11ChzFdfSzI9s1N2dnZ2daVfQ0ES63Ptw7zn3xzm/Q1RVxWrrQsna8tICrjaK9/JSQCu/6iIND9pR2dQ+IIXjzGqfq/daCqoPs9e19BwVvrNakdmdheOSrJ8Nh8Nv1GqAlFh/kZaLpohpH6ISz4KwiQBhkGNH2ULOqgC/RwpQiTXgjFuhiYiB0XwEqq0OE5P87/8CtHj39E33NqvEEAeKNYLiE0ALLrT2RzoXcpY4OJmfVJ5qtdQGZZVnaEqON45/bOmJlUt0bzUCw4MhMgZGp3GPndA9OpfMvb/Y4yELUzjm2FiQmWRtDkjBJVXxGSnw6GPhDfjhFUVsK0xF7/ggbr9orKc9atUioPZQehtnWpcTEx8NW5IZXZ19mBr/Ba2egK3MhqgE4FMlSCDYwG3Bmy8f8O5p+9XFFjQQfuQdLEWcdhp6joPFmgBBZ0Xr3UsYU2RIqgJJUSHCD6fQCWHUi8Zkc+Viuc9n058FRjr+ETasi4aGkNChYKC1iKMNCEwQ+P0SIjTKX4kPf+ZE539yycXLhN3stiJ7/TcwTBDhboNyEF/dI0NZw7vqxe19/fMAynHnxP4djvP2M6c1N17fh0+QIM75sSm7FIXyFC5faauntELV3MsK7/JR0w0d5pKdyTF1ZRW5XIePYEi/GVMGO6a4NAyOMbDbePAKnTYz4jSdOpr7eDmAdNdkyJKtjL5FH8Ckbg0gqpB9gOQPCfOFFMkKSgxP4PBdw/rKJrIcQBmN3PhQ3yBGu9xgQ/kUS0DrCCJMFCItgN7jhqu3d17YSouRTLZiveDOG/zsygzO0EVGng0XBihKaMv47nQNOewD9SJj7F8J8EeAAQA3uBp3kqy2LQAAAABJRU5ErkJggg==",
"Software License":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAhVJREFUeNqUk8+LEmEYx78zBeHYjgs5tQqha7aoeBEPbqCICF482bZnPQV78tJRPHj24t2/oLMXQW9K0iGCxE5KhqUUkzmwY4Y5zfPQiGu7h33gnYH3fb+f5+crGIaBXWu320an08FiscB0OoXL5YLD4UA8Hkc6nRawZ4IFGI/HRq1WY1EkEoGiKAgGg5jNZlBVFa1Wi2HFYhEej0e4AiBxpVJBOBxGIBBgsd/vhyAI0DSNAcvlEv1+H71eD+VyeQsR6UOevV4vMpkMnE4nC/cXAXO5HJLJJN+3TKScKexQKMReJEnCZrPBaDRiIXm3IJRONBrlNEnHACpYEi9gt9v58mq1Ysiud7fbva0FrXHhNUhHdpeqfSLL0N/5oNnuQQx/ZNF8PkepVEI2m+Vi0t5xtIQ3+i8onxXuEgMoHOlIwn0TIpiA9z8jODiV0bh4jkajgUKhgIs/X4Cnb6HaPHDaVCj6ktNgALVGv9RxYHo4dNjx5LGM0ztfYTs/Z3EsFsO3szM8vKzjgfHdlJgdMQGkYwANiTb9gZNDCUfPZhzqer3mYuXzeQwGA2ozxOOXEBYCHsmv8PvTBx4ungNzQIx6vY5qtYpEIoHbmkjjSeF0u13eoPbt/6113TkPEo1ns9m80ctkMoHP57v27MpbSKVSWzIJqB7D4fA/Md2x9kRrc/eB0CFdsuC7KdwYwT+hcdsi/hVgAOhOBp0jnqqCAAAAAElFTkSuQmCC"};
this.wrappedJSObject=this;this.QueryInterface=function(b){if(!b.equals(nsILastPass)&&!b.equals(nsISupports))throw Components.results.NS_ERROR_NO_INTERFACE;return this};this.en=function(b){return encodeURIComponent(b)};var Jk=Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService).createBundle("chrome://lastpass/locale/lang.properties"),Pe=false;try{Pe=Components.classes["@mozilla.org/privatebrowsing;1"].getService(Components.interfaces.nsIPrivateBrowsingService)}catch(vm){}Aa();
this.lpgs=function(b,c,d,e){return Hb(b,c,d,e)};var mi=[],eb="chrome://lastpass/";this.getBrowser=function(){if(LP.isFennec)return LP.fennecBrowser.selectedBrowser;var b=LP.lpGetCurrentWindow();if(null!=b&&typeof b.getBrowser=="function")return b.getBrowser();b=LP.mostRecent();if(null!=b&&typeof b.getBrowser=="function")return b.getBrowser();for(var c=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");c.hasMoreElements();){b=
c.getNext();if(null!=b&&typeof b.getBrowser=="function")return b.getBrowser();if(b&&b.document&&typeof b.document.getElementsByTagName=="function"){b=b.document.getElementsByTagName("browser");for(var d=0;d<b.length;d++)if(b[d].contentWindow.location.href!="about:blank")return b[d];if(b.length>0)return b[b.length-1]}}};this.lpUnload=function(b,c){try{for(var d=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator(""),e=0;d.hasMoreElements();){var f=
d.getNext();if(typeof f.getBrowser=="function"){var g=f.getBrowser();if(null!=g)if(g.browsers){e++;break}}}if(e==0){for(var h in Gb)if(typeof Gb[h]!="undefined"&&Gb[h]!=null){Gb[h].close();Gb[h]=null}Gb=[]}var j=b.document.getElementById("appcontent");j||(j=window.document.getElementById("browser_content"));if(j){j.removeEventListener("DOMContentLoaded",LP.lponcontentloaded,false);j.removeEventListener("pageshow",LP.lploadpage,false);j.removeEventListener("submit",LP.lpsubmitafter,false);j.removeEventListener("lpformsubmit",
LP.lpformsubmit,false,true);j.removeEventListener("change",LP.lpfieldchange,false);typeof b.getBrowser=="function"&&b.getBrowser().tabContainer.removeEventListener("TabSelect",LP.lptabselect,false)}b.removeEventListener("load",LP.lpToolbarInit,false);b.removeEventListener("unload",LP.lpUnload,false);c.documentElement.removeEventListener("DOMNodeInserted",ri,false)}catch(l){}};this.lptabselect=function(){if(LP.isFennec)LP.lpRebuildToolsMenu_all(true);else{var b;try{b=LP.getBrowser().selectedTab.linkedBrowser}catch(c){return}LP.lpgetcurrenturl(b);
LP.mostRecent().setTimeout("LP.lpRebuildToolsMenu_all(true)",0);var d=b.contentDocument;if(typeof LP.getBrowser().getNotificationBox=="function")if(typeof d.LPlpshowednote!="undefined"&&1==d.LPlpshowednote)LP.getBrowser().getNotificationBox(b).allNotifications.length==0?LP.mostRecent().setTimeout(function(){pd(b,b.contentDocument)},0):LP.mostRecent().setTimeout(function(){LP.getBrowser().getNotificationBox(b).allNotifications.length==0&&pd(b,b.contentDocument)},500)}};this.lp_getFFVersion=function(){var b=
Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("extensions."),c=null;if(b.prefHasUserValue("lastAppVersion"))c=b.getCharPref("lastAppVersion");else try{if(b=Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("general.useragent.")){var d=b.getCharPref("extra.firefox").match(/\/([0-9.]+)$/);if(d)c=d[1]}}catch(e){}return c};this.GotoURL=function(b){if(b!=0){b=y[b];b!=
null&&Zb(b.url)}};this.lpOpenEditWindow=function(b,c,d,e,f,g,h){if(ga){if(b!=0)for(var j in Gb)if(typeof Gb[j]!="undefined"&&Gb[j]!=null)if(typeof Gb[j].aid!="undefined"&&Gb[j].aid==b){Gb[j].focus();return}if(typeof e=="undefined"||e==null)e=LP.lpGetCurrentWindow();if(b!=0){g=y[b];if(g==null)g=qa[b];if(g.sn&&ie||!g.sn&&jd||g.pwprotect)if(!LP.securityPrompt(e))return}g=false;if(b!=0||c||d)g=true;else if(f)e.openDialog(eb+"content/siteinfo.xul","_blank","resizable=yes,chrome,titlebar,toolbar,centerscreen",
0,0,0,"","",e.getBrowser(),null,h);else{f=false;j=h="";var l=e.getBrowser().contentDocument,o=false;if(typeof l!="undefined"){l=l.getElementsByTagName("form");for(var n=0;n<l.length;n++){f=true;for(var p=l[n].elements,q=0;q<p.length;q++){var r=p[q];if(("email"==r.type||"text"==r.type)&&r.value.length&&!h.length)h=r.value;else if("password"==r.type&&r.value.length&&!j.length)j=r.value;else if(("text"==r.type||"email"==r.type||"password"==r.type)&&r.value.length)o=true}if(h.length&&j.length&&o)break}}if(h.length&&
!j.length){h="";o=true}l=false;if(o)if(LP.lpConfirmYesNo(LP.lpgs("We've detected populated fields on this page.  Would you like to save all fields on this page?"))){e.openDialog(eb+"content/siteinfo.xul","_blank","resizable=yes,chrome,titlebar,toolbar,centerscreen",0,0,0,"","",e.getBrowser());l=true}if(!l)if(f&&j.length)e.openDialog(eb+"content/siteinfo.xul","_blank","resizable=yes,chrome,titlebar,toolbar,centerscreen",0,0,0,h,j);else if(LP.lpConfirmYesNo(LP.lpgs("ManuallyAddSite")))g=true}if(g){c=
e.openDialog(eb+"content/siteinfo.xul","_blank","resizable=yes,chrome,titlebar,toolbar,centerscreen",b,c,d);c.aid=b;Gb.push(c)}}else this.lpOpenLogin()};this.lpOpenGenPWWindow=function(b){if(typeof b=="undefined"){var c=LP.getBrowser(),d=be(c,c.contentDocument,true);if(d){b={};b.browser=c;b.extra=d}}LP.lpGetCurrentWindow().openDialog(eb+"content/genpw.xul","_blank","chrome,titlebar,toolbar,centerscreen,modal",b)};this.mostRecent=function(){var b=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow("navigator:browser");
if(b)return b;return vg};this.lpSetCurrentWindow=function(b){vg=b};this.lpGetCurrentWindow=function(){return LP.gecko_version()<"1.9.2"&&vg?vg:LP.mostRecent()};this.lpCopyUsername=function(b){b=Kb(y[b],0);LP.lpCopyStringToClipboard(b)||LP.lpalert_ex(LP.lpgs("ErrorCopyingToClipboard"))};this.numsites=function(){return id};this.lpCopyPassword=function(b){if(y[b].sharedfromaid!=null&&y[b].sharedfromaid!=""&&y[b].sharedfromaid!="0")LP.lpalert_ex(LP.lpgs("This is a shared site. You are not permitted to view the password."));
else{if(je||y[b].pwprotect)if(!LP.securityPrompt())return;b=Kb(y[b],1);LP.lpCopyStringToClipboard(b)||LP.lpalert_ex(LP.lpgs("ErrorCopyingToClipboard"))}};this.lpCloseMenus=function(b){b.getElementById("lpt_lastpass-accts")&&typeof b.getElementById("lpt_lastpass-accts").hidePopup=="function"&&b.getElementById("lpt_lastpass-accts").hidePopup();b.getElementById("lpt_lastpass-securenotes")&&typeof b.getElementById("lpt_lastpass-securenotes").hidePopup=="function"&&b.getElementById("lpt_lastpass-securenotes").hidePopup();
b.getElementById("lpt_lp-tools-menu")&&typeof b.getElementById("lpt_lp-tools-menu").hidePopup=="function"&&b.getElementById("lpt_lp-tools-menu").hidePopup();b.getElementById("lpt_status-bar-menu")&&typeof b.getElementById("lpt_status-bar-menu").hidePopup=="function"&&b.getElementById("lpt_status-bar-menu").hidePopup();b.getElementById("lpt_lastpass-compact-menu")&&typeof b.getElementById("lpt_lastpass-compact-menu").hidePopup=="function"&&b.getElementById("lpt_lastpass-compact-menu").hidePopup()};
this.log=function(){};this.lpfieldchange=function(b){b=b?b.target:this;if(b.form){fe=b.form;if(ka(b)!=""&&("email"==b.type||"text"==b.type||"password"==b.type)){for(var c=false,d=0;d<Za.length;d++)if(Za[d].formname==ka(fe)&&Za[d].name==ka(b)){Za[d].value=b.value;c=true;break}if(!c){c=new Lc;c.name=ka(b);c.type=b.type;c.value=b.value;c.formname=ka(fe);Za[Za.length]=c}}}};this.lpgetcurrenturl=function(b){try{b||(b=typeof getBrowser=="function"?getBrowser():LP.getBrowser());return b.contentWindow.location.href}catch(c){}return null};
this.lpgetcurrenttitle=function(b){try{b||(b=getBrowser());return b.contentDocument.title}catch(c){U("Error getting current title: "+c+" ln: "+c.lineNumber)}return null};var fi=0,yg="";this.StartProf=function(){fi++;return(new Date).getTime()};this.EndProf=function(b,c,d,e){e||fi--;b=b+(d?" ("+d.location.href+")":"")+": "+((new Date).getTime()-c);for(c=0;c<fi;c++)b="  "+b;yg+=b+"\n"};this.lponcontentloaded=function(b){var c=false;try{fe=null;Za=[];var d=b.originalTarget;if(!qi(d)){d._LP_STATE="contentloaded";
var e=mb(d);!e&&LP.isFennec&&LP.lpRebuildToolsMenu_all(true);if(!e)return null;if((c=e.contentDocument==d?true:false)||typeof e.contentDocument.framecountcontentloaded=="undefined")e.contentDocument.framecountcontentloaded=0;else{e.contentDocument.framecountcontentloaded++;if(e.contentDocument.framecountcontentloaded>25)return}var f=d.location.href;Ta(f);if(c)if(typeof LP.getBrowser().getNotificationBox=="function"){var g=LP.getBrowser().getNotificationBox(e);if(g){var h=g.currentNotification;if(h&&
typeof h.choices!="undefined"&&h.persistence!=1)h.lpoldnotification=true}}if(!qd[e]){Ge[e]=null;Ng[e]=null;xf[e]=null;yf[e]=null}c&&LP.getBrowser().selectedTab&&e==LP.getBrowser().selectedTab.linkedBrowser&&LP.lpGetCurrentWindow().setTimeout("LP.lpRebuildToolsMenu_all(true)",0);if(!qd[e]){b=[];if(He(e,null,null,true,b)){Rg(e.contentDocument,b.aid);Sg(e.contentDocument,LP.lpgs("Waiting for the website to finish loading..."));qd[e]=true}else if(typeof Gd!="function"||uf==e)si(d,false,true)}if(c){Je();
d&&d.documentElement&&d.documentElement.addEventListener("DOMNodeInserted",ri,false);qd[e]=false}}}catch(j){U("Content Loaded: "+j+" ln: "+j.lineNumber,f)}finally{}};this.lploadpage=function(b){b=b.originalTarget;if(!qi(b)){b._LP_STATE="pageshow";var c=mb(b),d=c&&c.contentDocument==b?true:false;if(c)if(d||typeof c.contentDocument.frameloaded=="undefined")c.contentDocument.frameloaded=0;else{c.contentDocument.frameloaded++;if(c.contentDocument.frameloaded>25)return}Ig(b);typeof b.lastpass_domcontent_redo!=
"undefined"&&LP.setTimeout(b.lastpass_domcontent_redo,250);c&&d&&LP.getBrowser().selectedTab&&c==LP.getBrowser().selectedTab.linkedBrowser&&LP.lpGetCurrentWindow().setTimeout("LP.lpRebuildToolsMenu_all(true)",0);if(typeof b.LPlpinvisiblepw2!="undefined"&&b.LPlpinvisiblepw2){b.LPlpinvisiblepw2=false;typeof LP.getBrowser().getNotificationBox=="function"&&LP.lpGetCurrentWindow().setTimeout(function(){pd(c,c.contentDocument)},500);Ce(c,b)}else if(typeof b.LPlpinvisiblepw!="undefined"&&b.LPlpinvisiblepw){b.LPlpinvisiblepw=
false;typeof LP.getBrowser().getNotificationBox=="function"&&LP.lpGetCurrentWindow().setTimeout(function(){LP.getBrowser().getNotificationBox(c).allNotifications.length==0&&pd(c,c.contentDocument)},500);Ce(c,b)}else if(c){d=Ua(c.contentWindow.location.href);typeof sa[d]!="undefined"&&Ce(c,b)}b._LP_STATE="pageshowdone"}};this.checkAddTimer=function(b,c){typeof Ja[c]!="undefined"&&Ja[c]!=null&&Ja[c].show_count==0&&Kg(b,Ja[c].url,true,"LP.checkAddTimer",c)};var Vk={observe:function(b,c){try{b=b.QueryInterface(Components.interfaces.nsIHttpChannel);
var d=b.URI.asciiSpec;if(c=="http-on-modify-request"&&ic(d)){b.setRequestHeader("X-LastPass",Wb,false);Ib!=""&&d.match(/^https:\/\//i)&&b.setRequestHeader("X-wxsessid",Ib,false)}if(typeof ga!="undefined")if(ga)if((c=="http-on-modify-request"||c=="http-on-examine-response")&&b.loadFlags&Components.interfaces.nsIRequest.LOAD_BACKGROUND)if(b.notificationCallbacks){d=null;try{d=b.notificationCallbacks.getInterface(Components.interfaces.nsIXMLHttpRequest)}catch(e){}if(d&&b.loadGroup){var f=null;try{f=
b.loadGroup.groupObserver.QueryInterface(Components.interfaces.nsIWebProgress).DOMWindow}catch(g){f=null}f&&c=="http-on-modify-request"&&this.requestStarted(f,b,d,b.requestMethod,b.URI.asciiSpec)}}}catch(h){}finally{}},requestStarted:function(b,c,d,e,f){try{for(c=b;c.parent&&c!=c.parent&&c.parent instanceof Window;)c=c.parent;if(mb(c.document)){var g=this.readPostTextFromXHR(d,b);if(g){d=[];var h=g.split("&");for(g=0;g<h.length;++g){var j=h[g].split("=");if(j.length==2)j[1].length>2E3||(d[decodeURIComponent(j[0])]=
decodeURIComponent(j[1]));else d.push(decodeURIComponent(j[0]))}a:if(!(d==null||typeof d!="object")){var l=b.document,o=l.getElementsByTagName("form");for(b=0;b<o.length;b++){var n=o[b].elements;if(!(n==null||typeof n=="undefined"))for(h=0;h<n.length;h++){var p=ka(n[h]),q=n[h].value;if(n[h].type=="password"){j=false;for(var r in d)if(r==p||d[r]==q)j=true;if(j){h=new ii;h.target=o[b];h.doc=l;LP.lpsubmit(h);var u=mb(l);Kg(u,f,true,"lpHandleSubmitFormByFieldNames");break a}}}}}}}}catch(t){}finally{}},
readPostTextFromXHR:function(b){try{var c=b.channel.QueryInterface(Components.interfaces.nsIUploadChannel).uploadStream;if(c){var d=c.QueryInterface(Components.interfaces.nsISeekableStream);d&&d.seek(Components.interfaces.nsISeekableStream.NS_SEEK_SET,0);var e=Components.classes["@mozilla.org/binaryinputstream;1"].createInstance(Components.interfaces.nsIBinaryInputStream);e.setInputStream(c);b=[];for(var f=c.available();f;f=c.available())b.push(e.readBytes(f));var g=b.join("");try{d&&d.seek(Components.interfaces.nsISeekableStream.NS_SEEK_SET,
0)}catch(h){}return g}}catch(j){return null}finally{}return null}};this.lpformsubmit=function(b){var c=b.target.ownerDocument?b.target.ownerDocument:LP.getBrowser().contentDocument,d=b.target.getAttribute("formnum");b.target.getAttribute("from");b=c.getElementsByTagName("form");if(b.length>d){d=b[d];b=false;for(var e=0;e<d.elements.length;++e){var f=dd(d.elements[e]);if(d.elements[e].type!="hidden"&&f){b=true;break}}if(!b)if(b=De(null,c))d=b;b=new ii;b.target=d;b.doc=c;LP.lpsubmit(b)}};this.lpsubmitbefore=
function(b){LP.lpsubmit(b,true)};this.lpsubmitafter=function(b){LP.lpsubmit(b,false)};this.lpsubmit=function(b,c){var d=false;if(typeof c!="undefined"&&c)d=true;var e=b?b.target:this;if(typeof e.elements=="undefined"&&typeof e.form!="undefined")e=e.form;var f;if(typeof b.originalTarget!="undefined"&&typeof b.originalTarget.location!="undefined")f=b.originalTarget.location.href;f=LP.isFennec?b.originalTarget.ownerDocument.location.href:typeof b.doc!="undefined"&&typeof b.doc.location!="undefined"?
b.doc.location.href:e.ownerDocument&&mb(e.ownerDocument)?LP.lpgetcurrenturl(mb(e.ownerDocument)):LP.lpgetcurrenturl(LP.getBrowser());var g=null;if(f){g=Ra(f);if(ic(f,g)){if(typeof e.name!="undefined"&&e.name=="lpwebsiteeventform")if(e.elements.length>0){Kk(e.elements[0].value,e.ownerDocument,g);Ug(b);return}if(typeof e.name!="undefined"&&e.name=="lpmanualform"){ga||U("lpmanualform submission, but not logged in",null);var h="",j=e.ownerDocument&&mb(e.ownerDocument)?mb(e.ownerDocument):null;d=false;
for(var l=0;l<e.elements.length;l++)if(e.elements[l].name=="aid")h=e.elements[l].value;else if(e.elements[l].name=="samewindow")d=e.elements[l].value=="1"?true:false;if(h!="")d?LP.lpLaunchUrl(h,1,0,j,null,true):LP.lpLaunchUrl(h,1);Ug(b);return}}if(ic(f,g))return}j=e.ownerDocument&&mb(e.ownerDocument)?mb(e.ownerDocument):LP.getBrowser();if(typeof j.contentDocument.LPlpsaveforminfo!="undefined"){h=j.contentDocument.LPlpsaveforminfo;if(y[h]){var o=y[h].logins[0].fields.length==0||y[h].urid==0?3:4,n=
De(null,j.contentDocument);ee(j,n,f);sc(d,false,o,j,n,h,false,true,true)}}l=e.ownerDocument?e.ownerDocument:LP.getBrowser().contentDocument;if(typeof l.LPlpskipaddconfirm=="undefined"){h=o=0;j=mb(l);var p=e.elements;if(p){var q=ob(g.host,f);if(LP.compare_tlds("tdcanadatrust.com",q))for(var r=0;r<p.length;r++){if("hidden"==p[r].type&&"ConnectID"==ka(p[r]))p[r].type="text";if("hidden"==p[r].type&&"Password"==ka(p[r]))p[r].type="password"}n=wf(e,true);if(n.password==1)if(vi(e,l,true)==null){Ug(b);return}if(j&&
typeof j.contentDocument.m_filledAid!="undefined"&&j.contentDocument.m_filledAid&&n.text==1){r=y[j.contentDocument.m_filledAid];if(r!=null&&r.logins.length>0&&!r.save_all){var u=0;for(l=0;l<r.logins.length&&u==0;l++)for(var t=r.logins[l],C=0;C<t.fields.length&&u==0;C++)t.fields[C].type=="text"&&u++;if(u==0){sc(d,false,3,j,e,j.contentDocument.m_filledAid,false,true,true);j.contentDocument.m_filledAid=null}}}n.password>3&&sc(d,true,5,j,0,null,null,true,true,true);if(n.password<=1||n.password==3&&n.passwordValues==
1||n.uniquepasswords==n.password){savedForm=e;var A=false,J=false;for(r=0;r<p.length;r++)if(p[r].type=="password"||ka(p[r])=="openid_url"){ee(j,savedForm,f);sc(d,false,o,j,savedForm,h);A=true;break}else if("text"==p[r].type||"email"==p[r].type)J=true;if(!A&&J){ee(j,savedForm,f);sc(d,true,o,j,savedForm,h)}}else if(n.password>1){u=[];p=e.elements;for(r=0;r<p.length;r++)if(p[r].type=="password"){t=p[r].value;for(l=0;l<Za.length;l++)if(Za[l].name==ka(p[r])){if(Za[l].value!=t)if(t==""||t.match(/^\*+$/))t=
Za[l].value;else if(t.length==Za[l].value.length){var D=true;for(C=0;C<t.length;C++)if(t.charAt(C)!=Za[l].value.charAt(C)&&t.charAt(C)!="*"){D=false;break}if(D)t=Za[l].value}break}u[u.length]=t}r=false;l="";if(u[u.length-1]==u[u.length-2]&&u[u.length-1]!=""){r=true;l=u[u.length-1]}else if(u[0]==u[1]&&u[0]!=""){r=true;l=u[0]}if(r){if(ga&&g){h=Hi(q);if(n.password==2&&h==null){ee(j,e,f);sc(d,false,false,j,e,0,1)}else if(h!=null){if(h!=null){var B=[];A=0;for(J in h){B.username=h[J];B.password=l;B.id=
J;A++}}ee(j,e,f);sc(d,false,false,j,e,0,1,false,true,false,null,null,1,null,f);B.key=f;B.tld=q;if(A==1)Gd=function(){Ob(LP.lpgs("PasswordChange")+" "+B.username,j,B.id,"change",B)};else{B.matchingaccts=h;Gd=function(){Ob(LP.lpgs("PasswordChange2")+" "+q,j,B.id,"change",B)}}uf=j}}}else if(2==u.length&&u[0]!=""&&u[1]!=""){for(r=A=0;r<p.length;r++)if("text"==p[r].type||"email"==p[r].type)A++;if(!A){ee(j,savedForm,f);sc(d,false,o,j,savedForm,h)}}}if(ga&&hh&&n.text>=5)if(d=LP.getBrowser().selectedTab)if(d=
d.linkedBrowser)if((d=d.contentDocument)&&(typeof d.m_abortedFormFillChecking!="undefined"||typeof d.FieldFocusDone!="undefined"))Gl(e,j)}}};this.setTimeout=function(b,c){try{var d=Components.classes["@mozilla.org/timer;1"].createInstance(Components.interfaces.nsITimer);d.initWithCallback({that:this,thetimer:d,notify:function(){b.call(this.that)}},c,Components.interfaces.nsITimer.TYPE_ONE_SHOT)}catch(e){}};this.clearTimeout=function(b){b.cancel()};var zg=0;this.logoff=function(){zg++;try{LP.lpGetCurrentWindow().setTimeout(function(){LP.logoffhelper("current"+
zg)},100);LP.mostRecent().setTimeout(function(){LP.logoffhelper("mostrecent"+zg)},200);LP.setTimeout(function(){LP.logoffhelper("LP.setTimeout"+zg)},100)}catch(b){}};this.logoffhelper=function(b){if(ga)typeof b!="undefined"&&"vault"==b?Ia(true):Ia(false)};this.lplogoff_win=function(){for(var b in Gb)Gb[b].close();Gb=[];$b=ga=false;if(!LP.lpprefsHasUserValue("ffhasloggedinsuccessfully",false)){LP.lpprefsSetBoolPref("ffhasloggedinsuccessfully",true,false);LP.flush_prefs()}Fd("");Pc=[];Pc[""]="";kh=
null;pf();Zf(true);$f(true);y=[];lc=[];Yf=[];Tc=[];Ej={};qa=[];id=0;sa=[];Nd=[];Jb=[];Pb=[];tc=[];uc=[];pc=[];Yc=[];fd=[];gd=[];Zc=[];fa=[];La=[];Ha=[];ad=[];if(Wc){LP.mostRecent().clearTimeout(Wc);Wc=null}if(Xc){LP.mostRecent().clearTimeout(Xc);Xc=null}vd=ve=false;Th="";Lg=false;Fc=[];wa=[];Ja=[];od=[];bc=[];bb=[];fe=null;Za=[];uf=Gd=Uc=null;Ge=[];pg=false;xd=[];Md=[];rb=Xa=-1;Be=qf="";Uf=[];qc=[];Ng=[];xf=[];yf=[];qd=[];Vd=[];ch=Ld=je=ie=jd=Dc=ge=false;Jf=true;Lf=Kf=Ec=false;we="";Tf=false;LP.lpgenpwlist=
[];LP.lpacctsreq=null;me();sh();LP.lp_handle_buttons_all("off");LP.lpGetCurrentWindow().setTimeout("LP.lpRebuildToolsMenu_all();",0)};this.lp_fix_accts_btn_all=function(){for(var b=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");b.hasMoreElements();){var c=b.getNext();LP.lp_fix_accts_btn(c.document)}};this.lp_fix_accts_btn=function(b){if(b.getElementById("lpt_lastpass-accts-btn")){if(mf){b.getElementById("lpt_lastpass-accts-btn").setAttribute("type",
"checkbox");b.getElementById("lpt_lastpass-accts-btn").setAttribute("autoCheck","false");b.getElementById("lpt_lastpass-accts-btn").setAttribute("onclick","toggleSidebar('lpt_viewSidebar');");if(b.getElementById("lpt_status-bar-accts")){b.getElementById("lpt_status-bar-accts").setAttribute("hidden",true);b.getElementById("lpt_status-bar-accts2").setAttribute("hidden",false)}if(b.getElementById("lpt_comp-bar-accts")){b.getElementById("lpt_comp-bar-accts").setAttribute("hidden",true);b.getElementById("lpt_comp-bar-accts2").setAttribute("hidden",
false)}}else{b.getElementById("lpt_lastpass-accts-btn").setAttribute("type","menu");b.getElementById("lpt_lastpass-accts-btn").setAttribute("onclick","");if(b.getElementById("lpt_status-bar-accts")){b.getElementById("lpt_status-bar-accts").setAttribute("hidden",false);b.getElementById("lpt_status-bar-accts2").setAttribute("hidden",true)}if(b.getElementById("lpt_comp-bar-accts")){b.getElementById("lpt_comp-bar-accts").setAttribute("hidden",false);b.getElementById("lpt_comp-bar-accts2").setAttribute("hidden",
true)}}var c=b.getElementById("sidebar");try{if(c&&c.contentWindow&&c.contentWindow.location.href=="chrome://lastpass/content/sidebar.xul"){var d=c.contentDocument.getElementById("lpt_lastpass-accts-tree");if(!mf||!ga){var e=!mf;e&&LP.getWindowFromDocument(b).toggleSidebar();for(var f=d.childNodes.length-1;f>=0;f--)d.removeChild(d.childNodes.item(f));var g=c.contentDocument.createElement("treeitem");g.setAttribute("label",LP.lpgs(e?"FeatureDisabled":"NotLoggedIn"));d.appendChild(g)}}}catch(h){}}};
this.SetupUserPreferences=function(){Ee=!LP.lpprefsHasUserValue("notificationsAfterClick")||LP.lpprefsGetBoolPref("notificationsAfterClick");Hd=LP.lpprefsHasUserValue("RepromptTime")?LP.lpprefsGetIntPref("RepromptTime"):0;yi=!LP.lpprefsHasUserValue("automaticallyFill")||LP.lpprefsGetBoolPref("automaticallyFill");Cf=!LP.lpprefsHasUserValue("showNotifications")||LP.lpprefsGetBoolPref("showNotifications");Yi=LP.lpprefsHasUserValue("showLoginNotifications",false)?LP.lpprefsGetBoolPref("showLoginNotifications",
false):LP.lpprefsHasUserValue("showLoginNotifications")?LP.lpprefsGetBoolPref("showLoginNotifications"):true;Fh=!LP.lpprefsHasUserValue("showFormFillNotifications")||LP.lpprefsGetBoolPref("showFormFillNotifications");Qg=LP.lpprefsHasUserValue("dontfillautocompleteoff")&&LP.lpprefsGetBoolPref("dontfillautocompleteoff");zi=LP.lpprefsHasUserValue("warninsecureforms")&&LP.lpprefsGetBoolPref("warninsecureforms");Rh=LP.lpprefsHasUserValue("offerGeneratePasswd")?LP.lpprefsGetBoolPref("offerGeneratePasswd"):
true;Ee=!LP.lpprefsHasUserValue("notificationsAfterClick")||LP.lpprefsGetBoolPref("notificationsAfterClick");Ci=!LP.lpprefsHasUserValue("highlightFields")||LP.lpprefsGetBoolPref("highlightFields");ui=!LP.lpprefsHasUserValue("showSaveSiteNotifications")||LP.lpprefsGetBoolPref("showSaveSiteNotifications");mf=LP.lpprefsHasUserValue("showAcctsInSidebar")&&LP.lpprefsGetBoolPref("showAcctsInSidebar");ei=!LP.lpprefsHasUserValue("showAcctsInGroups")||LP.lpprefsGetBoolPref("showAcctsInGroups");dh=!LP.lpprefsHasUserValue("autoauto")||
LP.lpprefsGetBoolPref("autoauto");Xi=LP.lpprefsHasUserValue("autoautoVal")?LP.lpprefsGetIntPref("autoautoVal"):25;wg=(zk=LP.lpprefsHasUserValue("idleLogoff")&&LP.lpprefsGetBoolPref("idleLogoff"))?LP.lpprefsGetIntPref("idleLogoffVal"):0;fh=LP.lpprefsHasUserValue("alwayschooseprofilecc")&&LP.lpprefsGetBoolPref("alwayschooseprofilecc");gh=LP.lpprefsHasUserValue("notificationsBottom")&&LP.lpprefsGetBoolPref("notificationsBottom");Re=!LP.lpprefsHasUserValue("useCompact",false)||LP.lpprefsGetBoolPref("useCompact",
false);Sh=LP.lpprefsHasUserValue("openloginstart",false)&&LP.lpprefsGetBoolPref("openloginstart",false);hh=!LP.lpprefsHasUserValue("capturenewformfill")||LP.lpprefsGetBoolPref("capturenewformfill");di=LP.lpprefsHasUserValue("hidecontextmenu")&&LP.lpprefsGetBoolPref("hidecontextmenu");yc=LP.lpprefsHasUserValue("hidenotes",false)?LP.lpprefsGetBoolPref("hidenotes",false):yc;ne=LP.lpprefsHasUserValue("hideidentities",false)?LP.lpprefsGetBoolPref("hideidentities",false):ne;Cc=LP.lpprefsHasUserValue("hidevault",
false)?LP.lpprefsGetBoolPref("hidevault",false):Cc;Ad=LP.lpprefsHasUserValue("hideexport",false)?LP.lpprefsGetBoolPref("hideexport",false):Ad;zd=LP.lpprefsHasUserValue("hideimport",false)?LP.lpprefsGetBoolPref("hideimport",false):zd;xg=LP.lpprefsHasUserValue("hidesharing",false)?LP.lpprefsGetBoolPref("hidesharing",false):xg;Pd=LP.lpprefsHasUserValue("hideprint",false)?LP.lpprefsGetBoolPref("hideprint",false):Pd;Jh=LP.lpprefsHasUserValue("donotoverwritefilledfields")?LP.lpprefsGetBoolPref("donotoverwritefilledfields"):
false};this.getHideNotes=function(){return yc};this.getHideSharing=function(){return xg};this.getHideIdentities=function(){return ne};this.getGeneratedPw=function(){return ch};this.OpenCreateAccount=function(){xa&&!LP.securityPrompt()||LP.lpGetCurrentWindow().openDialog(eb+"content/welcome.xul","_blank","chrome,titlebar,toolbar,centerscreen,resizable=yes")};this.lp_handle_buttons_all=function(b){for(var c=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");c.hasMoreElements();){var d=
c.getNext();LP.lp_handle_buttons(b,d.document)}};this.ShowPremiumMenuItem=function(){for(var b=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");b.hasMoreElements();){var c=b.getNext();try{if(c.document&&c.document.getElementById("lpt_lppremium")){c.document.getElementById("lpt_lppremium").hidden=LP.lpisp()||xa?true:false;LP.sr(c.document,"lpt_lppremium","label","Go Premium!");c.document.getElementById("lpt_lpserver").hidden=
!xa?true:false;LP.sr(c.document,"lpt_lpserver","label","Upgrade to LastPass Online!")}}catch(d){U("Drew was right, lpt_lppremium is still null.",null)}if(c.document.getElementById("lpt_lpncpremium")){c.document.getElementById("lpt_lpncpremium").hidden=LP.lpisp()||xa?true:false;LP.sr(c.document,"lpt_lpncpremium","label","Go Premium!");c.document.getElementById("lpt_lpncserver").hidden=!xa?true:false;LP.sr(c.document,"lpt_lpncserver","label","Upgrade to LastPass Online!")}}};this.lp_handle_buttons=
function(b,c){LP.lp_fix_accts_btn(c);var d=0==LP.get_recentUsedCount();LP.sr(c,"lpt_comp-bar-recentlyused","hidden",d);LP.sr(c,"lpt_non-comp-bar-recentlyused","hidden",d);LP.sr(c,"lpt_status-bar-recentlyused","hidden",d);if("refresh"==b){b="off";if(ga)b="in";LP.sr(c,"lpt_status-bar-login","label","Login");LP.sr(c,"lpt_lpidentitiesmenu3","label","Identities");LP.sr(c,"lpt_status-bar-home","label","My LastPass Vault");LP.sr(c,"lpt_status-bar-home","hidden",Cc);LP.sr(c,"lpt_status-bar-recentlyused",
"label","Recently Used");LP.sr(c,"lpt_status-bar-accts","label","Sites");LP.sr(c,"lpt_statusbaritem","label","Retrieving Sites...");LP.sr(c,"lpt_status-bar-accts2","label","Sites");LP.sr(c,"lpt_status-bar-securenotes","label","SecureNotes");LP.sr(c,"lpt_status-bar-securenotes","hidden",yc);LP.sr(c,"lpt_statusbaritem2","label","Retrieving Sites...");LP.sr(c,"lpt_status-bar-fav","label","OpenFavorites");LP.sr(c,"lpt_lpfillformsmenu3","label","Fill Forms");LP.sr(c,"lpt_status-bar-prefs","label","Preferences");
LP.sr(c,"lpt_status-bar-help","label","Help...");LP.sr(c,"lpt_status-bar-tools","label","Tools");LP.sr(c,"lpt_status-bar-feedback","label","Feedback");LP.sr(c,"lpt_status-bar-search","label","Site Search");LP.sr(c,"lpt_status-bar-gen","label","Generate Secure Password");LP.sr(c,"lpt_status-bar-recheck","label","Recheck Page");LP.sr(c,"lpt_status-bar-refresh","label","RefreshAccounts");LP.sr(c,"lpt_status-bar-refresh","hidden",xa);zd&&LP.sr(c,"lpt_status-bar-importfrom","hidden",zd);LP.sr(c,"lpt_status-bar-importfrom",
"label","Import From");LP.sr(c,"lpt_status-bar-impff","label","Firefox Password Manager");LP.sr(c,"lpt_status-bar-impsxipper","label","Sxipper");LP.sr(c,"lpt_status-bar-imp1p","label","1Password");LP.sr(c,"lpt_status-bar-impkp","label","KeePass");LP.sr(c,"lpt_status-bar-impclipperz","label","Clipperz");LP.sr(c,"lpt_status-bar-impewallet","label","eWallet");LP.sr(c,"lpt_status-bar-impfireform","label","FireForm");LP.sr(c,"lpt_status-bar-imppwcoral","label","Password Corral");LP.sr(c,"lpt_status-bar-imppassworddragon",
"label","Password Dragon");LP.sr(c,"lpt_status-bar-imphppwsafe","label","HP Password Safe");LP.sr(c,"lpt_status-bar-imppasswordsmax","label","Passwords Max");LP.sr(c,"lpt_status-bar-imppins","label","PINs Password Manager");LP.sr(c,"lpt_status-bar-impsplashid","label","SplashID");LP.sr(c,"lpt_status-bar-impsticky","label","Sticky Password");LP.sr(c,"lpt_status-bar-impdarnpasswords","label","Darn! Passwords!");LP.sr(c,"lpt_status-bar-implp","label","LastPass");LP.sr(c,"lpt_status-bar-impmps","label",
"MyPasswordSafe");LP.sr(c,"lpt_status-bar-imppp","label","PassPack");LP.sr(c,"lpt_status-bar-impps","label","Password Safe");LP.sr(c,"lpt_status-bar-imprf","label","RoboForm");LP.sr(c,"lpt_status-bar-imptp","label","TurboPasswords");LP.sr(c,"lpt_status-bar-imppk","label","Password Keeper");LP.sr(c,"lpt_status-bar-impcsv","label","Generic CSV File");LP.sr(c,"lpt_status-bar-impmsi","label","MSI PasswordKeeper");LP.sr(c,"lpt_status-bar-imppwagent","label","Password Agent");for(d=1;c.getElementById("lpt_status-bar-inst"+
d);d++){LP.sr(c,"lpt_status-bar-inst"+d,"label","Instructions");LP.sr(c,"lpt_status-bar-import"+d,"label","Import")}if(xa){var e=["sxipper","1p","kp","clipperz","ewallet","fireform","pwcoral","passworddragon","hppwsafe","passwordsmax","pins","splashid","sticky","darnpasswords","lp","mps","pp","ps","rf","tp","pk","csv","msi","pwagent"];for(d=0;d<e.length;d++)LP.sr(c,"lpt_status-bar-imp"+e[d],"hidden",true)}Ad&&LP.sr(c,"lpt_status-bar-exportto","hidden",Ad);LP.sr(c,"lpt_status-bar-exportto","label",
"Export To");LP.sr(c,"lpt_status-bar-exportcsv","label","LastPass CSV File");LP.sr(c,"lpt_status-bar-exportff","label","Firefox");LP.sr(c,"lpt_status-bar-exportenc","label","LastPass Encrypted File");LP.sr(c,"lpt_status-bar-print","label","Print");LP.sr(c,"lpt_status-bar-printsites","label","Sites");LP.sr(c,"lpt_status-bar-printsn","label","SecureNotes");LP.sr(c,"lpt_status-bar-printsn","hidden",yc);LP.sr(c,"lpt_status-bar-seccheck","label","Security Check");LP.sr(c,"lpt_status-bar-seccheck","hidden",
xa);LP.sr(c,"lpt_status-bar-othersessions","label","Other Sessions");LP.sr(c,"lpt_status-bar-othersessions","hidden",xa);LP.sr(c,"lpt_status-bar-about","label","About...");LP.sr(c,"lpt_status-bar-tbctrl","label","ShowToolbar");LP.sr(c,"lpt_lpclearcache3","label","Clear Local Cache");LP.sr(c,"lpt_lpclearcache3","hidden",xa)}if("off"==b){if(c.getElementById("lpt_lplogintolastpass")&&!di)c.getElementById("lpt_lplogintolastpass").hidden=false;if(c.getElementById("lpt_lastpass-fav"))c.getElementById("lpt_lastpass-fav").disabled=
true;c.getElementById("lpt_status-bar-fav")&&c.getElementById("lpt_status-bar-fav").setAttribute("disabled",true);c.getElementById("lpt_comp-bar-fav")&&c.getElementById("lpt_comp-bar-fav").setAttribute("disabled",true);if(c.getElementById("lpt_lastpass-login"))c.getElementById("lpt_lastpass-login").label=LP.lpgs("Login");c.getElementById("lpt_status-bar-login")&&LP.sr(c,"lpt_status-bar-login","label","Login");if(c.getElementById("lpt_status-bar-image"))c.getElementById("lpt_status-bar-image").src=
"chrome://lastpass/skin/icon_gray.gif";if(c.getElementById("lpt_lastpass-login2"))c.getElementById("lpt_lastpass-login2").className="login_"+LP.GetToolbarImageLang();c.getElementById("lpt_comp-bar-login")&&LP.sr(c,"lpt_comp-bar-login","label","Login");c.getElementById("lpt_fennec-bar-login")&&LP.sr(c,"lpt_fennec-bar-login","label","Login");LP.changeIcon(c,false);if(c.getElementById("lpt_lastpass-fennec-btn"))c.getElementById("lpt_lastpass-fennec-btn").image="chrome://lastpass/skin/icon_big_gray.gif";
if(c.getElementById("lpt_admin-sep"))c.getElementById("lpt_admin-sep").hidden=true;if(c.getElementById("lpt_admin-row"))c.getElementById("lpt_admin-row").hidden=true;if(c.getElementById("lpt_lastpass-accts-btn"))c.getElementById("lpt_lastpass-accts-btn").disabled=true;if(c.getElementById("lpt_lastpass-accts-btn4")){c.getElementById("lpt_lastpass-accts-btn4").disabled=true;c.getElementById("lpt_lastpass-accts-btn4").className="sites_disabled_"+LP.GetToolbarImageLang()}c.getElementById("lpt_status-bar-accts")&&
c.getElementById("lpt_status-bar-accts").setAttribute("disabled",true);c.getElementById("lpt_status-bar-accts2")&&c.getElementById("lpt_status-bar-accts2").setAttribute("disabled",true);c.getElementById("lpt_comp-bar-recentlyused")&&c.getElementById("lpt_comp-bar-recentlyused").setAttribute("disabled",true);c.getElementById("lpt_non-comp-bar-recentlyused")&&c.getElementById("lpt_non-comp-bar-recentlyused").setAttribute("disabled",true);c.getElementById("lpt_status-bar-recentlyused")&&c.getElementById("lpt_status-bar-recentlyused").setAttribute("disabled",
true);c.getElementById("lpt_comp-bar-accts")&&c.getElementById("lpt_comp-bar-accts").setAttribute("disabled",true);c.getElementById("lpt_comp-bar-accts2")&&c.getElementById("lpt_comp-bar-accts2").setAttribute("disabled",true);c.getElementById("lpt_lastpass-securenotes-btn")&&c.getElementById("lpt_lastpass-securenotes-btn").setAttribute("disabled",true);c.getElementById("lpt_comp-bar-securenotes")&&c.getElementById("lpt_comp-bar-securenotes").setAttribute("disabled",true);c.getElementById("lpt_fennec-securenotes")&&
c.getElementById("lpt_fennec-securenotes").setAttribute("disabled",true);c.getElementById("lpt_status-bar-securenotes")&&c.getElementById("lpt_status-bar-securenotes").setAttribute("disabled",true);c.getElementById("lpt_search-btn")&&c.getElementById("lpt_search-btn").setAttribute("disabled",true);c.getElementById("lpt_tools-btn")&&c.getElementById("lpt_tools-btn").setAttribute("disabled",true);if(c.getElementById("lpt_tools-btn4")){c.getElementById("lpt_tools-btn4").disabled=true;c.getElementById("lpt_tools-btn4").className=
"tools_disabled_"+LP.GetToolbarImageLang()}}if("loggingin"==b){if(c.getElementById("lpt_lplogintolastpass"))c.getElementById("lpt_lplogintolastpass").hidden=true;c.getElementById("lpt_lastpass-login")&&LP.sr(c,"lpt_lastpass-login","label","Loggingin");c.getElementById("lpt_status-bar-login")&&LP.sr(c,"lpt_status-bar-login","label","Loggingin");if(c.getElementById("lpt_status-bar-image"))c.getElementById("lpt_status-bar-image").src="chrome://lastpass/skin/icon_gray.gif";c.getElementById("lpt_comp-bar-login")&&
LP.sr(c,"lpt_comp-bar-login","label","Loggingin");c.getElementById("lpt_fennec-bar-login")&&LP.sr(c,"lpt_fennec-bar-login","label","Loggingin");LP.changeIcon(c,false);if(c.getElementById("lpt_admin-sep"))c.getElementById("lpt_admin-sep").hidden=true;if(c.getElementById("lpt_admin-row"))c.getElementById("lpt_admin-row").hidden=true;if(c.getElementById("lpt_lastpass-accts-btn"))c.getElementById("lpt_lastpass-accts-btn").disabled=true;if(c.getElementById("lpt_lastpass-accts-btn4")){c.getElementById("lpt_lastpass-accts-btn4").disabled=
true;c.getElementById("lpt_lastpass-accts-btn4").className="sites_disabled_"+LP.GetToolbarImageLang()}c.getElementById("lpt_status-bar-accts")&&c.getElementById("lpt_status-bar-accts").setAttribute("disabled",true);c.getElementById("lpt_status-bar-accts2")&&c.getElementById("lpt_status-bar-accts2").setAttribute("disabled",true);c.getElementById("lpt_comp-bar-recentlyused")&&c.getElementById("lpt_comp-bar-recentlyused").setAttribute("disabled",true);c.getElementById("lpt_non-comp-bar-recentlyused")&&
c.getElementById("lpt_non-comp-bar-recentlyused").setAttribute("disabled",true);c.getElementById("lpt_status-bar-recentlyused")&&c.getElementById("lpt_status-bar-recentlyused").setAttribute("disabled",true);c.getElementById("lpt_comp-bar-accts")&&c.getElementById("lpt_comp-bar-accts").setAttribute("disabled",true);c.getElementById("lpt_comp-bar-accts2")&&c.getElementById("lpt_comp-bar-accts2").setAttribute("disabled",true);c.getElementById("lpt_comp-bar-securenotes")&&c.getElementById("lpt_comp-bar-securenotes").setAttribute("disabled",
true);c.getElementById("lpt_fennec-securenotes")&&c.getElementById("lpt_fennec-securenotes").setAttribute("disabled",true);c.getElementById("lpt_status-bar-securenotes")&&c.getElementById("lpt_status-bar-securenotes").setAttribute("disabled",true);c.getElementById("lpt_lastpass-securenotes-btn")&&c.getElementById("lpt_lastpass-securenotes-btn").setAttribute("disabled",true);c.getElementById("lpt_search-btn")&&c.getElementById("lpt_search-btn").setAttribute("disabled",true);c.getElementById("lpt_tools-btn")&&
c.getElementById("lpt_tools-btn").setAttribute("disabled",true);if(c.getElementById("lpt_tools-btn4")){c.getElementById("lpt_tools-btn4").disabled=true;c.getElementById("lpt_tools-btn4").className="tools_disabled_"+LP.GetToolbarImageLang()}}if("in"==b){if(c.getElementById("lpt_lplogintolastpass"))c.getElementById("lpt_lplogintolastpass").hidden=true;if(c.getElementById("lpt_lastpass-login"))c.getElementById("lpt_lastpass-login").label=LP.lpgs("Logoff")+(": "+Z);if(c.getElementById("lpt_status-bar-login"))c.getElementById("lpt_status-bar-login").label=
LP.lpgs("Logoff")+(": "+Z);if(c.getElementById("lpt_status-bar-image"))c.getElementById("lpt_status-bar-image").src="chrome://lastpass/skin/icon.gif";if(c.getElementById("lpt_lastpass-login2"))c.getElementById("lpt_lastpass-login2").className="logoff_"+LP.GetToolbarImageLang();d=LP.GetIdentity()!=""?" ("+LP.GetIdentity(true)+")":"";if(c.getElementById("lpt_comp-bar-login"))c.getElementById("lpt_comp-bar-login").label=LP.lpgs("Logoff")+(": "+Z)+d;if(c.getElementById("lpt_fennec-bar-login"))c.getElementById("lpt_fennec-bar-login").label=
LP.lpgs("Logoff")+(": "+Z);LP.changeIcon(c,true);if(c.getElementById("lpt_lastpass-fennec-btn"))c.getElementById("lpt_lastpass-fennec-btn").image="chrome://lastpass/skin/icon_big.gif";if(c.getElementById("lpt_admin-sep"))c.getElementById("lpt_admin-sep").hidden=ve?false:true;if(c.getElementById("lpt_admin-row"))c.getElementById("lpt_admin-row").hidden=ve?false:true;if(c.getElementById("lpt_lastpass-accts-btn"))c.getElementById("lpt_lastpass-accts-btn").disabled=false;if(c.getElementById("lpt_lastpass-accts-btn4")){c.getElementById("lpt_lastpass-accts-btn4").disabled=
false;c.getElementById("lpt_lastpass-accts-btn4").className="sites_"+LP.GetToolbarImageLang()}c.getElementById("lpt_status-bar-accts")&&c.getElementById("lpt_status-bar-accts").setAttribute("disabled",false);c.getElementById("lpt_status-bar-accts2")&&c.getElementById("lpt_status-bar-accts2").setAttribute("disabled",false);c.getElementById("lpt_comp-bar-recentlyused")&&c.getElementById("lpt_comp-bar-recentlyused").setAttribute("disabled",false);c.getElementById("lpt_non-comp-bar-recentlyused")&&c.getElementById("lpt_non-comp-bar-recentlyused").setAttribute("disabled",
false);c.getElementById("lpt_status-bar-recentlyused")&&c.getElementById("lpt_status-bar-recentlyused").setAttribute("disabled",false);c.getElementById("lpt_comp-bar-accts")&&c.getElementById("lpt_comp-bar-accts").setAttribute("disabled",false);c.getElementById("lpt_comp-bar-accts2")&&c.getElementById("lpt_comp-bar-accts2").setAttribute("disabled",false);c.getElementById("lpt_comp-bar-securenotes")&&c.getElementById("lpt_comp-bar-securenotes").setAttribute("disabled",false);c.getElementById("lpt_fennec-securenotes")&&
c.getElementById("lpt_fennec-securenotes").setAttribute("disabled",false);if(c.getElementById("lpt_lastpass-securenotes-btn"))c.getElementById("lpt_lastpass-securenotes-btn").disabled=false;c.getElementById("lpt_status-bar-securenotes")&&c.getElementById("lpt_status-bar-securenotes").setAttribute("disabled",false);c.getElementById("lpt_search-btn")&&c.getElementById("lpt_search-btn").setAttribute("disabled",false);c.getElementById("lpt_tools-btn")&&c.getElementById("lpt_tools-btn").setAttribute("disabled",
false);if(c.getElementById("lpt_tools-btn4")){c.getElementById("lpt_tools-btn4").disabled=false;c.getElementById("lpt_tools-btn4").className="tools_"+LP.GetToolbarImageLang()}}if(Ak!=ga){Ak=ga;jc()}};this.changeIcon=function(b,c){if(b.getElementById("lpt_lastpass-compact-btn")){b.getElementById("lpt_lastpass-compact-btn").image="";var d=LP.lpprefsHasUserValue("Icon",false)?LP.lpprefsGetIntPref("Icon",false):0,e="";if(d!=0)e="iconset"+d;b.getElementById("lpt_lastpass-compact-btn").className=(c?"lploggedin":
"")+e}};this.lpEditAccount=function(b,c){var d=null;if(c.id!=0){var e=c.id;d=y[e];var f=false;if(d==null){d=qa[e];f=true}var g=d.tld;typeof sa[g]!="undefined"&&typeof sa[g][e]!="undefined"&&delete sa[g][e];if(typeof Ha[g]!="undefined"){g=Ha[g];if(typeof Ha[g]!="undefined")for(var h=0;h<Ha[g][h];h++){var j=Ha[g][h];typeof sa[j]!="undefined"&&typeof sa[j][e]!="undefined"&&delete sa[j][e]}}d.name=c.name;h=d.url;d.url=c.url;g=Ua(d.url);d.tld=g;d.group=c.group!=""?c.group:LP.get_null_group();d.extra=c.extra;
d.fav=c.fav;d.username=c.username;d.password=c.password;d.autologin=c.autologin;d.pwprotect=c.pwprotect;d.never_autofill=c.never_autofill;d.unencryptedUsername=c.unencryptedUsername;LP.SetLastTouch(d);for(var l=j=d.genpw=false,o=0;o<d.logins.length;o++){if(c.url!=h&&d.logins[o].url==h){d.logins[o].url=c.url;var n=Ra(c.url);d.logins[o].server=n.host;d.logins[o].tld=g;n=Ta(c.url,n);Jb[Jb.length]=n}d.logins[o].username=c.username;d.logins[o].unencryptedUsername=c.unencryptedUsername;d.logins[o].password=
c.password;for(n=0;n<d.logins[o].fields.length;n++){if(d.logins[o].fields[n].value==c.oldusername){j=true;if(c.oldusername!="")d.logins[o].fields[n].value=c.username}if(d.logins[o].fields[n].value==c.oldpassword){l=true;if(c.oldpassword!="")d.logins[o].fields[n].value=c.password}}for(n=0;n<d.logins[o].otherfields.length;n++){if(d.logins[o].otherfields[n].value==c.oldusername){j=true;if(c.oldusername!="")d.logins[o].otherfields[n].value=c.username}if(d.logins[o].otherfields[n].value==c.oldpassword){l=
true;if(c.oldpassword!="")d.logins[o].otherfields[n].value=c.password}}}for(o=0;o<d.otherlogins.length;o++){if(c.url!=h&&d.otherlogins[o].url==h){d.otherlogins[o].url=c.url;n=Ra(c.url);d.otherlogins[o].server=n.host;d.otherlogins[o].tld=g;n=Ta(c.url,n);Jb[Jb.length]=n}d.otherlogins[o].username=c.username;d.otherlogins[o].unencryptedUsername=c.unencryptedUsername;d.otherlogins[o].password=c.password;for(n=0;n<d.otherlogins[o].fields.length;n++){if(d.otherlogins[o].fields[n].value==c.oldusername){j=
true;if(c.oldusername!="")d.otherlogins[o].fields[n].value=c.username}if(d.otherlogins[o].fields[n].value==c.oldpassword){l=true;if(c.oldpassword!="")d.otherlogins[o].fields[n].value=c.password}}for(n=0;n<d.otherlogins[o].otherfields.length;n++){if(d.otherlogins[o].otherfields[n].value==c.oldusername){j=true;if(c.oldusername!="")d.otherlogins[o].otherfields[n].value=c.username}if(d.otherlogins[o].otherfields[n].value==c.oldpassword){l=true;if(c.oldpassword!="")d.otherlogins[o].otherfields[n].value=
c.password}}}if(!j&&c.username!=""||!l&&c.password!=""){for(o=0;o<d.logins.length;o++)d.logins[o].fields=[];for(o=0;o<d.otherlogins.length;o++)d.otherlogins[o].fields=[]}if(f)qa[e]=d;else y[e]=d;g=d.tld;if(typeof sa[g]=="undefined")sa[g]=[];sa[g][e]=true;for(o=0;o<bb.length;o++)if(bb[o].id==e){bb.splice(o,1);break}if(parseInt(d.fav)==1){f=new Vb;f.id=e;f.command={aid:e,manual:d.manual,is_http:d.is_http};bb[bb.length]=f}if(typeof Ha[g]!="undefined"){g=Ha[g];if(typeof Ha[g]!="undefined")for(h=0;h<Ha[g].length;h++){j=
Ha[g][h];if(typeof sa[j]=="undefined")sa[j]=[];sa[j][e]=true}}Ec=true;LP.lpGetCurrentWindow().setTimeout("LP.lpRebuildToolsMenu_all();",0);LP.lpDisplayAccounts_all();LP.lpRecheckTabs()}b+=LP.GetIdentityParam();c.postdata=b;c.posturl=LP.lp_base+"show.php";c.newvalues=[];LP.lpMakeRequest(c.posturl,c.postdata,Me,null,c)};var Kd=null;this.launchHome=function(){Cc||(ga?Zb("chrome://lastpass/content/home.xul"):this.lpOpenLogin())};this.lpGetPageOpenSetting=function(b){var c=LP.lpprefsHasUserValue("pageOpenTab"),
d=true;if("same"==b){if(LP.lpprefsHasUserValue("pageOpenSameTab"))return LP.lpprefsGetBoolPref("pageOpenSameTab");return false}if(c)d=LP.lpprefsGetBoolPref("pageOpenTab");else try{d=LP.lpmainprefs.getIntPref("browser.link.open_newwindow")!=2?true:false}catch(e){}return d};this.lpbaseopen=function(b){Zb(LP.lp_base+b,false)};this.lpanyopen=function(b){Zb(b)};this.lpbaseopenwin=function(b){LP.mostRecent().open(LP.lp_base+b).focus()};this.lpOpenLP=function(){Cc||Zb("chrome://lastpass/content/home.xul")};
this.lpAdminPage=function(){Zb(LP.lp_base+"admintools/")};this.lpCloseNotifications=function(b){for(var c=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");c.hasMoreElements();){var d=c.getNext();if(typeof d.getBrowser=="function"){d=d.getBrowser();if(null!=d&&typeof d.getNotificationBox=="function")for(var e=d.browsers,f=0;e&&f<e.length;f++){var g=d.getNotificationBox(e[f]);if(b)for(var h=g.allNotifications,j=h.length-
1;j>=0;j--)typeof h[j].choices!="undefined"&&h[j].choices==b&&g.removeNotification(h[j]);else g.removeAllNotifications(false)}}}};this.lpOpenSearch=function(b){if(ga){b=LP.lpGetCurrentWindow().openDialog(eb+"content/search.xul","_blank","resizable=yes,chrome,titlebar,toolbar,centerscreen,close=yes",b);Gb.push(b)}else this.lpOpenLogin()};this.lpToolbarInit=function(b){try{var c=b.originalTarget,d=hl(c);if(!d){b=false;if(yb("LPISLOC"))if(Aa()&&LP.lpis_mac&&typeof ba.lpvt_verify_file_contents=="function"&&
ba.lpvt_verify_file_contents(ib("LPISLOC")))LP.LPISLOC=xa=true;else b=true;if(xa){ne=xg=Pd=Nf=true;LP.lpdopoll=LP.lpdolostpwotp=false}if(yb("LPISUPEK"))if(Aa()&&LP.lpis_mac&&typeof ba.lpvt_verify_file_contents=="function"&&ba.lpvt_verify_file_contents(ib("LPISUPEK")))LP.LPISUPEK=ac=true;else b=true;b&&LP.setTimeout(function(){LP.alert(LP.lpgs("LastPass has detected an installation error.  Please reinstall LastPass."))},0)}fb=LP.lpprefsHasUserValue("language",false)?LP.lpprefsGetCharPref("language",
false):null;b=false;if(fb=="cs-CS"){fb="cs-CZ";b=true}else if(fb=="ms-SG"){fb="ms-MY";b=true}else if(fb=="no-NO"){fb="nb-NO";b=true}else if(fb=="zh-HS"){fb="zh-CN";b=true}else if(fb=="zh-HT"){fb="zh-TW";b=true}if(b){LP.lpprefsSetCharPref("language",fb,false);LP.flush_prefs()}if(fb=="")fb=null;if(ac&&!LP.lpprefsHasUserValue("openloginstart",false)){LP.lpprefsSetBoolPref("openloginstart",true,false);LP.flush_prefs()}gl();LP.lpSetupHotKeys(c);LP.SetupUserPreferences();ph(c,Re);hj(c);LP.lp_handle_buttons("refresh",
c);LP.ShowPremiumMenuItem();d||Rl();if((xa||!se)&&!d)LP.httptest();var e=LP.lpprefsHasUserValue("version");if(e&&Ii(LP.lpprefsGetCharPref("version"),Wb,false)<0){var f=LP.lp_base+"upgrade.php?ver="+LP.en(Wb)+"&type=ff&upgrade="+e;LP.lpGetCurrentWindow().setTimeout(function(){Zb(f,true)},3E3);LP.lpprefsSetCharPref("version",Wb);LP.flush_prefs()}var g=c.getElementById("contentAreaContextMenu");g&&g.addEventListener("popupshowing",LP.hide_context,false);if(LP.lpprefsHasUserValue("doautocompletesearch")&&
LP.lpprefsGetBoolPref("doautocompletesearch")){var h=c.defaultView.gURLBar.getAttribute("autocompletesearch");if(h!="lastpass"&&h.indexOf(" lastpass")==-1&&h.indexOf("lastpass ")==-1){h+=(h!=""?" ":"")+"lastpass";c.defaultView.gURLBar.setAttribute("autocompletesearch",h)}}}catch(j){U("lpToolbarInit: "+j+" ln: "+j.lineNumber)}};this.hide=function(){};this.adminoverride="";var Ye=0;this.lpGetAccounts=function(b){var c=(new Date).getTime();if(!(c-Ye<1E3)){Ye=c;c=LP.lp_base+"getaccts.php?u="+ia;if(LP.adminoverride.length)c=
LP.lp_base+"getaccts.php?adminoverride="+LP.adminoverride;if(b)c+="&recache=1";c+="&mobile=1&b64=1&shap=1&nexturid=1";LP.lpMakeRequest(c,"?a=1",LP.lpPopulateAccounts)}};this.lpPopulateAccounts=function(b,c,d,e){Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");if(c==null)c=true;d=Il(b,c,d);var f=false;for(var g in lc){f=true;break}if(f)if(!(!ga||$b))if(!((new Date).getTime()-Kj<1E4)){Zf();if(Aa())if(na==""||na==null)U("lprsa_acceptpendingshares : failing autoaccept of share because lp_local_key is invalid");
else{var h=re("acceptpendingshares");if(h=="")U("lprsa_acceptpendingshares : failing becuase we could not read our privatekey");else{f=[];for(g in lc){var j=lc[g];if(j.shareautoaccept==1){var l=ba.xCryptoRSADecrypt(h,j.sharekeyenchex);if(l==""||l==null)U("lprsa_acceptpendingshares : failing autoaccept of share because xCryptoRSADecrypt failed");else{var o=Da(l);if(o==""||o==null)U("lprsa_acceptpendingshares : failing autoaccept of share because lp_hex2bin(sharekeyhex) failed");else{l=K(j.sharename,
o);var n=K(j.sharegroup,o),p=K(j.username,o),q=K(j.password,o),r=K(j.extra,o),u=true,t={};for(g in j.shareafids){t[g]=K(j.shareafids[g],o);if(j.shareafids[g]!=""&&t[g]==""){u=false;break}}if(j.sharename!=""&&l==""||j.sharegroup!=""&&n==""||j.username!=""&&p==""||j.password!=""&&q==""||j.extra!=""&&r==""||!u){o="";o+="\nsharename ='"+j.sharename+"'  decrypted to plain_name    ='"+l+"'";o+="\nsharegroup='"+j.sharegroup+"' decrypted to plain_group   ='"+n+"'";o+="\nusername  ='"+j.username+"'   decrypted to plain_username='"+
p+"'";o+="\npassword  ='"+j.password+"'   decrypted to plain_password='"+q+"'";o+="\nextra     ='"+j.extra+"'      decrypted to plain_extra   ='"+r+"'";o+="\nafidsok   ="+(u?"ok":"error");for(g in j.shareafids)o+="\n  shareafids["+g+"]='"+j.shareafids[g]+"' decrypted to plain_aAfids["+g+"]='"+t[g]+"'";U("lprsa_acceptpendingshares : failing autoaccept of share because we failed to decrypt at least one value:"+o)}else{var C=P(l),A=P(n),J=P(p),D=P(q),B=P(r);u=true;o={};for(g in t){o[g]=P(t[g]);if(t[g]!=
""&&o[g]==""){u=false;break}}if(l!=""&&C==""||n!=""&&A==""||p!=""&&J==""||q!=""&&D==""||r!=""&&B==""||!u)U("lprsa_acceptpendingshares : failing autoaccept of share because we failed to reencrypt at least one value");else{j={aid:j.id,name:C,group:A,username:J,password:D,extra:B};l=0;for(g in o){j["afid"+l]=g;j["afidv"+l]=o[g];++l}j.numafids=l;f.push(j)}}}}}}if(f.length>0){h="cmd="+LP.en("autoacceptshares")+"&from="+LP.en("ffplugin")+"&numshares="+LP.en(f.length);j=0;for(g in f){l="&share"+j;++j;for(var z in f[g])h+=
l+z+"="+LP.en(f[g][z])}Ye=0;LP.lpMakeRequest(LP.lp_base+"showacceptshare.php",h,Ol)}}}else U("lprsa_acceptpendingshares : failing becuase lpusexpcomencrypt is not ok")}g=false;for(var L in Tc){g=true;break}if(g)if(!(!ga||$b))if(!((new Date).getTime()-Lj<1E4)){$f();if(Aa())if(na==""||na==null)U("lprsa_acceptshareeautopushes : failing autoaccept of share because lp_local_key is invalid");else{f=re("acceptshareeautopushes");if(f=="")U("lprsa_acceptshareeautopushes : failing becuase we could not read our privatekey");
else{g=[];for(var S in Tc)for(L in Tc[S]){z=Tc[S][L];h=ba.xCryptoRSADecrypt(f,z.sharekeyhexenc);if(h==""||h==null)U("lprsa_acceptshareeautopushes : failing shareeautopush because xCryptoRSADecrypt failed");else{h=Da(h);if(h==""||h==null)U("lprsa_acceptshareeautopushes : failing shareeautopush because lp_hex2bin(sharekeyhex) failed");else{z=am(h,z);if(z!=null){if(typeof g[S]=="undefined")g[S]=[];g[S].push(z)}}}}L="cmd="+LP.en("updateautoshareepushes")+"&from="+LP.en("ffplugin");h=f=0;for(S in g){++f;
for(var $ in g[S]){j="&share"+h;z=g[S][$];for(var E in z)L+=j+E+"="+LP.en(z[E]);++h}}L+="&numupdates="+LP.en(h);if(h>0){Ye=0;LP.lpMakeRequest(LP.lp_base+"showacceptshare.php",L,Pl)}}}else U("lprsa_acceptshareeautopushes : failing becuase lpusexpcomencrypt is not ok")}if(d&&b&&b.readyState==4&&(b.status==200||c)){e||LP.lpRecheckTabs(pg);pg=false}LP.ShowPremiumMenuItem()};this.lpEditFormFillProfiles=function(){Zb(LP.lp_base+"accts.php?ffid=0",true)};this.IdentityIsOk=function(b,c){if(b=="")return true;
for(var d=0;d<La.length;d++)if(La[d].iid==b)for(var e=La[d].aids.split(","),f=0;f<e.length;f++)if(e[f]==c)return true;return false};this.IdentityFfidIsOk=function(b,c){if(b=="")return true;for(var d=0;d<La.length;d++)if(La[d].iid==b)for(var e=La[d].ffids.split(","),f=0;f<e.length;f++)if(e[f]==c)return true;return false};this.lpRecheckTabs=function(b){if(ga){var c=LP.lpGetCurrentWindow();if(c)if(c=mb(c.contentDocument))if(!ic(c.contentWindow.location.href))if(!pd(c,c.contentDocument))if(b)be(c,c.contentDocument)||
Nc(c,c.contentDocument);for(c=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");c.hasMoreElements();){var d=c.getNext();if(typeof d.getBrowser=="function"){d=d.getBrowser();if(null!=d){d=d.browsers;for(var e=0;d&&e<d.length;e++)if(!ic(d[e].contentWindow.location.href))if(!pd(d[e],d[e].contentDocument))if(b)be(d[e],d[e].contentDocument)||Nc(d[e],d[e].contentDocument)}}}}else this.lpOpenLogin()};this.getWindowFromDocument=
function(b){for(var c=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");c.hasMoreElements();){var d=c.getNext();if(d.document==b)return d}};this.disable_single_factor=function(){LP.getsinglefactortype()=="trueapi"&&Aa()&&LP.lpis_win&&typeof ba.trueapi_delete_default_login=="function"&&ba.trueapi_delete_default_login();LP.setsinglefactortype("")};this.lpDisplayAccounts_all=function(b){for(var c=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");c.hasMoreElements();){var d=
c.getNext();LP.lpDisplayAccounts_win(d.document,b)}};this.lpDisplayAccounts_win=function(b,c){if(ga||c){var d=[];if(b)d[0]=b;else for(var e=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");e.hasMoreElements();){var f=e.getNext();d[d.length]=f.document}for(e=0;e<d.length;e++){b=d[e];LP.lp_fix_accts_btn(b);f=[];var g,h;if(mf){h=b.getElementById("sidebar");try{if(h&&h.contentWindow&&h.contentWindow.location.href=="chrome://lastpass/content/sidebar.xul"){f[f.length]=
h.contentDocument.getElementById("lpt_lastpass-accts-tree");g=h.contentDocument;h=true}}catch(j){}}else{if(b.getElementById("lpt_lastpass-accts"))f[f.length]=b.getElementById("lpt_lastpass-accts");if(b.getElementById("lpt_status-bar-accts-popup"))f[f.length]=b.getElementById("lpt_status-bar-accts-popup");if(b.getElementById("lpt_comp-bar-accts-popup"))f[f.length]=b.getElementById("lpt_comp-bar-accts-popup");g=b;h=false}if(b.getElementById("lpt_lastpass-fav"))b.getElementById("lpt_lastpass-fav").disabled=
bb.length==0;b.getElementById("lpt_status-bar-fav")&&b.getElementById("lpt_status-bar-fav").setAttribute("disabled",bb.length==0);if(b.getElementById("lpt_comp-bar-fav"))if(bb.length==0)b.getElementById("lpt_comp-bar-fav").setAttribute("hidden",true);else{b.getElementById("lpt_comp-bar-fav").setAttribute("hidden",false);b.getElementById("lpt_comp-bar-fav").setAttribute("disabled",false)}if(f.length>0){for(var l=0;l<f.length;l++)for(var o=f[l].childNodes.length-1;o>=0;o--)f[l].removeChild(f[l].childNodes.item(o));
o=false;if(ei)for(l=0;l<f.length;l++){o=true;var n=[],p=[],q=false,r=false;for(var u in y)if(y[u].url!="http://group"){var t=y[u].genpw;if(!t){var C=y[u].fav;if(parseInt(C)==1)q=true;var A=y[u].group;A=A==""?LP.get_null_group():A;if(A!=LP.get_null_group())r=true;t=false;for(C=0;C<n.length;C++)if(n[C].getAttribute("id")==A+"_menu"+l){t=true;break}if(!t){t=g.createElement(h?"treeitem":"menu");t.setAttribute("id",A+"_menu"+l);var J=A==""?LP.get_null_group():A;t.setAttribute("label",(h?" ":"")+LP.fix_group_name(J));
if(h){t.setAttribute("container","true");t.setAttribute("open","true");var D=g.createElement("treerow"),B=g.createElement("treecell");B.setAttribute("src","chrome://lastpass/skin/folder-open.gif");B.setAttribute("label",LP.fix_group_name(J));B.setAttribute("id",A+"_cell"+l);D.appendChild(B);t.appendChild(D)}D=g.createElement(h?"treechildren":"menupopup");D.setAttribute("ignorekeys",false);D.setAttribute("id","_"+A+"_submenu"+l);t.appendChild(D);n[n.length]=t;p[J]=D}}}if(!q&&!r)o=false;else{if(q){t=
g.createElement(h?"treeitem":"menu");t.setAttribute("id","_favorites_menu"+l);t.setAttribute("label",LP.fix_group_name(LP.lpgs("favorites")));if(h){t.setAttribute("container","true");t.setAttribute("open","true");D=g.createElement("treerow");B=g.createElement("treecell");B.setAttribute("src","chrome://lastpass/skin/folder-open.gif");B.setAttribute("label",LP.fix_group_name(LP.lpgs("favorites")));B.setAttribute("id","_favorites_cell"+l);D.appendChild(B);t.appendChild(D)}D=g.createElement(h?"treechildren":
"menupopup");D.setAttribute("ignorekeys",false);D.setAttribute("id","__favorites_submenu"+l);t.appendChild(D);n[n.length]=t}n.sort(Ti);for(u=0;u<n.length;u++){A=n[u].id;J=A.replace(/_menu\d+$/,"");A=J.split("\\");if(A.length==1)f[l].appendChild(n[u]);else{q=null;r="";for(C=0;C<A.length-1;C++){if(r!="")r+="\\";r+=A[C];t=p[r];if(!t){t=g.createElement(h?"treeitem":"menu");t.setAttribute("id",r+"_menu"+l);t.setAttribute("label",LP.fix_group_name(A[C]));if(h){t.setAttribute("container","true");t.setAttribute("open",
"true");D=g.createElement("treerow");B=g.createElement("treecell");B.setAttribute("src","chrome://lastpass/skin/folder-open.gif");B.setAttribute("label",LP.fix_group_name(J));B.setAttribute("id",r+"_cell"+l);D.appendChild(B);t.appendChild(D)}D=g.createElement(h?"treechildren":"menupopup");D.setAttribute("ignorekeys",false);D.setAttribute("id","_"+r+"_submenu"+l);t.appendChild(D);q?q.appendChild(t):f[l].appendChild(t);t=p[r]=D}q=t}n[u].setAttribute("label",(h?" ":"")+LP.fix_group_name(A[A.length-1]));
q.appendChild(n[u])}}}}n=true;for(u in y)if(y[u].url!="http://group"){p=y[u].name;J=y[u].id;l=y[u].manual;D=y[u].is_http;C=y[u].fav;A=y[u].group;A=A==""?LP.get_null_group():A;t=y[u].genpw;q=(h?"":"")+"LP.lpLaunchUrl('"+J+"', '"+l+"', '"+D+"');";r="if (event.button == 1) { "+q+" LP.lpCloseMenus(document); }";if(!t){n=false;for(l=0;l<f.length;l++){t=g.createElement(h?"treeitem":"menuitem");h||t.setAttribute("class","menuitem-iconic");if(h){D=g.createElement("treerow");B=g.createElement("treecell");
B.setAttribute("src",zb(J));B.setAttribute("label",p);B.setAttribute("value",J);D.appendChild(B);t.appendChild(D)}else{t.setAttribute("oncommand",q+" return true;");t.setAttribute("onclick",r);t.setAttribute("oncontextmenu","LP.lpcurrcontextmenusite = '"+J+"'; return true;");t.setAttribute("context","lpt_site-context-menu");t.setAttribute("label",p);D=g.createElement("image");D.setAttribute("src",zb(J));D.setAttribute("width","16");D.setAttribute("height","16");t.appendChild(D);B=g.createElement("label");
B.setAttribute("value",p);t.appendChild(B)}if(o){D=g.getElementById("_"+A+"_submenu"+l);D.appendChild(t);if(parseInt(C)==1){t=g.createElement(h?"treeitem":"menuitem");h||t.setAttribute("class","menuitem-iconic");if(h){D=g.createElement("treerow");B=g.createElement("treecell");B.setAttribute("src",zb(J));B.setAttribute("label",p);B.setAttribute("value",J);D.appendChild(B);t.appendChild(D)}else{t.setAttribute("oncommand",q+" return true;");t.setAttribute("onclick",r);t.setAttribute("oncontextmenu",
"LP.lpcurrcontextmenusite = '"+J+"'; return true;");t.setAttribute("context","lpt_site-context-menu");t.setAttribute("label",p);D=g.createElement("image");D.setAttribute("src",zb(J));D.setAttribute("width","16");D.setAttribute("height","16");t.appendChild(D);B=g.createElement("label");B.setAttribute("value",p);t.appendChild(B)}D=g.getElementById("__favorites_submenu"+l);D.appendChild(t)}}else f[l].appendChild(t)}}}if(n)for(l=0;l<f.length;l++){t=g.createElement(h?"treeitem":"menuitem");t.setAttribute("label",
LP.lpgs("NoAccountsDefined"));f[l].appendChild(t)}for(l=0;l<f.length;l++)if(!h){t=g.createElement("menuseparator");t.setAttribute("id","menudelim");f[l].appendChild(t);D=g.createElement(h?"treeitem":"menuitem");D.setAttribute("label",LP.lpgs("AddSite"));D.setAttribute("oncommand","LP.lpOpenEditWindow(0)");f[l].appendChild(D)}}f=[];if(b.getElementById("lpt_lastpass-securenotes"))f[f.length]=b.getElementById("lpt_lastpass-securenotes");if(b.getElementById("lpt_comp-bar-securenotes-popup"))f[f.length]=
b.getElementById("lpt_comp-bar-securenotes-popup");if(b.getElementById("lpt_status-bar-securenotes-popup"))f[f.length]=b.getElementById("lpt_status-bar-securenotes-popup");if(b.getElementById("lpt_fennec-securenotes-popup"))f[f.length]=b.getElementById("lpt_fennec-securenotes-popup");if(f.length!=0){for(l=0;l<f.length;l++)for(o=f[l].childNodes.length-1;o>=0;o--)f[l].removeChild(f[l].childNodes.item(o));o=false;if(ei)for(l=0;l<f.length;l++){o=true;n=[];p=[];r=false;for(u in qa){A=qa[u].group;A=A==
""?LP.lpgs("SecureNotes"):A;if(A!=LP.lpgs("SecureNotes"))r=true;t=false;for(C=0;C<n.length;C++)if(n[C].getAttribute("id")==A+"_menu_sn_"+l){t=true;break}if(A!=LP.lpgs("SecureNotes"))if(!t){t=b.createElement("menu");t.setAttribute("id",A+"_menu_sn_"+l);J=A==""?LP.lpgs("SecureNotes"):A;t.setAttribute("label",LP.fix_group_name(J));D=b.createElement("menupopup");D.setAttribute("ignorekeys",false);D.setAttribute("id","_"+A+"_submenu_sn_"+l);t.appendChild(D);n[n.length]=t;p[J]=D}}if(r){n.sort(Ti);for(u=
0;u<n.length;u++){A=n[u].id;J=A.replace(/_menu_sn_\d+$/,"");A=J.split("\\");if(A.length==1)f[l].appendChild(n[u]);else{q=null;r="";for(C=0;C<A.length-1;C++){if(r!="")r+="\\";r+=A[C];t=p[r];if(!t){t=b.createElement("menu");t.setAttribute("id",r+"_menu_sn_"+l);t.setAttribute("label",LP.fix_group_name(A[C]));D=b.createElement("menupopup");D.setAttribute("ignorekeys",false);D.setAttribute("id","_"+r+"_submenu_sn_"+l);t.appendChild(D);q?q.appendChild(t):f[l].appendChild(t);t=p[r]=D}q=t}n[u].setAttribute("label",
LP.fix_group_name(A[A.length-1]));q.appendChild(n[u])}}}else o=false}n=true;for(u in qa){p=qa[u].name;J=qa[u].id;A=qa[u].group;A=A==""?LP.lpgs("SecureNotes"):A;q="LP.lpOpenEditWindow('"+J+"');";r="if (event.button == 1) { "+q+" LP.lpCloseMenus(document); }";n=false;for(l=0;l<f.length;l++){t=b.createElement("menuitem");t.setAttribute("class","menuitem-iconic");t.setAttribute("oncommand",q+" return true;");t.setAttribute("onclick",r);t.setAttribute("oncontextmenu","LP.lpcurrcontextmenusite = '"+J+"'; return true;");
t.setAttribute("context","lpt_site-context-menu");t.setAttribute("label",p);D=b.createElement("image");D.setAttribute("src",zb(J),true);D.setAttribute("width","16");D.setAttribute("height","16");t.appendChild(D);B=b.createElement("label");B.setAttribute("value",p);t.appendChild(B);if(o)if(A==LP.lpgs("SecureNotes"))f[l].appendChild(t);else{D=b.getElementById("_"+A+"_submenu_sn_"+l);D.appendChild(t)}else f[l].appendChild(t)}}if(n)for(l=0;l<f.length;l++){t=b.createElement("menuitem");t.setAttribute("label",
LP.lpgs("NoSecureNotesDefined"));f[l].appendChild(t)}if(!yc)for(l=0;l<f.length;l++){t=b.createElement("menuseparator");t.setAttribute("id","menudelim");f[l].appendChild(t);D=b.createElement("menuitem");D.setAttribute("label",LP.lpgs("AddSecureNote"));D.setAttribute("oncommand","LP.lpOpenEditWindow(0, false, true)");f[l].appendChild(D)}}}}};this.lpLaunchUrl=function(b,c,d,e,f,g,h,j,l,o,n){if(typeof f=="undefined"||f==null)if(y[b])f=false;qc[b]=cb();if(y[b]){if(!f&&!j&&(Dc||y[b].pwprotect))if(!LP.securityPrompt())return;
if(y[b]&&y[b].logins.length>0){b=y[b];c=[];if(typeof h!="undefined"&&h!=null&&h>=0&&h<b.otherlogins.length)h=Array(b.otherlogins[h]);else{h=b.logins;if(h.length==1)for(var p=b.otherlogins.length-1;p>=0;p--)if((b.otherlogins[p].fields.length>0||b.otherlogins[p].otherfields.length>0)&&b.otherlogins[p].url==h[0].url){h=Array(b.otherlogins[p]);break}}j=[];var q=h[0].fields;for(p=0;typeof q!="undefined"&&p<q.length;p++){var r=q[p].name;j[r]="1";c[c.length]=q[p]}if(typeof b.otherlogins!="undefined")for(p=
b.otherlogins.length-1;p>=0;p--)for(d=0;d<b.otherlogins[p].fields.length;d++){r=b.otherlogins[p].fields[d].name;if(typeof j[r]=="undefined"){c[c.length]=b.otherlogins[p].fields[d];j[r]="1"}}for(d=0;typeof h[0].fields!="undefined"&&d<b.logins[0].fields.length;d++){r=b.logins[0].fields[d].name;if(typeof j[r]=="undefined"){c[c.length]=b.logins[0].fields[d];j[r]="1"}}if(h.length!=0){j=h[0].url;var u=false,t=false;if(!b.isbookmark){for(d=0;d<h.length;d++){p=h[d].url;if(o&&d==0)p=o.location.href;else if(e&&
!g&&d==0)p=LP.lpgetcurrenturl(e);r=typeof h[d].submit_id!="undefined"?h[d].submit_id:"";var C=typeof h[d].captcha_id!="undefined"?h[d].captcha_id:"",A=typeof h[d].custom_js!="undefined"?h[d].custom_js:"";q=h[d].unencryptedUsername;for(var J=K(h[d].password),D=K(h[d].openid_url),B=0;B<wa.length;B++)if(p==wa[B].url)break;wa[B]=[];wa[B].aid=b.id;wa[B].multi=d<h.length-1?true:false;wa[B].secondary=d>0?true:false;wa[B].url=p;wa[B].submit_id=r;wa[B].captcha_id=C;wa[B].custom_js=A;wa[B].u=q;wa[B].p=J;wa[B].o=
D;wa[B].uname=h[d].uname;wa[B].pname=h[d].pname;wa[B].oname=h[d].oname;wa[B].login=h[d];wa[B].create_time=cb();wa[B].onlyfill=f?true:false;wa[B].save_all=b.save_all?true:false;wa[B].overlay_shown=false;wa[B].fields=[];q=c;for(p=0;p<q.length;p++){C=q[p].type;r=q[p].name;A=q[p].value;if(C=="text"||C=="password")A=K(A);else if(C=="checkbox")A=q[p].checked;wa[B].fields[r]=A;if(b.basic_auth&&d==0)u=true}wa[B].otherfields=[];q=h[d].otherfields;for(p=0;typeof q!="undefined"&&p<q.length;p++){C=q[p].type;
r=q[p].name;A=q[p].value;J=q[p].formname;if(C=="text"||C=="password"||C=="textarea")A=K(A);else if(C=="checkbox")A=q[p].checked;if(typeof wa[B].otherfields[J]=="undefined")wa[B].otherfields[J]=[];wa[B].otherfields[J][r]=A}}if(e&&!g){c=e;if(o)c=mb(o);if(He(c,f,null,null,null,o,c.contentWindow))t=true;else if(f&&He(c,f,true,null,null,o,c.contentWindow,1,null,null,n))t=true}}if(!t)if(e&&g){e.contentWindow.location.href=j;e.loginAid=b.id}else f&&!b.save_all||Zb(j,null,b.id);if(l&&e&&!e.lpfieldchanged)u=
true;!u&&vd&&eh(b.id)}}else LP.lpMakeRequest(LP.lp_base+"launchman.php","id="+LP.en(b)+"&method=ff",il)}};this.lpDoSearch=function(b){if(typeof b=="undefined")b=LP.lpGetCurrentWindow().document.getElementById("lpt_find-acct").value;LP.lpOpenSearch(b)};this.lpRestartBrowser=function(){a=Components.interfaces.nsIAppStartup;Components.classes["@mozilla.org/toolkit/app-startup;1"].getService(a).quit(a.eRestart|a.eAttemptQuit)};this.lpSearchKey=function(b,c){try{if(ga){var d=0,e,f=b.target.ownerDocument?
b.target.ownerDocument:LP.getBrowser().contentDocument,g=f.getElementById("lpsearchpanel"),h=f.getElementById("lpt_find-acct");if(!c&&b.keyCode==b.DOM_VK_ESCAPE)h.value="";if(!(!c&&b.keyCode==b.DOM_VK_TAB)){if(!g){g=f.createElement("panel");g.id="lpsearchpanel";g.setAttribute("noautofocus",true);g.setAttribute("norestorefocus",true);g.setAttribute("style","background-color:white");f.getElementById("mainPopupSet").appendChild(g)}if(h.value.length){e=tj(h.value,false);d=e.length;if(13==b.keyCode){if(!d||
typeof g.lpIndex=="undefined")LP.lpDoSearch();else{var j=e[g.lpIndex];LP.is_secure_note(j.id)?LP.lpOpenEditWindow(j.id):LP.lpLaunchUrl(j.id,j.manual,j.is_http)}h.value="";g.hidePopup()}else if(d&&!c&&(b.keyCode==b.DOM_VK_DOWN||b.keyCode==b.DOM_VK_RIGHT||b.keyCode==b.DOM_VK_UP))try{var l=b.target.ownerDocument?b.target.ownerDocument:LP.getBrowser().contentDocument;l.getElementById("lpt_find-acct");var o=l.getElementById("lpsearchpanel");if(typeof o.lpIndex=="undefined")o.lpIndex=0;if(b.keyCode==b.DOM_VK_DOWN)o.lpIndex++;
else b.keyCode==b.DOM_VK_UP&&o.lpIndex--;var n=o.childNodes.length;if(-1==o.lpIndex)o.lpIndex=n-1;else if(o.lpIndex>=n)o.lpIndex=0;for(d=0;d<n;d++)d==o.lpIndex?o.childNodes[d].setAttribute("style","-moz-appearance: none !important; background-color: #FAFAD2 !important;"):o.childNodes[d].setAttribute("style","-moz-appearance: none !important; background-color: white !important;")}catch(p){}else if(d&&!c&&b.keyCode==b.DOM_VK_RETURN){if(typeof g.lpIndex!="undefined"){LP.is_secure_note(e[g.lpIndex].id)?
LP.lpOpenEditWindow(e[g.lpIndex].id):LP.lpLaunchUrl(e[g.lpIndex].id,e[g.lpIndex].manual,e[g.lpIndex].is_http);g.hidePopup()}}else{if(d>15)d=15;Bj(g);if(d){for(o=g.lpIndex=0;o<d;o++){j=e[o];var q=f.createElement("menuitem");n="";n=LP.is_secure_note(j.id)?"LP.lpOpenEditWindow('"+j.id+"');":"LP.lpLaunchUrl('"+j.id+"', '"+j.manual+"', '"+j.is_http+"');document.getElementById('lpt_find-acct').value='';";q.setAttribute("class","menuitem-iconic");q.setAttribute("src",zb(j.id));q.setAttribute("label",ke(j));
q.setAttribute("oncommand",n);q.addEventListener("mouseover",jl,false);g.appendChild(q);0==o?q.setAttribute("style","-moz-appearance: none !important; background-color: #FAFAD2 !important;"):q.setAttribute("style","-moz-appearance: none !important; background-color: white !important;")}g.openPopup(h,"after_start",0,0,false,false)}else g.hidePopup()}}else g.hidePopup()}}}catch(r){}};this.patchNotificationBox=function(b,c){if(!b._lastpassPatched){b._lastpassPatched=true;b.__defineGetter__("_closedNotification",
function(){var g=this.__ns__closedNotification;return g&&g.parentNode?g:null});b.__defineSetter__("_closedNotification",function(g){this.__ns__closedNotification=g});if(c=="bottom"){b._dom_={};var d=this.notificationBoxPatch;for(m in d){b._dom_[m]=b[m];b[m]=d[m]}d=b.getElementsByTagName("stack");for(var e=null,f=d.length;f-- >0;)if(d[f].getAttribute("class")=="lastpass-bottom-notify"){e=d[f];break}if(!e){e=b.ownerDocument.createElement("stack");e.setAttribute("class","lastpass-bottom-notify");b.appendChild(e)}b._lastpassBottomStack_=
e}}};this.notificationBoxPatch={insertBefore:function(b,c){if(b.localName=="notification"&&b.getAttribute("value").indexOf("lp_notificationAction")==0&&gh){this._lastpassBottomStack_.insertBefore(b,null);var d=b.ownerDocument.getAnonymousElementByAttribute(b,"class","notification-inner outset");if(d)for(var e=d.ownerDocument.defaultView.getComputedStyle(d,null),f=["color","style","width"],g,h,j,l=f.length;l-- >0;){g=f[l];h=g[0].toUpperCase()+g.substring(1);j=e.getPropertyValue("border-bottom-"+g);
d.style["borderBottom"+h]=e.getPropertyValue("border-top-"+g);d.style["borderTop"+h]=j}return b}if(c&&c.parentNode!=this){d=c.priority;c=null;e=this.allNotifications;for(f=e.length;f-- >0;)if((c=e[f]).priority<d&&c.parentNode==this)break;if(f<0)c=null}return this._dom_.insertBefore.apply(this,[b,c])},removeChild:function(b){return b.parentNode==this?this._dom_.removeChild.apply(this,arguments):b.parentNode.removeChild(b)}};this.never_helper=function(b,c,d,e,f,g){var h=LP.getBrowser();if(h){var j=
{};if(g){j.extra2=g;gj(j,null)}else{g=[];if(typeof d!="undefined")g.key=d;if(typeof e!="undefined")g.tld=e;if(typeof f!="undefined"&&f!="")g.currenturl=f;j.extra=g;j.browser=h;switch(b){case 0:tl(j,null,c);break;case 1:al(LP.lpgetcurrenturl(j.browser),c);break;case 2:bl(LP.lpgetcurrenturl(j.browser),c);break;case 3:cl(LP.lpgetcurrenturl(j.browser),c);break}}}typeof LP.getBrowser().getNotificationBox=="function"&&LP.getBrowser().getNotificationBox().currentNotification&&LP.getBrowser().getNotificationBox().removeCurrentNotification()};
this.fill_default_ffid=function(){if(ga){for(var b=LP.lpprefsHasUserValue("defaultffid")?LP.lpprefsGetCharPref("defaultffid"):"0",c=0;c<fa.length;c++)if(fa[c].ffid==b){LP.lp_fillFormsHelper(b);return}LP.lpConfirmYesNo(LP.lpgs("You have not yet chosen a default form fill profile.  Would you like to choose one now?"))&&LP.lpOpenPrefs()}else this.lpOpenLogin()};this.lp_fillFormsHelper=function(b,c,d){var e=LP.getBrowser();if(!LP.isFennec)if(typeof e.selectedTab!="undefined")e=e.selectedTab.linkedBrowser;
if(typeof e.contentDocument.ffidindex=="number")for(var f=0;f<fa.length;f++)if(fa[f].ffid==b){e.contentDocument.ffidindex=f;break}var g=e=null;for(f=0;f<fa.length;f++){if(fa[f].ffid==b)e=fa[f];if(d&&fa[f].ffid==d)g=fa[f]}if((Ld||e!=null&&e.pwprotect||g!=null&&g.pwprotect)&&!c)if(!LP.securityPrompt())return;Nc(LP.getBrowser(),LP.getBrowser().contentDocument,true,false,b,1,null,d)};this.lpClearFormsHelper=function(){hk(LP.getBrowser(),LP.getBrowser().contentDocument)};this.lpIdentityHelper=function(b,
c){if(b=="add")Zb(LP.lp_base+"?ac=1&addidentity=1");else if(b!=LP.GetIdentity()){for(var d=null,e=false,f=0;f<La.length;f++){if(La[f].iid==b)d=La[f];if(La[f].pwprotect)e=true}if((Kf||d!=null&&d.pwprotect||d==null&&e)&&c!=true)if(!LP.securityPrompt())return;Mc("switchidentity",{data0:b});LP.lpprefsSetCharPref("identity",b);LP.flush_prefs();Bb();c||jc()}};this.lpCreatePass=function(b,c,d,e,f,g,h,j){if(typeof b=="undefined")b=8+wd(0,1);if(typeof c=="undefined")c=true;if(typeof d=="undefined")d=true;
if(typeof e=="undefined")e=true;if(typeof f=="undefined")f=false;if(typeof g=="undefined")g=0;if(typeof h=="undefined")h=false;if(typeof j=="undefined")j=true;var l=0,o=0,n=0;if(j)l=o=n=1;j=[];if(d&&l>0)for(var p=0;p<l;p++)j[j.length]="L";if(c&&o>0)for(p=0;p<o;p++)j[j.length]="U";if(e&&g>0)for(p=0;p<g;p++)j[j.length]="D";if(f&&n>0)for(p=0;p<n;p++)j[j.length]="S";for(;j.length<b;)j[j.length]="A";j.sort(function(){return wd(0,1)*2-1});g="";l="abcdefghjkmnpqrstuvwxyz";h||(l+="ilo");if(d)g+=l;d="ABCDEFGHJKMNPQRSTUVWXYZ";
h||(d+="ILO");if(c)g+=d;c="23456789";h||(c+="10");if(e)g+=c;if(f)g+="!@#$%^&*";e="";for(f=0;f<b;f++){var q;switch(j[f]){case "L":q=l;break;case "U":q=d;break;case "D":q=c;break;case "S":q="!@#$%^&*";break;case "A":q=g;break}p=wd(0,q.length-1);e+=q.charAt(p)}return e};this.lpCopyPassToClipboard=function(){var b=lpCreatePass();LP.lpCopyStringToClipboard(b)||LP.lpalert_ex(LP.lpgs("ErrorCopyingToClipboard"))};this.lpCopyStringToClipboard=function(b){var c=Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);
c.copyString(b);LP.lpprefsHasUserValue("clearClipboard")&&LP.lpprefsGetBoolPref("clearClipboard")&&LP.lpGetCurrentWindow().setTimeout(function(){var d=Components.classes["@mozilla.org/widget/clipboard;1"].getService(Components.interfaces.nsIClipboard);if(d){var e=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);if(e){e.addDataFlavor("text/unicode");d.getData(e,d.kGlobalClipboard);d={};var f={};e.getTransferData("text/unicode",d,f);if(d)d=
d.value.QueryInterface(Components.interfaces.nsISupportsString);if(d)pastetext=d.data.substring(0,f.value/2);d==b&&c.copyString("")}}},LP.get_clearClipboardSecsVal()*1E3);return true};this.get_clearClipboardSecsVal=function(){var b=30;if(LP.lpprefsHasUserValue("clearClipboardSecsVal"))b=LP.lpprefsGetIntPref("clearClipboardSecsVal");else if(LP.lpprefsHasUserValue("clearClipboardVal")){b=LP.lpprefsGetIntPref("clearClipboardVal");b=b==1?30:b*60}return b};this.get_recentUsedCount=function(){var b=10;
if(LP.lpprefsHasUserValue("recentUsed"))if(LP.lpprefsGetBoolPref("recentUsed")){if(LP.lpprefsHasUserValue("recentUsedCount"))b=LP.lpprefsGetIntPref("recentUsedCount")}else b=0;return b};this.get_searchNotesVal=function(){if(LP.lpprefsHasUserValue("searchNotesVal"))return LP.lpprefsGetIntPref("searchNotesVal");return 200};this.get_searchNotesB64Length=function(){var b=0;if(LP.lpprefsHasUserValue("searchNotes")&&LP.lpprefsGetBoolPref("searchNotes")){b=Math.floor((4*LP.get_searchNotesVal()-3)/3);if(b%
64!=0)b=b-b%64+64}return b};this.fill_current=function(b){if(y[b]){if(Dc||y[b].pwprotect)if(!LP.securityPrompt())return;var c=LP.getBrowser().selectedTab.linkedBrowser;if(c){c=LP.lpgetcurrenturl(c);if(c=Md[c])c.value=Kb(y[b],1)}}};this.lp_generatePasswordAndFillFormsHelper=function(b){for(var c=null,d=0;d<fa.length;d++)if(fa[d].ffid==b)c=fa[d];if(Ld||c!=null&&c.pwprotect)if(!LP.securityPrompt())return;Nc(LP.getBrowser(),LP.getBrowser().contentDocument,true,false,b);LP.lpOpenGenPWWindow()};this.lp_generatePasswordComplete=
function(b,c,d){var e=LP.lpgetcurrenturl(b?b.browser:LP.getBrowser()),f=LP.lpgs("Generated Password for")+" "+Ua(e);c="url="+LP.en(Ka(e))+"&password="+LP.en(P(c))+"&name="+LP.en(P(f,void 0));c+=LP.GetIdentityParam();b||(c+="&nofill=1");LP.lpMakeRequest(LP.lp_base+"save_gen_pw.php",c,ul);if(!LP.lpprefsHasUserValue("SaveGenAlert")){LP.alert(LP.lpgs("SaveGenAlert"),d);LP.lpprefsSetBoolPref("SaveGenAlert",true,true)}};this.lp_noteAcceptPre=function(b){if(typeof LP.getBrowser().getNotificationBox=="function"){var c=
LP.getBrowser().getNotificationBox().currentNotification;if(c){Of(c.aid,c,b);LP.getBrowser().getNotificationBox().removeNotification(c)}}};this.lp_noteAcceptHelper=function(b,c,d,e){if(typeof y[b]!="undefined")try{c||(c=LP.isFennec?LP.fennecBrowser.selectedBrowser:LP.getBrowser().selectedTab.linkedBrowser);var f=c.contentDocument,g=null,h=null,j=false,l=-1;if(f.aid!=null&&typeof f.aid=="object")for(var o=0;o<f.aid.length;o++)if(f.aid[o].id==b){j=f.aid[o].needsnewurid;l=f.aid[o].otherlogin;h=f.aid[o].url;
if(typeof f.aidindex=="number")f.aidindex=o;break}var n=c.contentWindow;if(h&&n.location.href!=h){if(n&&n.frames){var p=n.frames.length;if(p>10)p=10;for(o=0;o<p;o++)if(n.frames[o].document)if(h==n.frames[o].document.location.href){g=n.frames[o].document;break}}}else if(h&&n.location.href==h)g=n.document;c.contentDocument.LPlpsaveforminfo=null;c.contentDocument.m_filledAid=null;if(d){f=false;if(Dc||y[b].pwprotect)if(Hd)if(cb()-de<Hd)f=true;if(!Dc&&!y[b].pwprotect||f||LP.securityPrompt()){LP.lpLaunchUrl(b,
1,0,c,d,false,l,null,null,g,e);if(y[b]&&!y[b].save_all)if(y[b].logins[0].fields.length==0||y[b].urid==0||j)c.contentDocument.LPlpsaveforminfo=b}}d||LP.lpGetCurrentWindow().setTimeout(function(){LP.lpLaunchUrl(b,1,0,c,d,false,l,null,null,g)},0)}catch(q){U("Notification Error for aid: "+b+" "+q+" ln: "+q.lineNumber)}};this.lp_noteAcceptNeverPre=function(){if(typeof LP.getBrowser().getNotificationBox=="function"){var b=LP.getBrowser().getNotificationBox().currentNotification;if(b){gj(b,"");LP.getBrowser().getNotificationBox().removeNotification(b)}}};
this.lpUploadForms=function(b){sc(false,b,1,null,0,0,false,false,true)};this.securityPrompt=function(b){if(Lf||ac){var c=wb("password_offline");if(c&&c!="")if(wb("type")=="trueapi")if(Aa()&&LP.lpis_win&&typeof ba.trueapi_get_hash=="function")if(ba.trueapi_get_hash(Z)==c)return true;c=LP.getsinglefactortype();if(ac||c=="vtapi"){if(Aa()&&LP.lpis_mac&&typeof ba.lpvt_verify_user=="function"){var d=ba.lpvt_verify_user("",LP.lpgs("Swipe finger"),LP.lpgs("Swipe your finger on the fingerprint sensor"),LP.lpgs("Cancel"));
if(d!=""){d=d.split("|");if(d.length==2)if(na!=""&&na==Da(za(sb(decodeURIComponent(d[0]))+decodeURIComponent(d[1]))))return true}}if(ac&&xa)return false}if(c=="validity")if(Aa()&&LP.lpis_win&&typeof ba.validity_verify_user=="function"){d=ba.validity_verify_user("",LP.lpgs("Swipe finger"),LP.lpgs("Swipe your finger on the fingerprint sensor"),LP.lpgs("Cancel"));if(d!=""){d=d.split("|");if(d.length==2)if(na!=""&&na==Da(za(sb(decodeURIComponent(d[0]))+decodeURIComponent(d[1]))))return true}}}if(Hd)if(cb()-
de<Hd)return true;if(typeof b=="undefined")b=LP.lpGetCurrentWindow();c={logincase:0,authorized:0};b.openDialog(eb+"content/login.xul","_blank","resizable,chrome,titlebar,toolbar,centerscreen,modal",c);LP.last_dialog_close=(new Date).getTime();if(0==c.authorized)return false;return true};this.lpOpenFavorites=function(){for(var b=false,c=0;c<bb.length;c++)b|=y[bb[c].id].pwprotect;if(Dc||b)if(!LP.securityPrompt())return;ge=true;for(c=0;c<bb.length;c++){b=bb[c].command;LP.lpLaunchUrl(b.aid,b.manual,b.is_http,
null,null,null,null,true)}ge=false};this.OpenGroup=function(b,c,d){c=[];var e=false,f=b.treeBoxObject,g=f.view.getLevel(d);for(d+=1;;){if(d>=f.view.rowCount)break;if(f.view.getLevel(d)<=g)break;if(!f.view.isContainer(d)){var h=b.view.getItemAtIndex(d).getAttribute("id");if(y[h]&&!y[h].genpw){c[c.length]=y[h];e|=y[h].pwprotect}}d++}if(c.length>5)if(!LP.lpConfirmYesNo(LP.lpgs("Are you sure you would like to launch all sites?")))return;if(Dc||e)if(!LP.securityPrompt())return;ge=true;for(b=0;b<c.length;b++)LP.lpLaunchUrl(c[b].id,
c[b].manual,c[b].is_http,null,null,null,null,true);ge=false};var jh=0;this.lpToggleDebug=function(){ae=!ae;for(var b=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");b.hasMoreElements();){var c=b.getNext();hj(c.document)}};this.lpOpenPrefs=function(b,c){LP.lpGetCurrentWindow().openDialog(eb+"content/prefs.xul","_blank","chrome,modal,resizable,centerscreen",b,c)};this.lpOpenChangePassword=function(){xa?LP.lpGetCurrentWindow().openDialog(eb+
"content/changemasterpw.xul","_blank","chrome,modal,resizable,centerscreen"):LP.lpbaseopen("?ac=1&opensettings=1")};this.lpfeedback=function(b,c,d,e){var f=LP.lpgetcurrenturl(LP.getBrowser());b="fb=1&subj="+LP.en(b)+"&desc=ff("+LP.lp_getFFVersion()+") lp("+Wb+") "+LP.en(c)+"&site="+LP.en(d)+"&email="+LP.en(e)+"&url="+LP.en(f)+"&compact="+LP.en(Re?"1":"0")+"&curforms="+LP.en(sc(false,true,2,null,0,0,false,false,true));LP.lpMakeRequest(LP.lp_base+"error.php",b,null)};this.lpToggleToolbar=function(){var b=
LP.lpGetCurrentWindow(),c=b.document.getElementById("lpt_lastpass-toolbar");if(c){b=b.fullScreen?"moz-collapsed":"collapsed";if(c.hasAttribute(b)&&c.getAttribute(b)=="true"){c.removeAttribute("moz-collapsed");c.removeAttribute("collapsed")}else c.setAttribute(b,true)}};this.lpSetHideShowText=function(){var b=LP.lpGetCurrentWindow(),c=b.document,d=c.getElementById("lpt_lastpass-toolbar");c=c.getElementById("lpt_status-bar-tbctrl");if(d&&c){b=b.fullScreen?"moz-collapsed":"collapsed";c.label=d.hasAttribute(b)&&
d.getAttribute(b)=="true"?LP.lpgs("ShowToolbar"):LP.lpgs("HideToolbar")}};this.gecko_version=function(){return Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULAppInfo).platformVersion};this.lpOpenAbout=function(){if(yg!=""){for(var b="lp.perf",c=0;yb(b);){b="lp.perf."+c;c++}Yb(b,yg);yg="";c=td(b,false);LP.lpalert_ex("Wrote perf data to "+c.path+"/"+b)}b=LP.lpgs("LastPassFFToolbar");if(xa)b+=" ("+LP.lpgs("LastPass Local")+")";b+="\n\n";b+=LP.lpgs("Version")+
" "+Wb;b+="\n";b+=LP.lpgs("Built")+" "+LP.lpbuilt;b+="\n";b+=LP.lpgs("FastEncryption")+": "+LP.lpgs(Aa());b+="\n\n"+LP.lpgs("CopyLicense");b=b.replace(" 2008 "," 2008-"+(new Date).getFullYear()+" ");LP.lpalert_ex(b)};this.lpOtherSessions=function(){LP.lpbaseopen("sess.php")};this.lpSecCheck=function(){LP.lpbaseopen("?securitychallenge=1")};this.lpRebuildToolsMenu_all=function(b){for(var c=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");c.hasMoreElements();){var d=
c.getNext();LP.lpRebuildToolsMenu(d.document,d,b)}};this.lpRebuildToolsMenu=function(b,c,d){if(typeof c.getBrowser=="function"){var e=c.getBrowser();if(!(null==e&&!LP.isFennec))if(!(!LP.isFennec&&(typeof e.selectedTab=="undefined"||e.selectedTab==null))){e=LP.isFennec?LP.fennecBrowser.selectedBrowser.contentDocument.location.href:LP.lpgetcurrenturl(e.selectedTab.linkedBrowser);var f=Ua(e);if(LP.compare_tlds(f,"blank"))f="";if(d)if(LP.compare_tlds(typeof c.lp_last_tld!="undefined"?c.lp_last_tld:"",
f)){var g=false;for(d=0;d<ad.length;d++)if(LP.compare_tlds(f,ad[d].tld)){g=true;break}if(!g)return}c.lp_last_tld=f;var h=b.getElementById("lpt_lpcopyusernamepopup");if(h)for(d=h.childNodes.length-1;d>=0;d--)h.removeChild(h.childNodes.item(d));if(h=b.getElementById("lpt_lpcopypasswordpopup"))for(d=h.childNodes.length-1;d>=0;d--)h.removeChild(h.childNodes.item(d));if(h=b.getElementById("lpt_lpautofillpopup"))for(d=h.childNodes.length-1;d>=0;d--)h.removeChild(h.childNodes.item(d));c=cb();g=[];var j=
false;if(b.getElementById("lpt_lastpass-compact-menu")){g[g.length]=b.getElementById("lpt_lastpass-compact-menu");j=true}if(b.getElementById("lpt_lastpass-fennec-menu"))g[g.length]=b.getElementById("lpt_lastpass-fennec-menu");if(b.getElementById("lpt_lp-tools-menu"))g[g.length]=b.getElementById("lpt_lp-tools-menu");if(b.getElementById("lpt_status-bar-menu"))g[g.length]=b.getElementById("lpt_status-bar-menu");if(b.getElementById("lpt_comp-bar-tools-menu"))g[g.length]=b.getElementById("lpt_comp-bar-tools-menu");
for(var l,o=0;o<g.length;o++){l=g[o];for(d=0;d<l.childNodes.length;d++){var n=l.childNodes.item(d).getAttribute("id");if(n=="menudelim"||n=="menudelim2")break}n=d;for(d=l.childNodes.length-1;d>=n;d--)l.removeChild(l.childNodes.item(d));if(ga&&(!j||o!=0)){var p=b.createElement("menuseparator");p.setAttribute("id","menudelim2");l.appendChild(p);var q=b.createElement("menuitem");q.setAttribute("label",LP.lpgs("AddSite"));q.setAttribute("oncommand","LP.lpOpenEditWindow(0)");if(l.id=="lpt_comp-bar-tools-menu"){q.setAttribute("src",
"chrome://lastpass/skin/new_small.gif");q.setAttribute("class","menuitem-iconic")}l.appendChild(q);if(!yc){h=b.createElement("menuitem");h.setAttribute("label",LP.lpgs("AddSecureNote"));h.setAttribute("oncommand","LP.lpOpenEditWindow(0, false, true)");if(l.id=="lpt_comp-bar-tools-menu"){h.setAttribute("src","chrome://lastpass/skin/note_add.png");h.setAttribute("class","menuitem-iconic")}l.appendChild(h)}if(l.id!="lpt_comp-bar-tools-menu"){h=b.createElement("menuitem");h.setAttribute("label",LP.lpgs("Save All Entered Data"));
h.setAttribute("oncommand","LP.lpOpenEditWindow(0, false, false, null, true)");h.setAttribute("key","lpt_key_lpSaveAll");l.appendChild(h)}}if(l.id=="lpt_comp-bar-tools-menu")break;n=true;var r=false,u=Ra(e),t;p=Ta(e,u);t=f;var C=[];Rf(C,Pb,0,p,t,LP.lpgs("Never Add Site"));Rf(C,tc,1,p,t,LP.lpgs("Never Generate Password"));Rf(C,uc,2,p,t,LP.lpgs("Never Fill Forms"));Rf(C,pc,3,p,t,LP.lpgs("Never AutoLogin"));t=C;if(t.length){p=b.createElement("menuseparator");p.setAttribute("id","menudelim");l.appendChild(p);
for(d=0;d<t.length;d++){p=b.createElement("menu");p.setAttribute("image","chrome://lastpass/skin/x.gif");p.setAttribute("class","menu-iconic");C=t[d].title+(t[d].domain?" "+LP.lpgs("(domain)"):"");p.setAttribute("label",C);q=b.createElement("menupopup");C=b.createElement("menuitem");C.setAttribute("label",LP.lpgs("Delete"));C.setAttribute("oncommand","LP.lpDeleteNever('"+t[d].url+"', '"+t[d].type+"');");q.appendChild(C);p.appendChild(q);l.appendChild(p)}}for(d in Nd)if(c-y[d].last_touch<=600||LP.compare_tlds(y[d].tld,
f)){if(n){p=b.createElement("menuseparator");p.setAttribute("id","menudelim");l.appendChild(p);n=false}r=true;p=b.createElement("menuitem");p.setAttribute("src",zb(y[d].id));p.setAttribute("class","menuitem-iconic");p.setAttribute("label",LP.lpgs("Copy")+" "+y[d].name);p.setAttribute("oncommand","LP.lpCopyPassword('"+d+"');");p.setAttribute("oncontextmenu","LP.lpcurrcontextmenusite = '"+d+"'; return true;");p.setAttribute("context","lpt_site-context-menu");l.appendChild(p);if(o==0&&!y[d].isbookmark)if(h=
b.getElementById("lpt_lpcopypasswordpopup")){p=b.createElement("menuitem");p.setAttribute("class","menuitem-iconic");p.setAttribute("src",zb(y[d].id));p.setAttribute("label",y[d].name);p.setAttribute("oncommand","LP.lpCopyPassword('"+d+"');");h.appendChild(p)}}n=true;t=false;C=[];p=LP.isFennec?b:LP.getBrowser().selectedTab.linkedBrowser.contentDocument;if(p.aid&&typeof p.aid=="object"){C=p.aid;t=true}else{p=typeof sa[f]!="undefined"?sa[f]:[];for(d in p)if(typeof y[d]!="undefined"&&!y[d].genpw)C[C.length]=
y[d];C=Bf(ad,C,f,typeof u.path=="string"?u.path:"",u.host,y,ce(u))}for(u=0;u<C.length;u++){d=C[u].id;if(typeof y[d]!="undefined"){if(n&&!r){p=b.createElement("menuseparator");p.setAttribute("id","menudelim");l.appendChild(p)}if(r){r=b.createElement("menuseparator");r.setAttribute("id","menudelimcopy");l.appendChild(r);r=false}q=ke(y[d]);if(LP.isFennec){h=b.createElement("menuitem");h.setAttribute("label",q);h.setAttribute("oncommand","LP.lpAutoFill('"+d+"');");l.appendChild(h);n=false}else{p=b.createElement("menu");
p.setAttribute("image",zb(y[d].id));p.setAttribute("label",q);p.setAttribute("class","menu-iconic");n&&t&&p.setAttribute("style","font-weight: bold;");n=false;q=b.createElement("menupopup");q.setAttribute("ignorekeys",false);if(typeof nofilloption=="undefined"||nofilloption!=1){h=b.createElement("menuitem");h.setAttribute("label",LP.lpgs("AutoFill"));h.setAttribute("oncommand","LP.lpAutoFill('"+d+"');");q.appendChild(h);h=b.createElement("menuitem");h.setAttribute("label",LP.lpgs("Copy Username"));
h.setAttribute("oncommand","LP.lpCopyUsername('"+d+"');");q.appendChild(h);h=b.createElement("menuitem");h.setAttribute("label",LP.lpgs("Copy Password"));h.setAttribute("oncommand","LP.lpCopyPassword('"+d+"');");q.appendChild(h);h=b.createElement("menuitem");h.setAttribute("label",LP.lpgs("Edit"));h.setAttribute("oncommand","LP.lpOpenEditWindow('"+d+"');");q.appendChild(h);h=b.createElement("menuitem");h.setAttribute("label",LP.lpgs("Go to URL"));h.setAttribute("oncommand","LP.GotoURL('"+d+"');");
q.appendChild(h);h=b.createElement("menuitem");h.setAttribute("label",LP.lpgs("Delete"));h.setAttribute("oncommand","setTimeout('LP.lpConfirmDeleteSite(\""+d+"\");', 0);");q.appendChild(h)}p.appendChild(q);p.setAttribute("oncontextmenu","LP.lpcurrcontextmenusite = '"+d+"'; return true;");p.setAttribute("context","lpt_site-context-menu");l.appendChild(p);q=ke(y[d]);if(o==0&&!y[d].isbookmark){if(!y[d].genpw)if(h=b.getElementById("lpt_lpcopyusernamepopup")){p=b.createElement("menuitem");p.setAttribute("class",
"menuitem-iconic");p.setAttribute("src",zb(y[d].id));p.setAttribute("label",q);p.setAttribute("oncommand","LP.lpCopyUsername('"+d+"');");h.appendChild(p)}if(h=b.getElementById("lpt_lpcopypasswordpopup")){p=b.createElement("menuitem");p.setAttribute("class","menuitem-iconic");p.setAttribute("src",zb(y[d].id));p.setAttribute("label",q);p.setAttribute("oncommand","LP.lpCopyPassword('"+d+"');");h.appendChild(p)}if(!y[d].genpw)if(h=b.getElementById("lpt_lpautofillpopup")){p=b.createElement("menuitem");
p.setAttribute("class","menuitem-iconic");p.setAttribute("src",zb(y[d].id));p.setAttribute("label",q);p.setAttribute("oncommand","LP.lpAutoFill('"+d+"');");h.appendChild(p)}}}}}}if((h=b.getElementById("lpt_lpcopyusernamepopup"))&&h.childNodes.length==0){p=b.createElement("menuitem");p.setAttribute("label",LP.lpgs("NoMatchingSites"));p.setAttribute("disabled","true");h.appendChild(p)}if((h=b.getElementById("lpt_lpcopypasswordpopup"))&&h.childNodes.length==0){p=b.createElement("menuitem");p.setAttribute("label",
LP.lpgs("NoMatchingSites"));p.setAttribute("disabled","true");h.appendChild(p)}if((h=b.getElementById("lpt_lpautofillpopup"))&&h.childNodes.length==0){p=b.createElement("menuitem");p.setAttribute("label",LP.lpgs("NoMatchingSites"));p.setAttribute("disabled","true");h.appendChild(p)}e=[];e[0]=b.getElementById("lpt_lpupdate1");e[1]=b.getElementById("lpt_lpupdate2");e[2]=b.getElementById("lpt_lpupdate3");for(u=0;u<e.length;u++)if(b=e[u])if(wh){b.setAttribute("label",LP.lpgs("LastPass update available"));
b.setAttribute("class","menuitem-iconic");b.setAttribute("src","chrome://lastpass/skin/exclamation.png")}else b.setAttribute("label",LP.lpgs("Check For Updates"))}}};this.lpDeleteNever=function(b,c){if(LP.lpConfirmYesNo(LP.lpgs("Are you sure you would like to delete this never URL?"))){var d=Pb;if(c==1)d=tc;if(c==2)d=uc;if(c==3)d=pc;jj(d,b);Xa++;rb++;(d=vb())&&El(d,b,c)&&vc(d,Xa)&&Ab(d,null,"lpDeleteNever");LP.lpGetCurrentWindow().setTimeout("LP.lpRebuildToolsMenu_all();",0);d="delete=1&type="+LP.en(c)+
"&url="+LP.en(b);LP.lpMakeRequest(LP.lp_base+"add_never.php",d,function(){})}};this.lpusexpcom=function(){return Aa()};this.lpes=function(b){return cd(b)};this.lp_sort_case_insensitive=function(b,c){b=b.toLowerCase();c=c.toLowerCase();return b<c?-1:1};this.lp_sort_case_insensitive_url=function(b,c){if(!c.url||!b.url)return-1;b=b.url.toLowerCase();c=c.url.toLowerCase();var d=Ra(b),e=ob(d.host,b),f=Ra(c),g=ob(f.host,c);if(e!=g)return e<g?-1:1;else if(d.host!=f.host)return d.host<f.host?-1:1;return b<
c?-1:1};this.lp_sort_case_insensitive_name=function(b,c){b=b.name.toLowerCase();c=c.name.toLowerCase();return b<c?-1:1};this.lp_sort_case_insensitive_group=function(b,c){b=b.group.toLowerCase();c=c.group.toLowerCase();return b<c?-1:1};this.lp_sort_case_insensitive_username=function(b,c){b=b.logins.length>0?b.logins[0].unencryptedUsername.toLowerCase():"";c=c.logins.length>0?c.logins[0].unencryptedUsername.toLowerCase():"";return b<c?-1:1};this.lp_sort_case_insensitive_lasttouch=function(b,c){b=b.last_touch;
c=c.last_touch;return b<c?-1:1};this.lp_sort_case_insensitive_note=function(b,c){b=b.extra&&b.extra.length>0==true?1:0;c=c.extra&&c.extra.length>0==true?1:0;return b<c?-1:1};this.lp_sort_case_insensitive_pwprotect=function(b,c){b=b.pwprotect==true?1:0;c=c.pwprotect==true?1:0;return b<c?-1:1};this.lp_sort_case_insensitive_autofill=function(b,c){b=parseInt(b.autologin)==1?1:0;c=parseInt(c.autologin)==1?1:0;return b<c?-1:1};this.lpOpenImport=function(b){var c=Components.interfaces.nsIFilePicker,d=Components.classes["@mozilla.org/filepicker;1"].createInstance(c);
d.init(LP.lpGetCurrentWindow(),LP.lpgs("Select a file to import"),c.modeOpen);if(b=="Roboform"||"hppwsafe"==b)d.appendFilters(c.filterHTML);else if("passpack"==b||"lastpass"==b||"TurboPasswords"==b||"passkeep"==b||"csv"==b||"splashid"==b||"passwordsmax"==b)d.appendFilter(LP.lpgs("CSVFiles"),"*.csv");else if("1password"==b)d.appendFilters(c.filterAll);else if("msi"==b||"ewallet"==b||"pins"==b||"pwcoral"==b||"passworddragon"==b||"darnpasswords"==b)d.appendFilters(c.filterText);else"clipperz"==b?d.appendFilter(LP.lpgs("JSON Files"),
"*.json;*.txt"):d.appendFilters(c.filterXML);if(d.show()==c.returnOK){qf=b;c=Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream);c.init(d.file,-1,-1,false);d=b=="Roboform"?"UTF-16":b=="pwagent"?"windows-1252":"UTF-8";var e=Components.interfaces.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER;b=Components.classes["@mozilla.org/intl/converter-input-stream;1"].createInstance(Components.interfaces.nsIConverterInputStream);b.init(c,
d,1024,e);Be="";for(d={};b.readString(4096,d)!=0;)Be+=d.value;b.close();c.close();c=LP.lp_base+"import.php?fromplugin=1";c+=LP.GetIdentityParam();Zb(c)}};this.lpOpenImportInstructions=function(b){LP.lpalert_ex(LP.lpgs(b+"Instructions"))};this.lp_test_xpcom=function(){try{var b=Components.classes["@lastpass.com/XPCOM/LastPass;1"];b=b.createInstance();b=b.QueryInterface(Components.interfaces.iLastPass);LP.lpalert_ex(b.encrypt(Ka(na),"hi")+" "+P("hi"));var c=b.encrypt(Ka(na),"hi");LP.lpalert_ex(b.decrypt(Ka(na),
c))}catch(d){LP.lpalert_ex(d.toString())}};this.lpSetupIdleTimer=function(){try{var b=Components.classes["@mozilla.org/widget/idleservice;1"];if(b){var c=b.getService(Components.interfaces.nsIIdleService);if(c){var d=Components.classes["@mozilla.org/timer;1"];if(d){if(kf!=null){c.removeIdleObserver(kf,ug);kf=null}if(zk){ug=wg*60;kf={observe:function(){ga&&Ia()}};if(xl(ug)){c.addIdleObserver(kf,ug);ci=cb();yk=d.createInstance(Components.interfaces.nsITimer);yk.initWithCallback({notify:LP.checkSleep},
1E4,Components.interfaces.nsITimer.TYPE_REPEATING_SLACK)}}}}}}catch(e){}};this.checkSleep=function(){var b=cb();wg!=0&&wg*60<b-ci&&ga&&Ia();ci=b};this.setupPollTimer=function(){try{var b=Components.classes["@mozilla.org/widget/idleservice;1"];if(b)if(b.getService(Components.interfaces.nsIIdleService)){var c=Components.classes["@mozilla.org/timer;1"];if(c){if(lf!=null){lf.cancel();lf=null}lf=c.createInstance(Components.interfaces.nsITimer);lf.initWithCallback({notify:LP.pollServer},6E4,Components.interfaces.nsITimer.TYPE_REPEATING_SLACK)}}}catch(d){}};
this.pollServer=function(){if(ga&&Rd("active")==null){var b=cb();LP.lpprefsSetIntPref("lastpollcheck",b);LP.lpprefsHasUserValue("logOffWhenCloseBrowser")&&LP.lpprefsGetBoolPref("logOffWhenCloseBrowser")&&LP.lpprefsHasUserValue("logOffWhenCloseBrowserVal")&&LP.lpprefsGetIntPref("logOffWhenCloseBrowserVal")&&LP.flush_prefs();var c=0;if(!LP.lpprefsHasUserValue("pollServer")||LP.lpprefsGetBoolPref("pollServer"))c=(LP.lpprefsHasUserValue("pollServerVal")?LP.lpprefsGetIntPref("pollServerVal"):15)*6E4;if(c!=
0){var d=Components.classes["@mozilla.org/widget/idleservice;1"];if(d)if(d=d.getService(Components.interfaces.nsIIdleService)){b=(b-Uh)*1E3;var e=false;if(d.idleTime<c){if(b>=c)e=true}else if(b>=(Tf?c*12:c*60))e=true;if(e){c=LP.lp_base+"poll_server.php";d="";if(rd!=""&&Ib!=""){c=c.replace(/^https:\/\//,"http://");d="sidhash="+LP.en(za(Ib))}LP.lpMakeRequest(c,d,wl);Uh=cb()}}else U("idleservice does not exist!",null);else U("idleservice component does not exist!",null)}}};this.lpOpenExport=function(b){if(!LP.getGeneratedPw())if(!LP.securityPrompt())return;
if("firefox"==b)if(LP.islastpass){if(LP.lpConfirmYesNo(LP.lpgs("ExportChrome")))LP.lpConfirmYesNo(LP.lpgs("ExportAll"))?mh(true,true):mh(true,false)}else LP.lpConfirmYesNo(LP.lpgs("ExportAll"))&&mh(true,true);else if(b!="csv"&&b!="xml")LP.lpalert_ex("Format not supported");else{b=b=="xml";var c=Components.interfaces.nsIFilePicker,d=Components.classes["@mozilla.org/filepicker;1"].createInstance(c);d.init(LP.lpGetCurrentWindow(),LP.lpgs("Select a file to export to"),c.modeSave);if(b){d.appendFilters(c.filterXML);
d.defaultExtension="xml"}else{d.appendFilter(LP.lpgs("CSVFiles"),"*.csv");d.defaultExtension="csv"}var e=d.show();if(e==c.returnOK||e==c.returnReplace)if(b){var f=vb();f&&Ab(f,d.file,"lpOpenExport")}else{b=Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);c=Components.interfaces.nsIConverterOutputStream.DEFAULT_REPLACEMENT_CHARACTER;b.init(d.file,-1,-1,false);d=Components.classes["@mozilla.org/intl/converter-output-stream;1"].createInstance(Components.interfaces.nsIConverterOutputStream);
d.init(b,"UTF-8",0,c);d.writeString("url,username,password,extra,name,grouping,fav\n");c=[];for(f in y)if(y[f].url!="http://group")c[f]=y[f];for(f in qa)c[f]=qa[f];e=LP.get_null_group();for(f in c){var g=y[f];g||(g=qa[f]);if(!(g.sharedfromaid!=null&&g.sharedfromaid!=""&&g.sharedfromaid!="0")){var h=[];h[0]=g.url;h[1]=Kb(g,0);h[2]=Kb(g,1);h[3]=K(g.extra);h[4]=g.name;h[5]=g.group!=e?g.group:"";h[6]=g.fav;for(var j=g="",l=0;l<h.length;l++){var o=h[l];if(o.match(/,|\r|\n|"/))o='"'+o.replace(/"/g,'""')+
'"';g+=j+o;j=","}g+="\n";d.writeString(g)}}d.close();b.close()}}};var oh,Ag,nh;this.lpShowSxipperPasswords=function(b,c,d,e){b=typeof b=="undefined"?this.lpShowFirefoxPasswords():this.lpShowFirefoxPasswords(b,c,d,e);LP.lpalert_ex(LP.lpgs("SxImportData"));return b};this.lpShowFirefoxPasswords=function(b,c,d,e){if(ga)if(!d&&!LP.lpImportFirefoxPasswords(true)){LP.lpalert_ex(LP.lpgs("FFImportNone"));return false}else{if(typeof c=="undefined")c=LP.lpGetCurrentWindow();oh=d;nh=Ag=false;c.openDialog(eb+
"content/selectpasswords.xul","_blank","chrome,titlebar,toolbar,centerscreen,modal",d,e);return true}else{LP.lpalert_ex(LP.lpgs("MustBeLoggedIn"));return false}};this.lpImportFirefoxPasswords=function(b){var c=[],d,e=Components.classes["@mozilla.org/passwordmanager;1"];if(e){pm=e.getService(Components.interfaces.nsIPasswordManager);for(e=pm.enumerator;e.hasMoreElements();)try{d=Components.interfaces.nsIPasswordInternal?e.getNext().QueryInterface(Components.interfaces.nsIPasswordInternal):e.getNext().QueryInterface(Components.interfaces.nsIPassword);
var f=new ji;f.url=d.host;f.username=d.user;f.password=d.password;f.usernamefield=d.userFieldName;f.passwordfield=d.passwordFieldName;f.login=d;if(!(f.url==""||f.username==""||f.password==""))if(!f.url.match(/^chrome:/)){if(b)return true;c[c.length]=f}}catch(g){}}else{e=Components.classes["@mozilla.org/login-manager;1"].getService(Components.interfaces.nsILoginManager).getAllLogins({});for(var h=0;h<e.length;h++){d=e[h];if(d.httpRealm!=null){f=d.hostname;var j=d.httpRealm;if(f=="http://sxipper"&&
j=="Sxipper Memborable Password"||f=="http://sxipper.com"&&j=="Sxipper User Account"||f=="safe-to-remove"&&j=="Sxipper"||f=="sxipper:memorable"&&j=="Sxipper Memorable Password"||f=="chrome://sxipper/user"||f=="chrome://sxipper/account"||f=="chrome://sxipper/memorablePassword"||f=="chrome://sxipper/temporary_safe-to-remove"||f=="chrome://sxipper/syncKey"||f.match("{deleted}$")=="{deleted}")continue}f=new ji;f.url=d.hostname;if(d.httpRealm!=null){f.url+=" ("+d.httpRealm+")";f.realm=d.httpRealm}f.username=
d.username;f.password=d.password;f.usernamefield=d.usernameField;f.passwordfield=d.passwordField;f.login=d;if(!(f.url==""||f.username==""||f.password==""))if(!f.url.match(/^chrome:/)){if(b)return true;c[c.length]=f}}}return b?false:c};this.lpSendFirefoxPasswordsToServer=function(b){for(var c=[],d="cmd=uploadaccounts&username="+LP.en(Z),e=null,f=0,g=0;g<b.length;g++){var h=b[g],j=Ua(h.url),l;a:{l=h;if(!(l.url=="http://sn"||typeof sa[j]=="undefined")){var o=sa[j];for(var n in o){var p=y[n];if(p&&p.unencryptedUsername==
l.username&&K(p.password)==l.password){l=true;break a}}}l=false}if(!l){d+="&url"+f+"="+LP.en(Ka(h.url));d+="&username"+f+"="+LP.en(P(h.username));d+="&password"+f+"="+LP.en(P(h.password));d+="&type"+f+"=ff";d+="&usernamefield"+f+"="+LP.en(h.usernamefield);d+="&passwordfield"+f+"="+LP.en("*"+h.passwordfield);for(l=1;l<=1E3;l++){o=j+(l>1?" ("+l+")":"");if(!Qa(o,c)){j=o;c[c.length]=j;break}}d+="&name"+f+"="+LP.en(P(j,void 0));f++;if(xa){if(e==null)e=vb();LP.ImportFirefoxPasswordLocal(h,e)}}}if(xa&&e){Xa++;
rb++;vc(e,Xa);Ab(e,null,"lpSendFirefoxPasswordsToServer")}d+=LP.GetIdentityParam();Uf=b;LP.lpMakeRequest(LP.lp_base+"lastpass/api.php",d,zl);Ag=true};this.ImportFirefoxPasswordLocal=function(b,c){var d=P(b.username),e=P(b.password),f=new ub;f.pendingshare=false;f.save_all=false;f.pwprotect=false;f.genpw=false;f.isbookmark=false;f.basic_auth=false;f.sn=false;f.manual="0";f.is_http="0";f.favico="0";f.extra="";f.realm="";f.sharedfromaid="";f.fav=0;f.autologin=0;f.never_autofill=0;if(typeof b.realm!=
"undefined"){f.basic_auth=true;f.realm=b.realm}var g=++zc;f.id=g;f.fiid=g;f.urid=++zc;f.url=b.url;var h=Ua(f.url);f.tld=h;f.name=le(f.url);f.group=LP.get_null_group();LP.SetLastTouch(f);f.username=d;f.password=e;f.unencryptedUsername=b.username;f.logins=[];f.otherlogins=[];f.fields=[];var j=new oc;j.urid=f.urid;j.url=f.url;var l=Ra(j.url);j.server=l.host;j.tld=h;l=Ta(j.url,l);j.submit_id="";j.captcha_id="";j.custom_js="";j.openid_url="";j.username=d;j.password=e;j.uname=b.usernamefield;j.pname=b.passwordfield;
j.unencryptedUsername=b.username;j.fields=[];j.otherfields=[];var o=new Lc;o.name=b.usernamefield;o.type="text";o.value=d;j.fields[j.fields.length]=o;o=new Lc;o.name=b.passwordfield;o.type="password";o.value=e;j.fields[j.fields.length]=o;f.logins[0]=j;y[g]=f;LP.addAidIdentity(g);id++;Jb[Jb.length]=l;if(typeof sa[h]=="undefined")sa[h]=[];sa[h][g]=true;if(typeof Ha[h]!="undefined"){d=Ha[h];if(typeof Ha[d]!="undefined")for(e=0;e<Ha[d].length;e++){f=Ha[d][e];if(typeof sa[f]=="undefined")sa[f]=[];sa[f][g]=
true}}kc(c,y[g],true)};this.lp_fix_context_menu=function(b,c){var d=b.getElementById(c),e=y[LP.lpcurrcontextmenusite],f=false;if(e==null){e=qa[LP.lpcurrcontextmenusite];f=true}var g=e.genpw;e=e.isbookmark;d.childNodes.item(0).style.display="";d.childNodes.item(1).style.display=g||e||f?"none":"";d.childNodes.item(2).style.display=e||f?"none":"";d.childNodes.item(3).style.display=e||f?"none":"";d.childNodes.item(4).style.display=""};this.lpConfirmDeleteSite=function(b,c){var d=y[b],e=jd;if(d==null){d=
qa[b];e=ie||qa[b].pwprotect}else e=jd||y[b].pwprotect;if(e)if(!LP.securityPrompt(c))return;if(LP.lpConfirmYesNo(LP.lpgs("Are you sure you would like to delete this "+(d.isbookmark?"bookmark":d.genpw?"generated password":d.sn?"secure note":"site")+"?")+" ("+d.name+")",c)){nj(b);Ec=true;LP.lpGetCurrentWindow().setTimeout("LP.lpRebuildToolsMenu_all();",0);LP.lpDisplayAccounts_all();LP.lpRecheckTabs();d="ajax=1&extjs=1&delete=1&aid="+LP.en(b);d+=LP.GetIdentityParam();LP.lpMakeRequest(LP.lp_base+"show.php",
d,oj);return true}return false};this.retranslate_toolbars=function(){fb=LP.lpprefsHasUserValue("language",false)?LP.lpprefsGetCharPref("language",false):null;if(fb=="")fb=null;LP.lpUpdateAllToolbars(Re)};this.lpUpdateAllToolbars=function(b){for(var c=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");c.hasMoreElements();){var d=c.getNext();typeof ph=="function"&&ph(d.document,b)}LP.ShowPremiumMenuItem()};this.lpshowHelpDlg=
function(b,c){if(!LP.lphelpstats){LP.lphelpstats=new ki;LP.lphelpstats.currentlyopen=false;LP.lphelpstats.wino=null;LP.lphelpstats.highlighthelp=false;LP.lphelpstats.genpwhelp=false;LP.lphelpstats.addsitehelp=false}LP.lphelpstats.currentlyopen&&LP.lphelpstats.wino.close();if(!(b!="all"&&b!="formfill"&&b!="loginprob")){LP.lphelpstats.currentlyopen=true;if(typeof c=="undefined")c=LP.lpGetCurrentWindow();LP.lphelpstats.wino=c.openDialog(eb+"content/help.xul","_blank","chrome,titlebar,toolbar,centerscreen,width=800,height=600,resizable=yes",
b)}};this.lpOpenPrint=function(b){LP.lpGetCurrentWindow().openDialog(eb+"content/print.xul","_blank","chrome,titlebar,toolbar,centerscreen,width=800,height=600,resizable=yes",b)};this.lp_remove_cookie=function(b,c){for(var d=Components.classes["@mozilla.org/cookiemanager;1"].getService(Components.interfaces.nsICookieManager),e=d.enumerator;e.hasMoreElements();){var f=e.getNext();f instanceof Components.interfaces.nsICookie&&b==f.host&&c==f.name&&d.remove(f.host,f.name,f.path,false)}};this.lpConfirmYesNo=
function(b,c){return rj(b,c)};this.lpalert_ex=function(b,c){var d=Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);c||(c=LP.lpGetCurrentWindow());d.alert(c,"LastPass",b)};this.alert=function(b,c){LP.lpalert_ex(b,c)};this.lp_sha256=function(b){return za(b)};this.lp_compact_button_hit=function(b){var c=LP.GetIdentity()!=""?" ("+LP.GetIdentity(true)+")":"";if(b.getElementById("lpt_comp-bar-login"))b.getElementById("lpt_comp-bar-login").label=
LP.lpgs("Logoff")+(": "+Z)+c;if(b.getElementById("lpt_lastpass-compact-btn")&&b.getElementById("lpt_lastpass-compact-btn").className=="lastpass-compact-default"){LP.retranslate_toolbars();LP.lp_handle_buttons("refresh",b)}if(ga){b.getElementById("lpt_lastpass-compact-btn")&&b.getElementById("lpt_lastpass-compact-btn").className==""&&LP.lp_handle_buttons_all("in");return true}else{LP.lpOpenLogin();return false}};this.status_button_hit=function(){if(ga){LP.lpSetHideShowText();return true}else{LP.lpOpenLogin();
return false}};this.lp_fix_formfills_menus_all2=function(){me()};this.lp_fix_formfills_menus_helper=function(b,c){qh(b,c)};this.lpDeleteFormFillProfile=function(b,c){if(LP.lpConfirmYesNo(LP.lpgs("Are you sure you would like to delete this form fill profile?"),c)){for(var d=0;d<fa.length;d++)if(fa[d].ffid==b){fa.splice(d,1);break}LP.deleteFfidIdentity(b);Ec=true;me();LP.lpRecheckTabs();d="deleteext=1&ffid="+LP.en(b);d+=LP.GetIdentityParam();LP.lpMakeRequest(LP.lp_base+"formfill.php",d,Pi);return true}return false};
this.lpEditFormFillProfile=function(b,c,d,e,f,g){f=null;for(var h=0;h<fa.length;h++)if(fa[h].ffid==b)f=fa[h];if(Ld||f!=null&&f.pwprotect)if(!LP.securityPrompt(g))return;if(typeof g=="undefined")g=LP.lpGetCurrentWindow();b=g.openDialog(eb+"content/formfill.xul","_blank","resizable=yes,chrome,titlebar,toolbar,centerscreen"+(e?",modal":""),b,c,d);e||Gb.push(b)};this.lpCopyFormFillProfile=function(b){LP.lpEditFormFillProfile(b,true)};this.lpNextAutoFill=function(b){if(ga){var c=LP.getBrowser().selectedTab.linkedBrowser,
d=c.contentDocument;if(d.aid!=null&&typeof d.aid=="object"&&typeof d.aidindex=="number"){b?d.aidindex++:d.aidindex--;if(d.aidindex<0)d.aidindex=d.aid.length-1;if(d.aidindex>=d.aid.length)d.aidindex=0;LP.lp_noteAcceptHelper(d.aid[d.aidindex].id,null,true)}else if(typeof d.ffidindex=="number"){b?d.ffidindex++:d.ffidindex--;if(d.ffidindex<0)d.ffidindex=fa.length-1;if(d.ffidindex>=fa.length)d.ffidindex=0;if((Ld||fa[d.ffidindex].pwprotect)&&!c.contentDocument.prompted){if(!LP.securityPrompt())return;c.contentDocument.prompted=
true}LP.lp_fillFormsHelper(fa[d.ffidindex].ffid,true)}}else this.lpOpenLogin()};this.lpSetupHotKeys_all=function(){for(var b=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getEnumerator("");b.hasMoreElements();){var c=b.getNext();c.contentDocument&&LP.lpSetupHotKeys(c.contentDocument)}};this.lpSetupHotKeys=function(b){if(!LP.DISABLE_HKS){var c=false;if(LP.lpis_mac){if(!LP.lpprefsHasUserValue("generateHkKeyCode",false)){LP.lpprefsSetIntPref("generateHkKeyCode",
0,false);LP.lpprefsSetCharPref("generateHkMods","",false);LP.lpprefsSetIntPref("recheckHkKeyCode",0,false);LP.lpprefsSetCharPref("recheckHkMods","",false);LP.lpprefsSetIntPref("searchHkKeyCode",0,false);LP.lpprefsSetCharPref("searchHkMods","",false);LP.lpprefsSetIntPref("nextHkKeyCode",33,false);LP.lpprefsSetCharPref("nextHkMods","meta",false);LP.lpprefsSetIntPref("prevHkKeyCode",34,false);LP.lpprefsSetCharPref("prevHkMods","meta",false);LP.lpprefsSetIntPref("homeHkKeyCode",0,false);LP.lpprefsSetCharPref("homeHkMods",
"",false);c=true}}else if(!LP.lpprefsHasUserValue("generateHkKeyCode",false)){LP.lpprefsSetIntPref("generateHkKeyCode",71,false);LP.lpprefsSetCharPref("generateHkMods","alt",false);LP.lpprefsSetIntPref("recheckHkKeyCode",73,false);LP.lpprefsSetCharPref("recheckHkMods","alt",false);if(LP.HIDE_SEARCH_HK){LP.lpprefsSetIntPref("searchHkKeyCode",0,false);LP.lpprefsSetCharPref("searchHkMods","",false)}else{LP.lpprefsSetIntPref("searchHkKeyCode",87,false);LP.lpprefsSetCharPref("searchHkMods","alt",false)}LP.lpprefsSetIntPref("nextHkKeyCode",
33,false);LP.lpprefsSetCharPref("nextHkMods","alt",false);LP.lpprefsSetIntPref("prevHkKeyCode",34,false);LP.lpprefsSetCharPref("prevHkMods","alt",false);if(LP.IsVaultHidden()||LP.HIDE_HOME_HK){LP.lpprefsSetIntPref("homeHkKeyCode",0,false);LP.lpprefsSetCharPref("homeHkMods","",false)}else{LP.lpprefsSetIntPref("homeHkKeyCode",104,false);LP.lpprefsSetCharPref("homeHkMods","control alt",false)}c=true}if(!LP.lpprefsHasUserValue("submitHkKeyCode",false)){LP.lpprefsSetIntPref("submitHkKeyCode",0,false);
LP.lpprefsSetCharPref("submitHkMods","",false);c=true}if(!LP.lpprefsHasUserValue("saveallHkKeyCode",false)){LP.lpprefsSetIntPref("saveallHkKeyCode",0,false);LP.lpprefsSetCharPref("saveallHkMods","",false);LP.lpprefsSetIntPref("logoffHkKeyCode",0,false);LP.lpprefsSetCharPref("logoffHkMods","",false);c=true}if(!LP.lpprefsHasUserValue("defaultffidHkKeyCode",false)){LP.lpprefsSetIntPref("defaultffidHkKeyCode",0,false);LP.lpprefsSetCharPref("defaultffidHkMods","",false)}c&&LP.flush_prefs();if(c=b.getElementById("mainKeyset")){Qc(c,
"lpt_key_lpGeneratePW",b);Qc(c,"lpt_key_lprecheck",b);Qc(c,"lpt_key_lpSearch",b);Qc(c,"lpt_key_lpNextAutoFill",b);Qc(c,"lpt_key_lpPrevAutoFill",b);Qc(c,"lpt_key_lpSubmit",b);Qc(c,"lpt_key_lpHome",b);Qc(c,"lpt_key_lpSaveAll",b);Qc(c,"lpt_key_lpLogoff",b);Qc(c,"lpt_key_lpdefaultffid",b);LP.lpprefsHasUserValue("generateHkKeyCode",false)&&Rc(c,"lpt_key_lpGeneratePW","lpt_cmd_lpGeneratePW",LP.lpprefsGetIntPref("generateHkKeyCode",false),LP.lpprefsGetCharPref("generateHkMods",false),b);LP.lpprefsHasUserValue("recheckHkKeyCode",
false)&&Rc(c,"lpt_key_lprecheck","lpt_cmd_lpRecheckTabs",LP.lpprefsGetIntPref("recheckHkKeyCode",false),LP.lpprefsGetCharPref("recheckHkMods",false),b);if(LP.lpprefsHasUserValue("searchHkKeyCode",false)){var d=LP.lpprefsGetCharPref("searchHkMods",false),e=LP.lpprefsGetIntPref("searchHkKeyCode",false);Rc(c,"lpt_key_lpSearch","lpt_cmd_lpSearch",e,d,b)}LP.lpprefsHasUserValue("nextHkKeyCode",false)&&Rc(c,"lpt_key_lpNextAutoFill","lpt_cmd_lpNextAutoFill",LP.lpprefsGetIntPref("nextHkKeyCode",false),LP.lpprefsGetCharPref("nextHkMods",
false),b);LP.lpprefsHasUserValue("prevHkKeyCode",false)&&Rc(c,"lpt_key_lpPrevAutoFill","lpt_cmd_lpPrevAutoFill",LP.lpprefsGetIntPref("prevHkKeyCode",false),LP.lpprefsGetCharPref("prevHkMods",false),b);LP.lpprefsHasUserValue("submitHkKeyCode")&&Rc(c,"lpt_key_lpSubmit","lpt_cmd_lpSubmit",LP.lpprefsGetIntPref("submitHkKeyCode",false),LP.lpprefsGetCharPref("submitHkMods",false),b);LP.lpprefsHasUserValue("homeHkKeyCode")&&Rc(c,"lpt_key_lpHome","lpt_cmd_lpHome",LP.lpprefsGetIntPref("homeHkKeyCode",false),
LP.lpprefsGetCharPref("homeHkMods",false),b);LP.lpprefsHasUserValue("saveallHkKeyCode")&&Rc(c,"lpt_key_lpSaveAll","lpt_cmd_lpSaveAll",LP.lpprefsGetIntPref("saveallHkKeyCode",false),LP.lpprefsGetCharPref("saveallHkMods",false),b);LP.lpprefsHasUserValue("logoffHkKeyCode")&&Rc(c,"lpt_key_lpLogoff","lpt_cmd_lpLogoff",LP.lpprefsGetIntPref("logoffHkKeyCode",false),LP.lpprefsGetCharPref("logoffHkMods",false),b);LP.lpprefsHasUserValue("defaultffidHkKeyCode")&&Rc(c,"lpt_key_lpdefaultffid","lpt_cmd_lpdefaultffid",
LP.lpprefsGetIntPref("defaultffidHkKeyCode",false),LP.lpprefsGetCharPref("defaultffidHkMods",false),b)}}};this.isadmin=function(){return ve};this.getUsername=function(){return Z};this.updateVaultSelectedIdentity=function(b,c){for(var d=LP.getIdentities(),e=LP.GetIdentity(false),f=0,g=0;g<d.length;++g)if(e==d[g].value){f=parseInt(g);break}if(b.getElementById("identitylist").selectedIndex!=f){b.getElementById("identitylist").selectedIndex=f;c&&Bb()}};this.getIdentities=function(){var b=[];b[b.length]=
{label:"All",value:""};for(var c=0;c<La.length;++c)b[b.length]={label:La[c].iname,value:La[c].iid};return b};this.getLoggedIn=function(){return ga};this.submitFieldsPane=function(b,c){for(var d=y[c].urid,e=Array(y[c].logins,y[c].otherlogins),f=0;f<e.length;f++)for(var g=0;g<e[f].length;g++){var h=false,j="",l=[],o=e[f][g];d=o.urid;o=Array(o.fields,o.otherfields);for(var n=0;n<o.length;n++){for(var p=0;p<o[n].length;p++){var q=o[n][p],r;r=n==0?q.type+"_"+q.name+"_"+d:q.formname+"_"+q.type+"_"+q.name+
"_"+d;var u=n==0?"_":"_"+q.formname+"_";if("email"==q.type||"text"==q.type||"password"==q.type||"textarea"==q.type){var t=b.getElementById(r);if(t){l.push(t.value);r=t.value==K(q.value)?q.value:P(t.value);j+=u+q.name+"="+LP.en(r)+"&";if(r!=q.value){h=true;if(q.value!=""&&y[c].username!=""&&q.value==y[c].username&&r!=""){y[c].username=r;y[c].unencryptedUsername=t.value;for(u=0;u<y[c].logins.length;u++){y[c].logins[u].username=y[c].username;y[c].logins[u].unencryptedUsername=y[c].unencryptedUsername}for(u=
0;u<y[c].otherlogins.length;u++){y[c].otherlogins[u].username=y[c].username;y[c].otherlogins[u].unencryptedUsername=y[c].unencryptedUsername}}if(q.value!=""&&y[c].password!=""&&q.value==y[c].password&&r!=""){y[c].password=r;for(u=0;u<y[c].logins.length;u++)y[c].logins[u].password=y[c].password;for(u=0;u<y[c].otherlogins.length;u++)y[c].otherlogins[u].password=y[c].password}}q.value=r}}else if(q.type=="checkbox"){if(t=b.getElementById(r)){if(t.checked)j+=u+q.name+"="+LP.en(q.value)+"&";if(t.checked!=
q.checked)h=true;q.checked=t.checked}}else if(q.type=="select-one")if(t=b.getElementById(r)){if(t.value!=q.value){j+=u+q.name+"="+LP.en(t.value)+"&";h=true}q.value=t.value}}if(h){(h=vb())&&dc(h,c,false)&&kc(h,y[c],false)&&Ne(h)&&Ab(h,null,"editfields_accept_click")&&Bb();h=LP.lp_base+"fields.php?aid="+LP.en(c)+"&update=1&urid="+LP.en(d);LP.lpMakeRequest(h,j,oe,null,{url:h,aid:c,postdata:j,handler:oe,param:null,newvalues:l});h=false}}}};this.search_home_accept_click=function(b){b.getElementById("tree").treeBoxObject.view.selection.select(1)};
this.search_home_keydown=function(b,c,d,e){function f(){b.getElementById("tree").focus()}var g=d.keyCode;if(!(typeof b.getElementById("searchresults")=="undefined"||typeof b.getElementById("searchresults").firstChild=="undefined")){var h=b.getElementById("searchresults");if(38==g){f();c=b.createEvent("KeyEvents");c.initKeyEvent("keypress",true,true,null,false,false,false,false,35,0);h.dispatchEvent(c)}else if(40==g)f();else if(34==g||33==g){f();c=b.createEvent("KeyEvents");c.initKeyEvent("keypress",
true,true,null,false,false,false,false,g,0);h.dispatchEvent(c);return false}else 13==g&&e&&LP.search_home_treeselect(b,c,d,1)}};this.search_home_treeselect=function(b,c,d,e){var f=d.keyCode;if(13==f){if(!((new Date).getTime()-LP.last_dialog_close<250)){d=b.getElementById("tree");try{var g=d.currentIndex;if(-1!=g){var h=d.view.getItemAtIndex(g);if(typeof e=="undefined"||!e)d.view.isContainer(g)&&LP.saveGroupState(b,"search_home_treeselect");var j=h.getAttribute("id");if(j){LP.is_secure_note(j)?LP.lpOpenEditWindow(j,
0,0,c):LP.lpLaunchUrl(j,1,0);typeof e!="undefined"&&1==e&&b.getElementById("LPSearch").cancelDialog()}}}catch(l){}}}else if(46==f&&(!d.ctrlKey||!d.altKey||d.shiftKey||d.metaKey)){d=b.getElementById("tree");g=d.currentIndex;if(-1!=g){h=d.view.getItemAtIndex(g);e=h.getAttribute("isgroup");var o=null;if(b.selected_ids.length==0&&e){o=h.getAttribute("orig_group");if(o==LP.lpgs("favorites")||o==LP.lpgs("recently used"))return}}LP.ConfirmMultipleDelete(b,c,o)}};this.ConfirmMultipleDelete=function(b,c,d){var e=
"",f="";if(b.selected_ids.length>1)f="Are you sure you would like to delete the selected sites?";else{f="Are you sure you would like to delete this site?";e=" (";for(var g=b.selected_ids,h=0;h<g.length;h++){var j=g[h],l=y[j];if(l==null)l=qa[j];if(l==null&&lc[j])return;e+=l.name+(h<g.length-1?" ":"")}e+=") "}if(d){f="Are you sure you would like to delete this group?";e=" ("+d+") "}LP.lpConfirmYesNo(LP.lpgs(f)+e,c)&&LP.deleteSelectedSites(b,c,d)};this.search_home_keyup=function(b,c,d){d=d.keyCode;var e=
b.getElementById("lpsearchstr").value;if(13==d&&e!="")LP.search_home_accept_click(b,c);else{LP.search_tree_accept_click(b,c);e==""&&LP.restoreGroupState(b,"search_home_keyup")}};var Bk="";this.autocomplete_search=function(b){var c=LP.get_searchNotesB64Length(),d=[];for(var e in y){var f=y[e];if(f.url!="http://group"){var g=f.logins.length>0?f.logins[0].unencryptedUsername:"";if(f.url.toLowerCase().indexOf(b)!=-1||f.name.toLowerCase().indexOf(b)!=-1||f.group.toLowerCase().indexOf(b)!=-1||g.toLowerCase().indexOf(b)!=
-1)d[d.length]={value:f.url,comment:f.name,image:zb(f.id),style:"lastpass"};else if(c>0)if(K(f.extra.substring(0,c)).toLowerCase().indexOf(b)!=-1)d[d.length]={value:f.url,comment:f.name,image:zb(f.id),style:"lastpass"}}}return d};var Bc;this.search_tree_accept_click=function(b){var c=b.getElementById("lpsearchstr").value.toLowerCase();c=c.replace(/^\s+$/g,"");var d,e=c,f=b.getElementById("tree").treeBoxObject.getFirstVisibleRow();d=[];if(e!=Bk){Bk=e;f=0}else if(e=b.getElementById("tree").treeBoxObject.view)for(var g=
0;g<e.rowCount;g++)if(e.isContainer(g)&&!e.isContainerOpen(g)){var h=b.getElementById("tree").columns.getColumnAt(0);h=Hc(e.getCellText(g,h));d[h]=1}for(e=b.getElementById("searchresults");e.firstChild;)e.removeChild(e.firstChild);d=[f,d];f=d[0];g=d[1];d=b.getElementById("tree");h=d.getAttribute("sortDirection");var j=tj(c,true),l=b.getElementById("tree");e=l.getAttribute("sortDirection");l=l.getAttribute("sortResource");if("tusername"==l)j.sort(LP.lp_sort_case_insensitive_username);else if("tlasttouch"==
l)j.sort(LP.lp_sort_case_insensitive_lasttouch);else if("tnote"==l)j.sort(LP.lp_sort_case_insensitive_note);else if("tpwprotect"==l)j.sort(LP.lp_sort_case_insensitive_pwprotect);else if("tautofill"==l)j.sort(LP.lp_sort_case_insensitive_autofill);else"turl"==l?j.sort(LP.lp_sort_case_insensitive_url):j.sort(LP.lp_sort_case_insensitive_name);"descending"==e&&j.reverse();var o=[];for(e=0;e<j.length;e++)o[e]=j[e];o.sort(LP.lp_sort_case_insensitive_lasttouch);l=[];var n=LP.lpprefsHasUserValue("ClearRecentTime")?
LP.lpprefsGetIntPref("ClearRecentTime"):0,p=LP.get_recentUsedCount();if(c=="")for(e=0;l.length<p&&e<o.length;e++)if(o[o.length-e-1].url!="http://group")o[o.length-e-1].last_touch<n||(l[l.length]=o[o.length-e-1]);Bc={};Bc.c={};Bc.i={};c=[];n=o=false;for(e=0;e<j.length;e++)for(p=1;p<=3;p++)if(!(p==2&&parseInt(j[e].fav)!=1))if(!(p==3&&e>=l.length)){var q=p==3?l[e]:j[e],r=p==1?q.group:p==2?LP.lpgs("favorites"):LP.lpgs("recently used"),u,t,C="_"+r;if(typeof Bc.i[C]=="undefined"){t=Vf(b,r,g,Bc);u=t[0];
t=t[1];Bc.c[C]=u;Bc.i[C]=t;if(p==1)c[c.length]=r;else if(p==2)o=true;else n=true}else u=Bc.c[C];if(q.url!="http://group"){C=b.createElement("treeitem");C.setAttribute("id",q.id);C.setAttribute("group",r);r=b.createElement("treerow");r.setAttribute("allowevents","true");r.setAttribute("crop","end");t=b.createElement("treecell");t.setAttribute("label",q.name);t.setAttribute("src",zb(q.id,q.sn));t.setAttribute("crop","end");r.appendChild(t);t=b.createElement("treecell");t.setAttribute("label",Bl(q));
r.appendChild(t);t=b.createElement("treecell");t.setAttribute("label",q.url);r.appendChild(t);t=b.createElement("treecell");t.setAttribute("label",Cl(q.last_touch));r.appendChild(t);t=b.createElement("treecell");q.extra&&q.extra.length>0&&t.setAttribute("src","chrome://lastpass/skin/page_edit.png");r.appendChild(t);t=b.createElement("treecell");q.pwprotect&&t.setAttribute("src","chrome://lastpass/skin/lock.png");r.appendChild(t);t=b.createElement("treecell");dh&&parseInt(q.autologin)==1&&t.setAttribute("src",
"chrome://lastpass/skin/autologin.png");r.appendChild(t);t=b.createElement("treecell");t.setAttribute("label",q.pendingshare?LP.lpgs("Accept"):LP.lpgs("Edit"));t.setAttribute("properties","underline");r.appendChild(t);t=b.createElement("treecell");t.setAttribute("label",q.pendingshare?LP.lpgs("Reject"):q.genpw||q.sharedfromaid!=null&&q.sharedfromaid!=""&&q.sharedfromaid!="0"?"":LP.lpgs("Share"));t.setAttribute("properties","underline");LP.lphidesharing||r.appendChild(t);t=b.createElement("treecell");
t.setAttribute("label",q.pendingshare?"":LP.lpgs("Delete"));t.setAttribute("properties","underline");r.appendChild(t);C.appendChild(r);u.appendChild(C)}}c.sort(LP.lp_sort_case_insensitive);n&&c.unshift(LP.lpgs("recently used"));o&&c.unshift(LP.lpgs("favorites"));"descending"==h&&c.reverse();g={};for(e=0;e<c.length;e++){h=c[e];if(j=h.match(/^([^\\]*)\\(.*)$/))h=j[1];h="_"+h;try{if(typeof g[h]=="undefined"){b.getElementById("searchresults").appendChild(Bc.i[h]);g[h]=1}}catch(A){U("Error with gn: "+
h+": "+A,null)}}d.treeBoxObject.scrollToRow(f);return false};this.search_accept_click=function(b){if(!ga)return true;for(var c=b.getElementById("searchresults");c.firstChild;)c.removeChild(c.firstChild);var d=LP.get_searchNotesB64Length(),e=b.getElementById("lpsearchstr").value.toLowerCase();e=e.replace(/^\s+$/g,"");var f=[];for(var g in y){var h=y[g];if(!h.isbookmark){var j=h.logins.length>0?h.logins[0].unencryptedUsername:"";if(h.url.toLowerCase().indexOf(e)!=-1||h.name.toLowerCase().indexOf(e)!=
-1||h.group.toLowerCase().indexOf(e)!=-1||j.toLowerCase().indexOf(e)!=-1)f[f.length]=h;else if(d>0){j=K(h.extra.substring(0,d));if(j.toLowerCase().indexOf(e)!=-1)f[f.length]=h}}}for(g in qa){h=qa[g];if(h.name.toLowerCase().indexOf(e)!=-1||h.group.toLowerCase().indexOf(e)!=-1)f[f.length]=h;else if(d>0){j=K(h.extra.substring(0,d));if(j.toLowerCase().indexOf(e)!=-1)f[f.length]=h}}d=b.getElementById("tree");g=d.getAttribute("sortDirection");d=d.getAttribute("sortResource");if("tgroup"==d)f.sort(LP.lp_sort_case_insensitive_group);
else if("tusername"==d)f.sort(LP.lp_sort_case_insensitive_username);else"tlasttouch"==d?f.sort(LP.lp_sort_case_insensitive_lasttouch):f.sort(LP.lp_sort_case_insensitive_name);"descending"==g&&f.reverse();for(g=0;g<f.length;g++)if(f[g].url!="http://group"){d=b.createElement("treeitem");d.setAttribute("container","true");d.setAttribute("id",f[g].id);e=b.createElement("treerow");e.setAttribute("allowevents","true");e.setAttribute("crop","end");h=b.createElement("treecell");h.setAttribute("label",f[g].name);
h.setAttribute("src",zb(f[g].id,f[g].sn));h.setAttribute("crop","end");e.appendChild(h);h=b.createElement("treecell");h.setAttribute("label",LP.fix_group_name(f[g].group));e.appendChild(h);h=b.createElement("treecell");h.setAttribute("label",f[g].logins.length>0?f[g].logins[0].unencryptedUsername:"");e.appendChild(h);h=b.createElement("treecell");h.setAttribute("label",LP.lpgs("Edit"));h.setAttribute("properties","underline");e.appendChild(h);h=b.createElement("treecell");h.setAttribute("label",f[g].id);
e.appendChild(h);d.appendChild(e);c.appendChild(d)}b.getElementById("tree").treeBoxObject.view.selection.select(0);b.getElementById("lpsearchstr").focus();return false};this.get_local_accts_version=function(){return Xa};this.IsHomePage=function(){try{return LP.lpmainprefs.getCharPref("browser.startup.homepage")=="chrome://lastpass/content/home.xul"}catch(b){return false}};this.SetHomePage=function(){LP.lpmainprefs.setCharPref("browser.startup.homepage","chrome://lastpass/content/home.xul");LP.flush_prefs()};
this.compare_tlds=function(b,c){if(typeof b!="string")return false;if(typeof c!="string")return false;b=b.toLowerCase();c=c.toLowerCase();return b==c?true:typeof Ha[b]!="undefined"&&typeof Ha[c]!="undefined"&&Ha[b]==Ha[c]?true:false};this.GetIdentityParam=function(){var b="&iid=";b+=LP.en(LP.GetIdentity());return b};this.GetIdentity=function(b){var c="";if(LP.lpprefsHasUserValue("identity"))c=LP.lpprefsGetCharPref("identity");if(c==""&&b)c=LP.lpgs("All");else if(b)for(b=0;b<La.length;b++)if(La[b].iid==
c)c=La[b].iname;return c};this.addAidIdentity=function(b){if(LP.lpprefsHasUserValue("identity"))for(var c=LP.lpprefsGetCharPref("identity"),d=0;d<La.length;d++)if(La[d].iid==c){if(La[d].aids=="")La[d].aids=b;else La[d].aids+=","+b;return}};this.deleteAidIdentity=function(b){for(var c=0;c<La.length;c++){for(var d=La[c].aids.split(","),e="",f=0;f<d.length;f++)if(d[f]!=b)if(e=="")e=d[f];else e+=","+d[f];La[c].aids=e}};this.addFfidIdentity=function(b){if(LP.lpprefsHasUserValue("identity"))for(var c=LP.lpprefsGetCharPref("identity"),
d=0;d<La.length;d++)if(La[d].iid==c){if(La[d].ffids=="")La[d].ffids=b;else La[d].ffids+=","+b;return}};this.deleteFfidIdentity=function(b){for(var c=0;c<La.length;c++){for(var d=La[c].ffids.split(","),e="",f=0;f<d.length;f++)if(d[f]!=b)if(e=="")e=d[f];else e+=","+d[f];La[c].ffids=e}};this.is_secure_note=function(b){return typeof qa[b]!="undefined"?true:false};this.is_pending_share=function(b){return typeof lc[b]!="undefined"?true:false};this.lpAutoFill=function(b){LP.lp_noteAcceptHelper(b,null,true,
true)};this.flush_prefs=function(){try{Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).savePrefFile(null)}catch(b){}LP.SetupUserPreferences()};var gi=false;this.IsIconsUpdated=function(){if(Ec){Ec=false;return true}if(gi){gi=false;return true}return false};this.lpprefsSetIntPref=function(b,c,d){if((d==null||d!=false)&&Z!="")b=ia+"."+b;LP.lpprefs.setIntPref(b,c)};this.lpprefsSetCharPref=function(b,c,d){if((d==null||d!=false)&&Z!="")b=ia+"."+
b;LP.lpprefs.setCharPref(b,c)};this.lpprefsSetBoolPref=function(b,c,d){if((d==null||d!=false)&&Z!="")b=ia+"."+b;LP.lpprefs.setBoolPref(b,c)};this.lpprefsGetIntPref=function(b,c){var d=b;if((c==null||c!=false)&&Z!="")b=ia+"."+b;return LP.lpprefs.prefHasUserValue(b)?LP.lpprefs.getIntPref(b):LP.lpprefs.prefHasUserValue(d)?LP.lpprefs.getIntPref(d):0};this.lpprefsGetCharPref=function(b,c){var d=b;if((c==null||c!=false)&&Z!="")b=ia+"."+b;return LP.lpprefs.prefHasUserValue(b)?LP.lpprefs.getCharPref(b):LP.lpprefs.prefHasUserValue(d)?
LP.lpprefs.getCharPref(d):""};this.lpprefsGetBoolPref=function(b,c,d){try{if(!d)d=LP.lpprefs;var e=b;if((c==null||c!=false)&&Z!="")b=ia+"."+b;return d.prefHasUserValue(b)?d.getBoolPref(b):d.prefHasUserValue(e)?d.getBoolPref(e):false}catch(f){U("Error in lpprefsGetBoolPref, name="+b+": "+f,null);return false}};this.lpprefsHasUserValue=function(b,c){var d=b;if((c==null||c!=false)&&Z!="")b=ia+"."+b;var e=LP.lpprefs.prefHasUserValue(b);return e||d==b?e:LP.lpprefs.prefHasUserValue(d)};this.is_firefox_portable=
function(){return ud()};var Qd=null,Se=null,Ck=null;this.lpUpdate=function(){try{Qd=Components.classes["@mozilla.org/extensions/manager;1"].getService(Components.interfaces.nsIExtensionManager);if(Qd!=null){Se=Qd.getItemForID("support@lastpass.com");if(Se!=null){var b=[];b[0]=Se;Ck=new Fl;Qd.update(b,1,0,Ck)}}}catch(c){U("Error in lpupdate: "+c,null)}};this.sr=function(b,c,d,e,f){if(b.getElementById(c))d=="hidden"||d=="className"?b.getElementById(c).setAttribute(d,e):b.getElementById(c).setAttribute(d,
e!=""?LP.lpgs(e,f):"")};this.sidebar_load=function(b){b.title=LP.lpgs("LastPass Sites");LP.sr(b,"editmenuitem","label","Edit");LP.sr(b,"gotomenuitem","label","Go to URL");LP.sr(b,"deletemenuitem","label","Delete");LP.sr(b,"copyusermenuitem","label","Copy Username");LP.sr(b,"copypassmenuitem","label","Copy Password");LP.sr(b,"retrieving","label","Retrieving Sites...")};this.changeGroupAndFavorites=function(b,c,d,e){for(var f="",g="",h="",j="",l=[],o=0;o<b.length;o++){var n=b[o],p=y[n];if(p==null)p=
qa[n];if(p){l[l.length]=n;p.group=e;f+=j+n;j=","}}j="";for(o=0;o<c.length;o++){n=c[o];p=y[n];if(p==null)p=qa[n];if(p){l[l.length]=n;p.fav="1";g+=j+n;j=",";bb[bb.length]=n}}j="";for(o=0;o<d.length;o++){n=d[o];p=y[n];if(p==null)p=qa[n];if(p){l[l.length]=n;p.fav="0";h+=j+n;j=",";for(b=0;b<bb.length;b++)if(bb[b].id==n){bb.splice(b,1);break}}}Xa++;rb++;d=true;j=vb();if(j==null)d=false;for(o=0;o<l.length;o++){n=y[l[o]];if(n==null)n=qa[l[o]];if(n){if(d&&!dc(j,l[o],false))d=false;if(d&&!kc(j,n,false))d=false}}if(d&&
!vc(j,Xa))d=false;d&&Ab(j,null,"changeGroupAndFavorites");LP.lpDisplayAccounts_all();e="aids="+LP.en(f)+"&newfavaids="+LP.en(g)+"&oldfavaids="+LP.en(h)+"&newgrp="+LP.en(P(e))+"&xml=1";LP.lpMakeRequest(LP.lp_base+"groups.php",e,Aj)};this.openChangeGroupDlg=function(b){LP.lpGetCurrentWindow().openDialog(eb+"content/changegrp.xul","_blank","chrome,titlebar,toolbar,centerscreen,modal",b)};this.openMoveGroupDlg=function(b,c,d){LP.lpGetCurrentWindow().openDialog(eb+"content/changegrp.xul","_blank","chrome,titlebar,toolbar,centerscreen,modal",
b,c,d)};this.OpenSubGroupDlg=function(b,c){LP.lpGetCurrentWindow().openDialog(eb+"content/creategrp.xul","_blank","chrome,titlebar,toolbar,centerscreen,modal",b,c)};this.moveSelectedToGroup=function(b,c,d){for(var e=[],f=0;f<c.selected_groups.length;f++)if(b!=c.selected_groups[f]&&b!=LP.lpgs("favorites"))e[e.length]=c.selected_ids[f];var g=[],h=[];if(b==LP.lpgs("favorites"))for(f=0;f<c.selected_groups.length;f++){if(c.selected_groups[f]!=LP.lpgs("favorites"))g[g.length]=c.selected_ids[f]}else for(f=
0;f<c.selected_groups.length;f++)if(c.selected_groups[f]==LP.lpgs("favorites"))h[h.length]=c.selected_ids[f];if(e.length>0||g.length>0||h.length>0){LP.changeGroupAndFavorites(e,g,h,b);LP.search_tree_accept_click(c,d)}};this.deleteSelectedSites=function(b,c,d){var e=false;if(d){b=[];for(var f in y)if(y[f].group==d||y[f].group.indexOf(d+"\\")==0)b[b.length]=f;for(f in qa)if(qa[f].group==d||qa[f].group.indexOf(d+"\\")==0)b[b.length]=f}else b=b.selected_ids;for(f=0;f<b.length;f++){d=b[f];var g=y[d];e=
jd;g==null&&lc[d]||(e|=g==null?ie||qa[d].pwprotect:jd||y[d].pwprotect)}if(e)if(!LP.securityPrompt(c))return;e=c="";for(f=0;f<b.length;f++){d=b[f];nj(d);c+=e+d;e=","}Ec=true;LP.lpGetCurrentWindow().setTimeout("LP.lpRebuildToolsMenu_all();",0);LP.lpDisplayAccounts_all();LP.lpRecheckTabs();f="ajax=1&extjs=1&delete=1&aid="+LP.en(c);f+=LP.GetIdentityParam();LP.lpMakeRequest(LP.lp_base+"show.php",f,oj)};this.isconnected=function(){return Wh};this.lpClearCache=function(b,c,d){b=typeof b!="undefined"&&b?
true:false;c=typeof c=="undefined"||c?true:false;d=typeof d=="undefined"||d?true:false;Wa(ia+"_lp.act.lps");Wa(ia+"_lpall.lps");Wa(ia+"_lpall.slps");Wa(ia+"_lps.act.xml");Wa(ia+"_lps.act.sxml");Wa(ia+"_lt.cac");if(d)if(yb(ia+"_ff.otp")||yb(ia+"_ff.sotp"))if(b||LP.lpConfirmYesNo(LP.lpgs("A One Time Password has been found. This can be used for Account Recovery if you forget your master LastPass password. If you are having trouble logging in, it is recommended that you do not delete it. Would you like to delete this file?")))LP.DeleteOTP();
if(c){Wa(ia.toUpperCase()+"_ICONS3.LPS");Wa("lpiconsversion2_"+ia+".txt");oi();c=tf();if(c!=""&&yb(c))if(b||LP.lpConfirmYesNo(LP.lpgs("A retry file has been found. This likely means that not all of your site changes have been saved. Would you like to delete this file and potentially lose some changes?")))Wa(c)}};var Dk=false;this.check_key_for_changes=function(b){if(b){if(Dk)return;Dk=true}if(""!=na)if(za(na)!=Xf){Ia();U("INVESTIGATE! KEY_HASH IS WRONG! COSMIC RAYS?")}this.setTimeout(LP.check_key_for_changes,
6E4)};this.lpisp=function(){return cb()<=Df};this.choose_profile_and_credit_card=function(){LP.lpGetCurrentWindow().openDialog(eb+"content/chooseprofilecc.xul","_blank","chrome,titlebar,toolbar,centerscreen,modal")};this.saveGroupState=function(b){if(b!=null)LP.lphomedoc=b;else b=LP.lphomedoc;if(b!=null)if(!(!b.getElementById("lpsearchstr")||b.getElementById("lpsearchstr").value!="")){b=b.getElementById("tree");for(var c=b.treeBoxObject.view,d="",e=[],f=0;f<c.rowCount;++f)if(c.isContainer(f)&&c.isContainerOpen(f)){var g=
c.getLevel(f),h=c.getCellText(f,b.columns.getColumnAt(0));e[g]=(g==0?"":e[g-1]+"_LPSEP_")+encodeURIComponent(h);d+=(d==""?"":"&")+e[g]}LP.lpprefsSetCharPref("opengroups",d,true);LP.flush_prefs()}};this.restoreGroupState=function(b){if(b!=null)LP.lphomedoc=b;else b=LP.lphomedoc;if(b!=null)if(LP.lpprefsHasUserValue("opengroups",true)){for(var c=LP.lpprefsGetCharPref("opengroups",true).split("&"),d=[],e=0;e<c.length;++e){var f=c[e];f=f.split("_LPSEP_");for(var g="",h=0;h<f.length;++h){if(g!="")g+="_LPSEP_";
g+=decodeURIComponent(f[h]);d[g]=1}}b=b.getElementById("tree");c=b.treeBoxObject.view;g=[];if(c)for(e=0;e<c.rowCount;++e)if(c.isContainer(e)){f=c.getLevel(e);h=c.isContainerOpen(e);var j=c.getCellText(e,b.columns.getColumnAt(0));g[f]=(f==0?"":g[f-1]+"_LPSEP_")+j;f=g[f];if(h&&typeof d[f]=="undefined"){c.toggleOpenState(e);c.getItemAtIndex(e).firstChild.firstChild.setAttribute("src","chrome://lastpass/skin/folder-closed.gif")}else if(!h&&typeof d[f]!="undefined"){c.toggleOpenState(e);c.getItemAtIndex(e).firstChild.firstChild.setAttribute("src",
"chrome://lastpass/skin/folder-open.gif")}}}};this.update_recently_used=function(b,c){if(b){for(var d=b.childNodes.length-1;d>=0;d--)b.removeChild(b.childNodes.item(d));var e=[];for(d in y)if(y[d].url!="http://group")e[e.length]=y[d];for(d in qa)e[e.length]=qa[d];e.sort(LP.lp_sort_case_insensitive_lasttouch);var f=LP.lpprefsHasUserValue("ClearRecentTime")?LP.lpprefsGetIntPref("ClearRecentTime"):0,g=[],h=LP.get_recentUsedCount();for(d=0;d<h&&d<e.length;d++){var j=e[e.length-d-1];if(j.last_touch>f)g[d]=
j}if(g.length==0){e=c.createElement("menuitem");e.setAttribute("label",LP.lpgs("None Available"));b.appendChild(e)}else{for(d=0;d<g.length;d++){j=g[d];f="LP.lpLaunchUrl('"+j.id+"', '"+j.manual+"', '"+j.is_http+"');";h="if (event.button == 1) { "+f+" LP.lpCloseMenus(document); }";e=c.createElement("menuitem");e.setAttribute("oncommand",f+" return true;");e.setAttribute("onclick",h);e.setAttribute("oncontextmenu","LP.lpcurrcontextmenusite = '"+j.id+"'; return true;");e.setAttribute("context","lpt_site-context-menu");
e.setAttribute("label",j.name);f=c.createElement("image");f.setAttribute("src",zb(j.id));f.setAttribute("width","16");f.setAttribute("height","16");e.appendChild(f);f=c.createElement("label");f.setAttribute("value",j.name);e.appendChild(f);b.appendChild(e)}e=c.createElement("menuseparator");e.setAttribute("id","menurecentdelim");b.appendChild(e);f=c.createElement("menuitem");f.setAttribute("label",LP.lpgs("Clear Recent"));f.setAttribute("oncommand","LP.lpClearRecent()");b.appendChild(f)}}};this.lpClearRecent=
function(){LP.lpprefsSetIntPref("ClearRecentTime",cb());gi=true};this.compare_urls=function(b,c,d){if(typeof b!="string")return false;if(typeof c!="string")return false;b=b.toLowerCase().replace(/^www\./,"");c=c.toLowerCase().replace(/^www\./,"");return d&&b.indexOf("*")!=-1?RegExp("^"+gg(b).replace(/\\\*/g,".*")+"$").exec(c):b==c};this.hide_context=function(b){try{var c=b.target.ownerDocument?b.target.ownerDocument:LP.getBrowser().contentDocument;if(c.getElementById("lpt_lpcontentareacontextmenu"))if(di){c.getElementById("lpt_lpcontentareacontextmenu").setAttribute("hidden",
true);c.getElementById("lpt_lpcontentareacontextmenu").setAttribute("display","none");c.getElementById("lpt_lpcontentareacontextmenuseparator")&&c.getElementById("lpt_lpcontentareacontextmenuseparator").setAttribute("hidden",true);c.getElementById("lpt_lpfillformsmenu4").setAttribute("hidden",true)}else{c.getElementById("lpt_lpcontentareacontextmenu").setAttribute("hidden",false);c.getElementById("lpt_lpcontentareacontextmenu").setAttribute("display","");c.getElementById("lpt_lpcontentareacontextmenuseparator")&&
c.getElementById("lpt_lpcontentareacontextmenuseparator").setAttribute("hidden",false);c.getElementById("lpt_lpfillformsmenu4").setAttribute("hidden",false)}}catch(d){U("Error in hide_context: "+d+" ln: "+d.lineNumber,null)}};this.lpSubmitForm=function(){if(ga){var b=LP.getBrowser().selectedTab.linkedBrowser.contentDocument;b.aid!=null&&typeof b.aid=="object"&&typeof b.aidindex=="number"&&LP.lp_noteAcceptHelper(b.aid[b.aidindex].id,null,false)}else this.lpOpenLogin()};this.MakeOTP=function(){if(!(Z==
null||Z.length==0))if(!(na==null||na.length==0)){var b=sb(Z);sg();for(var c=[],d=0;d<16;d++)c[d]=0;xk(c);var e="";for(d=0;d<16;d++)e+=String.fromCharCode(c[d]);c=P(Ka(e),na);d=Da(za(b+e));d=P(Ka(na),d);b=za(za(b+e)+e);b="newkey=1&xml=1&hash="+LP.en(b);b+="&encrypted_otp="+LP.en(c);b+="&rand_encrypted_key="+LP.en(d);b+="&recovery=1";LP.lpMakeRequest(LP.lp_base+"otp.php",b,Hl,function(){},e)}};this.DeleteOTP=function(){Wa(ia+"_ff.otp");Wa(ia+"_ff.sotp")};this.GetOTPHash=function(){var b=ib(ia+"_ff.sotp");
if(b==false){b=ib(ia+"_ff.otp");if(b!=false){var c=sd(b,true);Yb(ia+"_ff.sotp",c);Wa(ia+"_ff.otp")}}else b=$d(b,true);if(b==false)return"";return za(za(sb(Z)+b)+b)};this.IsVaultHidden=function(){return Cc};this.setupUrlPrefix=function(){if(LP.lpis_win)try{var b="";if("@mozilla.org/windows-registry-key;1"in Components.classes){var c=Components.classes["@mozilla.org/windows-registry-key;1"].createInstance(Components.interfaces.nsIWindowsRegKey);try{c.open(c.ROOT_KEY_CURRENT_USER,"SOFTWARE\\LastPass",
c.ACCESS_READ);b=c.readStringValue("URLPrefix2");c.close()}catch(d){}if(b==""){c.open(c.ROOT_KEY_LOCAL_MACHINE,"SOFTWARE\\LastPass",c.ACCESS_READ);b=c.readStringValue("URLPrefix2");c.close()}}else if("@mozilla.org/winhooks;1"in Components.classes){var e=Components.classes["@mozilla.org/winhooks;1"].getService(Components.interfaces.nsIWindowsRegistry);try{b=e.getRegistryEntry(e.HKCU,"SOFTWARE\\LastPass","URLPrefix2")}catch(f){}if(b=="")b=e.getRegistryEntry(e.HKLM,"SOFTWARE\\LastPass","URLPrefix2")}if(b.match(/\/\/([^\/]+)\//))LP.lp_base=
b}catch(g){}};this.GetToolbarImageLang=function(){var b="en_US";if(fb!=null)b=fb.replace("/-/","_");var c=Array("en_US");for(var d in c){if(b==d)return b;return"en_US"}};this.SetLastTouch=function(b){b.last_touch=cb()};this.CacheAccountSummary=function(){if(ga){var b=0,c=0,d=[];for(var e in y)if(y[e].url!="http://group"){if(y[e].genpw)c++;else b++;d[d.length]=y[e]}d.sort(LP.lp_sort_case_insensitive_lasttouch);e=fa.length;b+="\n";b+=c+"\n";b+=e+"\n";c=0;var f=[];for(e=0;e<d.length&&c<10;e++){var g=
le(d[d.length-e-1].url);if(typeof f[g]=="undefined"){c++;f[g]=g;b+=le(g)+"\n"}}d=Da(za(Z));b=P(b,d);Yb(ia+".cac",b)}};this.getuuid=function(){if(xa)return"";try{var b=ib("lp.suid");if(b==false){b=ib("lp.uid");if(b==false)b=LP.lpCreatePass(32,1,1,1,1,1,1,1);var c=sd(b,true);Yb("lp.suid",c);Wa("lp.uid")}else b=$d(b,true);return b}catch(d){U("Failure generating uuid");return""}};this.get_null_group=function(){return"_"+LP.lpgs("NullGroup")};this.fix_group_name=function(b){if(b==LP.get_null_group())b=
b.substring(1);return b};this.get_formfills=function(){return fa};this.getsinglefactortype=function(){var b=Hc(ib("singlefactortype")),c=LP.lpprefsHasUserValue("singlefactortype",false)?LP.lpprefsGetCharPref("singlefactortype",false):"";if(b!=c){yb("singlefactortype")||(b=c);LP.setsinglefactortype(b)}return b};this.setsinglefactortype=function(b){Yb("singlefactortype",b);LP.lpprefsSetCharPref("singlefactortype",b,false);b!=""&&LP.lpprefsSetBoolPref("openloginstart",true,false);LP.flush_prefs()};this.AddLangLocVer=
function(b){try{var c=LP.lpmainprefs.getCharPref("general.useragent.locale"),d=b,e="&lang="+c.substr(0,2)+"&loc=",f=c.substr(-2).toUpperCase();b=d+(e+{AD:"AND",AE:"ARE",AF:"AFG",AF:"AFG",AG:"ATG",AL:"ALB",AM:"ARM",AO:"AGO",AQ:"ATA",AR:"ARG",AT:"AUT",AU:"AUS",AW:"ABW",AZ:"AZE",BA:"BIH",BB:"BRB",BD:"BGD",BE:"BEL",BF:"BFA",BG:"BGR",BH:"BHR",BI:"BDI",BJ:"BEN",BM:"BMU",BN:"BRN",BO:"BOL",BR:"BRA",BS:"BHS",BT:"BTN",BW:"BWA",BY:"BLR",BZ:"BLZ",CA:"CAN",CD:"COD",CF:"CAF",CG:"COG",CH:"CHE",CI:"CIV",CL:"CHL",
CM:"CMR",CN:"CHN",CO:"COL",CR:"CRI",CU:"CUB",CV:"CPV",CY:"CYP",CZ:"CZE",DE:"DEU",DJ:"DJI",DK:"DNK",DM:"DMA",DO:"DOM",DZ:"DZA",EC:"ECU",EE:"EST",EG:"EGY",EH:"ESH",ER:"ERI",ES:"ESP",ET:"ETH",FI:"FIN",FJ:"FJI",FM:"FSM",FO:"FRO",FR:"FRA",GA:"GAB",GB:"GBR",GD:"GRD",GE:"GEO",GF:"GUF",GH:"GHA",GM:"GMB",GN:"GIN",GP:"GLP",GQ:"GNQ",GR:"GRC",GT:"GTM",GW:"GNB",GY:"GUY",HN:"HND",HR:"HRV",HT:"HTI",HU:"HUN",ID:"IDN",IE:"IRL",IL:"ISR",IN:"IND",IO:"IOT",IQ:"IRQ",IR:"IRN",IS:"ISL",IT:"ITA",JE:"JEY",JM:"JAM",JO:"JOR",
JP:"JPN",KE:"KEN",KG:"KGZ",KH:"KHM",KI:"KIR",KM:"COM",KN:"KNA",KP:"PRK",KR:"KOR",KW:"KWT",KZ:"KAZ",LA:"LAO",LB:"LBN",LC:"LCA",LI:"LIE",LK:"LKA",LR:"LBR",LS:"LSO",LT:"LTU",LU:"LUX",LV:"LVA",LY:"LBY",MA:"MAR",MC:"MCO",MD:"MDA",ME:"MNE",MG:"MDG",MK:"MKD",ML:"MLI",MM:"MMR",MN:"MNG",MO:"MAC",MQ:"MTQ",MR:"MRT",MS:"MSR",MU:"MUS",MV:"MDV",MW:"MWI",MX:"MEX",MY:"MYS",MZ:"MOZ",NA:"NAM",NE:"NER",NG:"NGA",NI:"NIC",NL:"NLD",NO:"NOR",NP:"NPL",NZ:"NZL",OM:"OMN",PA:"PAN",PE:"PER",PG:"PNG",PH:"PHL",PK:"PAK",PL:"POL",
PS:"PSE",PT:"PRT",PW:"PLW",PY:"PRY",QA:"QAT",RE:"REU",RO:"ROU",RS:"SRB",RU:"RUS",RW:"RWA",SA:"SAU",SB:"SLB",SC:"SYC",SD:"SDN",SE:"SWE",SH:"SHN",SI:"SVN",SK:"SVK",SL:"SLE",SM:"SMR",SN:"SEN",SO:"SOM",SR:"SUR",ST:"STP",SV:"SLV",SY:"SYR",SZ:"SWZ",TD:"TCD",TF:"ATF",TG:"TGO",TH:"THA",TJ:"TJK",TL:"TLS",TM:"TKM",TN:"TUN",TR:"TUR",TT:"TTO",TW:"TWN",TZ:"TZA",UA:"UKR",UG:"UGA",US:"USA",UY:"URY",UZ:"UZB",VC:"VCT",VE:"VEN",VN:"VNM",VU:"VUT",YE:"YEM",ZA:"ZAF",ZM:"ZMB",ZW:"ZWE"}[f])}catch(g){}b+="&lpv="+Wb;return b};
this.DEBUG=function(b){var c=td("lp.dbg",false);c.append("lp.dbg");b=ib("lp.dbg")+b+"\n";var d=Components.classes["@mozilla.org/network/safe-file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);d.init(c,26,384,0);d.write(b,b.length);d instanceof Components.interfaces.nsISafeOutputStream?d.finish():d.close()};this.SetupUploadFormFill=function(b){typeof b.uploadforms=="undefined"&&LP.mostRecent().setInterval(function(){LP.SetupUploadFormFill(b)},1E3);if(!(typeof b.uploadforms!=
"undefined"&&b.getElementsByTagName("form").length==b.uploadforms)){for(var c=b.getElementsByTagName("form"),d=0;d<c.length;d++)for(var e=c[d].elements,f=0;f<e.length;f++)e[f].addEventListener("click",function(g){LP.lpUploadFormFill(b,g)},false);b.uploadforms=b.getElementsByTagName("form").length}};var Ek="";this.lpUploadFormFill=function(b,c){var d=c.target;if(d.tagName=="INPUT")if(c.shiftKey){d=d.form.elements;for(var e="",f=0;f<d.length;f++){var g=d[f].type;if(!(g!="text"&&g!="password"&&g!="select"&&
g!="email")){g=Le(d[f]);var h=ka(d[f]);e+=g+","+h+",,"+b.location.href+"\n"}}Ek=e;LP.lpGetCurrentWindow().openDialog(eb+"content/ffuploadlang.xul","_blank","chrome,titlebar,toolbar,centerscreen,modal")}};this.GetOverridePrefs=function(){return Yf};this.ffuploadlang_window_load=function(b){var c=LP.lpprefsHasUserValue("ffuploadlang")?LP.lpprefsGetCharPref("ffuploadlang"):"",d=b.getElementById("lplanguagepopup");for(var e in LP.LANGS)if(LP.LANGS[e][1]!=""){var f=b.createElement("menuitem");f.setAttribute("label",
LP.LANGS[e][0]);f.setAttribute("value",LP.LANGS[e][1]);d.appendChild(f);if(LP.LANGS[e][1]==c)b.getElementById("lplanguage").selectedItem=f}};this.ffuploadlang_accept_click=function(b){b=b.getElementById("lplanguage").value;LP.lpprefsSetCharPref("ffuploadlang",b);var c="data="+LP.en(Ek);c+="&fflang="+LP.en(b);c+="&fromplugin=1";LP.lpMakeRequest(LP.lp_base+"/.test/formfillbuilder.php",c,function(){LP.alert("Data uploaded")},function(){})};var xh=null;this.addconfirm_window_load=function(b,c){b.title=
LP.lpgs("Add LastPass Site");b.documentElement.getButton("accept").setAttribute("label",LP.lpgs("SaveSite"));b.documentElement.getButton("cancel").setAttribute("label",LP.lpgs("NoThanks"));LP.sr(b,"newacct","label","Add New Site");LP.sr(b,"namelabel","value","Name");LP.sr(b,"grouplabel","value","Group");LP.sr(b,"fav","label","Make This a Favorite");LP.sr(b,"pwprotect","label","Require Password Reprompt");LP.sr(b,"autologin","label","AutoLogin");LP.sr(b,"replacct","label","Replace Existing Site");
LP.getGeneratedPw()&&b.getElementById("pwprotect").setAttribute("hidden",true);var d=c.arguments;if(d.length>0){b.getElementById("lpname").value=d[0];b.addconfirm_tld=d[0]}if(d.length>1)b.getElementById("lpgrouping").value=d[1];if(d.length>2)b.addconfirm_key=d[2];if(d.length>3)b.addconfirm_username=d[3];if(d.length>4)b.addconfirm_encryptedpassword=d[4];if(d.length>5)b.getElementById("lpname").value=d[5];var e=b.getElementById("lpgroupingpopup");d=b.getElementById("lpexistingpopup");for(var f=e.childNodes.length-
1;f>=0;f--)e.removeChild(e.childNodes.item(f));b.addconfirm_replaceAccts=[];var g=[];for(f in y){if(y[f].logins&&LP.compare_tlds(y[f].logins[0].tld,b.addconfirm_tld)&&!y[f].isbookmark&&!y[f].basic_auth&&!y[f].genpw)b.addconfirm_replaceAccts[b.addconfirm_replaceAccts.length]=y[f];if(y[f].group!=""&&y[f].group!=LP.get_null_group()&&!Qa(y[f].group,g))g[g.length]=y[f].group}for(f in qa)if(qa[f].group!=""&&qa[f].group!=LP.get_null_group()&&!Qa(qa[f].group,g))g[g.length]=qa[f].group;g.sort(LP.lp_sort_case_insensitive);
for(f=0;f<g.length;f++){var h=b.createElement("menuitem");h.setAttribute("label",g[f]);e.appendChild(h)}e=false;b.addconfirm_replaceAccts.sort(LP.lp_sort_case_insensitive_name);for(f in b.addconfirm_replaceAccts){e=true;h=b.createElement("menuitem");g=b.addconfirm_replaceAccts[f].name;var j=Kb(b.addconfirm_replaceAccts[f],0);if(j&&j!="")g+=" ("+j+")";h.setAttribute("label",g);d.appendChild(h)}if(e)b.getElementById("newacct");else{d=b.getElementById("newacct");f=b.getElementById("replacct");h=b.getElementById("lpexisting");
if(d)d.style.display="none";if(f)f.hidden=true;if(h)h.hidden=true}b.documentElement.getButton("accept").focus()};this.addconfirm_switchdisable=function(b){var c=b.getElementById("replacct");c=c&&c.selected?true:false;var d=b.getElementById("lpname");if(d)d.disabled=c;if(d=b.getElementById("lpgrouping"))d.disabled=c;if(d=b.getElementById("fav"))d.disabled=c;if(d=b.getElementById("pwprotect"))d.disabled=c;if(d=b.getElementById("autologin"))d.disabled=c;if(b=b.getElementById("lpexisting"))b.disabled=
!c};this.addconfirm_accept_click=function(b,c){var d=b.getElementById("lpname").value,e=b.getElementById("lpgrouping").value,f=0,g="",h=false,j=false,l=false,o="",n=b.getElementById("replacct"),p=false;if(n&&n.selected&&b.addconfirm_replaceAccts.length>0){p=true;if(n=b.getElementById("lpexisting"))if(n.selectedIndex==-1){LP.lpalert_ex(LP.lpgs("PleaseMakeSelection"),c);return false}else{var q=0;for(var r in b.addconfirm_replaceAccts){if(q==n.selectedIndex){f=b.addconfirm_replaceAccts[r].id;o="&aid="+
LP.en(f);if(b.addconfirm_replaceAccts[r].logins.length>0)o+="&openid_url="+LP.en(b.addconfirm_replaceAccts[r].logins[0].openid_url);g=b.addconfirm_replaceAccts[r].extra;o+="&extra="+LP.en(g);if(parseInt(b.addconfirm_replaceAccts[r].fav)==1){h=true;o+="&fav=on"}if(b.addconfirm_replaceAccts[r].pwprotect){j=true;o+="&pwprotect=on"}if(parseInt(b.addconfirm_replaceAccts[r].autologin)==1){l=true;o+="&autologin=on"}d=b.addconfirm_replaceAccts[r].name;e=b.addconfirm_replaceAccts[r].group;break}q++}}}else{if(d==
""){LP.lpalert_ex(LP.lpgs("You must enter a name."),c);return false}if(h=b.getElementById("fav").checked)o="&fav=on";if(j=b.getElementById("pwprotect").checked)o+="&pwprotect=on";if(l=b.getElementById("autologin").checked)o+="&autologin=on"}if(n=Ja[b.addconfirm_key]){q=new ub;q.pendingshare=false;q.id=f;q.name=d;q.url=n.url;q.group=e;q.username=P(n.username);q.password=n.encryptedPassword;try{for(r=0;r<n.fields.length;r++)if((n.fields[r].type=="text"||n.fields[r].type=="email")&&K(n.fields[r].value)==
n.username)q.username=n.fields[r].value;else if(n.fields[r].type=="password"&&K(n.fields[r].value)==K(n.encryptedPassword))q.password=n.fields[r].value}catch(u){}q.unencryptedUsername=n.username;q.oldusername="";q.oldpassword="";q.extra=g;q.fav=h?"1":"0";q.never_autofill="0";q.autologin=l?"1":"0";q.pwprotect=j;q.isbookmark=false;q.basic_auth=false;q.realm="";q.save_all=false;if(n.postdata.indexOf("createacct=1")!=-1){if((f=Ra(n.url))&&f.protocol&&f.host)n.url=f.protocol+"://"+f.host}else{q.logins=
[];q.logins[0]=new oc;q.logins[0].method=n.method;q.logins[0].action=Ka(n.action);q.logins[0].fields=n.fields}n.ai=q;o+="&localupdate=1&extjs=1";if(p)o+="&replacing=1"}$k(d,e,b.addconfirm_key,o);return true};this.addconfirm_cancel_click=function(b){Qf(b.addconfirm_key,b.addconfirm_tld);return true};this.addconfirm_never_click=function(b){Ki(b.addconfirm_key);Qf(b.addconfirm_key,b.addconfirm_tld);b.getElementById("LPAddConfirm").cancelDialog();return true};this.changepw_window_load=function(b,c){b.title=
LP.lpgs("Change Password Detected");b.documentElement.getButton("accept").setAttribute("label",LP.lpgs("Change"));b.documentElement.getButton("cancel").setAttribute("label",LP.lpgs("Close"));LP.sr(b,"desc","value","LastPass detected a password change for");LP.sr(b,"selectall","value","Select All");LP.sr(b,"unselectall","value","Unselect All");var d=c.arguments,e=b.getElementById("linked"),f=b.getElementById("desc"),g=d.length>3?d[3]:"",h=0;if(d.length>0){b.changepw_idToUsername=d[0];for(var j in b.changepw_idToUsername){var l=
b.createElement("checkbox"),o=ke(y[j]);l.setAttribute("label",o);e.appendChild(l);if(g=="")g=Ua(y[j].url);h++}f.setAttribute("value",f.getAttribute("value")+" "+g)}if(d.length>1)b.changepw_pw=d[1];h>=5?b.getElementById("chpwgroupcontrols").setAttribute("hidden",false):e.setAttribute("height",h*25);e=b.getElementById("instr");d.length>2&&d[2]=="1"?e.setAttribute("value",LP.lpgs("ChangePwInstr2")):e.setAttribute("value",LP.lpgs("ChangePwInstr1"))};this.changepw_accept_click=function(b){var c=[],d="",
e="",f="",g=b.getElementById("linked"),h=0,j=0;for(var l in b.changepw_idToUsername){if(g.childNodes[h].checked){if(y[l]&&K(y[l].password)==b.changepw_pw)continue;if(j!=0){e="&username"+j+"=";f="&id"+j+"="}else{e="&username=";f="&id=";d="&password="+LP.en(P(b.changepw_pw));c.push(b.changepw_pw)}e+=LP.en(P(b.changepw_idToUsername[l]));f+=LP.en(l);d+=e+f;c.push(b.changepw_idToUsername[l]);j++}h++}d!=""&&dj(null,b.changepw_pw,null,d,c);b.changepw_idToUsername=null;b.changepw_pw=null;return true};this.changepw_cancel_click=
function(b){b.changepw_idToUsername=null;b.changepw_pw=null;return true};this.changepw_select_all=function(b){b=b.getElementById("linked");for(var c=0;b&&c<b.childNodes.length;c++)b.childNodes[c].checked=true};this.changepw_unselect_all=function(b){b=b.getElementById("linked");for(var c=0;b&&c<b.childNodes.length;c++)b.childNodes[c].checked=false};this.createFieldsPane=function(b,c,d,e){Bj(c);for(var f=[],g=Array(d.logins,d.otherlogins),h=0;h<g.length;h++)for(var j=0;j<g[h].length;j++){var l=g[h][j];
urid=l.urid;if(h==0&&j==0&&d.aid!=0&&!e){var o=b.createElement("hbox"),n=b.createElement("label");n.setAttribute("value",LP.lpgs("Add Field"));n.setAttribute("class","text-link");n.setAttribute("id",r+"_show");n.setAttribute("onclick","showAddFieldDlg();");o.appendChild(n);c.appendChild(o)}l=Array(l.fields,l.otherfields);for(o=0;o<l.length;o++)for(n=0;n<l[o].length;n++){var p=l[o][n],q=p.name+"_"+p.type+"_"+p.value;if(!Qa(q,f)){f[f.length]=q;var r;r=o==0?p.type+"_"+p.name+"_"+urid:p.formname+"_"+
p.type+"_"+p.name+"_"+urid;LP.DrawField(b,c,r,p,d,urid,e,false)}}}};this.DrawField=function(b,c,d,e,f,g,h,j){var l=null;if(e.type=="text"||e.type=="password"||e.type=="textarea"){l=b.createElement("hbox");var o=b.createElement("label");o.setAttribute("value",e.name);l.appendChild(o);var n=b.createElement("textbox");n.setAttribute("type",e.type);n.setAttribute("value",K(e.value));n.setAttribute("id",d);n.setAttribute("size","20");if(e.type=="textarea"){n.setAttribute("rows","6");n.setAttribute("multiline",
"true")}h&&n.setAttribute("readonly","true");l.appendChild(n);if(e.type=="password"){j=b.createElement("label");j.setAttribute("value",LP.lpgs("ShowPw"));j.setAttribute("class","text-link");j.setAttribute("id",d+"_show");f.sharedfromaid!=null&&f.sharedfromaid!=0?j.setAttribute("onclick","alert_shared();"):j.setAttribute("onclick","toggle_password('"+d+"');");l.appendChild(j)}}else if(e.type=="select-one"||e.type=="select-multiple"){l=b.createElement("hbox");o=b.createElement("label");o.setAttribute("value",
e.name);l.appendChild(o);n=b.createElement("menulist");n.setAttribute("id",d);h&&n.setAttribute("readonly","true");if(j)n.setAttribute("editable","true");else{n.setAttribute("value",e.value);n.value=e.value}j=b.createElement("menupopup");o=b.createElement("menuitem");o.setAttribute("label",e.value);j.appendChild(o);n.appendChild(j);l.appendChild(n)}else if(e.type=="checkbox"){l=b.createElement("hbox");o=b.createElement("checkbox");o.setAttribute("label",e.name);o.setAttribute("id",d);e.checked&&o.setAttribute("checked",
"true");h&&o.setAttribute("disabled","true");l.appendChild(o)}else if(e.type=="radio"){l=b.createElement("hbox");o=b.createElement("radiogroup");n=b.createElement("radio");n.setAttribute("label",e.name);n.setAttribute("id",d);e.checked&&n.setAttribute("selected","true");h&&n.setAttribute("disabled","true");o.appendChild(n);l.appendChild(o)}if(l!=null){if(!h){j=b.createElement("label");j.setAttribute("value","[ - ]");j.setAttribute("class","text-link");j.setAttribute("id",d+"_delete");j.setAttribute("onclick",
"delete_field('"+f.id+"','"+g+"','"+e.name+"','"+e.value+"');");l.appendChild(j)}c.appendChild(l)}};this.changemasterpw_window_load=function(b){b.title=LP.lpgs("Change Password");b.documentElement.getButton("accept").setAttribute("label",LP.lpgs("Change"));b.documentElement.getButton("cancel").setAttribute("label",LP.lpgs("Close"));LP.sr(b,"origmasterpasswordlabel","value","Old Password");LP.sr(b,"passwordlabel","value","New Master Password");LP.sr(b,"confirmpasswordlabel","value","Confirm Password")};
this.changemasterpw_accept_click=function(b){var c=b.getElementById("password").value,d=b.getElementById("confirmpassword").value;b=b.getElementById("origmasterpassword").value;if(c!=d){LP.alert(LP.lpgs("Your passwords did not match."));return false}if(na!=Da(za(Z+b))){LP.alert(LP.lpgs("The 'Old Password' you entered is not your correct LastPass master password"));return false}return Gj(Z,c)};this.reencrypt=function(b,c,d){for(var e in c){var f=[];if(!Hj(f,c[e],d,false))return false;b[e]=f}return true};
var Kl=["username","password","extra","firstname","middlename","lastname","email","company","ssn","birthday","address1","address2","city","state","state_name","zip","country","country_cc3l","country_name","mobilephone","mobilephone3lcc","mobilephoneext","evephone","evephone3lcc","evephoneext","phone","phone3lcc","phoneext","fax","fax3lcc","faxphoneext","ccnum","ccexp","cccsc","address3","title","gender","driverslicensenum","taxid","bankname","bankacctnum","bankroutingnum","timezone","county","ccstart",
"ccname","ccissuenum","notes","text","alttext","profilelanguage","lastname2","mobileemail","firstname2","firstname3","lastname3"];this.changemasterpw_cancel_click=function(){};this.changegrp_window_load=function(b,c){b.title=LP.lpgs("Change Group Name");b.documentElement.getButton("accept").setAttribute("label",LP.lpgs("Change"));b.documentElement.getButton("cancel").setAttribute("label",LP.lpgs("Close"));LP.sr(b,"changegrptext","value","Select or enter a new group name");var d=c.arguments;if(d&&
d.length==1)b.origgrp=d[0];else if(d&&d.length>=2){b.openerdoc=d[0];b.openerwin=d[1];if(d.length==3)b.subgroup=d[2]}d=b.getElementById("lpgroupingpopup");var e=[];for(var f in y)if(y[f].group!=""&&y[f].group!=LP.get_null_group()&&!Qa(y[f].group,e))e[e.length]=y[f].group;for(f in qa)if(qa[f].group!=""&&qa[f].group!=LP.get_null_group()&&!Qa(qa[f].group,e))e[e.length]=qa[f].group;e.sort(LP.lp_sort_case_insensitive);for(f=0;f<e.length;f++){var g=b.createElement("menuitem");g.setAttribute("label",e[f]);
d.appendChild(g)}};this.changegrp_accept_click=function(b){var c=b.getElementById("lpgrouping").value;if(typeof b.origgrp!="undefined"){b=b.origgrp;if(b.indexOf("\\")!=-1&&c.indexOf("\\")==-1)c=b.substring(0,b.lastIndexOf("\\"))+"\\"+c;if(c=="")c=LP.get_null_group();var d=[];for(var e in y)if(y[e].group==b){d[d.length]=e;y[e].group=c}for(e in qa)if(qa[e].group==b){d[d.length]=e;qa[e].group=c}if(c==LP.get_null_group())c="";if(b==LP.get_null_group())b="";Xa++;rb++;var f=true,g=vb();if(g==null)f=false;
for(e=0;e<d.length;e++){var h=y[d[e]];if(h==null)h=qa[d[e]];if(h){if(f&&!dc(g,d[e],false))f=false;if(f&&!kc(g,h,false))f=false}}if(f&&!vc(g,Xa))f=false;f&&Ab(g,null,"renameGroup");LP.lpDisplayAccounts_all();e="origgrp="+LP.en(P(b))+"&newgrp="+LP.en(P(c))+"&xml=1";LP.lpMakeRequest(LP.lp_base+"groups.php",e,Aj)}else{if(typeof b.subgroup!="undefined"&&b.subgroup){e=b.openerdoc.selected_ids[0];if(e=typeof y[e]!="undefined"?y[e]:qa[e])c=e.group+"\\"+c}LP.moveSelectedToGroup(c,b.openerdoc,b.openerwin)}LP.saveGroupState(null,
"changegrp_accept_click");return true};this.changegrp_cancel_click=function(){return true};this.addfield_window_load=function(b,c){b.title=LP.lpgs("Add Field");b.documentElement.getButton("accept").setAttribute("label",LP.lpgs("OK"));b.documentElement.getButton("cancel").setAttribute("label",LP.lpgs("Cancel"));LP.sr(b,"namelabel","value","Name");LP.sr(b,"typelabel","value","Field Type");LP.sr(b,"formnamelabel","value","Form Name");var d=c.arguments;if(d){if(d.length>0)b.id=d[0];if(d.length>1)b.fieldsdoc=
d[1]}d=b.getElementById("typepopup");var e=b.createElement("menuitem");e.setAttribute("label",LP.lpgs("Text"));d.appendChild(e);e=b.createElement("menuitem");e.setAttribute("label",LP.lpgs("Password"));d.appendChild(e);e=b.createElement("menuitem");e.setAttribute("label",LP.lpgs("Select"));d.appendChild(e);e=b.createElement("menuitem");e.setAttribute("label",LP.lpgs("Checkbox"));d.appendChild(e);b.getElementById("type").selectedIndex=0;if(y[b.id]&&y[b.id].save_all){b.getElementById("formnamerow").hidden=
false;d="";if(y[b.id].logins.length>0)for(e=0;e<y[b.id].logins[0].otherfields.length;e++)if(e==0)d=y[b.id].logins[0].otherfields[e].formname;else if(y[b.id].logins[0].otherfields[e].formname!=d){d="";break}b.getElementById("formname").value=d}};this.addfield_accept_click=function(b,c){var d=b.getElementById("name").value,e=b.getElementById("type").selectedIndex,f=b.getElementById("formname").value;if(d==""){LP.alert(LP.lpgs("You must enter a name."),c);return false}var g=y[b.id],h=null,j=null,l=null;
if(g&&g.logins.length>0){h=g.logins[0];l=g.save_all?h.otherfields:h.fields;j=h.urid;for(var o=0;o<l.length;o++){var n=l[o];if(n&&n.name==d&&(!g.save_all||n.formname==f)){LP.alert(LP.lpgs("You must enter a unique name."),c);return false}}}o="text";if(e==1)o="password";else if(e==2)o="select-one";else if(e==3)o="checkbox";n=null;if(h){n=new Lc;n.name=d;n.type=o;n.value="";if(g&&g.save_all)n.formname=f;l[l.length]=n}if(n&&typeof b.fieldsdoc!="undefined"){e=n.type+"_"+n.name+"_"+j;if(g&&g.save_all)e=
n.formname+"_"+e;LP.DrawField(b.fieldsdoc,b.fieldsdoc.getElementById("fields"),e,n,g,j,false,true)}(n=vb())&&dc(n,g.id,false)&&kc(n,g,false)&&Ne(n)&&Ab(n,null,"addfield_accept_click")&&Bb();d=LP.lp_base+"fields.php?add=1&aid="+LP.en(g.id)+"&urid="+LP.en(j)+"&name="+LP.en(d)+"&type="+LP.en(o);if(g&&g.save_all)d+="&formname="+LP.en(f);LP.lpMakeRequest(d,"",oe,null,{url:d,aid:g.id,postdata:"",handler:oe,param:null});return true};this.addfield_cancel_click=function(){return true};var Xe="",We="",Ve="",
se=false,Qb={},rc={},sf=null,Rb={},Oj=null,Sb={};this.creategrp_window_load=function(b,c){b.title=LP.lpgs("Group Name");b.documentElement.getButton("accept").setAttribute("label",LP.lpgs("OK"));b.documentElement.getButton("cancel").setAttribute("label",LP.lpgs("Cancel"));LP.sr(b,"grplabel","value","Group Name");var d=c.arguments;if(d&&d.length==2){b.parentgroup=d[0];b.tdoc=d[1]}};this.creategrp_accept_click=function(b,c){var d=b.getElementById("lpgrp").value;if(b.parentgroup!="")d=b.parentgroup+"\\"+
d;for(var e in y)if(y[e].group==d){LP.alert(LP.lpgs("That group already exists."),c);return false}for(e in qa)if(qa[e].group==d){LP.alert(LP.lpgs("That group already exists."),c);return false}e=Vf(b.tdoc,d,[],Bc);var f="_"+d;Bc.c[f]=e[0];Bc.i[f]=e[1];LP.saveGroupState(null,"lpAddResponse");e=new ub;e.pendingshare=false;e.id=0;e.name="";e.url="http://group";e.group=d;e.username="";e.password="";e.unencryptedUsername="";e.oldusername="";e.oldpassword="";e.extra="";e.fav="0";e.never_autofill="0";e.autologin=
"0";e.pwprotect=false;e.isbookmark=false;e.basic_auth=false;e.realm="";d="ajax=1&extjs=1&name=&url="+LP.en(Ka(e.url))+"&grouping="+LP.en(P(e.group,void 0))+"&username=&password=&extra=&aid=0&openid_url=&isbookmark=0";LP.lpEditAccount(d,e);return true};this.creategrp_cancel_click=function(){return true};this.siteinfo_window_load=function(b,c){b.title=LP.lpgs("Edit Site Information");b.documentElement.getButton("accept").setAttribute("label",LP.lpgs("OK"));b.documentElement.getButton("cancel").setAttribute("label",
LP.lpgs("Cancel"));b.documentElement.getButton("extra1").setAttribute("label",LP.lpgs("Share"));b.documentElement.getButton("extra2").setAttribute("label",LP.lpgs("Delete"));LP.sr(b,"urllabel","value","URL");LP.sr(b,"namelabel","value","Name");LP.sr(b,"grouplabel","value","Group");LP.sr(b,"usernamelabel","value","Username");LP.sr(b,"passwordlabel","value","Password");LP.sr(b,"capslocklabel","value","Caps Lock is ON");LP.sr(b,"lpshowhide","value","ShowPw");LP.sr(b,"fieldslabel","value","Fields");LP.sr(b,
"noteslabel","value","Notes");LP.sr(b,"lpfav","label","Favorite");LP.sr(b,"lpneverautofill","label","NeverAutoFill");LP.sr(b,"lpeditfields","value","Edit Form Fields");LP.sr(b,"lppwprotect","label","Require Password Reprompt");LP.sr(b,"lpautologin","label","AutoLogin");LP.sr(b,"notestypelabel","value","Note Type");LP.getHideSharing()&&b.documentElement.getButton("extra1").setAttribute("hidden",LP.getHideSharing());LP.getGeneratedPw()&&b.getElementById("lppwprotect").setAttribute("hidden",true);var d=
b.getElementById("capslocklabel");d.style.display="none";d.style.textAlign="center";d.style.padding="3px";d.style.color="#ff0000";d.style.background="#ffff00";b.siteinfo_isbookmark=false;b.siteinfo_sharedfromaid="";d=false;var e="",f="";b.siteinfo_save_all_fields_browser=null;b.siteinfo_save_all_fields_postdata="";b.siteinfo_save_all_fields_numfields=0;b.siteinfo_save_all_fields_fields=[];b.siteinfo_isotherfields=false;b.siteinfo_fi=null;c.addEventListener("resize",Sl,false);var g=c.arguments;if(g.length>
0)b.siteinfo_id=g[0];if(g.length>1)b.siteinfo_isbookmark=g[1];if(g.length>2)d=g[2];if(g.length>3)e=g[3];if(g.length>4)f=g[4];if(g.length>5)b.siteinfo_save_all_fields_browser=g[5];if(g.length>6)b.siteinfo_postdata=g[6];if(g.length>7)b.siteinfo_fi=g[7];if(b.siteinfo_fi){b.siteinfo_save_all_fields_postdata="&save_all=1&localupdate=1&"+b.siteinfo_fi.postdata;b.siteinfo_save_all_fields_numfields=b.siteinfo_fi.fields.length;b.siteinfo_save_all_fields_fields=b.siteinfo_fi.fields;b.getElementById("lpnumfields").setAttribute("value",
LP.lpgs("Number of fields saved")+": "+b.siteinfo_save_all_fields_numfields);b.getElementById("lpnumfields").setAttribute("hidden",false)}else if(b.siteinfo_postdata){b.siteinfo_save_all_fields_postdata="&save_all=1&localupdate=1&"+b.siteinfo_postdata;b.getElementById("lpnumfields").setAttribute("value",LP.lpgs("Number of fields saved")+": "+b.siteinfo_save_all_fields_numfields);b.getElementById("lpnumfields").setAttribute("hidden",false)}else if(b.siteinfo_save_all_fields_browser){b.siteinfo_save_all_fields_postdata=
"&save_all=1&localupdate=1&"+sc(false,true,2,b.siteinfo_save_all_fields_browser,0,null,null,true,true,true,b.siteinfo_save_all_fields_browser.contentDocument,b.siteinfo_save_all_fields_browser.contentWindow,1,b);b.getElementById("lpnumfields").setAttribute("value",LP.lpgs("Number of fields saved")+": "+b.siteinfo_save_all_fields_numfields);b.getElementById("lpnumfields").setAttribute("hidden",false)}var h=b.getElementById("lpgroupingpopup");for(g=h.childNodes.length-1;g>=0;g--)h.removeChild(h.childNodes.item(g));
var j=[];for(g in y)if(y[g].group!=""&&y[g].group!=LP.get_null_group()&&!Qa(y[g].group,j))j[j.length]=y[g].group;for(g in qa)if(qa[g].group!=""&&qa[g].group!=LP.get_null_group()&&!Qa(qa[g].group,j))j[j.length]=qa[g].group;j.sort(LP.lp_sort_case_insensitive);for(g=0;g<j.length;g++){var l=b.createElement("menuitem");l.setAttribute("label",j[g]);h.appendChild(l)}LP.HIDE_SHARE&&b.documentElement.getButton("extra1").setAttribute("hidden",true);g=null;if(b.siteinfo_id==0){if(d){h="http://sn";b.getElementById("lpurl").value=
h;LP.sr(b,"lpgroup","value","SecureNotes")}else{h=b.siteinfo_fi?b.siteinfo_fi.url:LP.lpgetcurrenturl();b.getElementById("lpurl").value=h;if(b.siteinfo_isbookmark){e=LP.lpgetcurrenttitle();b.getElementById("lpname").value=e}else{b.getElementById("lpname").value=le(h);b.getElementById("lpusername").value=e;b.getElementById("lppassword").value=f}}b.documentElement.getButton("extra2").setAttribute("hidden",true);b.documentElement.getButton("extra1").setAttribute("hidden",true);b.getElementById("lpeditfields").setAttribute("hidden",
true);if(b.siteinfo_save_all_fields_browser){b.getElementById("usernamepassword").style.display="none";b.getElementById("fieldscontainer").setAttribute("hidden","false");e=new ub;e.pendingshare=false;e.logins=[];e.logins[0]=new oc;e.logins[0].fields=[];e.logins[0].otherfields=b.siteinfo_save_all_fields_fields;e.otherlogins=[];LP.createFieldsPane(b,b.getElementById("fields"),e,true)}}else{g=y[b.siteinfo_id];if(g==null)g=qa[b.siteinfo_id];b.getElementById("lpurl").value=g.url;b.getElementById("lpname").value=
g.name;b.getElementById("lpgroup").value=g.group!=LP.get_null_group()?g.group:"";b.getElementById("lpnotes").value=K(g.extra);if(g.logins.length>0){b.getElementById("lpusername").value=g.logins[0].unencryptedUsername;b.getElementById("lppassword").value=K(g.logins[0].password);b.siteinfo_un=g.logins[0].username;b.siteinfo_pw=g.logins[0].password;b.siteinfo_tld=g.logins[0].tld}else{b.siteinfo_un="";b.siteinfo_pw="";b.siteinfo_tld=""}b.getElementById("lpfav").checked=parseInt(g.fav)==1?true:false;b.getElementById("lpneverautofill").checked=
parseInt(g.never_autofill)==1?true:false;b.getElementById("lpautologin").checked=parseInt(g.autologin)==1?true:false;b.getElementById("lppwprotect").checked=g.pwprotect;b.siteinfo_isbookmark=g.isbookmark;b.siteinfo_sharedfromaid=g.sharedfromaid;if(g.genpw)b.getElementById("LPEditSite4").getButton("extra1").disabled=true;else if(g.sharedfromaid!=null&&g.sharedfromaid!=""&&g.sharedfromaid!="0")b.getElementById("LPEditSite4").getButton("extra1").disabled=true;if(g.logins.length>0&&g.logins[0].fields.length==
0&&g.logins[0].otherfields.length!=0){b.siteinfo_isotherfields=true;b.getElementById("usernamepassword").style.display="none";b.getElementById("fieldscontainer").setAttribute("hidden","false");LP.createFieldsPane(b,b.getElementById("fields"),g)}b.siteinfo_isotherfields&&b.getElementById("lpeditfields").setAttribute("hidden",true)}if(b.siteinfo_isbookmark){b.getElementById("usernamepassword").style.visibility="hidden";b.title=LP.lpgs("Edit Bookmark Information")}else if(g!=null&&g.sn==true||d){b.getElementById("lpeditfields").setAttribute("hidden",
true);b.getElementById("usernamepassword").style.display="none";b.getElementById("urlgrp").style.display="none";b.title=LP.lpgs("Edit Secure Note");b.getElementById("lpfav").style.display="none";b.getElementById("lpneverautofill").style.display="none";b.getElementById("lpautologin").style.display="none";b.getElementById("lpnotes").setAttribute("rows","10")}b.origvalues=[];d=Array("lpurl","lpname","lpgroup","lpusername","lppassword","lpnotes");e=Array("lpfav","lpneverautofill","lppwprotect","lpautologin");
for(g=0;g<d.length;g++)if(b.getElementById(d[g]))b.origvalues[d[g]]=b.getElementById(d[g]).value;for(g=0;g<e.length;g++)if(b.getElementById(e[g]))b.origvalues[e[g]]=b.getElementById(e[g]).checked;LP.siteinfo_update_passwordmeter(b,c);LP.buildSecureNotes(b)};this.buildSecureNotes=function(b){if(LP.islastpass)if(b.getElementById("lpurl").value=="http://sn"){b.getElementById("notesrow0").setAttribute("hidden",false);b.getElementById("notesrow1").setAttribute("hidden",true);for(var c=b.getElementById("notestypepopup"),
d=b.getElementById("notestypeval").selectedIndex,e=null,f=c.childNodes.length-1;f>=0;f--)c.removeChild(c.childNodes.item(f));var g=0;for(f in nc){if(g++==d)e=f;var h=b.createElement("menuitem");h.setAttribute("label",LP.lpgs(f));h.setAttribute("className","menuitem-iconic");typeof Gf[f]!="undefined"?h.setAttribute("image",Gf[f]):h.setAttribute("image",zb("sn"));c.appendChild(h)}if(b.siteinfo_id!=0)e=LP.getNoteValue("NoteType",b.getElementById("lpnotes").value);if(!e||typeof nc[e]=="undefined")e="Generic";
c=0;d="Generic";for(f in nc){g=Eh(nc[f]);if(g>c){c=g;d=f}}LP.buildForm(b,d);LP.setTimeout(function(){LP.buildForm(b,e)},0)}};this.getNoteValue=function(b,c,d){b+=":";if(!c)return null;c="\n"+c;var e=c.indexOf("\n"+b);if(b=="NoteType:"){if(e!=0)return null}else if(e==-1)return null;e++;d=d?"-1":c.indexOf("\n",e);if(d==-1)d=c.length;return c.substring(e+b.length,d).replace(/^\s*/,"").replace(/\s*$/,"")};var Bg=["January","February","March","April","May","June","July","August","September","October",
"November","December"];this.buildForm=function(b,c){var d=[],e=[],f=b.getElementById("notestypeval"),g=b.getElementById("notestypepopup"),h=0;for(var j in nc){if(j==c){f.selectedIndex=h;break}h++}b.getElementById("notesrow1").setAttribute("hidden",c=="Generic"?false:true);b.getElementById("dynamicnotes").setAttribute("hidden",c=="Generic"?true:false);b.getElementById("notestypeval").disabled=b.siteinfo_id!=0?true:false;if(c!="Generic"){for(f=b.getElementById("dynamicnotes");f.hasChildNodes()&&f.childNodes.length>
0;)f.removeChild(f.firstChild);var l=nc[c],o=b.createElement("grid");o.flex=1;var n=b.createElement("columns"),p=b.createElement("column");p.flex=1;var q=b.createElement("column");q.flex=50;n.appendChild(p);n.appendChild(q);o.appendChild(n);n=b.createElement("rows");for(j in l){p=b.createElement("row");q=b.createElement("label");q.setAttribute("value",LP.lpgs(j)+":");var r=null;if(l[j]=="text"){r=b.createElement("textbox");r.id="note_"+j;b.siteinfo_id!=0&&r.setAttribute("value",LP.getNoteValue(j,
b.getElementById("lpnotes").value))}else if(l[j]=="date"||l[j]=="datemoyr"){r=b.createElement("hbox");var u=null;if(b.siteinfo_id!=0)if(u=LP.getNoteValue(j,b.getElementById("lpnotes").value))u=u.split(",");var t=b.createElement("menulist");t.id="note_"+j+"_mo";g=b.createElement("menupopup");h=0;for(var C in Bg){var A=b.createElement("menuitem");A.setAttribute("label",LP.lpgs(Bg[C]));g.appendChild(A);if(u&&u.length>0&&Bg[C]==u[0]){d[d.length]=t;e[e.length]=h}h++}t.appendChild(g);r.appendChild(t);if(l[j]==
"date"){h=b.createElement("menulist");h.id="note_"+j+"_day";g=b.createElement("menupopup");for(C=1;C<=31;C++){A=b.createElement("menuitem");A.setAttribute("label",C);g.appendChild(A)}h.appendChild(g);if(u&&u.length>1&&u[1]>=1){d[d.length]=h;e[e.length]=u[1]-1}r.appendChild(h)}g=b.createElement("textbox");g.setAttribute("maxlength",4);g.setAttribute("size",4);g.id="note_"+j+"_yr";h=l[j]=="date"?2:1;u&&u.length>h&&g.setAttribute("value",u[h]);r.appendChild(g)}else if(l[j]=="textarea"){r=b.createElement("textbox");
r.setAttribute("multiline",true);r.setAttribute("minrows",4);r.id="note_"+j;b.siteinfo_id!=0&&r.setAttribute("value",LP.getNoteValue(j,b.getElementById("lpnotes").value,true))}else continue;q.flex=1;r.flex=50;p.appendChild(q);p.appendChild(r);n.appendChild(p)}o.appendChild(n);j=b.createElement("groupbox");j.flex=1;j.appendChild(o);f.appendChild(j);for(j=0;j<d.length;j++)d[j].selectedIndex=e[j]}};this.siteinfo_update_passwordmeter=function(b){var c=b.getElementById("lppassword").value;b.getElementById("passwordmeter").value=
LP.calcStrength("",c)};this.lpsiteinfo_checkcapslock=function(b,c,d){Dj(b,c,d,"capslocklabel")};this.getSecureNoteFromFields=function(b){if(b.getElementById("lpurl").value=="http://sn"){var c="Generic",d=b.getElementById("notestypeval").selectedIndex;if(d>=0){var e=0;for(var f in nc)if(e++==d){c=f;break}}if(c=="Generic"||b.getElementById("notesrow0").getAttribute("hidden")==true)return b.getElementById("lpnotes").value;d="NoteType:"+c+"\n";for(f in nc[c])if(nc[c][f]=="text")d+=f+":"+b.getElementById("note_"+
f).value+"\n";else if(nc[c][f]=="date"||nc[c][f]=="datemoyr"){d+=f+":"+Bg[b.getElementById("note_"+f+"_mo").selectedIndex];if(nc[c][f]=="date")d+=","+(b.getElementById("note_"+f+"_day").selectedIndex+1);d+=","+b.getElementById("note_"+f+"_yr").value+"\n"}else if(nc[c][f]=="textarea")d+=f+":"+b.getElementById("note_"+f).value+"\n";return d}return b.getElementById("lpnotes").value};this.siteinfo_accept_click=function(b,c){if(!ga)return true;if(b.getElementById("lpname").value==""){LP.lpalert_ex(LP.lpgs("You must enter a name."),
c);return false}var d=null;if(b.siteinfo_id!=0){d=y[b.siteinfo_id];if(d==null)d=qa[b.siteinfo_id];if(d.urid!=0&&d.url!=b.getElementById("lpurl").value)if(!LP.lpConfirmYesNo(LP.lpgs("ConfirmURLChange"),c))return false}if(b.getElementById("lpnotes").value.length>45E3)if(LP.lpConfirmYesNo(LP.lpgs("NotesTooLarge"),c))b.getElementById("lpnotes").value=b.getElementById("lpnotes").value.substring(0,45E3);else return false;var e=new ub;e.pendingshare=false;e.id=b.siteinfo_id;e.name=b.getElementById("lpname").value;
e.url=b.getElementById("lpurl").value;e.group=b.getElementById("lpgroup").value;e.username=d&&b.getElementById("lpusername").value==d.unencryptedUsername?d.username:P(b.getElementById("lpusername").value);e.password=d&&b.getElementById("lppassword").value==K(d.password)?d.password:P(b.getElementById("lppassword").value);var f=e.password;e.unencryptedUsername=b.getElementById("lpusername").value;e.oldusername=b.siteinfo_un;e.oldpassword=b.siteinfo_pw;var g=LP.getSecureNoteFromFields(b);e.extra=P(g);
e.fav=b.getElementById("lpfav").checked?"1":"0";e.never_autofill=b.getElementById("lpneverautofill").checked?"1":"0";e.autologin=b.getElementById("lpautologin").checked?"1":"0";e.pwprotect=b.getElementById("lppwprotect").checked;e.isbookmark=b.siteinfo_isbookmark?true:false;e.basic_auth=false;e.realm="";var h="ajax=1&extjs=1&name="+LP.en(P(e.name,void 0))+"&url="+LP.en(Ka(e.url))+"&grouping="+LP.en(P(e.group,void 0))+"&username="+LP.en(e.username)+"&password="+LP.en(e.password)+"&extra="+LP.en(e.extra);
if(e.url=="http://sn"){g=LP.getNoteValue("NoteType",g);h+=g&&g!=""?"&notetype="+LP.en(g):"";if(g)e.notetype=g}if(b.siteinfo_id==0){h+="&aid=0&openid_url=";if(b.getElementById("lpfav").checked)h+="&fav=on"}else{h+="&aid="+LP.en(d.id);h+=d.logins.length>0?"&openid_url="+LP.en(d.logins[0].openid_url):"&openid_url=";h+="&basic_auth="+LP.en(d.basic_auth?"1":"0");if(b.getElementById("lpfav").checked)h+="&fav=on";if(b.getElementById("lpneverautofill").checked)h+="&never_autofill=on";if(b.getElementById("lpautologin").checked)h+=
"&autologin=on"}h+="&isbookmark="+LP.en(b.siteinfo_isbookmark?"1":"0");if(b.getElementById("lppwprotect").checked)h+="&pwprotect=on";if(b.siteinfo_save_all_fields_browser){h+=b.siteinfo_save_all_fields_postdata;e.save_all=true;e.logins=[];e.logins[0]=new oc;e.logins[0].otherfields=b.siteinfo_save_all_fields_fields}LP.lpEditAccount(h,e);b.siteinfo_isotherfields&&LP.submitFieldsPane(b,b.siteinfo_id);if(b.siteinfo_id!=0&&f!=b.siteinfo_pw){d=Hi(b.siteinfo_tld,b.siteinfo_id);d!=null&&c.openDialog(eb+"content/changepw.xul",
"_blank","chrome,titlebar,toolbar,centerscreen,modal",d,b.getElementById("lppassword").value,"1",b.siteinfo_tld)}LP.last_dialog_close=(new Date).getTime();return true};this.siteinfo_delete_click=function(b,c){if(!ga)return true;var d=y[b.siteinfo_id];if(d==null)d=qa[b.siteinfo_id];if(LP.lpConfirmDeleteSite(d.id,c)){LP.last_dialog_close=(new Date).getTime();c.close()}LP.saveGroupState(null,"siteinfo_delete_click")};this.siteinfo_share_click=function(b,c){if(!ga)return true;if(b.siteinfo_id){LP.lpOpenShareWindow(b.siteinfo_id);
LP.last_dialog_close=(new Date).getTime();c.close()}};this.lpOpenShareWindow=function(b){LP.lpbaseopen("?ac=1&share="+LP.en(b))};this.lpOpenAcceptShareWindow=function(b){LP.lpbaseopen("?ac=1&acceptshare="+LP.en(b))};this.lpOpenRejectShareWindow=function(b){LP.lpbaseopen("?ac=1&rejectshare="+LP.en(b))};this.siteinfo_edit_fields=function(b,c){if(b.siteinfo_id){var d=false;for(var e in b.origvalues)if(b.getElementById(e))if(typeof b.origvalues[e]=="string"&&b.getElementById(e).value!=b.origvalues[e]){d=
true;break}else if(typeof b.origvalues[e]=="boolean"&&b.getElementById(e).checked!=b.origvalues[e]){d=true;break}d&&!LP.lpConfirmYesNo("Are you sure you want to edit this site's fields?  Doing so will cause you to lose any changes you have made to this site!",c)||c.openDialog(eb+"content/editfields.xul","_blank","resizable=yes,chrome,titlebar,toolbar,centerscreen",b.siteinfo_id,c)}};this.siteinfo_cancel_click=function(){if(!ga)return true;LP.last_dialog_close=(new Date).getTime();return true};this.siteinfo_toggle_password=
function(b,c){if(b.siteinfo_sharedfromaid!=null&&b.siteinfo_sharedfromaid!=""&&b.siteinfo_sharedfromaid!="0"&&b.siteinfo_sharedfromaid!="null")LP.alert(LP.lpgs("This is a shared site. You are not permitted to view the password."),c);else if(b.getElementById("lppassword").type=="password"){if(je)if(!LP.securityPrompt(c))return;b.getElementById("lppassword").type="text";LP.sr(b,"lpshowhide","value","HidePw")}else{b.getElementById("lppassword").type="password";LP.sr(b,"lpshowhide","value","ShowPw")}};
this.help_window_load=function(b,c){b.title=LP.lpgs("LastPass Help");LP.sr(b,"NoMore","label","Do not show this help item again");LP.sr(b,"helpcancel","label","Close");var d=c.arguments;if(d.length>0){b.help_topic=d[0];var e=b.getElementById("help-iframe"),f="";try{f=typeof fb!="undefined"&&fb!=null&&fb!=""?fb:LP.lpmainprefs.getCharPref("general.useragent.locale")}catch(g){}if(f)f=f.replace("-","_");if(e)if(LP.althelpurl!="")e.setAttribute("src",LP.AddLangLocVer(LP.althelpurl));else{d=LP.lp_base+
"help.php?topic="+LP.en(d[0])+(f?"&lang="+LP.en(f):"");e.setAttribute("src",d)}b.getElementById("NoMore").setAttribute("hidden",true)}};this.help_window_unload=function(b){LP.lphelpstats.currentlyopen=false;LP.lphelpstats.wino=null;var c=b.getElementById("NoMore");c&&c.checked&&LP.lpMakeRequest(LP.lp_base+"help.php","topic="+LP.en(b.help_topic)+"&comp=1",null)};this.help_cancel_click=function(b){(b=b.getElementById("LPHelp"))&&b.cancelDialog()};this.print_window_load=function(b,c){b.title=LP.lpgs("LastPass Print");
LP.sr(b,"printbutton","label","Print");LP.sr(b,"cancelbutton","label","Close");var d=c.arguments;if(d.length>0){var e=d[0];if(d=b.getElementById("print-iframe")){e=LP.lp_base+"export.php?plug=1&print=1"+(e==true?"&notes=1":"")+LP.GetIdentityParam();d.webNavigation.loadURI(e,null,null,null,null);b.print_webnavigation=d.webNavigation;b.print_timer=c.setInterval(function(){LP.print_write_key(b,c)},200)}}};this.print_write_key=function(b){b=b.print_webnavigation.document;if(b.body!=null){var c=b.createElement("script");
c.appendChild(b.createTextNode("var exportkey='"+Ka(na)+"';var exportusername='"+LP.lpes(Z)+"';var exporthash='"+LP.lpes(Zd)+"';"));b.body.appendChild(c)}};this.print_window_unload=function(b,c){b.print_timer!=null&&c.clearInterval(b.print_timer)};this.print_print_click=function(b){(b=b.getElementById("print-iframe"))&&b.contentWindow.print()};this.print_cancel_click=function(b){(b=b.getElementById("LPPrint"))&&b.cancelDialog()};var lb,yd,te="",zh=false,Ze;this.welcome_window_load=function(b,c){lb=
b;yd=c;b.welcomestate=0;LP.welcome_translate(b,c);var d=b.getElementById("languagesel"),e=LP.lpprefsHasUserValue("language",false)?LP.lpprefsGetCharPref("language",false):"",f=0;for(var g in LP.LANGS){var h=b.createElement("listitem");h.setAttribute("label",LP.LANGS[g][0]);h.setAttribute("value",LP.LANGS[g][1]);d.appendChild(h);if(LP.LANGS[g][1]==e){d.ensureIndexIsVisible(f);d.selectedItem=h}f++}d=b.getElementById("timezonepopup");Sj();for(g=0;g<Y.length;g++){e=b.createElement("menuitem");e.setAttribute("label",
Y[g].name);e.setAttribute("value",Y[g].value);d.appendChild(e)}b.getElementById("timezone").value=vk(false);xa||ga&&Ia(false);LP.mostRecent().setTimeout(function(){c.focus()},5E3)};this.welcome_change_language_if=function(b,c){var d=LP.lpprefsHasUserValue("language",false)?LP.lpprefsGetCharPref("language",false):"",e="",f="",g=b.getElementById("languagesel");if(g)if(g=g.selectedItem){e=g.value;f=g.label}if(e!=d){if(!LP.lpConfirmYesNo(LP.lpgs("Are you sure you want to change your language to")+" "+
f+"?",c))return false;LP.lpprefsSetCharPref("language",e,false);LP.flush_prefs();LP.retranslate_toolbars();LP.welcome_translate(b,c)}return true};this.welcome_translate=function(b){b.title=LP.lpgs("Welcome to LastPass!");b.getElementById("welcometext1").appendChild(b.createTextNode(LP.lpgs("WelcomeMsg1")));b.getElementById("welcometext2").appendChild(b.createTextNode(LP.lpgs("WelcomeMsg2")));b.getElementById("welcometextwindows").setAttribute("display","none");b.getElementById("exelink").setAttribute("display",
"none");LP.sr(b,"languagelabel","value","Please select your language");b.documentElement.getButton("accept").setAttribute("label",LP.lpgs("CreateAccount"));b.documentElement.getButton("cancel").setAttribute("label",LP.lpgs("NoThanks"));LP.sr(b,"title","value","Welcome to LastPass!");LP.sr(b,"emaillabel","value","Email");LP.sr(b,"passwordlabel","value","MasterPassword");LP.sr(b,"passwordreminderlabel","value","Password Reminder");LP.sr(b,"timezonelabel","value","Time Zone");LP.sr(b,"terms","label",
"I have read and agree with the");LP.sr(b,"termslink","value","terms of service");LP.sr(b,"and","value","and");LP.sr(b,"privacylink","value","privacy statement");LP.sr(b,"data","label","I understand that my encrypted data will be sent to LastPass");LP.sr(b,"history","label","Keep a history of my logins and form fills");LP.sr(b,"improve","label","Send anonymous error reporting data to help improve LastPass");LP.sr(b,"disablemgr","label","Disable Insecure Firefox Password Manager");for(var c=1;c<=10;c++)LP.sr(b,
"reenter"+c,"value","Reenter"+c);LP.sr(b,"passwordconfirmlabel","value","ReenterPassword");for(c=2;c<=8;c++)LP.sr(b,"importdataask"+c,c>=6?"label":"value","importdataask"+c);for(c=2;c<=8;c++)LP.sr(b,"removedataask"+c,c>=7?"label":"value","removedataask"+c);for(c=2;c<=7;c++)LP.sr(b,"formfillask"+c,c>=6?"label":"value","formfillask"+c);for(c=0;c<b.getElementById("thanks2").childNodes.length;c++)b.getElementById("thanks2").removeChild(b.getElementById("thanks2").childNodes.item(c));b.getElementById("thanks2").appendChild(b.createTextNode(LP.lpgs("thanks2")));
for(c=3;c<=4;c++)LP.sr(b,"thanks"+c,"value","thanks"+c)};this.welcome_accept_click=function(b,c){var d=LP.lpgs("CreateAccount"),e=LP.lpgs("Cancel"),f=true;if(b.welcomestate==0){if(!LP.welcome_change_language_if(b,c)){c.focus();return false}d=LP.lpgs("CreateAccount");e=LP.lpgs("Cancel");b.getElementById("welcome").setAttribute("hidden","true");b.getElementById("create").setAttribute("hidden","false");LP.sr(b,"title","value","CreateAccount");b.getElementById("email").focus()}else if(b.welcomestate==
1){if(!Xl(b,c)){c.focus();return false}b.getElementById("create").setAttribute("hidden","true");b.getElementById("reenter").setAttribute("hidden","false");LP.sr(b,"title","value","ReenterPassword");b.getElementById("passwordconfirm").value="";b.getElementById("passwordconfirm").focus()}else if(b.welcomestate==2){d=b.getElementById("passwordconfirm").value;f=b.getElementById("password").value;if(d!=f){LP.alert(LP.lpgs("The LastPass master password you reentered does not match"),c);b.welcomestate=0;
b.getElementById("reenter").setAttribute("hidden","true");LP.welcome_accept_click(b,c);c.focus();return false}else{if(xa){lb.getElementById("progresslabel").value=LP.lpgs("Reencrypting Data");d=sb(lb.getElementById("email").value);f=lb.getElementById("password").value;Ze=Gj(d,f,true);if(typeof Ze!="string"||Ze.length<4||Ze.substring(0,4)!="LPAV"){Ah(LP.lpgs("An error occurred while re-encrypting your data"),yd);return false}}b.getElementById("progresslabel").value=LP.lpgs("Creating Account...");d=
b.getElementById("email").value.toLowerCase().replace(/\s*/g,"");f=b.getElementById("password").value;f=za(za(d+f)+f);var g=b.getElementById("improve").checked,h=b.getElementById("history").checked,j=b.getElementById("timezone").value,l=b.getElementById("passwordreminder").value;d="username="+LP.en(d)+"&email="+LP.en(d)+"&hash="+LP.en(f)+"&password_hint="+LP.en(l)+(g?"&improve=1":"")+(h?"&loglogins=1":"")+"&timezone2="+LP.en(j)+"&xml=1&language2="+LP.en(LP.lpprefsHasUserValue("language",false)?LP.lpprefsGetCharPref("language",
false):"en-US");if(xa&&ac)d+="&singlefactortype=vtapi";LP.lpMakeRequest(LP.lp_base+"create_account.php",d,Vl,Wl)}b.getElementById("reenter").setAttribute("hidden","true");b.getElementById("createprogress").setAttribute("hidden","false");LP.sr(b,"title","value","Creating Account...");b.documentElement.getButton("accept").setAttribute("disabled",true);b.documentElement.getButton("cancel").setAttribute("disabled",true);f=false;d=LP.lpgs("Continue")}else if(b.welcomestate==3){b.getElementById("createprogress").setAttribute("hidden",
"true");b.getElementById("importdataask").setAttribute("hidden","false");LP.sr(b,"title","value","importdataask1");d=LP.lpgs("Continue")}else if(b.welcomestate==4){Ag=false;if(b.getElementById("importdataask6").selected)LP.lpShowFirefoxPasswords(b,c,true,true);else b.getElementById("importdataask7").selected&&LP.lpShowFirefoxPasswords(b,c,true,false);LP.lpprefsSetBoolPref("ffimportdone",true,false);LP.flush_prefs();if(Ag){b.getElementById("importdataask").setAttribute("hidden","true");b.getElementById("importdataprogress").setAttribute("hidden",
"false");LP.sr(b,"title","value","Importing Your Data...");b.getElementById("importdatalabel").value=LP.lpgs("Importing Your Data...");b.documentElement.getButton("accept").setAttribute("disabled",true);b.documentElement.getButton("cancel").setAttribute("disabled",true);f=false;d=LP.lpgs("Continue")}else{b.getElementById("importdataask").setAttribute("hidden","true");b.getElementById("formfillask").setAttribute("hidden","false");LP.sr(b,"title","value","formfillask1");d=LP.lpgs("Continue");b.welcomestate+=
2}}else if(b.welcomestate==5)if(nh){b.getElementById("importdataprogress").setAttribute("hidden","true");b.getElementById("removedataask").setAttribute("hidden","false");LP.sr(b,"title","value","removedataask1");d=LP.lpgs("Continue")}else{b.getElementById("importdataprogress").setAttribute("hidden","true");b.getElementById("formfillask").setAttribute("hidden","false");LP.sr(b,"title","value","formfillask1");d=LP.lpgs("Continue");b.welcomestate++}else if(b.welcomestate==6){if(b.getElementById("removedataask7").selected)mj(Uf);
else if(!LP.lpConfirmYesNo(LP.lpgs("DoNotDeletePasswordsConfirm"),c))return false;b.getElementById("removedataask").setAttribute("hidden","true");b.getElementById("formfillask").setAttribute("hidden","false");LP.sr(b,"title","value","formfillask1");d=LP.lpgs("Continue")}else if(b.welcomestate==7){!xa&&b.getElementById("formfillask6").selected&&LP.lpEditFormFillProfile(0,false,0,true,b,c);b.getElementById("formfillask").setAttribute("hidden","true");b.getElementById("thanks").setAttribute("hidden",
"false");LP.sr(b,"title","value","Congratulations");d=LP.lpgs("Continue")}else{xa?LP.alert(LP.lpgs("Please restart all your browsers to begin using LastPass Online."),c):If();c.close();return true}if(f){b.documentElement.getButton("accept").setAttribute("disabled",false);b.documentElement.getButton("cancel").setAttribute("disabled",false)}b.documentElement.getButton("accept").setAttribute("label",d);b.documentElement.getButton("cancel").setAttribute("label",e);b.welcomestate++;return false};this.checkEmail=
function(b){b=b.getElementById("email");if(b.value.length>0){te="";LP.lpMakeRequest(LP.lp_base+"create_account.php?check=avail&username="+LP.en(b.value),"",Tl)}};this.welcome_cancel_click=function(b,c){if(b.welcomestate==0)LP.welcome_change_language_if(b,c);else if(b.welcomestate==1||b.welcomestate==2)if(LP.lpConfirmYesNo(LP.lpgs("ReallyQuit"),c))LP.alert(LP.lpgs("VisitWebsiteToCreate"),c);else return false;else xa&&b.welcomestate>=7&&LP.alert(LP.lpgs("Please restart all your browsers to begin using LastPass Online."),
c);c.close();return true};this.welcome_update_password_meter=function(b){var c=b.getElementById("password"),d=b.getElementById("email")?b.getElementById("email").value:"";b=b.getElementById("passwordstrength");if(c&&b)b.value=LP.calcStrength(d,c.value).toString()};this.calcStrength=function(b,c){var d=0;if(c==b)return 0;if(b!=""&&b.indexOf(c)!=-1)d-=15;if(b!=""&&c.indexOf(b)!=-1)d-=b.length;d+=c.length;if(c.length>0&&c.length<=4)d+=c.length;else if(c.length>=5&&c.length<=7)d+=6;else if(c.length>=
8&&c.length<=15)d+=12;else if(c.length>=16)d+=18;if(c.match(/[a-z]/))d+=1;if(c.match(/[A-Z]/))d+=5;if(c.match(/\d/))d+=5;if(c.match(/.*\d.*\d.*\d/))d+=5;if(c.match(/[!,@,#,$,%,^,&,*,?,_,~]/))d+=5;if(c.match(/.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~]/))d+=5;if(c.match(/(?=.*[a-z])(?=.*[A-Z])/))d+=2;if(c.match(/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])/))d+=2;if(c.match(/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!,@,#,$,%,^,&,*,?,_,~])/))d+=2;d*=2;if(d<0)d=0;else if(d>100)d=100;return d};this.lplogin_window_load=
function(b,c){var d=1,e="";if(typeof c.arguments!="undefined"&&c.arguments.length>0){if(c.arguments[0].sesameusername)e=c.arguments[0].sesameusername;if(typeof c.arguments[0].logincase!="undefined")d=c.arguments[0].logincase}b.title=LP.lpgs("LastPassMasterLogin");b.documentElement.getButton("accept").setAttribute("label",LP.lpgs("Login"));b.documentElement.getButton("cancel")&&b.documentElement.getButton("cancel").setAttribute("label",LP.lpgs("Cancel"));b.getElementById("repromptdesc")&&b.getElementById("repromptdesc").appendChild(b.createTextNode(LP.lpgs("PasswordReprompt")));
LP.sr(b,"usernamelabel","value","Email");LP.sr(b,"passwordlabel","value","MasterPassword");LP.sr(b,"capslocklabel","value","Caps Lock is ON");LP.sr(b,"lprememberusername","label","RememberUsername");LP.sr(b,"lprememberpassword","label","RememberPassword");LP.sr(b,"lpshowhomepageafterlogin","label","ShowHomepageAfterLogin");LP.sr(b,"disableffpw","label","Disable Insecure Firefox Password Manager");LP.sr(b,"forgetlink","value","ForgotHelp");LP.sr(b,"forgetlink","hidden",xa);LP.sr(b,"screenkeyboard",
"value","ScreenKeyboard");LP.sr(b,"screenkeyboard","hidden",xa);LP.sr(b,"createlink","value","CreateAccount");LP.sr(b,"createlink","hidden",Nf);LP.sr(b,"lpreprompttimecheck","label","RepromptTime");if(b.getElementById("capslocklabel")){var f=b.getElementById("capslocklabel");f.style.display="none";f.style.textAlign="center";f.style.padding="3px";f.style.color="#ff0000";f.style.background="#ffff00"}if(d==1){f=Ed(e);if(f.length>0){var g=decodeURIComponent(f[0]);f.sort(LP.lp_sort_case_insensitive);if(b.getElementById("lpusernamepopup"))for(var h=
b.getElementById("lpusernamepopup"),j=0;j<f.length;j++){d=b.createElement("menuitem");d.setAttribute("label",decodeURIComponent(f[j]));d.setAttribute("oncommand","LP.populate_password(document);");h.appendChild(d)}b.getElementById("lpusername").value=e!=""?e:g;LP.populate_password(b)}else b.getElementById("lpusername").focus();b.getElementById("lprememberusername").checked=!LP.lpprefsHasUserValue("rememberUsername",false)||LP.lpprefsGetBoolPref("rememberUsername",false);if(b.getElementById("lprememberpassword"))b.getElementById("lprememberpassword").checked=
LP.lpprefsHasUserValue("rememberPassword",false)&&LP.lpprefsGetBoolPref("rememberPassword",false);if(b.getElementById("lpshowhomepageafterlogin"))b.getElementById("lpshowhomepageafterlogin").checked=!LP.lpprefsHasUserValue("showHomepageAfterLogin",false)||LP.lpprefsGetBoolPref("showHomepageAfterLogin",false);if(LP.lpprefsGetBoolPref("signon.rememberSignons",false,LP.lpmainprefs)){if(!LP.lpprefsHasUserValue("disableffpwasked"))if(b.getElementById("disableffpw")&&LP.islastpass)b.getElementById("disableffpw").checked=
true}else if(b.getElementById("disableffpw"))b.getElementById("disableffpw").style.display="none";if(b.getElementById("pwreprompt"))b.getElementById("pwreprompt").style.display="none";LP.sr(b,"lpshowhomepageafterlogin","hidden",false);LP.lplogin_fix_fields(b)}else{b.getElementById("lpusername").value=Z;b.getElementById("lpusername").disabled=true;if(b.getElementById("lpdelete"))b.getElementById("lpdelete").style.display="none";b.getElementById("lppassword").focus();b.getElementById("lprememberusername").style.display=
"none";if(b.getElementById("lprememberpassword"))b.getElementById("lprememberpassword").style.display="none";b.getElementById("lpshowhomepageafterlogin").style.display="none";b.getElementById("disableffpw").checked=false;b.getElementById("disableffpw").style.display="none";b.getElementById("forgetlink").style.display="none";b.getElementById("createlink").style.display="none";b.getElementById("screenkeyboard").style.display="none";b.getElementById("lpreprompttimerow").setAttribute("hidden",false);
e=b.getElementById("lpreprompttimepopup");d=b.createElement("menuitem");d.setAttribute("label","");d.setAttribute("value","0");e.appendChild(d);d=b.createElement("menuitem");d.setAttribute("label","30 "+LP.lpgs("seconds"));d.setAttribute("value","30");e.appendChild(d);d=b.createElement("menuitem");d.setAttribute("label","60 "+LP.lpgs("seconds"));d.setAttribute("value","60");e.appendChild(d);d=b.createElement("menuitem");d.setAttribute("label","5 "+LP.lpgs("minutes"));d.setAttribute("value","300");
e.appendChild(d);d=b.createElement("menuitem");d.setAttribute("label","15 "+LP.lpgs("minutes"));d.setAttribute("value","900");e.appendChild(d);d=b.createElement("menuitem");d.setAttribute("label","30 "+LP.lpgs("minutes"));d.setAttribute("value","1800");e.appendChild(d);d=b.createElement("menuitem");d.setAttribute("label","1 "+LP.lpgs("hour"));d.setAttribute("value","3600");e.appendChild(d);d=b.createElement("menuitem");d.setAttribute("label","3 "+LP.lpgs("hours"));d.setAttribute("value","10800");
e.appendChild(d);d=b.createElement("menuitem");d.setAttribute("label","6 "+LP.lpgs("hours"));d.setAttribute("value","21600");e.appendChild(d);d=b.createElement("menuitem");d.setAttribute("label","12 "+LP.lpgs("hours"));d.setAttribute("value","43200");e.appendChild(d);d=b.createElement("menuitem");d.setAttribute("label","24 "+LP.lpgs("hours"));d.setAttribute("value","86400");e.appendChild(d);e=0;if(LP.lpprefsHasUserValue("RepromptTime"))e=LP.lpprefsGetIntPref("RepromptTime");b.getElementById("lpreprompttime").value=
e;b.getElementById("lpreprompttimecheck").checked=e==0?false:true}};this.setpromptcheck=function(b){var c=b.getElementById("lpreprompttime").value;b.getElementById("lpreprompttimecheck").checked=c==0?false:true};this.lplogin_checkcapslock=function(b,c,d){b.getElementById("capslocklabel")&&Dj(b,c,d,"capslocklabel")};this.lplogin_accept_click=function(b,c){var d=b.getElementById("lpusername").value,e=b.getElementById("lppassword").value,f=1;if(typeof c.arguments!="undefined"&&c.arguments.length>0&&
typeof c.arguments[0].logincase!="undefined")f=c.arguments[0].logincase;if(f!=1){if(na!=""&&na==Da(za(d+e)))c.arguments[0].authorized=1;else LP.alert(LP.lpgs("Invalid Password."),c);if(c.arguments[0].authorized==1){var g=30;if(b.getElementById("lpreprompttimecheck").checked){d=b.getElementById("lpreprompttime").value;g=parseInt(d)}else g=0}LP.lpprefsSetIntPref("RepromptTime",g);LP.flush_prefs();de=cb();return true}g=(f=b.getElementById("lprememberusername")&&b.getElementById("lprememberusername").checked)&&
b.getElementById("lprememberpassword")&&b.getElementById("lprememberpassword").checked;for(var h=Ed(),j=Cd(),l=0;l<h.length;l++)if(h[l]==d){h.splice(l,1);break}if(typeof j[d]!="undefined")j[d]=null;f&&h.unshift(d);if(g)j[d]=e;ye(h);Ue(j);LP.flush_prefs();LP.lpprefsSetBoolPref("rememberUsername",f,false);LP.lpprefsSetBoolPref("rememberPassword",g,false);LP.lpprefsSetBoolPref("showHomepageAfterLogin",b.getElementById("lpshowhomepageafterlogin")&&b.getElementById("lpshowhomepageafterlogin").checked,
false);LP.lpprefsSetBoolPref("disableffpwasked",true,false);b.getElementById("disableffpw")&&b.getElementById("disableffpw").checked&&LP.lpmainprefs.setBoolPref("signon.rememberSignons",false);LP.flush_prefs();LP.lplogin(b.getElementById("lpusername").value,b.getElementById("lppassword").value,"pluginlogin");b.getElementById("lppassword").value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
return true};this.lplogin_cancel_click=function(){return true};this.lplogin_fix_fields=function(b){if(b.getElementById("lprememberpassword"))b.getElementById("lprememberpassword").disabled=!b.getElementById("lprememberusername").checked};this.lplogin_confirm_remember_password=function(b,c){if(b.getElementById("lprememberpassword")&&b.getElementById("lprememberpassword").checked)if(!LP.lpConfirmYesNo(LP.lpgs("Are you sure you want to have LastPass remember your password?  This will significantly decrease the security of your LastPass account!"),
c))b.getElementById("lprememberpassword").checked=false};this.populate_password=function(b){var c=b.getElementById("lpusername").value,d=Cd();if(typeof d[c]!="undefined"){b.getElementById("lppassword").value=d[c];if(b.getElementById("lprememberpassword"))b.getElementById("lprememberpassword").checked=true;b.getElementById("LPLogin").getButton("accept").focus()}else{b.getElementById("lppassword").value="";if(b.getElementById("lprememberpassword"))b.getElementById("lprememberpassword").checked=false;
b.getElementById("lppassword").focus()}};this.lplogin_delete_user=function(b){for(var c=b.getElementById("lpusername").value,d=Ed(),e=Cd(),f=0;f<d.length;f++)if(d[f]==c){d.splice(f,1);break}if(typeof e[c]!="undefined")e[c]=null;ye(d);Ue(e);LP.flush_prefs();c=b.getElementById("lpusernamepopup");for(f=c.childNodes.length-1;f>=0;f--)c.removeChild(c.childNodes.item(f));if(d.length>0){e=decodeURIComponent(d[0]);d.sort(LP.lp_sort_case_insensitive);for(f=0;f<d.length;f++){var g=b.createElement("menuitem");
g.setAttribute("label",decodeURIComponent(d[f]));g.setAttribute("oncommand","LP.populate_password(document);");c.appendChild(g)}b.getElementById("lpusername").value=e;LP.populate_password(b)}else{b.getElementById("lpusername").value="";b.getElementById("lppassword").value="";b.getElementById("lpusername").focus()}};this.formfill_window_load=function(b,c){function d(r,u){var t=b.createElement("menuitem");t.setAttribute("label",r);t.setAttribute("value",u);o.appendChild(t);if(typeof locale_states==
"undefined")locale_states=[];if(typeof locale_states[u]=="undefined"){t=[];for(var C=1;;C++){var A=LP.lpgs("state"+C,u,true);if(A=="state"+C)break;state=new la;state.name=A;state.code=A;state.ordernum=0;t[t.length]=state}if(t.length)locale_states[u]=t}}var e=c.arguments;if(e.length>0)b.formfill_id=e[0];var f=e.length>1?e[1]:false,g=e.length>2&&typeof e[2]!="undefined"?e[2]:0,h=e.length>3&&typeof e[3]!="undefined"?e[3]:null,j="";try{j=typeof fb!="undefined"&&fb!=null&&fb!=""?fb:LP.lpmainprefs.getCharPref("general.useragent.locale")}catch(l){}b.defaultcountry=
typeof we!="undefined"&&we!=null&&we!=""?we:j.length==5?j.substring(3).toUpperCase():"";var o=b.getElementById("lpprofilelanguagepopup");d(LP.lpgs("Dutch"),"nl-NL");d(LP.lpgs("English"),"en-US");d(LP.lpgs("English (United Kingdom)"),"en-GB");d(LP.lpgs("French"),"fr-FR");d(LP.lpgs("French (Canada)"),"fr-CA");d(LP.lpgs("German"),"de-DE");d(LP.lpgs("Italian"),"it-IT");d(LP.lpgs("Japanese"),"ja-JP");d(LP.lpgs("Portuguese"),"pt-PT");d(LP.lpgs("Portuguese  (Brazilian)"),"pt-BR");d(LP.lpgs("Spanish"),"es-ES");
d(LP.lpgs("Spanish (Mexico)"),"es-MX");for(var n=b.getElementById("lpbirthmonthpopup"),p=1;p<=12;p++){e=b.createElement("menuitem");e.setAttribute("value",(p<10?"0":"")+p);n.appendChild(e)}var q=b.getElementById("lpbirthdaypopup");for(p=1;p<=31;p++){e=b.createElement("menuitem");e.setAttribute("label",p);e.setAttribute("value",(p<10?"0":"")+p);q.appendChild(e)}b.getElementById("lpstatepopup");Yl();Tj(b,j);Zl();for(p=0;p<s.length;p++){e=b.createElement("menuitem");e.setAttribute("label",s[p].name);
e.setAttribute("value",s[p].cc2l);b.getElementById("lpcountrypopup").appendChild(e);e=b.createElement("menuitem");e.setAttribute("label",s[p].name);e.setAttribute("value",s[p].cc3l);b.getElementById("lpcountryphonepopup").appendChild(e);e=b.createElement("menuitem");e.setAttribute("label",s[p].name);e.setAttribute("value",s[p].cc3l);b.getElementById("lpcountryevephonepopup").appendChild(e);e=b.createElement("menuitem");e.setAttribute("label",s[p].name);e.setAttribute("value",s[p].cc3l);b.getElementById("lpcountryfaxphonepopup").appendChild(e);
e=b.createElement("menuitem");e.setAttribute("label",s[p].name);e.setAttribute("value",s[p].cc3l);b.getElementById("lpcountrymobphonepopup").appendChild(e)}n=b.getElementById("lpccstartmonthpopup");for(p=1;p<=12;p++){e=b.createElement("menuitem");e.setAttribute("value",(p<10?"0":"")+p);n.appendChild(e)}n=b.getElementById("lpccexpmonthpopup");for(p=1;p<=12;p++){e=b.createElement("menuitem");e.setAttribute("value",(p<10?"0":"")+p);n.appendChild(e)}n=b.getElementById("lptimezonepopup");Sj();for(p=0;p<
Y.length;p++){e=b.createElement("menuitem");e.setAttribute("label",Y[p].name);e.setAttribute("value",Y[p].value);n.appendChild(e)}b.formfill_numcustomfields=0;b.formfill_cfids=Array(0);n=b.getElementById("customfieldrows");LP.getGeneratedPw()&&b.getElementById("lppwprotect").setAttribute("hidden",true);if(b.formfill_id==0){fa.length==0&&LP.sr(b,"lpprofilename","value","Default");e=b.getElementById("lpprofilelanguagepopup");h=false;for(p=0;p<e.childNodes.length;p++)if(e.childNodes.item(p).value==j){b.getElementById("lpprofilelanguage").value=
j;h=true;break}if(!h)b.getElementById("lpprofilelanguage").value="en-US";b.getElementById("lpcountry").value=b.defaultcountry;b.getElementById("lptimezone").value=vk(false);Dd(b,"phone");Dd(b,"evephone");Dd(b,"fax");Dd(b,"mobilephone")}else{j=null;if(h)j=h;else for(p=0;p<fa.length;p++)if(fa[p].ffid==b.formfill_id)j=fa[p];if(j){g=j.profiletype;if(!f)b.getElementById("lpprofilename").value=j.profilename;b.getElementById("lpprofilelanguage").value=K(j.profilelanguage);b.getElementById("lpfirstname").value=
K(j.firstname);b.getElementById("lpfirstnameja1").value=b.getElementById("lpfirstname").value;b.getElementById("lpfirstnameja2").value=K(j.firstname2);b.getElementById("lpfirstnameja3").value=K(j.firstname3);b.getElementById("lpmiddlename").value=K(j.middlename);b.getElementById("lplastname").value=K(j.lastname);b.getElementById("lplastname2").value=K(j.lastname2);b.getElementById("lplastnameja1").value=b.getElementById("lplastname").value;b.getElementById("lplastnameja2").value=b.getElementById("lplastname2").value;
b.getElementById("lplastnameja3").value=K(j.lastname3);b.getElementById("lpusername").value=K(j.username);b.getElementById("lpemail").value=K(j.email);b.getElementById("lpmobileemail").value=K(j.mobileemail);b.getElementById("lpcompany").value=K(j.company);b.getElementById("lpssn").value=K(j.ssn);b.getElementById("lppwprotect").checked=j.pwprotect;q=K(j.birthday);if(q!=""){b.getElementById("lpbirthyear").value=q.substring(0,4);b.getElementById("lpbirthmonth").value=q.substring(5,7);b.getElementById("lpbirthday").value=
q.substring(8,10);LP.formfill_fix_birthday(b,c)}b.getElementById("lpgender").value=K(j.gender);b.getElementById("lptitle").value=K(j.title);b.getElementById("lpaddress1").value=K(j.address1);b.getElementById("lpaddress2").value=K(j.address2);b.getElementById("lpaddress3").value=K(j.address3);b.getElementById("lpcity").value=K(j.city);b.getElementById("lpcounty").value=K(j.county);b.getElementById("lpstate").value=K(j.state_name);b.getElementById("lpzip").value=K(j.zip);b.getElementById("lpcountry").value=
K(j.country);b.getElementById("lpcountryphone").value=K(j.countryphone);b.getElementById("lpcountryevephone").value=K(j.countryevephone);b.getElementById("lpcountryfaxphone").value=K(j.countryfaxphone);b.getElementById("lpcountrymobphone").value=K(j.countrymobphone);b.getElementById("lpphone").value=K(j.phone);b.getElementById("lpevephone").value=K(j.evephone);b.getElementById("lpfax").value=K(j.fax);b.getElementById("lpmobilephone").value=K(j.mobilephone);b.getElementById("lpphoneext").value=K(j.phoneext);
b.getElementById("lpevephoneext").value=K(j.evephoneext);b.getElementById("lpfaxphoneext").value=K(j.faxphoneext);b.getElementById("lpmobphoneext").value=K(j.mobilephoneext);Dd(b,"phone");Dd(b,"evephone");Dd(b,"fax");Dd(b,"mobilephone");b.getElementById("lpccname").value=K(j.ccname);b.getElementById("lpccnum").value=K(j.ccnum);e=K(j.ccstart);if(e!=""){b.getElementById("lpccstartyear").value=e.substring(0,4);b.getElementById("lpccstartmonth").value=e.substring(5,7)}e=K(j.ccexp);if(e!=""){b.getElementById("lpccexpyear").value=
e.substring(0,4);b.getElementById("lpccexpmonth").value=e.substring(5,7)}b.getElementById("lpcccsc").value=K(j.cccsc);b.getElementById("lpccissuenum").value=K(j.ccissuenum);b.getElementById("lptimezone").value=K(j.timezone);b.getElementById("lpbankname").value=K(j.bankname);b.getElementById("lpbankacctnum").value=K(j.bankacctnum);b.getElementById("lpbankroutingnum").value=K(j.bankroutingnum);for(p=0;p<j.customfields.length;p++){b.formfill_numcustomfields++;b.formfill_cfids[b.formfill_numcustomfields]=
f?0:j.customfields[p].cfid;e=b.createElement("row");h=b.createElement("vbox");h.setAttribute("pack","center");q=b.createElement("textbox");q.setAttribute("id","customfield"+b.formfill_numcustomfields+"text");q.setAttribute("value",K(j.customfields[p].text));q.setAttribute("width","200");h.appendChild(q);e.appendChild(h);h=b.createElement("textbox");h.setAttribute("id","customfield"+b.formfill_numcustomfields+"value");h.setAttribute("value",K(j.customfields[p].value));h.setAttribute("multiline","true");
h.setAttribute("width","200");e.appendChild(h);h=b.createElement("textbox");h.setAttribute("id","customfield"+b.formfill_numcustomfields+"alttext");h.setAttribute("value",K(j.customfields[p].alttext));h.setAttribute("multiline","true");h.setAttribute("width","200");e.appendChild(h);n.appendChild(e)}b.getElementById("lpnotes").value=K(j.notes)}}for(p=b.formfill_numcustomfields+1;p<=b.formfill_numcustomfields+3;p++){b.formfill_cfids[p]=0;e=b.createElement("row");h=b.createElement("vbox");h.setAttribute("pack",
"center");q=b.createElement("textbox");q.setAttribute("id","customfield"+p+"text");q.setAttribute("rows","1");q.setAttribute("width","200");h.appendChild(q);e.appendChild(h);h=b.createElement("textbox");h.setAttribute("id","customfield"+p+"value");h.setAttribute("multiline","true");h.setAttribute("width","200");e.appendChild(h);h=b.createElement("textbox");h.setAttribute("id","customfield"+p+"alttext");h.setAttribute("multiline","true");h.setAttribute("width","200");e.appendChild(h);n.appendChild(e)}b.formfill_numcustomfields+=
3;if(f)b.formfill_id=0;b.formfill_id==0&&b.documentElement.getButton("extra2").setAttribute("hidden",true);b.formfill_profiletype=parseInt(g);if(isNaN(b.formfill_profiletype))b.formfill_profiletype=0;switch(b.formfill_profiletype){case 1:b.getElementById("personalinfo").style.display="none";b.getElementById("contactinfo").style.display="none";b.getElementById("bankaccountinfo").style.display="none";b.getElementById("customfields").style.display="none";b.getElementById("fftabs").selectedIndex=2;break}LP.formfill_retranslate(b,
c)};this.th=function(b,c,d){b.getElementById(c).setAttribute("hidden",d)};var nf=null;this.formfill_retranslate=function(b,c){var d=b.getElementById("lpprofilelanguage").value;if(nf=="es-ES"||nf=="es-MX"||nf=="ca-ES")LP.th(b,"last2","true");else if(nf=="ja-JP"){LP.th(b,"first","false");LP.th(b,"middle","false");LP.th(b,"last","false");LP.th(b,"mobileemail","true");LP.th(b,"nameja1","true");LP.th(b,"nameja2","true");LP.th(b,"nameja3","true")}if(d=="es-ES"||d=="es-MX"||d=="ca-ES")LP.th(b,"last2","false");
else if(d=="ja-JP"){LP.th(b,"first","true");LP.th(b,"middle","true");LP.th(b,"last","true");LP.th(b,"mobileemail","false");LP.th(b,"nameja1","false");LP.th(b,"nameja2","false");LP.th(b,"nameja3","false")}nf=d;b.title=LP.lpgs("Edit Form Fill Profile",d);b.documentElement.getButton("accept").setAttribute("label",LP.lpgs("OK",d));b.documentElement.getButton("cancel").setAttribute("label",LP.lpgs("Cancel",d));b.documentElement.getButton("extra2").setAttribute("label",LP.lpgs("Delete",d));b.documentElement.getButton("help").setAttribute("label",
LP.lpgs("Help",d));LP.sr(b,"profilenamelabel","value","Profile Name",d);LP.sr(b,"profilelanglabel","value","Profile Language",d);LP.sr(b,"personalinfo","label","Personal Information",d);LP.sr(b,"contactinfo","label","Contact Information",d);LP.sr(b,"creditcardinfo","label","Credit Card Information",d);LP.sr(b,"bankaccountinfo","label","Bank Account Information",d);LP.sr(b,"customfields","label","Custom Fields",d);LP.sr(b,"notes","label","Notes",d);LP.sr(b,"titlelabel","value","Title",d);LP.sr(b,"mr",
"label","Mr",d);LP.sr(b,"ms","label","Ms",d);LP.sr(b,"mrs","label","Mrs",d);LP.sr(b,"dr","label","Dr",d);LP.sr(b,"firstlabel","value","First Name",d);LP.sr(b,"middlelabel","value","Middle Name",d);LP.sr(b,"lastlabel","value","Last Name",d);LP.sr(b,"lastlabel2","value","Last Name2",d);LP.sr(b,"labelja1","value","Name Std",d);LP.sr(b,"firstlabelja1","value","First Std",d);LP.sr(b,"lastlabelja1","value","Last Std",d);LP.sr(b,"labelja2","value","Name Fur",d);LP.sr(b,"firstlabelja2","value","First Fur",
d);LP.sr(b,"lastlabelja2","value","Last Fur",d);LP.sr(b,"labelja3","value","Name Rom",d);LP.sr(b,"firstlabelja3","value","First Rom",d);LP.sr(b,"lastlabelja3","value","Last Rom",d);LP.sr(b,"ssnlabel","value","Social Security Number",d);LP.sr(b,"birthdaylabel","value","Birthday",d);LP.sr(b,"genderlabel","value","Gender",d);LP.sr(b,"male","label","Male",d);LP.sr(b,"female","label","Female",d);LP.sr(b,"addr1label","value","Address 1",d);LP.sr(b,"addr2label","value","Address 2",d);LP.sr(b,"addr3label",
"value","Address 3",d);LP.sr(b,"citylabel","value","City / Town",d);LP.sr(b,"countylabel","value","County",d);LP.sr(b,"statelabel","value","State / Province",d);LP.sr(b,"ziplabel","value","ZIP / Postal Code",d);LP.sr(b,"countrylabel","value","Country",d);LP.sr(b,"groupcaptionphone","label","Phone Number",d);LP.sr(b,"groupcaptioneve","label","Evening Number",d);LP.sr(b,"groupcaptionfax","label","Fax Number",d);LP.sr(b,"groupcaptionmob","label","Mobile Number",d);LP.sr(b,"extlabel","value","ext.",d);
LP.sr(b,"eveextlabel","value","ext.",d);LP.sr(b,"faxextlabel","value","ext.",d);LP.sr(b,"mobextlabel","value","ext.",d);LP.sr(b,"companylabel","value","Company",d);LP.sr(b,"emaillabel","value","Email Address",d);LP.sr(b,"mobileemaillabel","value","Mobile Email Address",d);LP.sr(b,"usernamelabel","value","Username",d);LP.sr(b,"tzlabel","value","Time Zone",d);LP.sr(b,"ccnamelabel","value","Name on Card",d);LP.sr(b,"cclabel","value","Credit Card Number",d);LP.sr(b,"ccstartlabel","value","Start Date",
d);LP.sr(b,"ccexplabel","value","Expiration Date",d);LP.sr(b,"csclabel","value","Security Code",d);LP.sr(b,"cscnote","value","Last 3 digits on back of card, or for American Express, last 4 digits in small print on front",d);LP.sr(b,"issuenumlabel","value","Issue Number",d);LP.sr(b,"issuenumnote","value","Only applicable to certain European brands of debit cards, such as Maestro",d);LP.sr(b,"banklabel","value","Bank Name",d);LP.sr(b,"acctnumlabel","value","Account Number",d);LP.sr(b,"acctnumnote",
"value","Number that can be found to the right of your routing number on your checks",d);LP.sr(b,"routingnumlabel","value","Routing Number",d);LP.sr(b,"routingnumnote","value","9 digit number that can be found in the bottom left corner of your checks",d);LP.sr(b,"textlabel","value","Text",d);LP.sr(b,"valuelabel","value","Value",d);LP.sr(b,"alttextlabel","value","Alternate Text",d);LP.sr(b,"noteslabel","value","Notes",d);LP.sr(b,"lppwprotect","label","Require Password Reprompt",d);for(var e=1;e<=9;e++)LP.sr(b,
"pleaseselect"+e,"label","Please Select",d);var f=Array("lpbirthmonthpopup","lpccstartmonthpopup","lpccexpmonthpopup");for(e=0;e<f.length;e++)for(var g=b.getElementById(f[e]),h=1;h<g.childNodes.length;h++)g.childNodes.item(h).setAttribute("label",LP.lpgs("month"+h,d));Tj(b,d);c.sizeToContent()};this.formfill_fix_birthday=function(b){var c=b.getElementById("lpbirthmonth"),d=b.getElementById("lpbirthyear");if(c.value=="02")if(d.value=="")c=29;else{c=d.value;c=parseInt(c);c=(c%4==0?c%100!=0?true:c%400==
0?true:false:false)?29:28}else c=c.value=="04"||c.value=="06"||c.value=="09"||c.value=="11"?30:31;c+=1;d=b.getElementById("lpbirthday");if(d.selectedIndex>=c)d.selectedIndex=c-1;d=b.getElementById("lpbirthdaypopup");for(var e=d.childNodes.length-1;e>=c;e--)d.removeChild(d.childNodes.item(e));for(e=d.childNodes.length;e<c;e++){var f=b.createElement("menuitem");f.setAttribute("label",e);f.setAttribute("value",(e<10?"0":"")+e);d.appendChild(f)}};this.formfill_accept_click=function(b,c){var d=b.getElementById("lpprofilelanguage").value,
e="";if(b.getElementById("lpprofilename").value=="")e+=LP.lpgs("You must enter a profile name.",d)+"\n";if((b.getElementById("lpbirthyear").value!=""||b.getElementById("lpbirthmonth").value!=""||b.getElementById("lpbirthday").value!="")&&(!b.getElementById("lpbirthyear").value.match(/^\d{4}$/)||b.getElementById("lpbirthmonth").value==""||b.getElementById("lpbirthday").value==""))e+=LP.lpgs("You must enter a valid birthday, with a 4 digit year.",d)+"\n";for(var f=null,g=0;g<s.length;g++)if(s[g].cc2l==
b.getElementById("lpcountry").value){f=s[g];break}var h=cg(b,"phone"),j=cg(b,"evephone"),l=cg(b,"fax"),o=cg(b,"mobilephone"),n=h!=""?ue(b,"phone"):"",p=j!=""?ue(b,"evephone"):"",q=l!=""?ue(b,"fax"):"",r=o!=""?ue(b,"mobilephone"):"";if(h!=""&&!dg(h))e+=LP.lpgs("You must enter a valid phone number.",d)+"\n";if(j!=""&&!dg(j))e+=LP.lpgs("You must enter a valid evening phone number.",d)+"\n";if(l!=""&&!dg(l))e+=LP.lpgs("You must enter a valid fax phone number.",d)+"\n";if(o!=""&&!dg(o))e+=LP.lpgs("You must enter a valid mobile phone number.",
d)+"\n";b.getElementById("lpphoneext").value.match(/^\d*$/)||(e+=LP.lpgs("You must enter a valid phone extension, consisting only of digits.",d)+"\n");b.getElementById("lpevephoneext").value.match(/^\d*$/)||(e+=LP.lpgs("You must enter a valid evening phone extension, consisting only of digits.",d)+"\n");b.getElementById("lpfaxphoneext").value.match(/^\d*$/)||(e+=LP.lpgs("You must enter a valid fax phone extension, consisting only of digits., locale")+"\n");b.getElementById("lpmobphoneext").value.match(/^\d*$/)||
(e+=LP.lpgs("You must enter a valid mobile phone extension, consisting only of digits.",d)+"\n");if(b.getElementById("lpccnum").value!=""&&!b.getElementById("lpccnum").value.match(/^\d{11,19}$/))e+=LP.lpgs("You must enter your credit card number as a sequence of 11 to 19 digits, without dashes.",d)+"\n";if((b.getElementById("lpccstartyear").value!=""||b.getElementById("lpccstartmonth").value!="")&&(!b.getElementById("lpccstartyear").value.match(/^\d{4}$/)||b.getElementById("lpccstartmonth").value==
""))e+=LP.lpgs("You must enter a valid credit card start date, with a 4 digit year.",d)+"\n";if((b.getElementById("lpccexpyear").value!=""||b.getElementById("lpccexpmonth").value!="")&&(!b.getElementById("lpccexpyear").value.match(/^\d{4}$/)||b.getElementById("lpccexpmonth").value==""))e+=LP.lpgs("You must enter a valid credit card expiration date, with a 4 digit year.",d)+"\n";if(b.getElementById("lpcccsc").value!=""&&!b.getElementById("lpcccsc").value.match(/^\d{3,4}$/))e+=LP.lpgs("You must enter your credit card security code as a sequence of 3 to 4 digits.",
d)+"\n";if(b.getElementById("lpccissuenum").value!=""&&!b.getElementById("lpccissuenum").value.match(/^\d{1,3}$/))e+=LP.lpgs("You must enter your credit card issue number as a sequence of 1 to 3 digits.",d)+"\n";if(b.getElementById("lpemail").value!=""&&!b.getElementById("lpemail").value.match(/^.+@.+\.[a-z]{2,6}$/))e+=LP.lpgs("You must enter a valid email address.",d)+"\n";if(b.getElementById("lpbankacctnum").value!=""&&!b.getElementById("lpbankacctnum").value.match(/^[0-9A-Za-z]+$/))e+=LP.lpgs("You must enter a valid bank account number, consisting only of letters and digits.",
d)+"\n";if(b.getElementById("lpbankroutingnum").value!=""&&!b.getElementById("lpbankroutingnum").value.match(/^\d+$/))e+=LP.lpgs("You must enter a valid bank routing number, consisting only of digits.",d)+"\n";for(g=1;g<=b.formfill_numcustomfields;g++)if(b.getElementById("customfield"+g+"text").value!=""||b.getElementById("customfield"+g+"value").value!=""||b.getElementById("customfield"+g+"alttext").value!="")if(b.getElementById("customfield"+g+"text").value==""||b.getElementById("customfield"+g+
"value").value=="")e+=LP.lpgs("All custom fields must have both text and a value.",d)+"\n";if(e!=""){LP.alert(e,c);return false}e=new of;e.ffid=b.formfill_id;var u="ffid="+LP.en(e.ffid);e.profiletype=b.formfill_profiletype;u+="&profiletype="+LP.en(e.profiletype);e.profilename=b.getElementById("lpprofilename").value;u+="&profilename="+LP.en(P(e.profilename));e.profilelanguage=P(b.getElementById("lpprofilelanguage").value);u+="&profilelanguage="+LP.en(e.profilelanguage);e.firstname=d!="ja-JP"?P(b.getElementById("lpfirstname").value):
P(b.getElementById("lpfirstnameja1").value);u+="&firstname="+LP.en(e.firstname);e.middlename=P(b.getElementById("lpmiddlename").value);u+="&middlename="+LP.en(e.middlename);e.lastname=d!="ja-JP"?P(b.getElementById("lplastname").value):P(b.getElementById("lplastnameja1").value);u+="&lastname="+LP.en(e.lastname);e.lastname2=d!="ja-JP"?P(b.getElementById("lplastname2").value):P(b.getElementById("lplastnameja2").value);u+="&lastname2="+LP.en(e.lastname2);e.firstname2=P(b.getElementById("lpfirstnameja2").value);
u+="&firstname2="+LP.en(e.firstname2);e.firstname3=P(b.getElementById("lpfirstnameja3").value);u+="&firstname3="+LP.en(e.firstname3);e.lastname3=P(b.getElementById("lplastnameja3").value);u+="&lastname3="+LP.en(e.lastname3);e.email=P(b.getElementById("lpemail").value);u+="&email="+LP.en(e.email);e.mobileemail=P(b.getElementById("lpmobileemail").value);u+="&mobileemail="+LP.en(e.mobileemail);e.company=P(b.getElementById("lpcompany").value);u+="&company="+LP.en(e.company);e.ssn=P(b.getElementById("lpssn").value);
u+="&ssn="+LP.en(e.ssn);e.birthday=b.getElementById("lpbirthyear").value!=""&&b.getElementById("lpbirthmonth").value!=""&&b.getElementById("lpbirthday").value!=""?P(b.getElementById("lpbirthyear").value+"-"+b.getElementById("lpbirthmonth").value+"-"+b.getElementById("lpbirthday").value):"";u+="&birthday="+LP.en(e.birthday);e.gender=P(b.getElementById("lpgender").value);u+="&gender="+LP.en(e.gender);e.title=P(b.getElementById("lptitle").value);u+="&title="+LP.en(e.title);e.address1=P(b.getElementById("lpaddress1").value);
u+="&address1="+LP.en(e.address1);e.address2=P(b.getElementById("lpaddress2").value);u+="&address2="+LP.en(e.address2);e.address3=P(b.getElementById("lpaddress3").value);u+="&address3="+LP.en(e.address3);e.city=P(b.getElementById("lpcity").value);u+="&city="+LP.en(e.city);e.county=P(b.getElementById("lpcounty").value);u+="&county="+LP.en(e.county);e.state_name=P(b.getElementById("lpstate").label);u+="&state_name="+LP.en(e.state_name);d=b.getElementById("lpstate").value;for(g=0;g<Q.length;g++)if(Q[g].name==
d){d=Q[g].code;break}e.state=P(d);u+="&state="+LP.en(e.state);e.zip=P(b.getElementById("lpzip").value);u+="&zip="+LP.en(e.zip);if(f==null)e.country=e.country_cc3l=e.country_name="";else{e.country=P(f.cc2l);e.country_cc3l=P(f.cc3l);e.country_name=P(f.name)}u+="&country="+LP.en(e.country);u+="&country_cc3l="+LP.en(e.country_cc3l);u+="&country_name="+LP.en(e.country_name);e.countryphone=P(n);u+="&phone3lcc="+LP.en(P(n));e.countryevephone=P(p);u+="&evephone3lcc="+LP.en(P(p));e.countryfaxphone=P(q);u+=
"&fax3lcc="+LP.en(P(q));e.countrymobphone=P(r);u+="&mobilephone3lcc="+LP.en(P(r));e.phone=P(h);e.evephone=P(j);e.fax=P(l);e.mobilephone=P(o);u+="&phone="+LP.en(e.phone);u+="&evephone="+LP.en(e.evephone);u+="&fax="+LP.en(e.fax);u+="&mobilephone="+LP.en(e.mobilephone);e.phoneext=P(b.getElementById("lpphoneext").value);e.evephoneext=P(b.getElementById("lpevephoneext").value);e.faxphoneext=P(b.getElementById("lpfaxphoneext").value);e.mobilephoneext=P(b.getElementById("lpmobphoneext").value);u+="&phoneext="+
LP.en(e.phoneext);u+="&eveext="+LP.en(e.evephoneext);u+="&faxext="+LP.en(e.faxphoneext);u+="&mobileext="+LP.en(e.mobilephoneext);e.ccname=P(b.getElementById("lpccname").value);u+="&ccname="+LP.en(e.ccname);e.ccnum=P(b.getElementById("lpccnum").value);u+="&ccnum="+LP.en(e.ccnum);e.ccstart=b.getElementById("lpccstartyear").value!=""&&b.getElementById("lpccstartmonth").value!=""?P(b.getElementById("lpccstartyear").value+"-"+b.getElementById("lpccstartmonth").value+"-01"):"";u+="&ccstart="+LP.en(e.ccstart);
e.ccexp=b.getElementById("lpccexpyear").value!=""&&b.getElementById("lpccexpmonth").value!=""?P(b.getElementById("lpccexpyear").value+"-"+b.getElementById("lpccexpmonth").value+"-01"):"";u+="&ccexp="+LP.en(e.ccexp);e.cccsc=P(b.getElementById("lpcccsc").value);u+="&cccsc="+LP.en(e.cccsc);e.ccissuenum=P(b.getElementById("lpccissuenum").value);u+="&ccissuenum="+LP.en(e.ccissuenum);e.username=P(b.getElementById("lpusername").value);u+="&username="+LP.en(e.username);e.pwprotect=b.getElementById("lppwprotect").checked;
if(e.pwprotect)u+="&pwprotect=on";e.timezone=P(b.getElementById("lptimezone").value);u+="&timezone="+LP.en(e.timezone);e.bankname=P(b.getElementById("lpbankname").value);u+="&bankname="+LP.en(e.bankname);e.bankacctnum=P(b.getElementById("lpbankacctnum").value);u+="&bankacctnum="+LP.en(e.bankacctnum);e.bankroutingnum=P(b.getElementById("lpbankroutingnum").value);u+="&bankroutingnum="+LP.en(e.bankroutingnum);e.customfields=[];for(g=1;g<=b.formfill_numcustomfields;g++){f=new Eg;f.cfid=b.formfill_cfids[g];
u+="&customfield"+g+"cfid="+LP.en(f.cfid);f.text=P(b.getElementById("customfield"+g+"text").value);u+="&customfield"+g+"text="+LP.en(f.text);f.value=P(b.getElementById("customfield"+g+"value").value);u+="&customfield"+g+"value="+LP.en(f.value);f.alttext=P(b.getElementById("customfield"+g+"alttext").value);u+="&customfield"+g+"alttext="+LP.en(f.alttext);if(f.text!=""||f.value!=""||f.alttext!="")e.customfields[e.customfields.length]=f}e.notes=P(b.getElementById("lpnotes").value);u+="&notes="+LP.en(e.notes);
u+=LP.GetIdentityParam();if(b.formfill_id!=0){for(g=0;g<fa.length;g++)if(fa[g].ffid==b.formfill_id){fa.splice(g,1);break}fa[fa.length]=e;fa.sort(Hf);Ec=true;me();LP.lpRecheckTabs()}LP.lpMakeRequest(LP.lp_base+"formfill.php",u,Pi,null,e);LP.last_dialog_close=(new Date).getTime();return true};this.formfill_delete_click=function(b,c){if(LP.lpDeleteFormFillProfile(b.formfill_id,c)){LP.last_dialog_close=(new Date).getTime();c.close()}};this.formfill_cancel_click=function(){LP.last_dialog_close=(new Date).getTime();
return true};this.formfill_npa_input=function(b,c){c="lp"+c;b.getElementById(c+"_npa").value.length==3&&b.getElementById(c+"_nxx").focus()};this.formfill_nxx_input=function(b,c){c="lp"+c;if(b.getElementById(c+"_nxx").value.length==3)b.getElementById(c+"_xxxx").focus();else if(b.getElementById(c+"_nxx").value.length==0){b.getElementById(c+"_npa").focus();b.getElementById(c+"_npa").select()}};this.formfill_xxxx_input=function(b,c){c="lp"+c;if(b.getElementById(c+"_xxxx").value.length==0){b.getElementById(c+
"_nxx").focus();b.getElementById(c+"_nxx").select()}};this.formfill_fix=function(b,c){var d,e,f,g,h,j;if(c=="phone"){d="lpphone";e="lpphoneext";f="lpphone_npa";g="lpphone_nxx";h="lpphone_xxxx";j="lpphone_cc"}else if(c=="evephone"){d="lpevephone";e="lpevephoneext";f="lpevephone_npa";g="lpevephone_nxx";h="lpevephone_xxxx";j="lpevephone_cc"}else if(c=="fax"){d="lpfax";e="lpfaxphoneext";f="lpfax_npa";g="lpfax_nxx";h="lpfax_xxxx";j="lpfax_cc"}else if(c=="mobilephone"){d="lpmobilephone";e="lpmobphoneext";
f="lpmobilephone_npa";g="lpmobilephone_nxx";h="lpmobilephone_xxxx";j="lpmobilephone_cc"}else return;var l=d+"_dom";d+="_int";var o=ue(b,c);if(o==""){b.getElementById(l).style.display="";b.getElementById(d).style.display="none";b.getElementById(f).disabled=true;b.getElementById(g).disabled=true;b.getElementById(h).disabled=true;b.getElementById(e).disabled=true}else for(var n=0;n<s.length;++n)if(s[n].cc3l==o){o=s[n].phone;if(o=="1"){b.getElementById(l).style.display="";b.getElementById(d).style.display=
"none";b.getElementById(f).disabled=false;b.getElementById(g).disabled=false;b.getElementById(h).disabled=false}else{b.getElementById(l).style.display="none";b.getElementById(d).style.display="";b.getElementById(j).value=o}b.getElementById(e).disabled=false;return}};this.editfields_window_load=function(b,c){b.title=LP.lpgs("Edit Site Fields");b.documentElement.getButton("accept").setAttribute("label",LP.lpgs("Update"));b.documentElement.getButton("cancel").setAttribute("label",LP.lpgs("Cancel"));
var d=c.arguments,e=b.getElementById("fields");if(d.length>0){b.editfields_id=d[0];var f=y[b.editfields_id];if(f==null){U("lpaccts missing in editfields:"+b.editfields_id,null);return}LP.createFieldsPane(b,e,f)}if(d.length>1)b.editfields_opener=d[1]};this.editfields_toggle_password=function(b,c,d){var e=b.getElementById(d);b=b.getElementById(d+"_show");if(e&&b)if(e.type=="password"){if(je)if(!LP.securityPrompt(c))return;e.type="text";b.value=LP.lpgs("HidePw")}else{e.type="password";b.value=LP.lpgs("ShowPw")}};
this.editfields_alert_shared=function(b,c){LP.alert(LP.lpgs("This is a shared site. You are not permitted to view the password."),c)};this.deleteFieldLocal=function(b,c,d,e){for(c=0;c<b.logins.length;c++){var f=b.logins[c];f.fields=eg(f.fields,d,e);f.otherfields=eg(f.otherfields,d,e)}for(c=0;c<b.otherlogins.length;c++){f=b.otherlogins[c];f.fields=eg(f.fields,d,e);f.otherfields=eg(f.otherfields,d,e)}};this.editfields_delete_field=function(b,c,d,e,f,g){if(LP.lpConfirmYesNo(LP.lpgs("Are you sure you would like to delete this field?"),
c)){if(d!=0){var h=y[d];if(h==null)return;if(jd||h.pwprotect)if(!LP.securityPrompt(c))return}h=y[d];if(h==null)U("lpaccts missing in editfields_delete_field:"+d,null);else{LP.deleteFieldLocal(h,e,f,g);var j=vb();j&&dc(j,h.id,false)&&kc(j,h,false)&&Ne(j)&&Ab(j,null,"editfields_delete_field")&&Bb();e=LP.lp_base+"fields.php?delete=1&aid="+LP.en(d)+"&urid="+LP.en(e)+"&name="+LP.en(f)+"&value="+LP.en(g);LP.lpMakeRequest(e,"",oe,null,{url:e,aid:d,postdata:"",handler:oe,param:null});LP.createFieldsPane(b,
b.getElementById("fields"),h);if(b.editfields_opener)b.getElementById("fields").hasChildNodes()||c.close()}}};this.editfields_accept_click=function(b,c){b.getElementById("fields");if(y[b.editfields_id]==null)U("lpaccts missing in editfields accept:"+b.editfields_id,null);else{LP.submitFieldsPane(b,b.editfields_id);c.close();if(b.editfields_opener){var d=b.editfields_opener;b.editfields_opener.setTimeout(function(){d.close()},200)}b.editfields_id=null;b.editfields_opener=null;return true}};this.editfields_cancel_click=
function(b,c){c.close();b.editfields_id=null;b.editfields_opener=null;return true};this.showAddFieldDlg=function(b,c){var d=null;if(typeof b.editfields_id!="undefined")d=b.editfields_id;else if(typeof b.siteinfo_id!="undefined")d=b.siteinfo_id;d!=null&&c.openDialog(eb+"content/addfield.xul","_blank","chrome,titlebar,toolbar,centerscreen,modal",d,b)};this.lphandlebasic=function(b,c){if(ga&&b.getElementById("loginTextbox")&&b.getElementById("password1Textbox")){var d="";if(!b.getElementById("loginContainer").hidden){d=
Vj(b);if(d!=""){var e=Ra(d),f=typeof e.path=="string"?e.path.split("/"):[],g=Ta(d,e),h=Uj(Bh(b)),j=Ua(d),l=Fc,o=0,n=[];for(var p in l)if(LP.compare_tlds(Ua(d),Ua(l[p].url))){o++;var q=new Dg;q.id=p;q.realmmatch=h==l[p].realm?true:false;var r=Ra(l[p].url);q.urlmatch=Ta(l[p].url,r)==g?true:false;q.servermatch=r.host==e.host?true:false;q.portmatch=Pg(r,e);q.serverportmatch=q.servermatch&&q.portmatch;r=typeof r.path=="string"?r.path.split("/"):[];var u;for(u=0;u<f.length&&u<r.length;u++)if(r[u]!=f[u])break;
q.pathlevelmatch=u;q.fieldmatchcount=0;n[n.length]=q}n.sort(Af);n=Bf(ad,n,j,typeof e.path=="string"?e.path:"",e.host,y,ce(e));for(f=0;f<n.length;f++)p=n[f].id;do e=wd(1,1E5);while(typeof Vd[e]!="undefined");if(o>1){Vd[e]=b;p=b.createElement("button");p.setAttribute("label"," "+LP.lpgs("AutoFill")+" ("+o+")");p.setAttribute("image","chrome://lastpass/skin/icon.gif");p.setAttribute("type","menu");p.setAttribute("flex","1");f=b.createElement("hbox");f.setAttribute("flex","1");g=b.createElement("spacer");
g.setAttribute("orient","horizontal");g.setAttribute("flex","3");f.appendChild(g);f.appendChild(p);g=b.createElement("spacer");g.setAttribute("flex","20");f.appendChild(g);b.getElementById("commonDialog").appendChild(f);f=b.createElement("menupopup");f.setAttribute("id","LPOtherMenu");p.appendChild(f)}g=0;if(o)for(f=0;f<n.length;f++){p=n[f].id;g++;if(o>1){h=b.createElement("menuitem");j=ke(l[p]);h.setAttribute("label",j);h.setAttribute("oncommand",'LP.handlebasic_id("'+p+'","'+e+'");');b.getElementById("LPOtherMenu").appendChild(h)}if(f==
0){b.getElementById("loginTextbox").value=l[p].logins[0].unencryptedUsername;b.getElementById("password1Textbox").value=K(l[p].logins[0].password)}if(!(g>1)){h=cb();j=false;if(typeof qc[p]!="undefined"&&qc[p]!=null)if(h-qc[n[f].id]<45){qc[p]=null;j=true}if(j||Di(l[p].id)){l[p].last_time=h;eh(l[p].id);c.commonDialogOnAccept();c.close();return}else if(l[p].last_time+3E3<h){eh(l[p].id);l[p].last_time=h}}}if(d!=""){c.addEventListener("unload",function(){a:{var t="";for(z in Vd)if(b==Vd[z])t=z;""!=t&&
delete Vd[t];t=b.getElementById("checkbox");if(typeof t!="undefined"&&t.checked&&ga){LP.lpprefsSetBoolPref("savePasswordChecked",true);LP.flush_prefs();var C=b.getElementById("loginTextbox").value,A=b.getElementById("password1Textbox").value;if(""!=C||""!=A){var J=Bh(b);t=Vj(b);Ta(t);var D=Ra(t);J=Uj(J);var B=Fc;for(var z in B)if(LP.compare_tlds(Ua(t),Ua(B[z].url))){var L=K(B[z].logins[0].password);if(C==B[z].logins[0].unencryptedUsername&&A==L&&J==B[z].realm){L=Ra(B[z].url);if(D.host==L.host)break a}}B=
le(t);if(J.length>0)B=J+" "+B;z=new ub;z.pendingshare=false;z.id=0;z.name=B;z.group="";z.username=P(C);z.password=P(A);z.unencryptedUsername=C;z.oldusername="";z.oldpassword="";z.extra="";z.fav="0";z.never_autofill="0";z.autologin="0";z.pwprotect=false;z.isbookmark=false;z.basic_auth=true;z.realm=J;z.save_all=false;C="basic_auth=1&localupdate=1&extjs=1&username="+LP.en(z.username)+"&password="+LP.en(z.password)+"&name="+LP.en(P(z.name,void 0))+"&realm="+LP.en(P(z.realm))+"&dnc="+(new Date).getTime();
A=new hi;A.postdata=C;A.url=A.uri=t;A.server=D.host;A.tld=ob(D.host,t);A.actiontld=ob(D.host,t);A.action="";A.method="";A.hastext=true;A.basic_auth=true;A.ai=z;Ja[t]=A}}else if(typeof t!="undefined"&&!t.checked&&ga){LP.lpprefsSetBoolPref("savePasswordChecked",false);LP.flush_prefs()}}},false);d=b.getElementById("checkboxContainer");if(null!=d){d.removeAttribute("collapsed");d.removeAttribute("hidden")}d=b.getElementById("checkbox");if(typeof d!="undefined"){d.label=LP.lpgs("RememberWithLastPass");
d.setAttribute("align","start");d.setAttribute("src","chrome://lastpass/skin/icon.gif");d.setAttribute("minwidth","300");d.checked=LP.lpprefsHasUserValue("savePasswordChecked")?LP.lpprefsGetBoolPref("savePasswordChecked"):1}}}}}};this.handlebasic_id=function(b,c){var d=Fc,e=Vd[c];e.getElementById("loginTextbox").value=d[b].logins[0].unencryptedUsername;e.getElementById("password1Textbox").value=K(d[b].logins[0].password)};var $e=[],Ch=0;Ra.options={strictMode:false,key:["source","protocol","authority",
"userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};
var af=[],Dh=0,df=[],Ph=0,Bd=Array("combineddummy","phoneext","gender","ssn1","ssn2","ssn3","ssn","birthyear","birthmonth","birthday","birthdate","city","county","state","zip1","zip2","zip","country","email","mobileemail","housenumbername","housenumber","housename","address1","ccphone","address2","address3","mobilephone1","mobilephone2","mobilephone3","mobilephone","evephone1","evephone2","evephone3","evephone","phone1","phone2","phone3","phone","fax1","fax2","fax3","fax","title","ccname","ccnum1",
"ccnum2","ccnum3","ccnum4","cccsc","ccnum","ccstartmonth","ccstartyear","ccstart","ccexpmonth","ccexpyear","ccexp","cctype","ccissuenum","firstname3","firstname2","firstname","middlename","middleinitial","lastname3","lastname2","lastname","fulllastname","address","company","username","bankname","addrbookname","name","age","timezone","bankacctnum","bankroutingnum"),jm=Array("securityanswer","promocode","maiden","comments","invoice","addrbookname","emailalert","combineddummy"),Na=[];Na.ssn1=Na.ssn2=
Na.ssn3="ssn";Na.birthyear=Na.birthmonth=Na.birthday="birthdate";Na.address1=Na.address2=Na.address3="address";Na.phone1=Na.phone2=Na.phone3=Na.phone23="phone";Na.evephone1=Na.evephone2=Na.evephone3=Na.evephone23="evephone";Na.mobilephone1=Na.mobilephone2=Na.mobilephone3=Na.mobilephone23="mobilephone";Na.fax1=Na.fax2=Na.fax3=Na.fax23="fax";Na.ccnum1=Na.ccnum2=Na.ccnum3=Na.ccnum4="ccnum";Na.ccexpmonth=Na.ccexpyear="ccexp";Na.ccstartmonth=Na.ccstartyear="ccstart";Na.firstname=Na.middlename=Na.middleinitial=
Na.lastname=Na.lastname2="name";Na.zip1=Na.zip2="zip";Na.lastname=Na.lastname2="fulllastname";var Sc=[],qe=[],Gh=-1,Hh=-1,Qh=false;if(typeof xd=="undefined")xd=[];if(typeof Md=="undefined")Md=[];this.FieldFocus=function(b){var c=typeof LP!="undefined"?LP.getBrowser().selectedTab.linkedBrowser:null;if(typeof LP=="undefined"||c){var d=c?c.contentDocument:document;if(!(!d||typeof d.FieldFocusDone!="undefined"&&d.FieldFocusDone==true))if(typeof d.LPlpUseLastPassLogin!="undefined"&&d.LPlpUseLastPassLogin==
true)if(ga){d.LPlpUseLastPassLogin=false;LP.FieldFocus(b)}else{Ob("UseLastPassLogin",c,0,"login",null);d.LPlpUseLastPassLogin=false;d.LPlpm_setupFocusHandler=false;d.FieldFocusDone=false}else{if(typeof d.LPlpgenerateandfill=="undefined"&&typeof d.LPlpfillforms!="undefined")Ob("FillableFormDetected",c,0,"formfill");else if(typeof d.LPlpgenerateandfill!="undefined")Ob("GeneratePassword",c,d.LPlpgenerateAids,"generate",d.LPlpgenerateForm,null,d.LPlpgenerateandfill,d.LPlpfillcurrent);else return;d.FieldFocusDone=
true}}};this.lpchooseprofilecc_window_load=function(b){b.title=LP.lpgs("Choose Profile and Credit Card");LP.sr(b,"profilecaption","label","Profile");LP.sr(b,"cccaption","label","Credit Card");LP.sr(b,"alwayschooseprofilecc","label","Always Choose Profile and Credit Card");for(var c=LP.lpprefsHasUserValue("profileffid")?LP.lpprefsGetIntPref("profileffid"):0,d=LP.lpprefsHasUserValue("ccffid")?LP.lpprefsGetIntPref("ccffid"):0,e=false,f=false,g=0,h=0,j=0;j<fa.length;j++){var l=fa[j];if(l.profiletype==
0){var o=b.createElement("radio");o.setAttribute("label",l.profilename);o.setAttribute("value",l.ffid);if(l.ffid==c){o.setAttribute("selected",true);e=true}b.getElementById("profilegroup").appendChild(o);g++}if(l.ccnum!=""){o=b.createElement("radio");o.setAttribute("label",l.profilename);o.setAttribute("value",l.ffid);if(l.ffid==d){o.setAttribute("selected",true);f=true}b.getElementById("ccgroup").appendChild(o);h++}}g<5&&b.getElementById("profilebox").setAttribute("height",g*25);e||b.getElementById("profilegroup").childNodes.item(0).setAttribute("selected",
true);h<5&&b.getElementById("ccbox").setAttribute("height",h*25);f||b.getElementById("ccgroup").childNodes.item(0).setAttribute("selected",true);LP.lpprefsHasUserValue("alwayschooseprofilecc")&&LP.lpprefsGetBoolPref("alwayschooseprofilecc")&&b.getElementById("alwayschooseprofilecc").setAttribute("checked",true)};this.lpchooseprofilecc_accept_click=function(b){var c=b.getElementById("profilegroup").selectedItem.value,d=b.getElementById("ccgroup").selectedItem.value;LP.lpprefsSetIntPref("profileffid",
c);LP.lpprefsSetIntPref("ccffid",d);LP.lpprefsSetBoolPref("alwayschooseprofilecc",b.getElementById("alwayschooseprofilecc").checked);LP.flush_prefs();LP.setTimeout(function(){LP.lp_fillFormsHelper(c,false,d)},0);return true};this.lpchooseprofilecc_cancel_click=function(){return true};this.lplogincheck=function(b){LP.mostRecent().setTimeout(function(){Gg(b)},100)};var ik=0,jk=0;this.lplogin=function(b,c,d,e){LP.mostRecent().setTimeout(function(){Mj(b,c,d,e);c="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},
100)};var mk=0;this.notifyoffline=function(b){if(ga&&$b){Ob("LoggedInOffline",null,0,"offline");if((b=="pluginlogin"||b=="createaccount")&&(!LP.lpprefsHasUserValue("showHomepageAfterLogin",false)||LP.lpprefsGetBoolPref("showHomepageAfterLogin",false)))If()}};this.retryonlinelogin=function(b){if(ga&&$b){LP.lplogincheck("retryonline");b=2*b;if(b>12E5)b=12E5;LP.mostRecent().setTimeout("LP.retryonlinelogin("+b+");",b)}};this.have_loginpw=function(b){var c=Cd();return typeof c[b]!="undefined"&&c[b]};this.delete_loginpw=
function(b){var c=Cd();if(typeof c[b]!="undefined")c[b]=null;Ue(c)};this.lpOpenLogin=function(b,c){var d={logincase:1};if(typeof c!="undefined"&&c!=null&&c!="")d.sesameusername=c;if(ga)Ia();else{Uc=b&&typeof b=="function"?b:null;var e=LP.getsinglefactortype();if(e=="trueapi"&&Aa()&&LP.lpis_win&&typeof ba.trueapi_default_login_exists=="function"&&ba.trueapi_default_login_exists("")){var f={},g={},h={};if(ba.trueapi_get_default_login(f,g,h)){Sb.password_offline=h.value;Sb.type=e;LP.lplogin(f.value,
g.value,"pluginlogin",h.value!="");return}}if(ac||e=="vtapi"){if(Aa()&&LP.lpis_mac&&typeof ba.lpvt_verify_user=="function"){f=encodeURIComponent(LP.lpCreatePass(8,1,1,1,0,1,0,1));f=ba.lpvt_verify_user(f,LP.lpgs("Swipe finger"),LP.lpgs("Swipe your finger on the fingerprint sensor"),LP.lpgs("Cancel"));if(f!=""){f=f.split("|");if(f.length==2){LP.lplogin(decodeURIComponent(f[0]),decodeURIComponent(f[1]),"pluginlogin");return}}}if(ac&&xa){Ma("LoginError",false,true);return}}if(e=="validity")if(Aa()&&LP.lpis_win&&
typeof ba.validity_verify_user=="function"){f=ba.validity_verify_user("",LP.lpgs("Swipe finger"),LP.lpgs("Swipe your finger on the fingerprint sensor"),LP.lpgs("Cancel"));if(f!=""){f=f.split("|");if(f.length==2){LP.lplogin(decodeURIComponent(f[0]),decodeURIComponent(f[1]),"pluginlogin");return}}}LP.lpGetCurrentWindow().openDialog(eb+"content/login.xul","_blank","chrome,titlebar,toolbar,centerscreen,modal",d)}};var Fk=0;this.httptest=function(){if(!ga){var b=(new Date).getTime();if(!(b-Fk<1E3)){Fk=
b;typeof Je=="function"&&Je();ng(true,"httptest");b=LP.lp_base+"httptest.php";b=b.replace(/^https:\/\//,"http://");LP.lpMakeRequest(b,"",nm,Vh)}}};this.lpMakeRequest=function(b,c,d,e,f,g){if(xa){var h=true;if(b.indexOf("error.php")!=-1){if(rk(c).fb=="1")h=false}else if(b.indexOf("upgrade.php")!=-1||b.indexOf("create_account.php")!=-1||b.indexOf("import_local.php")!=-1)h=false;if(h){om(b,c,d,e,f,g);return}}g||(g=LP.mostRecent());if(rd!=null&&rd!="")c+=(c!=""?"&":"")+"requid="+LP.en(rd);if(Ib!=null&&
Ib!=""&&(b.match(/^https:\/\//i)||ic(b))){c+=(c!=""?"&":"")+"wxsessid="+LP.en(Ib);h=LP.lpprefsHasUserValue("logOffWhenCloseBrowser",true)&&LP.lpprefsGetBoolPref("logOffWhenCloseBrowser",true)==true&&(!LP.lpprefsHasUserValue("logOffWhenCloseBrowserVal",true)||LP.lpprefsGetIntPref("logOffWhenCloseBrowserVal",true)==0);if(Z!="")c+="&sessonly="+(h?"1":"0")}g?g.setTimeout(function(){LP.lpMakeRequestReal(b,c,d,e,f)},0):LP.setTimeout(function(){LP.lpMakeRequestReal(b,c,d,e,f)},0)};this.lpMakeRequestReal=
function(b,c,d,e,f){var g=(new Date).getTime(),h={rid:g+"_"+wd(1,1E4),ts:g,url:b,params:c};if(!Xh(b))if(c.indexOf("?requesthash=")==-1&&c.indexOf("&requesthash=")==-1){c+=(c==""?"":"&")+"requesthash="+encodeURIComponent(qm());c+=(c==""?"":"&")+"requestsrc="+encodeURIComponent(typeof g_ischrome=="undefined"?"ff":"cr");h.params=c}c=c.replace(/&?sentms=[^\&]+/,"");c+=(c==""?"":"&")+"sentms="+encodeURIComponent(g);if(c.indexOf("hasplugin=")==-1&&typeof Wb!="undefined")c+=(c==""?"":"&")+"hasplugin="+encodeURIComponent(Wb);
var j=rm(b);g=typeof e=="function"?e:qg;var l=typeof Components!="undefined"?Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Components.interfaces.nsIXMLHttpRequest):new XMLHttpRequest;if(!l){g("objectcreation",h,j);return false}l.onreadystatechange=function(){a:if(l.readyState==4&&l.status==200){Wh=true;var n=Xh(h.url),p=null;if(n){p=/[?&]rid=([^&]+)/.exec(h.url);if(!p||p.length!=2){U("SK:lpgetretryrid - could not find rid in url",null);p=null}else p=p[1];if(!p)break a}if(l.responseXML&&
l.responseXML.documentElement){var q=l.responseXML.documentElement.getElementsByTagName("error");if(q&&q.length>0){var r=q[0].getAttribute("cause");if(r&&"oldpassword"==r){if(typeof Wa=="function"){Wa(Z+"_lp.act.xml");Wa(Z+"_lps.act.xml");Wa(ia+"_lp.act.xml");Wa(ia+"_lps.act.xml");Wa(ia+"_lps.act.sxml")}Ia()}if((r=q[0].getAttribute("notloggedin"))&&r=="1"){n?Yh(p,false):qg("notloggedin",h,j);Ia();Ma("ErrorSessionMsg",false,true);break a}if((q=q[0].getAttribute("oldretry"))&&q=="1"){if(n){Yh(p,true);
break a}U("SK:ERROR : received oldretry=1 for non retry request!",null);break a}}}q=false;if(Fj(l))q=true;else{if(l.responseText&&(l.responseText=="latest"||l.responseText=="nodata"||l.responseText.indexOf("iconsversion")==0))q=true;if(h.url.indexOf("logout.php")>=0)q=true;if(h.url.indexOf("error.php")>=0)q=true;if(h.url.indexOf("country_from_ip.php")>=0)q=true;if(h.url.indexOf("loglogin.php")>=0)q=true;if(h.url.indexOf("logformfill.php")>=0)q=true;if(h.url.indexOf("httptest.php")>=0)q=true;if(h.url.indexOf("set_never_autofill.php")>=
0)q=true;if(h.url.indexOf("help.php")>=0)q=true;if(h.url.indexOf("create_account.php")>=0)q=true;if(h.url.indexOf("getaccts.php")>=0)if(h.url.indexOf("mobile")>=0)q=true;else{if(typeof LP!="undefined")if(Gk==false){LP.lpGetAccounts();Gk=true}U("ERROR: Got invalid xml from getaccts")}}if(n)Yh(p,q);else if(q){if(typeof d=="function"){if(!ga)if(d.toString().substring(0,100).indexOf("poll_server_response")!=-1){Ia();Ma("ErrorSessionMsg",false,true);break a}d(l,e,f)}}else qg("invalidresponse",h,j)}else l.readyState==
4&&typeof e=="function"&&e()};try{l.onerror=e&&!j?e:function(n){qg("onerror",h,j,n)};l.open("POST",b,true);l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.send(c)}catch(o){g("exception",h,j)}};var Gk=false,hb={exit:null,error:false,rid:null,status:null,sentms:null,donems:null,retryintervalms:0,initretryintervalms:0,responsewaitms:1E4},hf=[];this.lpretryrequests=function(){if(!hb.exit)if(ga){if(hb.status=="started"){if((new Date).getTime()-hb.sentms<=hb.responsewaitms){LP.lpGetCurrentWindow().setTimeout("LP.lpretryrequests()",
1E4);return}Zh(true,false);hb.donems=(new Date).getTime();hb.rid=null;hb.sentms=null;hb.status=null}if(!(hb.donems&&(new Date).getTime()-hb.donems<hb.retryintervalms)){hb.rid=null;hb.sentms=null;hb.status=null;hb.donems=null;var b=xe();if(b.length!=0){b=b[0];var c=b.url,d=b.rid,e=b.ts;c+=(c.indexOf("?")==-1?"?":"&")+"rid="+encodeURIComponent(d);c+="&localts="+encodeURIComponent(e);hb.rid=d;hb.sentms=(new Date).getTime();hb.status="started";LP.lpMakeRequest(c,b.params,null,null,null)}}LP.lpGetCurrentWindow().setTimeout("LP.lpretryrequests()",
1E4)}};var jf=null,Wf=pe=0,Qe=false,rg=[],uk=null,Cb;if(typeof xc=="undefined")var xc=function(b){if(typeof LP=="object"&&typeof LP.lpGetCurrentWindow=="function"&&typeof ischrome=="undefined"){var c=LP.lpGetCurrentWindow();if(typeof c=="object"&&typeof c.btoa=="function")return c.btoa(b)}if(typeof lptoolband=="object"&&typeof lptoolband.btoa2!="undefined")return lptoolband.btoa2(b,b.length);if(b.length==0)return"";var d,e,f,g;c=0;var h="";do{d=b.charCodeAt(c++);e=b.charCodeAt(c++);f=b.charCodeAt(c++);
g=d<<16|e<<8|f;d=g>>18&63;e=g>>12&63;f=g>>6&63;g&=63;h+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g)}while(c<b.length);switch(b.length%3){case 1:h=h.slice(0,-2)+"==";break;case 2:h=h.slice(0,-1)+"=";break}return h};if(typeof wc=="undefined")var wc=
function(b){if(typeof LP=="object"&&typeof LP.lpGetCurrentWindow=="function"&&typeof ischrome=="undefined"){var c=LP.lpGetCurrentWindow();if(typeof c=="object"&&typeof c.atob=="function")return c.atob(b)}if(typeof lptoolband=="object"&&typeof lptoolband.atob2!="undefined")return lptoolband.atob2(b,b.length);if(typeof b!="string"||b.length%4!=0||typeof b.charAt=="undefined")return"";var d,e,f,g,h=0,j="";do{d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(b.charAt(h++));
e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(b.charAt(h++));c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(b.charAt(h++));g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(b.charAt(h++));f=d<<18|e<<12|c<<6|g;d=f>>16&255;e=f>>8&255;f&=255;j+=c==64?String.fromCharCode(d):g==64?String.fromCharCode(d,e):String.fromCharCode(d,e,f)}while(h<b.length);return j};var Ya=function(){var b=[[0,0,0,0],[1,0,0,0],[2,0,0,0],
[4,0,0,0],[8,0,0,0],[16,0,0,0],[32,0,0,0],[64,0,0,0],[128,0,0,0],[27,0,0,0],[54,0,0,0]],c=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,
146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],
d=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,
240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],f=[0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,0,0,0,0,0,0,0,10,11,12,13,14,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,11,12,13,14,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0],g=function(q){for(var r=0;r<4;r++)q[r]=c[q[r]];return q},h=function(q,r,u){var t,C;for(t=0;t<4;t++)for(C=0;C<4;C++)q[t][C]^=u[r*4+C][t];return q},j=function(q){var r,u;for(r=0;r<4;r++)for(u=0;u<4;u++)q[r][u]=c[q[r][u]];return q},l=function(q){var r,u,t=[];for(r=1;r<4;r++){for(u=0;u<4;u++)t[u]=q[r][(u+r)%4];for(u=0;u<4;u++)q[r][u]=t[u]}return q},o=function(q){var r,u;for(r=0;r<4;r++)for(u=0;u<4;u++)q[r][u]=d[q[r][u]];return q},n=function(q){var r,u,t=[];for(r=1;r<4;r++){for(u=0;u<4;u++)t[u]=
q[r][(u+(4-r))%4];for(u=0;u<4;u++)q[r][u]=t[u]}return q},p=function(q){typeof reportError=="function"&&reportError(q,null)};return{KeyExpansion:function(q){var r,u=[],t,C;q instanceof Array&&(q.length==16||q.length==24||q.length==32)||p("KeyExpansion: key must be an array of length 16, 24, or 32 bytes");t=q.length/4;C=t+6;var A=[];for(r=0;r<t;r++)A[r]=[q[4*r],q[4*r+1],q[4*r+2],q[4*r+3]];for(;r<4*(C+1);r++){A[r]=[];for(q=0;q<4;q++)u[q]=A[r-1][q];if(r%t==0){q=u[0];for(var J=0;J<3;J++)u[J]=u[J+1];u[3]=
q;u=g(u);for(q=0;q<4;q++)u[q]^=b[r/t][q]}else if(t>6&&r%t==4)u=g(u);for(q=0;q<4;q++)A[r][q]=A[r-t][q]^u[q]}return A},Cipher:function(q,r){var u,t,C,A=[],J=[];if(!(q instanceof Array&&q.length==16)){p("Cipher: input must be an array of length 16");return null}if(!(r instanceof Array&&(r.length==44||r.length==52||r.length==60))){p("Cipher: roundKeys must be an array of length 44, 52, or 60");return null}C=r.length/4-1;for(u=0;u<4;u++){A[u]=[];for(t=0;t<4;t++)A[u][t]=q[u+4*t]}A=h(A,0,r);for(u=1;u<C;u++){A=
j(A);A=A=l(A);var D=void 0,B=[],z=[],L=[];for(t=0;t<4;t++){for(D=0;D<4;D++){B[D]=A[D][t];z[D]=B[D]<<1;if(z[D]>255)z[D]^=283;L[D]=B[D]^z[D]}A[0][t]=z[0]^L[1]^B[2]^B[3];A[1][t]=B[0]^z[1]^L[2]^B[3];A[2][t]=B[0]^B[1]^z[2]^L[3];A[3][t]=L[0]^B[1]^B[2]^z[3]}A=h(A,u,r)}A=j(A);A=l(A);A=h(A,C,r);for(u=0;u<4;u++)for(t=0;t<4;t++)J[u+4*t]=A[u][t];return J},InvCipher:function(q,r){var u,t,C,A=[],J=[];if(!(q instanceof Array&&q.length==16)){p("Cipher: input must be an array of length 16");return null}if(!(r instanceof
Array&&(r.length==44||r.length==52||r.length==60))){p("Cipher: roundKeys must be an array of length 44, 52, or 60");return null}C=r.length/4-1;for(u=0;u<4;u++){A[u]=[];for(t=0;t<4;t++)A[u][t]=q[u+4*t]}A=h(A,C,r);for(u=C-1;u>0;u--){A=n(A);A=o(A);A=A=h(A,u,r);var D=[],B=[],z=[],L=[],S=[],$=[],E=[],ea=[];for(t=0;t<4;t++){for(C=0;C<4;C++){D[C]=A[C][t];B[C]=D[C]<<1;if(B[C]>255)B[C]^=283;z[C]=B[C]<<1;if(z[C]>255)z[C]^=283;L[C]=z[C]<<1;if(L[C]>255)L[C]^=283;S[C]=L[C]^D[C];$[C]=L[C]^B[C]^D[C];E[C]=L[C]^z[C]^
D[C];ea[C]=L[C]^z[C]^B[C]}A[0][t]=ea[0]^$[1]^E[2]^S[3];A[1][t]=S[0]^ea[1]^$[2]^E[3];A[2][t]=E[0]^S[1]^ea[2]^$[3];A[3][t]=$[0]^E[1]^S[2]^ea[3]}}A=n(A);A=o(A);A=h(A,0,r);for(u=0;u<4;u++)for(t=0;t<4;t++)J[u+4*t]=A[u][t];return J},StringToKeyIv:function(q,r){var u=[],t=[],C=[],A=0,J=16,D;if(r!=128&&r!=192&&r!=256){p("BytesToKey: bits must be 128, 192, or 256");return null}A=r/8;for(D=0;D<q.length;D++)u[D]=q.charCodeAt(D);for(;;){D=0;if(A)for(;A;){t.push(u[D++]);A--;if(D==u.length)break}if(J&&D<u.length)for(;J;){C.push(u[D++]);
J--;if(D==u.length)break}if(!A&&!J||!A&&D>=u.length)break}return{key:t,iv:C}},StringToPaddedData:function(q){var r=[],u;q=Ya._utf8_encode(q);for(u=0;u<q.length;u++)r.push(q.charCodeAt(u));q=16-u%16;for(u=0;u<q;u++)r.push(q);return r},PaddedDataToString:function(q,r){var u="",t,C=q[q.length-1];if(C>=0&&C<=16){for(t=q.length-1;t>0;t--)if(q[t]!=C)break;for(C=0;C<=t;C++)u+=String.fromCharCode(q[C])}else r||p("Bogus pad:"+C+(typeof g_to_dec!="undefined"?" length: "+g_to_dec.length:""));return Ya._utf8_decode(u)},
_utf8_encode:function(q){for(var r="",u=0;u<q.length;u++){var t=q.charCodeAt(u);if(t<128)r+=String.fromCharCode(t);else{if(t>127&&t<2048)r+=String.fromCharCode(t>>6|192);else{r+=String.fromCharCode(t>>12|224);r+=String.fromCharCode(t>>6&63|128)}r+=String.fromCharCode(t&63|128)}}return r},_utf8_decode:function(q){for(var r="",u=0,t=0,C=0,A=0;u<q.length;){t=q.charCodeAt(u);if(t<128){r+=String.fromCharCode(t);u++}else if(t>191&&t<224){C=q.charCodeAt(u+1);r+=String.fromCharCode((t&31)<<6|C&63);u+=2}else{C=
q.charCodeAt(u+1);A=q.charCodeAt(u+2);r+=String.fromCharCode((t&15)<<12|(C&63)<<6|A&63);u+=3}}return r},db64:function(q){return wc(q)},eb64:function(q){return xc(q)},BytesToB64:function(q){var r,u="";for(r=0;r<q.length;r++)u+=String.fromCharCode(q[r]);return Ya.eb64(u)},B64ToBytes:function(q){q=Ya.db64(q);for(var r=[],u=0;u<q.length;u++)r[u]=q.charCodeAt(u);return r},Prepare:function(q){var r,u;r=256;var t={mode:"ecb",b64:false,data:[],key:[],iv:[]};if(q.mode=="cbc")t.mode=q.mode;if(q.b64==true)t.b64=
q.b64;if(typeof q.pass=="string"){if(q.bits==128||q.bits==192)r=q.bits;u=Ya.StringToKeyIv(q.pass,r);for(r=0;r<u.key.length;r++)t.key[r]=u.key[r];for(r=0;r<u.iv.length;r++)t.iv[r]=u.iv[r]}else{if(!(q.key instanceof Array)||q.key.length!=16&&q.key.length!=24&&q.key.length!=32){p("obj.key must be a byte array of length 16, 24, or 32");return null}for(r=0;r<q.key.length;r++){if(typeof q.key[r]!="number"){p("obj.key must be a byte array of length 16, 24, or 32");return null}t.key[r]=q.key[r]}if(t.mode==
"cbc"){if(!(q.iv instanceof Array)||q.iv.length!=16){p("obj.iv must be a byte array of length 16");return null}for(r=0;r<q.iv.length;r++){if(typeof q.iv[r]!="number"){p("obj.iv must be a byte array of length 16");return null}t.iv[r]=q.iv[r]}}}if(typeof q.data=="string"){q=Ya.StringToPaddedData(q.data);for(r=0;r<q.length;r++)t.data[r]=q[r]}else{if(!(q.data instanceof Array)||q.data.length%16){p("obj.data must be a byte array with a multiple of 16 length ");return null}for(r=0;r<q.data.length;r++){if(typeof q.data[r]!=
"number"){p("obj.data must be a byte array with a multiple of 16 length ");return null}t.data[r]=q.data[r]}}t.round=Ya.KeyExpansion(t.key);return t},CreateIV:function(q){var r={arr:[],str:""};for(k=0;k<q;++k){r.arr[k]=Math.floor(Math.random()*256);r.str+=String.fromCharCode(r.arr[k])}return r},Encrypt:function(q){var r=[],u=[],t,C,A;A=Ya.Prepare(q);if(A==null)return null;if(A.mode=="cbc")t=A.iv;for(C=0;C<A.data.length/16;C++){for(q=0;q<16;q++){u[q]=A.data[C*16+q];if(A.mode=="cbc")u[q]^=t[q]}t=Ya.Cipher(u,
A.round);for(q=0;q<16;q++)r[C*16+q]=t[q]}if(A.b64)r=Ya.BytesToB64(r);return r},Decrypt:function(q,r){var u=[],t=[],C=[],A,J,D,B;B=Ya.Prepare(q);if(B==null)return null;if(B.b64)B.data=Ya.B64ToBytes(q.data);if(B.mode=="cbc")for(J=0;J<B.iv.length;J++)C[J]=B.iv[J];for(D=0;D<B.data.length/16;D++){if(D>0&&B.mode=="cbc")for(J=0;J<16;J++)C[J]=t[J];for(J=0;J<16;J++)t[J]=B.data[D*16+J];A=Ya.InvCipher(t,B.round);for(J=0;J<16;J++){u[D*16+J]=A[J];if(B.mode=="cbc")u[D*16+J]^=C[J]}}return Ya.PaddedDataToString(u,
r)},bin2hex:function(q){for(var r=q.length,u="",t,C=0;0<r--;){t=q.charCodeAt(C++);u+=e[(t&240)>>4];u+=e[t&15]}return u},hex2bin:function(q){for(var r=q.length,u="",t,C,A=0;r>1;){t=q.charAt(A++);t=t.charCodeAt(0);C=q.charAt(A++);C=C.charCodeAt(0);u+=String.fromCharCode((f[t]<<4)+f[C]);r-=2}return u},ok:function(q){if(0==q.length)return true;if(q.length>=16){if(Ya.isb64(q))return true;if((q=q.match(/^!([^|]*)\|(.*)$/))&&Ya.isb64(q[1])&&Ya.isb64(q[2]))return true}return false},isb64:function(q){if(q.match(/^[A-Za-z0-9+\/=]+$/))return true;
return false}}}();ai.prototype.init=function(b){var c,d,e;for(c=0;c<256;++c)this.S[c]=c;for(c=d=0;c<256;++c){d=d+this.S[c]+b[c%b.length]&255;e=this.S[c];this.S[c]=this.S[d];this.S[d]=e}this.j=this.i=0};ai.prototype.next=function(){var b;this.i=this.i+1&255;this.j=this.j+this.S[this.i]&255;b=this.S[this.i];this.S[this.i]=this.S[this.j];this.S[this.j]=b;return this.S[b+this.S[this.i]&255]};var bi=256,tg,Ac,Nb;if(Ac==null){Ac=[];Nb=0;var Wd;if(typeof navigator!="undefined"&&navigator.appName=="Netscape"&&
navigator.appVersion<"5"&&typeof window!="undefined"&&window.crypto){var Hk=window.crypto.random(32);for(Wd=0;Wd<Hk.length;++Wd)Ac[Nb++]=Hk.charCodeAt(Wd)&255}for(;Nb<bi;){Wd=Math.floor(65536*Math.random());Ac[Nb++]=Wd>>>8;Ac[Nb++]=Wd&255}Nb=0;sg()}this.LPJSON={};if(typeof ischrome=="undefined"){this.JSON=this.LPJSON;if(typeof Te=="undefined")var Te=this.JSON,Cg=this.LPJSON}(function(){function b(o){return o<10?"0"+o:o}function c(o){f.lastIndex=0;return f.test(o)?'"'+o.replace(f,function(n){var p=
j[n];return typeof p==="string"?p:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+o+'"'}function d(o,n){var p,q,r,u,t=g,C,A=n[o];if(A&&typeof A==="object"&&typeof A.toJSON==="function")A=A.toJSON(o);if(typeof l==="function")A=l.call(n,o,A);switch(typeof A){case "string":return c(A);case "number":return isFinite(A)?String(A):"null";case "boolean":case "null":return String(A);case "object":if(!A)return"null";g+=h;C=[];if(l&&typeof l==="object"){u=l.length;for(p=0;p<u;p+=1){q=l[p];if(typeof q===
"string")if(r=d(q,A))C.push(c(q)+(g?": ":":")+r)}}else for(q in A)if(Object.hasOwnProperty.call(A,q))if(r=d(q,A))C.push(c(q)+(g?": ":":")+r);r=C.length===0?"{}":g?"{\n"+g+C.join(",\n"+g)+"\n"+t+"}":"{"+C.join(",")+"}";g=t;return r}}if(typeof ischrome!="undefined"&&typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+
":"+b(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g,h,j={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},l;if(typeof Cg.stringify!==
"function")Cg.stringify=function(o,n,p){var q;h=g="";if(typeof p==="number")for(q=0;q<p;q+=1)h+=" ";else if(typeof p==="string")h=p;if((l=n)&&typeof n!=="function"&&(typeof n!=="object"||typeof n.length!=="number"))throw Error("JSON.stringify");return d("",{"":o})};if(typeof Cg.parse!=="function")Cg.parse=function(o,n){function p(r,u){var t,C,A=r[u];if(A&&typeof A==="object")for(t in A)if(Object.hasOwnProperty.call(A,t)){C=p(A,t);if(C!==undefined)A[t]=C;else delete A[t]}return n.call(r,u,A)}var q;
e.lastIndex=0;if(e.test(o))o=o.replace(e,function(r){return"\\u"+("0000"+r.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(o.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){q=eval("("+o+")");return typeof n==="function"?p({"":q},""):q}throw new SyntaxError("JSON.parse");}})()};
