function calcMPay(){
		 var pr, r, m, pay;
		 pr = document.getElementById('principal').value;		//5000;
		 r= document.getElementById('rate').value;				//.07;
		 r = r/100;
		 m= document.getElementById('term').value;				//12;
			 num =  pr*(r/12);
			 den = r/12;
			 den = 1 + den;
			 den = Math.pow(den, (-m));
			 den = 1-den;
			 result = num/den;
			 var output = '<table class="calc_result" cellspacing="0"><tr><td colspan="9" class="res_ttls"><div class="res_ttld">Results</div></td></tr>';
			 output = output +'<tr><td class="stack_left">Your monthly payment would be : </td><td class="stack_right">$'+ result.toFixed(2)+'</td></tr>';
			 displayRes(output);
}

/*This function is used in enabling a drop-down/flyout menu for IE6
 *It is needed because IE6 and below do not support :hover css functionality
 *for elements other than <a>.  Therefor all li:hover css rules must also have a
 *corresponding class designated to them.
 *In this script that class is ".over".
 *
 *The script uses the document.all property, which is only available in IE to assign the
 *mouse events to <li> elements.
 *Finally the function takes as a parameter a dom element, this should be the parent of the
 *navigation bar, either the ul tag or the div container.
 */

window.onload = function(){

	//allow function to only add mouse events if browser is IE
	if (document.all&&document.getElementById) {

		//get navigation menu parent
		navRoot = document.getElementById("h-nav");
		//get all list items
		if (navRoot != null) {
            liList  = navRoot.getElementsByTagName("li");
		//add onmounseover and onmouseout events to each <li>
		//that change the class of the element top .over
		for (i=0; i<liList.length; i++) {
			node = liList[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className = this.className.replace(" over", "");
                 }
				}
			}
		}
	}
		//enableIESixDropDown("category-nav");
};
