<!--
///////////////////////////////////////////////////////
//
//  Function: expandMenu()
//
//  Purpose: 
//
//  Last modified:  2002/08/22  Dave Carroll - modified
//			
///////////////////////////////////////////////////////

var ns6=document.getElementById&&!document.all?1:0

var ua=navigator.userAgent;
var opera=(ua.indexOf("Opera") > 0);
//var opera=((ua.indexOf("Opera")>0)&&(ua.indexOf("MSIE")==0));

var menu="display:''"
var submenu=''

function expandMenu(selobj)  {

if (ns6||opera)  {
	submenu=selobj.nextSibling.nextSibling.style;
}  else  {
	submenu=document.all[selobj.sourceIndex+1].style;
}

if (submenu.display=="none")
submenu.display=""
else
submenu.display="none"
}

///////////////////////////////////////////////////////
//
//  Functions: cacheImages(index)
//             highlight(imageName)
//             unHighlight(imageName)
//  Purpose:  Mouse over image
//
//  Last modified:  
//			
///////////////////////////////////////////////////////
// Given "Foo", returns "images/Foo.gif".

function regularImageFile(imageName) {
  return("images/" + imageName + ".gif");
}

// Given "Bar", returns "images/Bar-on.gif".

function negativeImageFile(imageName) {
  return("images/" + imageName + "-on.gif");
}

// Cache image at specified index. E.g., given index 0,
// take imageNames[0] to get "Home". Then preload 
// images/Home.gif and images/Home-Negative.gif.

function cacheImages(index) {
  regularImageObjects[index] = new Image(150, 30);
  regularImageObjects[index].src =
    regularImageFile(imageNames[index]);
  negativeImageObjects[index] = new Image(150, 30);
  negativeImageObjects[index].src =
    negativeImageFile(imageNames[index]);
}

imageNames = new Array();

regularImageObjects = new Array(imageNames.length);
negativeImageObjects = new Array(imageNames.length);

// Put images in cache for fast highlighting.
for(var i=0; i<imageNames.length; i++) {
  cacheImages(i);
}

// This is attached to onMouseOver -- change image
// under the mouse to negative (reverse video) version.

function highlight(imageName) {
  document.images[imageName].src = negativeImageFile(imageName);
}

// This is attached to onMouseOut -- return image to
// normal.

function unHighlight(imageName) {
  document.images[imageName].src = regularImageFile(imageName);
}


// Open content in new browser window
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


///////////////////////////////////////////////////////
//
//  Functions: calculate()
//             round(x)
//  Purpose:  calculates monthly loan according to 
//            principle, interest, and payment term
//
//  Last modified: 5/6/03 
//			
///////////////////////////////////////////////////////
<!-- Thanks to David Flanagan and O'Reilly & Associates -->
<!-- for the concept of this calculator. -->
<!-- This calculator is provided WITHOUT ANY WARRANTY -->
<!-- either expressed or implied. -->
function calculate() 
{
    var principal = document.loandata.principal.value;
    var interest = document.loandata.interest.value / 100 / 12;
    var payments = document.loandata.years.value * 12;

    var x = Math.pow(1 + interest, payments);
    var monthly = (principal*x*interest)/(x-1);

    if (!isNaN(monthly) && 
        (monthly != Number.POSITIVE_INFINITY) &&
        (monthly != Number.NEGATIVE_INFINITY)) 
    {
        document.loandata.payment.value = round(monthly);
    }
    else 
    {
        document.loandata.payment.value = "";
    }
}

function round(x) 
{
  return Math.round(x*100)/100;
}
// -->