SetupNamespaces("EZLF.Login");EZLF.Login=function(){var g=this;var d=null;var e=Elem("div");e.className="urgent";FocusSignInForm=function(){try{var h=Get("LogInEmail");var i=Get("LogInPassword");if(h!=null&&h.value==""){h.focus()
}else{if(i!=null){i.focus()}}}catch(j){}};CreateLoginForm=function(){var i=Elem("div");i.style.textAlign="center";var j=Elem("table");var n,m,k;j.cellspacing=0;j.cellpadding=4;j.style.textAlign="left";
j.style.width="260px";j.style.margin="15px auto 20px auto";n=j.insertRow(j.rows.length);cell1=n.insertCell(n.cells.length);cell2=n.insertCell(n.cells.length);var l=Elem("input");l.type="text";l.id="LogInEmail";
l.name="LogInEmail";l.value=ReadCookie("lastemail")?ReadCookie("lastemail"):"";l.style.width="175px";l.maxlength=128;l.tabindex=1;cell1.appendChild(Text("Email: "));cell2.appendChild(l);n=j.insertRow(j.rows.length);
cell1=n.insertCell(n.cells.length);cell2=n.insertCell(n.cells.length);l=Elem("input");l.type="password";l.id="LogInPassword";l.name="LogInPassword";l.style.width="175px";l.maxlength=128;l.tabindex=2;cell1.appendChild(Text("Password: "));
cell2.appendChild(l);n=j.insertRow(j.rows.length);cell1=n.insertCell(n.cells.length);cell1.setAttribute("colSpan",2);cell1.style.padding="2px 0 5px 0";l=CreateCheckbox();l.id="RememberLogin";l.name="RememberLogin";
l.checked=true;l.style.verticalAlign="middle";var h=Elem("label");h.setAttribute("for","RememberLogin");h.style.verticalAlign="middle";h.appendChild(Text(" Remember me on this computer."));cell1.appendChild(l);
cell1.appendChild(h);n=j.insertRow(j.rows.length);cell1=n.insertCell(n.cells.length);cell1.setAttribute("colSpan",2);cell1.style.textAlign="center";l=Elem("input");l.type="submit";l.id="ButtonLogIn";l.value="Secure Log In";
l.className="Button";l.tabindex=3;l.style.background="#5275C6 url(/images/layout2009/home/lock_icon.png) no-repeat scroll 11px center";l.style.padding="5px 20px 5px 31px";cell1.appendChild(l);i.appendChild(j);
return i};g.ShowLoginBox=function(n){d=new EZLF.Shared.ModalDialog(null,null,true);if(!n){n=""}var k=Elem("form");k.action="https://"+window.location.hostname+"/login.aspx";k.method="post";k.style.display="block";
var m=Elem("h1");m.appendChild(Text("Log In to Your Account"));var j=Elem("div");j.style.width="96%";j.style.position="relative";j.style.left="0px";j.style.bottom="0px";j.style.height="20px";j.style.padding="5px 0 0 0";
j.style.margin="0px auto";j.style.borderTop="1px solid #CCCCCC";var i=Elem("a");var h=Elem("a");i.href="https://www.ezlandlordforms.com/join/";i.style.display="block";i.style.position="absolute";i.style.left="2px";
i.appendChild(Text("Create New Account"));h.href="https://www.ezlandlordforms.com/lostpassword.aspx";h.style.position="absolute";h.style.right="2px";h.appendChild(Text("Lost Password?"));j.appendChild(i);
j.appendChild(h);j.appendChild(Text(" "));var l=Elem("input");l.type="hidden";l.id="HiddenReturnUrl";l.name="HiddenReturnUrl";l.value=n;j.appendChild(l);k.appendChild(m);k.appendChild(CreateLoginForm());
k.appendChild(j);d.Display(k,370,260);FocusSignInForm()};var b=Elem("iframe");var f=280;var c=370;b.name="login";b.style.borderWidth="0px";b.style.width="100%";b.scrolling="no";b.setAttribute("frameBorder","0");
var a=null;g.ReLogin=function(k,h){d=new EZLF.Shared.ModalDialog(null,true,true);var i=Elem("div");var j=Elem("h1");if(newUser&&!h){j.appendChild(Text("Save Lease to Free Account"))}else{j.appendChild(Text("Please Log In"))
}i.appendChild(j);if(newUser&&!h){b.style.height="360px";f=420;c=410;if(Pliner.Util.Display.IsIE(7,7)){b.style.height="380px";f=440}b.src="https://"+window.location.host+"/ajax/signup.aspx";if(typeof(leaseWizard)!="undefined"&&leaseWizard){if(leaseWizard.GetLeaseData().State!=null&&leaseWizard.GetLeaseData().Country!=null){b.src+="?state="+leaseWizard.GetLeaseData().State+"&country="+leaseWizard.GetLeaseData().Country
}else{b.src+="?state="+primaryState+"&country="+primaryCountry}if(leaseWizard.GetLeaseData().ContactEmail){b.src+="&email="+leaseWizard.GetLeaseData().ContactEmail}if(leaseWizard.GetLeaseData().Landlords[0].Name){b.src+="&name="+leaseWizard.GetLeaseData().Landlords[0].Name;
b.style.height="320px";f=380;if(Pliner.Util.Display.IsIE(7,7)){b.style.height="340px";f=400}}}else{b.src+="?state="+primaryState+"&country="+primaryCountry}}else{b.src="https://"+window.location.host+"/ajax/login.aspx";
b.style.height="210px"}i.appendChild(b);d.Display(i,c,f);a=setInterval(function(){CheckForLoginCookie(k)},1000);d.SetCloseButtonOnClick(function(){if(a){clearInterval(a)}d.CloseDialog()})};CheckForLoginCookie=function(j){if(ReadCookie("TrialUser")&&ReadCookie("TrialUser")=="false"){EraseCookie("TrialUser");
userIsTrial=false;if(leaseWizard){leaseWizard.Refresh()}}if(ReadCookie("LoggedIn")&&ReadCookie("LoggedIn")=="true"){EraseCookie("LoggedIn");if(newUser){try{var h=_gat._getTracker("UA-535903-1");h._trackPageview("/fakeurl/leasewizardsignup.aspx?gasignupgoal=")
}catch(i){}}if(a){clearInterval(a)}d.CloseDialog();if(j){j()}}};g.ShowLogOutBox=function(){var i=new EZLF.Shared.ModalDialog(true,null,true);var m=Elem("div");m.style.textAlign="center";var l=Elem("h1");
l.style.textAlign="center";l.style.marginLeft="0px";l.appendChild(Text("You have been logged out of ezLandlordForms.com"));m.appendChild(l);var k=Elem("button");if(!Pliner.Util.Display.IsIE(null,8)){k.type="button"
}k.className="YellowButton";k.style.paddingLeft="40px";k.style.paddingRight="40px";k.style.margin="10px";k.value="OK";k.innerHTML=k.value;var h=function(){i.CloseDialog();window.location="/";return false
};k.onclick=h;m.appendChild(k);m.appendChild(Elem("br"));m.appendChild(Elem("br"));var j=Elem("a");j.style.textDecoration="underline";j.style.textTransform="uppercase";j.appendChild(Text("Log Back Into ezLandlordForms"));
j.href="https://<%=Request.Url.Host %>/login.aspx";j.onclick=function(){i.CloseDialog();g.ShowLoginBox();return false};m.appendChild(j);i.Display(m,600,150);i.SetCloseButtonOnClick(h)}};var Login=new EZLF.Login();
