	<!--
function floor(number)
{
  return Math.floor(number*Math.pow(10,2))/Math.pow(10,2);
}
capitalarray = new Array(50);
function dosum()
{
  var monthlyinterest = document.mortcalc.interest.value / 12 / 100;   
  var annualinterest = document.mortcalc.interest.value / 100;   
  var mortgageterm = document.mortcalc.year.value / 100;    
  var type = document.mortcalc.mortgagetype.selectedIndex ;  
  var originalcapital = document.mortcalc.capital.value ;  
  var base = 1;
  var base2 = 1;
  var mbase = 1 + monthlyinterest;
  var ybase = 1 + monthlyinterest*12;
  
  for (i=0; i<document.mortcalc.year.value; i++)
  {base2 = base2 * ybase;}
    
  for (i=0; i<document.mortcalc.year.value * 12; i++)
  {base = base * mbase;}

  	if (type == 0)
  	{    //Repayment type mortgage
   
  		if (document.mortcalc.intcalc.selectedIndex == 0) 
  		{           // Annual interest calculations
  		var monthlypayment = ((originalcapital * monthlyinterest*12 / ( 1 - (1/base2))/12));
  		document.mortcalc.monthlypayment.value = floor((originalcapital * monthlyinterest*12 / ( 1 - (1/base2))/12));
  
  		}else{      // Monthly or daily interest calculations
  		var monthlypayment = (originalcapital * monthlyinterest / ( 1 - (1/base)));
  		document.mortcalc.monthlypayment.value = floor(originalcapital * monthlyinterest / ( 1 - (1/base)));
  		}

  	document.mortcalc.totalpayments.value = floor(document.mortcalc.monthlypayment.value * document.mortcalc.year.value * 12) ;

  	}else{  //Interest only type mortgage
  	var monthlypayment = (originalcapital * monthlyinterest);
  	document.mortcalc.monthlypayment.value = floor(originalcapital * monthlyinterest);
  	document.mortcalc.totalpayments.value = floor(monthlypayment * document.mortcalc.year.value * 12) ;
  	}
  
  
  	//For calculating arrays
  
  	if (document.mortcalc.intcalc.selectedIndex == 0) // Annual interest calculations
  	{
  	// Annual calculations for amortization table
  	var capital = originalcapital;
  		for (i=0; i<document.mortcalc.year.value; i++)
  		{
  		capital = capital - (12 * monthlypayment) + (capital*annualinterest);
  		capitalarray[i] = capital;
  		}
  	}else{
  	// Monthly/Daily calculations for amortization table
  
  	var capital = originalcapital;

  		for (i=0; i<document.mortcalc.year.value; i++);
  		{

  			for (j=0; j < 12; j++) {
  			capital = capital - (monthlypayment) + (capital * monthlyinterest);
  			}
  		capitalarray[1] = capital;
  		}
  	}

	
}
// -->


<!-- Begin
	function verify() {
	var themessage = "You are required to complete the following fields: \n";

	if ((document.emailform.senderemail.value=="") || (document.emailform.senderemail.value=='Enter Email')) {
	themessage = themessage + "\n Email Address for E-Newsletter";
	document.emailform.senderemail.value="Enter Email";
	}
	//alert if fields are empty and cancel form submit
	if (themessage == "You are required to complete the following fields: \n") {
	document.emailform.submit();
	}
	else {
	alert(themessage);
	document.emailform.senderemail.focus();
	return false;
	   }
	}
//  End -->


<!-- Begin
	function verifysearch() {
	var themessage = "You are required to complete the following fields: \n";

	if ((document.searchform.keywords.value=="") || (document.searchform.keywords.value=='Search')) {
	themessage = themessage + "\n Search Terms";
	document.searchform.keywords.value="Search";
	}
	//alert if fields are empty and cancel form submit
	if (themessage == "You are required to complete the following fields: \n") {
	document.searchform.submit();
	}
	else {
	alert(themessage);
	document.searchform.keywords.focus();
	return false;
	   }
	}
//  End -->


<!-- Begin
	function jumpPage(newLoc) {
	newPage = newLoc.options[newLoc.selectedIndex].value           	
	if (newPage !="") {
	window.location.href = newPage
	}
	}
//  End -->
            
