
//------------------------------------------------------------------
// Google Map Load (load() on window load)
function load() {
  if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map"));
    var point = new GLatLng(39.720274, -104.992838);

    map.setCenter(point, 13);
    map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());
    map.setMapType(G_NORMAL_MAP);

    var marker = new GMarker(point);
    var html = "Your New Home";
    GEvent.addListener(marker, 'click', function() { marker.openInfoWindowHtml(html); });

    map.addOverlay(marker);
  }
}
//------------------------------------------------------------------

//------------------------------------------------------------------
// Scrollbar Functionality (getcontent_height() on window load)

/******************************************
 * * Scrollable content script II- © Dynamic Drive (www.dynamicdrive.com)
 * * Visit http://www.dynamicdrive.com/ for full source code
 * * This notice must stay intact for use
 * ******************************************/
iens6=document.all||document.getElementById
ns4=document.layers
// specify speed of scroll (greater=faster)
var speed=2

function movedown(){
  if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
    crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
  else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
    crossobj.top-=speed
    movedownvar=setTimeout("movedown()",20)
}

function moveup(){
  if (iens6&&parseInt(crossobj.style.top)<=0)
    crossobj.style.top=parseInt(crossobj.style.top)+speed+"px"
  else if (ns4&&crossobj.top<=0)
    crossobj.top+=speed
    moveupvar=setTimeout("moveup()",20)
}

function getcontent_height(){
  if (iens6)
    contentheight=crossobj.offsetHeight
  else if (ns4)
    document.nscontainer.document.nscontent.visibility="show"
}
//------------------------------------------------------------------

//------------------------------------------------------------------
// calculator form
function calculate(form)  {
P=document.forms[0].principal.value;
I=document.forms[0].interest.value;
N=document.forms[0].months.value;
X = I/1200;
// changed N * 12 = months
N = N * 12;
S = X + 1;
y = X;
V=Math.pow(S, -N);
V = 1 - V;
B = y/V;
A = P*B;
A = Math.round(A);
form.answer.value=A;
} 
//------------------------------------------------------------------