function close_this_window(){if(opener.closed){}else{opener.focus()}window.close()}function close_this_window_reload(){if(opener.closed){}else{opener.location.reload();opener.focus()}window.close()}var activeWindow=new Array();function createWindow(C,B,D,A){if(D>screen.width){D=screen.width-20}if(A>screen.height){A=screen.height-20}if(activeWindow[B]){activeWindow[B].close()}hmiddle=Math.floor((screen.width-D)/2);vmiddle=Math.floor((screen.height-A)/3);activeWindow[B]=window.open(C,B,"left="+hmiddle+",top="+vmiddle+",scrollbars=yes,resizable=yes,location=no,status=yes,toolbar=no,menubar=no,width="+D+",height="+A);activeWindow[B].focus();return false}var master=new Array();var currentPic=new Array();function slap(){var D=0;var C=0;for(key in master){for(C=0;C<master[key].length;C++){var E=master[key][C].width;var A=master[key][C].height;var F=master[key][C].src;var B=new Image(E,A);B.src=F;master[key][C]=B}}}function addPic(C,E,D,A){if(master[C]==null){currentPic[C]=0;master[C]=new Array()}var F=new Image(D,A);F.src=E;var B=master[C].length;master[C][B]=F}function nextFile(A){currentPic[A]++;if(currentPic[A]==master[A].length){currentPic[A]=0}return master[A][currentPic[A]]}function prevFile(A){currentPic[A]--;if(currentPic[A]<0){currentPic[A]=master[A].length-1}return master[A][currentPic[A]]}function next(B){var A=document.getElementById(B);var C=nextFile(B);A.innerHTML='<img border=0 src="'+C.src+'" width="'+C.width+'" height="'+C.height+'">'}function prev(B){var A=document.getElementById(B);var C=prevFile(B);A.innerHTML='<img border=0 src="'+C.src+'" width="'+C.width+'" height="'+C.height+'">'}preview_index=Array();preview_max=Array();preview_url=Array();function changepic(A,B){preview_index[A]+=B;if(preview_url[A][preview_index[A]]){document.images[A].src=preview_url[A][preview_index[A]].src}else{if(B=="+1"){preview_index[A]=0;document.images[A].src=preview_url[A][preview_index[A]].src}else{preview_index[A]=preview_max[A];document.images[A].src=preview_url[A][preview_index[A]].src}}}function swap(C,B){var A=document.getElementById(C);A.src=B}function createFlash(E,A,I,B,G,C,D,H,F){if(!(A&&I&&B)){return }if(!C){C="noscale"}if(!G){G="high"}if(!D){D=""}if(!H){H=""}if(!F){F=""}var J="";J=J+'<object class="tplgenswf" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+A+'" height="'+I+'" id="'+E+'" align="middle">';J=J+'<param name="movie" value="'+B+'" />';J=J+'<param name="quality" value="'+G+'" />';J=J+'<param name="scale" value="'+C+'" />';J=J+'<param name="wmode" value="transparent" />';J=J+'<param name="bgcolor" value="'+D+'" />';J=J+'<param name="salign" value="'+H+'" />';J=J+'<param name="FlashVars" value="'+F+'" />';J=J+'<param name="swLiveConnect" value="true" />';J=J+'<param name="allowScriptAccess" value="always" />';J=J+'<embed swLiveConnect="true" allowScriptAccess="always" FlashVars="'+F+'" scale="'+C+'" bgcolor="'+D+'" src="'+B+'" quality="'+G+'" wmode="transparent" width="'+A+'" height="'+I+'" name="'+E+'" salign="'+H+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';J=J+"</object>";document.write(J)}function bookmark(B,A){if(window.sidebar){window.sidebar.addPanel(A,B,"")}else{if(window.external.AddFavorite){window.external.AddFavorite(B,A)}else{alert("Press CTRL+D or Command+D to bookmark this page.")}}return false}function setCollapse(F,B){if(B==0){return false}var E=F.parentNode.getElementsByTagName("ul");if(E.length==0){return false}var A=E[0].style.display;if(B==1){var D=YAHOO.util.Dom.getElementsByClassName("tplm_pages_open","","rnd_menu");for(var C=0;C<D.length;C++){YAHOO.util.Dom.replaceClass(D[C],"tplm_pages_open","tplm_pages_closed");D[C].style.display="none"}}if(A!="block"){E[0].style.display="block";YAHOO.util.Dom.replaceClass(E[0],"tplm_pages_closed","tplm_pages_open")}else{E[0].style.display="none";YAHOO.util.Dom.replaceClass(E[0],"tplm_pages_open","tplm_pages_closed")}return false}function setDropAction(){var A=document.getElementById("tplm_drop")}var m_dropTimer=-1;function setDropCollapse(G,B){var F=document.getElementById(G);var E=F.parentNode.getElementsByTagName("ul");if(E.length==0){return false}var A=E[0].style.display;var D=YAHOO.util.Dom.getElementsByClassName("tplm_pages_open","","tplm_drop");for(var C=0;C<D.length;C++){if(D[C]!=E[0]){YAHOO.util.Dom.replaceClass(D[C],"tplm_pages_open","tplm_pages_closed");D[C].style.display="none"}}if(A!="block"){E[0].style.position="absolute";YAHOO.util.Dom.replaceClass(E[0],"tplm_pages_closed","tplm_pages_open");E[0].style.width="150px";E[0].style.zIndex="3100";E[0].parentNode.style.zIndex="3100";E[0].parentNode.parentNode.style.position="static";E[0].parentNode.parentNode.style.zIndex="3098";E[0].style.display="block";resetDrop(E[0].id)}else{}return false}function setDropHide(B){var A=document.getElementById(B);if(!A){return false}A.style.display="none";YAHOO.util.Dom.replaceClass(A,"tplm_pages_open","tplm_pages_closed");return false}function clearDrop(){window.clearTimeout(m_dropTimer);return false}function resetDrop(A){m_dropTimer=setTimeout("setDropHide('"+A+"')",900);return false}try{document.execCommand("BackgroundImageCache",false,true)}catch(e){};
function Loan(){var housePrice;var IR;var dpayment;var years;var monthPay;var month;switch(document.calcform.startm.value){case"january":document.calcform.startm.value="0";parseInt(document.calcform.startm.value);break;case"february":document.calcform.startm.value="1";parseInt(document.calcform.startm.value);break;case"march":document.calcform.startm.value="2";parseInt(document.calcform.startm.value);break;case"april":document.calcform.startm.value="3";parseInt(document.calcform.startm.value);break;case"may":document.calcform.startm.value="4";parseInt(document.calcform.startm.value);break;case"june":document.calcform.startm.value="5";parseInt(document.calcform.startm.value);break;case"july":document.calcform.startm.value="6";parseInt(document.calcform.startm.value);break;case"august":document.calcform.startm.value="7";parseInt(document.calcform.startm.value);break;case"september":document.calcform.startm.value="8";parseInt(document.calcform.startm.value);break;case"october":document.calcform.startm.value="9";parseInt(document.calcform.startm.value);break;case"november":document.calcform.startm.value="10";parseInt(document.calcform.startm.value);break;case"december":document.calcform.startm.value="11";parseInt(document.calcform.startm.value);break;default:document.calcform.startm.value="0";parseInt(document.calcform.startm.value);break}housePrice=parseFloat(document.calcform.price.value);dpayment=parseFloat(document.calcform.dpayment.value);IR=parseFloat(document.calcform.interest.value);years=parseFloat(document.calcform.time.value);housePrice=housePrice-dpayment;month=years*12;interestRate=IR/12;negmonth=-1*month;var bottom=1-(Math.pow(interestRate+1,negmonth));var top=interestRate;var mid=top/bottom;var dec;document.calcform.monthPay.value=(housePrice*mid);monthPay=document.calcform.monthPay.value;document.calcform.monthPay.value=eval(monthPay);housePrice=housePrice-document.calcform.monthPay.value;aro=document.getElementById("mpayment");aro.innerHTML=month;return false}function convert(){var A=new String();A=document.calcform.startm.value;document.calcform.startm.value=A.toLowerCase()}function changenum(){document.calcform.startyear.value=parseInt(document.calcform.startyear.value)}var d=new Date;function getFieldValue(B){var C;var A=new RegExp(B+"=([^&]+)","gi");if(A.test(location.search)){C=unescape(RegExp.$1)}else{C=""}return C}function Currency(C){var B=new String(C);var A=B.indexOf(".",[0]);var B=B.substring(0,A+3);var C=parseFloat(B);return B}var startmonth;startmonth=getFieldValue("startm");var monthofpayment=new String;month=getFieldValue("month");monthPay=getFieldValue("monthPay");Houseprice=getFieldValue("price");Ir=getFieldValue("interest");Ir=Ir/12;year=getFieldValue("startyear");function check(){var A=document.calcform.dpayment.value;var B=document.calcform.price.value;if(B.indexOf(",")>=0){alert("Please do not put commas in the Price number")}}function check1(){var A=document.calcform.dpayment.value;if(A.indexOf(",")>=0){alert("Please do not put commas in the Down Payment number")}};

