SetupNamespaces("EZLF");EZLF.DocumentProgressMonitor=function(a){var c={curtain:null,dialog:null,dialogWidth:750,dialogHeight:500,dialogPositionInterval:null,normalProgressArea:null,freeLeaseProgressArea:null,closeButton:null,documentsTitle:null,documentsStateGuarantee:null,documentsProgressBarOuter:null,documentsProgressBar:null,documentsProgressText:null,freeLeaseProgressBar:null,freeLeaseProgressText:null,isFirstUpdate:true,maxDocumentsFound:0,isFreeLeaseView:false,PositionDialog:function(){c.dialog.style.top=Pliner.Util.Display.FindScreenCenteredY(c.dialogHeight)+"px";
c.dialog.style.left=Pliner.Util.Display.FindScreenCenteredX(c.dialogWidth)+"px"},CloseDialog:function(){clearInterval(c.dialogPositionInterval);c.curtain.style.display="none";c.dialog.style.display="none";
try{dropbox.removeChild(c.curtain);dropbox.removeChild(c.dialog)}catch(d){}},SetupBuildProgress:function(){var f=Elem("div"),e=Elem("div");f.style.borderBottom="1px solid #797979";e.style.border="1px solid #DDDDDD";
e.style.height="417px";e.style.backgroundColor="#FFFFFF";e.style.textAlign="center";e.style.position="relative";c.documentsTitle=Elem("h3");c.documentsTitle.style.fontFamily="Arial, Helvetica, Sans-Serif";
c.documentsTitle.style.color="#000000";c.documentsTitle.style.fontSize="14px";c.documentsTitle.style.lineHeight="18px";c.documentsTitle.style.color="#000000";c.documentsTitle.style.fontWeight="bold";c.documentsTitle.style.margin="15px auto 10px auto";
c.documentsTitle.appendChild(Text("Preparing Your Documents"));e.appendChild(c.documentsTitle);var d=Elem("img");d.src="/images/layout2009/forms/builder-wizard/free-lease-popup.jpg";d.width=313;d.height=255;
d.alt="Sample Documents";e.appendChild(d);c.documentsStateGuarantee=Elem("h3");c.documentsStateGuarantee.style.fontFamily="Arial, Helvetica, Sans-Serif";c.documentsStateGuarantee.style.color="#000000";
c.documentsStateGuarantee.style.fontSize="14px";c.documentsStateGuarantee.style.lineHeight="18px";c.documentsStateGuarantee.style.fontWeight="bold";c.documentsStateGuarantee.style.margin="10px auto 15px auto";
c.documentsStateGuarantee.style.height="40px";e.appendChild(c.documentsStateGuarantee);c.documentsProgressBarOuter=Elem("div");c.documentsProgressBarOuter.style.margin="0 auto";c.documentsProgressBarOuter.style.width="286px";
c.documentsProgressBarOuter.style.height="20px";c.documentsProgressBarOuter.style.position="relative";c.documentsProgressBarOuter.style.border="1px solid #CCCCCC";c.documentsProgressText=Elem("div");c.documentsProgressText.style.position="absolute";
c.documentsProgressText.style.top=0;c.documentsProgressText.style.left=0;c.documentsProgressText.style.width="286px";c.documentsProgressText.style.textAlign="center";c.documentsProgressText.style.fontWeight="bold";
c.documentsProgressText.style.fontSize="11px";c.documentsProgressText.style.lineHeight="20px";c.documentsProgressText.style.zIndex=2;c.documentsProgressText.appendChild(Text("0%"));c.documentsProgressBarOuter.appendChild(c.documentsProgressText);
c.documentsProgressBar=Elem("div");c.documentsProgressBar.style.position="absolute";c.documentsProgressBar.style.top="2px";c.documentsProgressBar.style.left="2px";c.documentsProgressBar.style.width=0;c.documentsProgressBar.style.height="16px";
c.documentsProgressBar.style.backgroundColor="#3367CD";c.documentsProgressBar.style.overflow="hidden";c.documentsProgressBar.style.zIndex=1;c.documentsProgressBar.appendChild(Text(" "));c.documentsProgressBarOuter.appendChild(c.documentsProgressBar);
e.appendChild(c.documentsProgressBarOuter);f.appendChild(e);c.normalProgressArea.appendChild(f)},SetupFreeLeaseView:function(){c.normalProgressArea.style.width="348px";c.normalProgressArea.style.marginRight="15px";
c.freeLeaseProgressArea.style.display="block";c.freeLeaseProgressArea.style.width="348px";var h=Elem("div"),e=Elem("div");h.style.borderBottom="1px solid #797979";e.style.border="1px solid #DDDDDD";e.style.height="417px";
e.style.backgroundColor="#FFFFFF";e.style.textAlign="center";e.style.position="relative";var g=Elem("h3");g.style.fontFamily="Arial, Helvetica, Sans-Serif";g.style.color="#000000";g.style.fontSize="14px";
g.style.lineHeight="18px";g.style.color="#000000";g.style.fontWeight="bold";g.style.margin="15px auto 10px auto";g.appendChild(Text("Free Sample Lease"));e.appendChild(g);var f=Elem("img");f.src="/images/layout2009/forms/builder-wizard/free-lease-sample.jpg";
f.width=194;f.height=251;f.alt="Free Lease Sample";e.appendChild(f);freeLeaseDisclaimer=Elem("h3");freeLeaseDisclaimer.style.fontFamily="Arial, Helvetica, Sans-Serif";freeLeaseDisclaimer.style.color="#000000";
freeLeaseDisclaimer.style.fontSize="14px";freeLeaseDisclaimer.style.lineHeight="18px";freeLeaseDisclaimer.style.fontWeight="bold";freeLeaseDisclaimer.style.margin="14px auto 15px auto";freeLeaseDisclaimer.style.height="40px";
freeLeaseDisclaimer.appendChild(Text("Not State-Specific"));freeLeaseDisclaimer.appendChild(Elem("br"));freeLeaseDisclaimer.appendChild(Text("For Educational Purposes Only"));e.appendChild(freeLeaseDisclaimer);
var d=Elem("div");d.style.margin="0 auto";d.style.width="286px";d.style.height="20px";d.style.position="relative";d.style.border="1px solid #CCCCCC";c.freeLeaseProgressText=Elem("div");c.freeLeaseProgressText.style.position="absolute";
c.freeLeaseProgressText.style.top=0;c.freeLeaseProgressText.style.left=0;c.freeLeaseProgressText.style.width="286px";c.freeLeaseProgressText.style.textAlign="center";c.freeLeaseProgressText.style.fontWeight="bold";
c.freeLeaseProgressText.style.fontSize="11px";c.freeLeaseProgressText.style.lineHeight="20px";c.freeLeaseProgressText.style.zIndex=2;c.freeLeaseProgressText.appendChild(Text("0%"));d.appendChild(c.freeLeaseProgressText);
c.freeLeaseProgressBar=Elem("div");c.freeLeaseProgressBar.style.position="absolute";c.freeLeaseProgressBar.style.top="2px";c.freeLeaseProgressBar.style.left="2px";c.freeLeaseProgressBar.style.width=0;c.freeLeaseProgressBar.style.height="16px";
c.freeLeaseProgressBar.style.backgroundColor="#3367CD";c.freeLeaseProgressBar.style.overflow="hidden";c.freeLeaseProgressBar.style.zIndex=1;c.freeLeaseProgressBar.appendChild(Text(" "));d.appendChild(c.freeLeaseProgressBar);
e.appendChild(d);h.appendChild(e);c.freeLeaseProgressArea.appendChild(h)},DisplayFreeLeaseBuilding:function(e){if(e){ClearElem(c.documentsProgressBarOuter);c.documentsProgressBarOuter.style.borderWidth=0;
var g=Elem("a");g.style.fontFamily="Arial, Helvetica, Sans-Serif";g.style.fontSize="14px";g.style.lineHeight="18px";g.style.fontWeight="bold";g.style.textDecoration="underline";g.appendChild(Text("View Your Premium Lease Package"));
g.href="/members/documents/download.aspx?r="+e;g.target="_blank";c.documentsProgressBarOuter.appendChild(g)}var f=0,d=0;while(d<f){d++;setTimeout(function(h){return function(){c.freeLeaseProgressBar.style.width=Math.floor(282*(h/f))+"px";
ClearElem(c.freeLeaseProgressText);c.freeLeaseProgressText.appendChild(Text(Math.ceil((h/f)*100)+"%"))}}(d),d*1000)}setTimeout(function(){c.CloseDialog();c.DoBuildCompletionActions()},(d+2)*1000)},UpdateDocumentProgress:function(){var d=new Pliner.Util.Ajax.Message("/documentprogressbar.aspx",0);
d.AddOnCompletedEvent(function(j){var o=j.responseText.split("\n");var f=0,e=0,m,r="",h="",l=-1;for(var n=0;n<o.length;n++){if(o[n]&&o[n].length>0){var k=o[n].split("][");if(k.length==3){var g=k[0];var q=k[1];
var s=ParseInt(k[2]);r=g;h=q;e+=s;f++}else{if(k.length==1){l=k[0]}}}}if(f==0){m=100}else{m=Math.floor(e/f)}if(f>c.maxDocumentsFound){c.maxDocumentsFound=f}if(m>=100){if(c.isFreeLeaseView){c.DisplayFreeLeaseBuilding(l)
}else{c.DoBuildCompletionActions()}var i=Get("DocBuildingPrintMessage");if(i){ClearElem(i);i.appendChild(Text("Your Documents Have Been Created!"));i.appendChild(Elem("br"));var t=Elem("div"),p=Elem("a");
p.href="#";p.onclick=function(){window.location.reload(true);return false};p.appendChild(Text("refresh your current page"));t.style.fontSize="12px";t.appendChild(Text("You may need to "));t.appendChild(p);
t.appendChild(Text(" for any completed documents to appear."));i.appendChild(t)}}else{if(f==1){if(userIsTrial&&c.isFirstUpdate&&r.indexOf("Lease Package")>=0){c.isFreeLeaseView=true;c.SetupFreeLeaseView()
}}else{r="Creating Your "+c.maxDocumentsFound+" Documents";h=""}ClearElem(c.documentsTitle);c.documentsTitle.appendChild(Text(r));ClearElem(c.documentsStateGuarantee);if(h){c.documentsStateGuarantee.appendChild(Text("Guaranteed to Comply With"));
c.documentsStateGuarantee.appendChild(Elem("br"));c.documentsStateGuarantee.appendChild(Text(h+" Law"))}c.documentsProgressBar.style.width=Math.floor(282*(m/100))+"px";ClearElem(c.documentsProgressText);
c.documentsProgressText.appendChild(Text(m+"%"));var i=Get("DocBuildingPrintMessage");if(i){ClearElem(i);i.appendChild(Text(c.maxDocumentsFound+" Document"+((c.maxDocumentsFound!=1)?"s are":" is")+" Still Being Created for You!"));
i.appendChild(Elem("br"));var t=Elem("div");t.style.fontSize="12px";t.appendChild(Text("Your documents will be ready to print shortly. This message will update when your documents finish."));i.appendChild(t)
}setTimeout(c.UpdateDocumentProgress,500)}c.isFirstUpdate=false});ajaxConnection.AddToQueue(d)},DoBuildCompletionActions:function(){if(window.location.href.indexOf("/members/manageleases.aspx")!=-1||window.location.href.indexOf("/members/documents/")!=-1){window.location.reload(true)
}else{c.CloseDialog();var e=Get("LiPrintMenuItem");var d=Elem("div"),f=Elem("img");d.style.position="absolute";d.style.top=(Pliner.Util.Display.FindYPosition(e)-16)+"px";d.style.left=(Pliner.Util.Display.FindXPosition(e)+26)+"px";
d.style.zIndex=100;d.style.fontWeight="bold";d.style.color="#006600";d.style.fontStyle="italic";d.style.fontSize="11px";f.src="/images/arrow_green_down.gif";f.width=6;f.height=12;f.align="absmiddle";d.appendChild(f);
d.appendChild(Text(" Print Your Documents Here"));Get("ElementDropBox").appendChild(d)}}};var b={DisplayProgress:function(j){var d=Get("ElementDropBox");var i=((document.height)?document.height:document.body.offsetHeight)+20;
var g=((document.width)?document.width:document.body.offsetWidth)+20;if(document.documentElement.clientHeight>i){i=document.documentElement.clientHeight}c.curtain=Elem("div");c.curtain.className="DialogCurtain";
c.curtain.style.height=Math.ceil(i)+"px";c.curtain.style.width=Math.ceil(g)+"px";c.curtain.appendChild(Text(" "));c.dialog=Elem("div");c.dialog.style.position="absolute";c.dialog.style.backgroundColor="#F3F3F3";
c.dialog.style.padding="15px 18px 20px 18px";c.dialog.style.width=(c.dialogWidth-18-18)+"px";c.dialog.style.height=(c.dialogHeight-15-20)+"px";c.dialog.style.zIndex=201;d.appendChild(c.curtain);d.appendChild(c.dialog);
c.PositionDialog();c.dialogPositionInterval=setInterval(c.PositionDialog,500);var e=Elem("h2");e.style.fontFamily="Arial, Helvetica, Sans-Serif";e.style.fontSize="20px";e.style.lineHeight="26px";e.style.fontWeight="bold";
e.style.color="#000000";e.style.margin="5px auto 15px auto";e.appendChild(Text("Creating Your Documents"));c.dialog.appendChild(e);var h=Elem("div"),f=Elem("div");f.style.clear="both";c.normalProgressArea=Elem("div");
typeof(c.normalProgressArea.style.cssFloat)!="undefined"?c.normalProgressArea.style.cssFloat="left":c.normalProgressArea.style.styleFloat="left";c.normalProgressArea.style.width="714px";c.normalProgressArea.style.height="420px";
c.freeLeaseProgressArea=Elem("div");typeof(c.freeLeaseProgressArea.style.cssFloat)!="undefined"?c.freeLeaseProgressArea.style.cssFloat="left":c.freeLeaseProgressArea.style.styleFloat="left";c.freeLeaseProgressArea.style.display="none";
c.freeLeaseProgressArea.style.height="420px";h.appendChild(c.normalProgressArea);h.appendChild(c.freeLeaseProgressArea);c.dialog.appendChild(h);c.dialog.appendChild(f);c.SetupBuildProgress();c.UpdateDocumentProgress()
}};return b};
