function AutoFillEditor(a,b,e,c,d,f){this.SenderDisplayElem=a;this.RecipientDisplayElem=b;this.UserID=e;this.BuiltID=c;this.LeaseID=d;this.PropertyID=f;this.propertySelectOnly=false;this.LoadingImage=new Image();
this.LoadingImage.src="/images/loading.gif";this.PositionInterval=null;this.SenderName="";this.SenderCompany="";this.SenderAddressLine1="";this.SenderAddressLine2="";this.SenderCity="";this.SenderState="";
this.SenderCountry="";this.SenderZipCode="";this.SenderPhoneNumber="";this.SenderFaxNumber="";this.SenderEmail="";this.RecipientName="";this.RecipientAddressLine1="";this.RecipientAddressLine2="";this.RecipientCity="";
this.RecipientState="";this.RecipientCountry="";this.RecipientZipCode=""}AutoFillEditor.prototype.EditSender=function(){var j=this.ShowDialog();var m,l,i,f,o,h,g,e,p,d,k,q,a,c,b;var n=this;m=Elem("div");
m.style.fontWeight="bold";m.style.fontSize="16px";m.appendChild(Text("Format the Landlord's Auto-Fill Address"));j.appendChild(m);m=Elem("div");l=Elem("a");l.style.fontSize="12px";l.style.color="#FF0000";
l.href="#";l.onclick=function(){n.EditRecipient();return false};l.appendChild(Text("Switch to the Tenant's Auto-Fill Address"));m.appendChild(Text("   » "));m.appendChild(l);j.appendChild(m);j.appendChild(Elem("br"));
m=Elem("div");l=Elem("img");l.src="/images/info_icon.png";l.width=16;l.height=16;l.align="absmiddle";m.appendChild(l);l=Elem("strong");l.style.color="#4464DC";l.style.fontStyle="italic";l.appendChild(Text("Tip:"));
m.appendChild(l);l=Elem("a");l.href="/members/settings.aspx";l.target="_blank";l.appendChild(Text("here"));i=Elem("span");i.style.fontSize="11px";i.style.color="#666666";i.appendChild(Text(" Use this form to format the Auto-Fill Information on this document.  Updating the formatting here will not make any changes to the actual address information stored for your leases, properties, or on your account profile.  You can change the stored address information "));
i.appendChild(l);i.appendChild(Text("."));m.appendChild(i);j.appendChild(m);j.appendChild(Elem("br"));m=Elem("table");m.align="center";m.cellpadding="1";m.cellspacing="0";l=m.insertRow(m.rows.length);i=l.insertCell(l.cells.length);
f=l.insertCell(l.cells.length);h=Elem("input");h.type="text";h.maxlength="150";h.value=this.SenderName;h.style.width="250px";i.appendChild(Text("Name: "));f.appendChild(h);l=m.insertRow(m.rows.length);
i=l.insertCell(l.cells.length);f=l.insertCell(l.cells.length);g=Elem("input");g.type="text";g.maxlength="128";g.value=this.SenderAddressLine1;g.style.width="250px";i.appendChild(Text("Street Address: "));
f.appendChild(g);l=m.insertRow(m.rows.length);i=l.insertCell(l.cells.length);f=l.insertCell(l.cells.length);e=Elem("input");e.type="text";e.maxlength="128";e.value=this.SenderAddressLine2;e.style.width="250px";
i.appendChild(Text("Apt./Unit Number: "));f.appendChild(e);l=m.insertRow(m.rows.length);i=l.insertCell(l.cells.length);f=l.insertCell(l.cells.length);p=Elem("input");p.type="text";p.maxlength="128";p.value=this.SenderCity;
p.style.width="150px";d=Elem("input");d.type="text";d.maxlength="2";d.value=this.SenderState;d.style.width="30px";k=Elem("input");k.type="text";k.maxlength="2";k.value=this.SenderCountry;k.style.width="30px";
q=Elem("input");q.type="text";q.maxlength="12";q.value=this.SenderZipCode;q.style.width="70px";i.appendChild(Text("City/State/Zip: "));f.appendChild(p);f.appendChild(Text(" "));f.appendChild(d);f.appendChild(Text(" "));
f.appendChild(q);f.appendChild(Text(" "));f.appendChild(k);l=m.insertRow(m.rows.length);i=l.insertCell(l.cells.length);f=l.insertCell(l.cells.length);a=Elem("input");a.type="text";a.maxlength="32";a.value=this.SenderPhoneNumber;
a.style.width="250px";i.appendChild(Text("Phone: "));f.appendChild(a);l=m.insertRow(m.rows.length);i=l.insertCell(l.cells.length);f=l.insertCell(l.cells.length);c=Elem("input");c.type="text";c.maxlength="32";
c.value=this.SenderFaxNumber;c.style.width="250px";i.appendChild(Text("Fax: "));f.appendChild(c);l=m.insertRow(m.rows.length);i=l.insertCell(l.cells.length);f=l.insertCell(l.cells.length);b=Elem("input");
b.type="text";b.maxlength="128";b.value=this.SenderEmail;b.style.width="250px";i.appendChild(Text("Email: "));f.appendChild(b);l=m.insertRow(m.rows.length);i=l.insertCell(l.cells.length);i.colSpan=2;i.style.textAlign="center";
o=Elem("input");o.type="button";o.value="Update";o.onclick=function(){n.SaveSender(j,o,h.value,g.value,e.value,p.value,d.value,k.value,q.value,a.value,c.value,b.value);return false};i.appendChild(o);j.appendChild(m);
m=l=i=f=null};AutoFillEditor.prototype.EditRecipient=function(){var j=this.ShowDialog();var m,l,i,f,o,h,g,e,p,d,k,q,a,c,b;var n=this;m=Elem("div");m.style.fontWeight="bold";m.style.fontSize="16px";m.appendChild(Text("Format the Tenant's Auto-Fill Address"));
j.appendChild(m);m=Elem("div");l=Elem("a");l.style.fontSize="12px";l.style.color="#FF0000";l.href="#";l.onclick=function(){n.EditSender();return false};l.appendChild(Text("Switch to the Landlord's Auto-Fill Address"));
m.appendChild(Text("   » "));m.appendChild(l);j.appendChild(m);j.appendChild(Elem("br"));m=Elem("div");l=Elem("img");l.src="/images/info_icon.png";l.width=16;l.height=16;l.align="absmiddle";m.appendChild(l);
l=Elem("strong");l.style.color="#4464DC";l.style.fontStyle="italic";l.appendChild(Text("Tip:"));m.appendChild(l);l=Elem("a");l.href="/members/settings.aspx";l.target="_blank";l.appendChild(Text("here"));
i=Elem("span");i.style.fontSize="11px";i.style.color="#666666";i.appendChild(Text(" Use this form to format the Auto-Fill Information on this document.  Updating the formatting here will not make any changes to the actual address information stored for your leases, properties, or on your account profile.  You can change the stored address information "));
i.appendChild(l);i.appendChild(Text("."));m.appendChild(i);j.appendChild(m);j.appendChild(Elem("br"));m=Elem("table");m.align="center";l=m.insertRow(m.rows.length);i=l.insertCell(l.cells.length);f=l.insertCell(l.cells.length);
h=Elem("input");h.type="text";h.maxlength="150";h.value=this.RecipientName;h.style.width="250px";i.appendChild(Text("Name: "));f.appendChild(h);l=m.insertRow(m.rows.length);i=l.insertCell(l.cells.length);
f=l.insertCell(l.cells.length);g=Elem("input");g.type="text";g.maxlength="128";g.value=this.RecipientAddressLine1;g.style.width="250px";i.appendChild(Text("Street Address: "));f.appendChild(g);l=m.insertRow(m.rows.length);
i=l.insertCell(l.cells.length);f=l.insertCell(l.cells.length);e=Elem("input");e.type="text";e.maxlength="128";e.value=this.RecipientAddressLine2;e.style.width="250px";i.appendChild(Text("Apt./Unit Number: "));
f.appendChild(e);l=m.insertRow(m.rows.length);i=l.insertCell(l.cells.length);f=l.insertCell(l.cells.length);p=Elem("input");p.type="text";p.maxlength="128";p.value=this.RecipientCity;p.style.width="150px";
d=Elem("input");d.type="text";d.maxlength="30";d.value=this.RecipientState;d.style.width="30px";k=Elem("input");k.type="text";k.maxlength="30";k.value=this.RecipientCountry;k.style.width="30px";q=Elem("input");
q.type="text";q.maxlength="12";q.value=this.RecipientZipCode;q.style.width="70px";i.appendChild(Text("City/State/Zip/Country: "));f.appendChild(p);f.appendChild(Text(" "));f.appendChild(d);f.appendChild(Text(" "));
f.appendChild(q);f.appendChild(Text(" "));f.appendChild(k);l=m.insertRow(m.rows.length);i=l.insertCell(l.cells.length);i.colSpan=2;i.style.textAlign="center";o=Elem("input");o.type="button";o.value="Update";
o.onclick=function(){n.SaveRecipient(j,o,h.value,g.value,e.value,p.value,d.value,k.value,q.value);return false};i.appendChild(o);j.appendChild(m);m=l=i=f=null};AutoFillEditor.prototype.SaveSender=function(j,f,o,n,m,e,k,h,i,c,p,d){this.SenderName=o;
this.SenderCompany=o;this.SenderAddressLine1=n;this.SenderAddressLine2=m;this.SenderCity=e;this.SenderState=k;this.SenderCountry=h;this.SenderZipCode=i;this.SenderPhoneNumber=c;this.SenderFaxNumber=p;this.SenderEmail=d;
var l=this;var b=Elem("div");var g=Elem("img");g.src=this.LoadingImage.src;g.width=16;g.height=16;g.align="absmiddle";b.style.textAlign="center";b.style.fontWeight="bold";b.style.color="#12167D";b.appendChild(g);
b.appendChild(Text(" Saving Your Changes"));j.appendChild(b);f.disabled=true;var a=new Pliner.Util.Ajax.Message("/wizards/ajax/saveautofillprofile.aspx?bid="+escape(this.BuiltID)+"&lid="+escape(this.LeaseID)+"&pid="+escape(this.PropertyID)+"&sname="+escape(this.SenderName)+"&sa1="+escape(this.SenderAddressLine1)+"&sa2="+escape(this.SenderAddressLine2)+"&scity="+escape(this.SenderCity)+"&sstate="+escape(this.SenderState)+"&scountry="+escape(this.SenderCountry)+"&szip="+escape(this.SenderZipCode)+"&sphone="+escape(this.SenderPhoneNumber)+"&sfax="+escape(this.SenderFaxNumber)+"&semail="+escape(this.SenderEmail)+"&rname="+escape(this.RecipientName)+"&ra1="+escape(this.RecipientAddressLine1)+"&ra2="+escape(this.RecipientAddressLine2)+"&rcity="+escape(this.RecipientCity)+"&rstate="+escape(this.RecipientState)+"&rcountry="+escape(this.RecipientCountry)+"&rzip="+escape(this.RecipientZipCode),0);
a.AddOnCompletedEvent(function(q){l.SenderSaved(q.responseText)});ajaxConnection.AddToQueue(a);j=null};AutoFillEditor.prototype.SenderSaved=function(a){this.HideDialog();this.DisplaySender()};AutoFillEditor.prototype.SaveRecipient=function(h,e,i,l,k,m,d,f,c){this.RecipientName=i;
this.RecipientAddressLine1=l;this.RecipientAddressLine2=k;this.RecipientCity=m;this.RecipientState=d;this.RecipientCountry=f;this.RecipientZipCode=c;var j=this;var b=Elem("div");var g=Elem("img");g.src=this.LoadingImage.src;
g.width=16;g.height=16;g.align="absmiddle";b.style.textAlign="center";b.style.fontWeight="bold";b.style.color="#12167D";b.appendChild(g);b.appendChild(Text(" Saving Your Changes"));h.appendChild(b);e.disabled=true;
var a=new Pliner.Util.Ajax.Message("/wizards/ajax/saveautofillprofile.aspx?bid="+escape(this.BuiltID)+"&lid="+escape(this.LeaseID)+"&pid="+escape(this.PropertyID)+"&sname="+escape(this.SenderName)+"&sa1="+escape(this.SenderAddressLine1)+"&sa2="+escape(this.SenderAddressLine2)+"&scity="+escape(this.SenderCity)+"&sstate="+escape(this.SenderState)+"&scountry="+escape(this.SenderCountry)+"&szip="+escape(this.SenderZipCode)+"&sphone="+escape(this.SenderPhoneNumber)+"&sfax="+escape(this.SenderFaxNumber)+"&semail="+escape(this.SenderEmail)+"&rname="+escape(this.RecipientName)+"&ra1="+escape(this.RecipientAddressLine1)+"&ra2="+escape(this.RecipientAddressLine2)+"&rcity="+escape(this.RecipientCity)+"&rstate="+escape(this.RecipientState)+"&rcountry="+escape(this.RecipientCountry)+"&rzip="+escape(this.RecipientZipCode),0);
a.AddOnCompletedEvent(function(n){j.RecipientSaved(n.responseText)});ajaxConnection.AddToQueue(a);h=null};AutoFillEditor.prototype.RecipientSaved=function(a){this.HideDialog();this.DisplayRecipient()};
AutoFillEditor.prototype.ShowDialog=function(){clearInterval(this.PositionInterval);var d=Get("DivAutoFillCurtain");var g=Get("DivAutoFillDialog");var b=Get("ElementDropBox");var f=Math.max(document.documentElement.clientHeight,((document.height)?document.height:document.body.offsetHeight)+20);
var c=Math.max(document.body.clientWidth+20,980);if(d==null){d=Elem("div");d.id="DivAutoFillCurtain";b.appendChild(d);d.style.height=Math.ceil(f)+"px";d.style.width=Math.ceil(c)+"px";d.style.margin="0px auto";
d.style.backgroundColor="#FFFFFF";d.style.zIndex=200;d.style.opacity=0.8;d.style.filter="alpha(opacity=80)";d.style.position="absolute";d.style.top="0";d.style.left="0";d.appendChild(Text(" "))}if(g==null){var h=Elem("a");
var e=Elem("div");var a=this;g=Elem("div");g.id="DivAutoFillDialog";b.appendChild(g);g.style.zIndex=200;g.style.textAlign="left";g.style.color="#111133";g.style.padding="10px";g.style.border="2px solid #111133";
g.style.height="350px";g.style.width="566px";g.style.position="absolute";g.style.background="#FFFFFF url(/images/doclib/doc_blue_bg.jpg) repeat-x scroll center top";h.className="CloseLink";h.href="#";h.onclick=function(){a.HideDialog();
return false};h.appendChild(Text("Close"));g.appendChild(h);e.id="DivAutoFillDialogContents";g.appendChild(e);e=h=null;this.PositionDialog()}else{ClearChildNodes(Get("DivAutoFillDialogContents"))}d.style.display="block";
g.style.display="block";b=d=null;var a=this;this.PositionInterval=setInterval(function(){a.PositionDialog()},250);return Get("DivAutoFillDialogContents")};AutoFillEditor.prototype.HideDialog=function(){clearInterval(this.PositionInterval);
var a=Get("DivAutoFillCurtain");var b=Get("DivAutoFillDialog");if(a!=null){a.style.display="none"}if(b!=null){b.style.display="none"}b=a=null};AutoFillEditor.prototype.PositionDialog=function(){var a=Get("DivAutoFillDialog");
a.style.top=GetScreenCenteredY(350)+"px";a.style.left=GetScreenCenteredX(566)+"px";a=null};AutoFillEditor.prototype.DisplaySender=function(){var a=Get(this.SenderDisplayElem);ClearChildNodes(a);var b=Elem("div");
if(this.SenderCompany!=null&&this.SenderCompany.length>0){b.appendChild(Text(this.SenderCompany))}else{if(this.SenderName!=null&&this.SenderName.length>0){b.appendChild(Text(this.SenderName))}else{b.appendChild(FormatError("Name?"))
}}a.appendChild(b);b=Elem("div");if(this.SenderAddressLine1!=null&&this.SenderAddressLine1.length>0){b.appendChild(Text(this.SenderAddressLine1))}else{b.appendChild(FormatError("Address?"))}a.appendChild(b);
if(this.SenderAddressLine2!=null&&this.SenderAddressLine2.length>0){b=Elem("div");b.appendChild(Text(this.SenderAddressLine2));a.appendChild(b)}b=Elem("div");if(this.SenderCity!=null&&this.SenderCity.length>0){b.appendChild(Text(this.SenderCity))
}else{b.appendChild(FormatError("City?"))}b.appendChild(Text(" "));if(this.SenderState!=null&&this.SenderState.length>0){b.appendChild(Text(this.SenderState));b.appendChild(Text(", "))}else{b.appendChild(FormatError("State?"))
}if(this.SenderZipCode!=null&&this.SenderZipCode.length>0){b.appendChild(Text(this.SenderZipCode))}else{b.appendChild(FormatError("Zip?"))}b.appendChild(Text(" "));if(this.SenderCountry!=null&&this.SenderCountry.length>0){b.appendChild(Text(this.SenderCountry))
}else{b.appendChild(FormatError("Country?"))}a.appendChild(b);b=Elem("div");b.style.height="4px";a.appendChild(b);if(this.SenderPhoneNumber!=null&&this.SenderPhoneNumber.length>0){b=Elem("div");b.appendChild(Text("Phone: "));
b.appendChild(Text(this.SenderPhoneNumber));a.appendChild(b)}if(this.SenderFaxNumber!=null&&this.SenderFaxNumber.length>0){b=Elem("div");b.appendChild(Text("Fax: "));b.appendChild(Text(this.SenderFaxNumber));
a.appendChild(b)}if((this.SenderPhoneNumber!=null&&this.SenderPhoneNumber.length>0)||(this.SenderFaxNumber!=null&&this.SenderFaxNumber.length>0)){b=Elem("div");b.style.height="4px";a.appendChild(b)}b=Elem("div");
b.appendChild(Text("Email: "));b.appendChild(Text(this.SenderEmail));a.appendChild(b);editImg=editLink=b=a=null};AutoFillEditor.prototype.DisplayRecipient=function(){var a=Get(this.RecipientDisplayElem);
ClearChildNodes(a);var b=Elem("div");if(!this.propertySelectOnly){if(this.RecipientName!=null&&this.RecipientName.length>0){b.appendChild(Text(this.RecipientName))}else{b.appendChild(FormatError("Name?"))
}a.appendChild(b)}b=Elem("div");if(this.RecipientAddressLine1!=null&&this.RecipientAddressLine1.length>0){b.appendChild(Text(this.RecipientAddressLine1))}else{b.appendChild(FormatError("Address?"))}a.appendChild(b);
if(this.RecipientAddressLine2!=null&&this.RecipientAddressLine2.length>0){b=Elem("div");b.appendChild(Text(this.RecipientAddressLine2));a.appendChild(b)}b=Elem("div");if(this.RecipientCity!=null&&this.RecipientCity.length>0){b.appendChild(Text(this.RecipientCity))
}else{b.appendChild(FormatError("City?"))}b.appendChild(Text(" "));if(this.RecipientState!=null&&this.RecipientState.length>0){b.appendChild(Text(this.RecipientState));b.appendChild(Text(", "))}else{b.appendChild(FormatError("State?"))
}if(this.RecipientZipCode!=null&&this.RecipientZipCode.length>0){b.appendChild(Text(this.RecipientZipCode))}else{b.appendChild(FormatError("Zip?"))}b.appendChild(Text(" "));if(this.RecipientCountry!=null&&this.RecipientCountry.length>0){b.appendChild(Text(this.RecipientCountry))
}else{b.appendChild(FormatError("Country?"))}a.appendChild(b);editImg=editLink=b=a=null};function FormatError(b){var a=Elem("div");a.style.color="#B81818";a.appendChild(Text(b));return a};
