var d,dom,ie,ie4,ie5x,moz,mac,win,lin,old,ie5mac,ie5xwin,op;function DetectBroser(){d=document;n=navigator;na=n.appVersion;nua=n.userAgent;win=na.indexOf("Win")!=-1;mac=na.indexOf("Mac")!=-1;lin=nua.indexOf("Linux")!=-1;if(!d.layers){dom=d.getElementById;op=nua.indexOf("Opera")!=-1;konq=nua.indexOf("Konqueror")!=-1;saf=nua.indexOf("Safari")!=-1;moz=nua.indexOf("Gecko")!=-1&&!saf&&!konq;ie=d.all&&!op;ie4=ie&&!dom;ie5x=d.all&&dom;ie5mac=mac&&ie5x;ie5xwin=win&&ie5x}}function IsMozilla(){DetectBroser();return moz}var addLoadEvent=function(a){if(window.addEventListener)window.addEventListener("load",a,false);else window.attachEvent("onload",a)},progressBarId="";function ShowProgress(){progessBar=document.getElementById(progressBarId);if(progessBar!="undefined")progessBar.style.display=""}function closePanel(b){var a=$find(b);a!=null&&a.collapsePanel(null)}function openPanel(b){var a=$find(b);a!=null&&a.expandPanel(null)}function SyncDropDowns(a,b,c){changedValue=parseFloat(a.options[a.selectedIndex].value);syncValue=parseFloat(b.options[b.selectedIndex].value);if(changedValue=="NaN")changedValue=0;if(syncValue=="NaN")syncValue=0;if(c)changedValue<syncValue&&SelectValue(b,a.options[a.selectedIndex].value);else changedValue>syncValue&&SelectValue(b,a.options[a.selectedIndex].value)}function SelectValue(b,c){for(var a=0;a<b.length;a++)if(b[a].value==c){b.selectedIndex=a;break}}try{document.createElement("a");HTMLAnchorElement.prototype.click=function(){if(typeof this.onclick=="function")this.onclick({type:"click"})&&this.href&&window.open(this.href,this.target?this.target:"_self");else this.href&&window.open(this.href,this.target?this.target:"_self")}}catch(e){}function Mortgage_EN_Calculate(){var i=$get("IR").value.replace(/\$/g,"").replace(/,/g,""),j=$get("YR").value.replace(/\$/g,"").replace(/,/g,""),e=$get("LA").value.replace(/\$/g,"").replace(/,/g,""),b=$get("AT").value.replace(/\$/g,"").replace(/,/g,"");if(b=="")b="0";for(var d=$get("AI").value.replace(/\$/g,"").replace(/,/g,""),c=parseFloat(i)/1200,a=1,g=1+c,f=0;f<parseFloat(j)*12;f++)a=a*g;$get("PI").value=Math.round(parseFloat(e)*c/(1-1/a)*100)/100;$get("MT").value=Math.round(parseFloat(b)/12*100)/100;$get("MI").value=Math.round(parseFloat(d)/12*100)/100;var h=parseFloat(e)*c/(1-1/a)+parseFloat(b)/12+parseFloat(d)/12;$get("MP").value=Math.round(h*100)/100}function fnTrapKD(c,a){var b=document.getElementById(c);if(document.all){if(a.keyCode==13){a.returnValue=false;a.cancel=true;b.click()}}else if(document.getElementById)if(a.which==13){a.returnValue=false;a.cancel=true;b.focus();b.click()}}function clickButton(b,c){var d=b?b:window.event,a=document.getElementById(c);if(a)if(d.keyCode==13){a.click();return false}}function bookmark_us(c,b){if(window.sidebar)window.sidebar.addPanel(b,c,"");else if(window.opera&&window.print){var a=document.createElement("a");a.setAttribute("href",c);a.setAttribute("title",b);a.setAttribute("rel","sidebar");a.click()}else document.all&&window.external.AddFavorite(c,b)}function GetSynchronousJSONResponse(b,d){var a=null;if(window.XMLHttpRequest)a=new XMLHttpRequest;else if(window.ActiveXObject)if(new ActiveXObject("Microsoft.XMLHTTP"))a=new ActiveXObject("Microsoft.XMLHTTP");else a=new ActiveXObject("Msxml2.XMLHTTP");b=b+"?rnd="+Math.random();a.open("POST",b,false);a.setRequestHeader("Content-Type","application/json; charset=utf-8");a.send(d);var c=a.responseText;return c}function ReceiveStringData(c,b){var a=FCKeditorAPI.GetInstance(b.id);if(a.EditorWindow==null){a.SwitchEditMode();setTimeout(function(){ReplaceFckTxt(a,c,b)},500)}else ReplaceFckTxt(a,c,b)}function ReplaceFckTxt(d,e){var a=d.EditorWindow.parent.FCK.GetHTML(),b="<!--Begins Signature-->",g=a.indexOf(b);b=a.substring(0,g+23);var c="<!--Ends Signature-->",f=a.indexOf(c);c=a.substring(f);a=b+e+c;d.SetHTML(a)}function MicrosoftAjaxHack(){try{Sys.Browser.WebKit={};if(navigator.userAgent.indexOf("WebKit/")>-1){Sys.Browser.agent=Sys.Browser.WebKit;Sys.Browser.version=parseFloat(navigator.userAgent.match(/WebKit\/(\d+(\.\d+)?)/)[1]);Sys.Browser.name="WebKit"}}catch(a){}}function Receive_cbListing_ServerData(){}addLoadEvent(MicrosoftAjaxHack)
