<!--
function postResults(x,MIPPremium) {
	if (x == 1) {
			document.forms[0].mtgInsPmt1.value = MIPPremium;
		}
	if (x == 2) {
			document.forms[0].mtgInsPmt2.value = MIPPremium;
		}
}

function mtgIns(x) {

	var loantype;
	var loanterm;
	var downpmt;
	var term;
	var dp;
	
	loantype = document.forms[0].ARMorFRM.options.selectedIndex;
	term = document.forms[0].loanterm1.options.selectedIndex;
	if (term == 0) { loanterm = 40; }
	if (term == 1) { loanterm = 30; }
	if (term == 2) { loanterm = 25; }
	if (term == 3) { loanterm = 20; }
	if (term == 4) { loanterm = 15; }
	if (term == 5) { loanterm = 10; }
		
	if (x == 1) {
	dp = document.forms[0].DwnPmt1.options.selectedIndex;
	if (dp == 0) { downpmt = 0; }
	if (dp == 1) { downpmt = 3; }
	if (dp == 2) { downpmt = 5; }
	if (dp == 3) { downpmt = 10; }
	if (dp == 4) { downpmt = 15; }
	if (dp == 5) { downpmt = 20; }
	if (dp == 6) { downpmt = 25; }
	if (dp == 7) { downpmt = 30; }
	}
	if (x == 2) {
	dp = document.forms[0].DwnPmt2.options.selectedIndex;
	if (dp == 0) { downpmt = 3; }
	if (dp == 1) { downpmt = 5; }
	if (dp == 2) { downpmt = 10; }
	if (dp == 3) { downpmt = 15; }
	if (dp == 4) { downpmt = 20; }
	if (dp == 5) { downpmt = 25; }
	if (dp == 6) { downpmt = 30; }
	if (dp == 7) { downpmt = 35; }
	}
	
if (downpmt > 19.99) {
				postResults(x,0);
		}
				
if (loantype == 0){
	if (loanterm == 40 || loanterm == 30) {
		if (downpmt <= 5) {
			postResults(x,.96);
		}
		if (downpmt >= 5 && downpmt < 10) {
			postResults(x,.78);
		}
		if (downpmt >= 10 && downpmt < 15) {
			postResults(x,.52);
		}
		if (downpmt >= 15 && downpmt < 20) {
			postResults(x,.32);
		}
	}
	
	if (loanterm == 25){
		if (downpmt <= 5) {
			postResults(x,.85);
		}
		if (downpmt >= 5 && downpmt < 10) {
			postResults(x,.67);
		}
		if (downpmt >= 10 && downpmt < 15) {
			postResults(x,.41);
		}
		if (downpmt >= 15 && downpmt < 20) {
			postResults(x,.21);
		}
	}

	if (loanterm == 20 || loanterm == 15 || loanterm == 10) {
		if (downpmt <= 5) {
			postResults(x,.80);
		}
		if (downpmt >= 5 && downpmt < 10) {
			postResults(x,.56);
		}
		if (downpmt >= 10 && downpmt < 15) {
			postResults(x,.23);
		}
		if (downpmt >= 15 && downpmt < 20) {
			postResults(x,.19);
		}
	}
}
	
if (loantype == 1){
	if (loanterm == 40 || loanterm == 30) {
		if (downpmt <= 5) {
			postResults(x,1.17);
		}
		if (downpmt >= 5 && downpmt < 10) {
			postResults(x,.88);
		}
		if (downpmt >= 10 && downpmt < 15) {
			postResults(x,.61);
		}
		if (downpmt >= 15 && downpmt < 20) {
			postResults(x,.33);
		}
	}
	
	if (loanterm == 25 || loanterm == 20 || loanterm == 15 || loanterm == 10) {
		if (downpmt <= 5) {
			postResults(x,1.06);
		}
		if (downpmt >= 5 && downpmt < 10) {
			postResults(x,.77);
		}
		if (downpmt >= 10 && downpmt < 15) {
			postResults(x,.50);
		}
		if (downpmt >= 15 && downpmt < 20) {
			postResults(x,.22);
		}
	}
}
	
if (loantype == 2){
	if (loanterm == 40 || loanterm == 30) {	
		if (downpmt <= 5) {
			postResults(x,1.21);
		}
		if (downpmt >= 5 && downpmt < 10) {
			postResults(x,.92);
		}
		if (downpmt >= 10 && downpmt < 15) {
			postResults(x,.65);
		}
		if (downpmt >= 15 && downpmt < 20) {
			postResults(x,.37);
		}
	}
	
	if (loanterm == 25 || loanterm == 20 || loanterm == 15 || loanterm == 10) {
		if (downpmt <= 5) {
			postResults(x,1.10);
		}
		if (downpmt >= 5 && downpmt < 10) {
			postResults(x,.81);
		}
		if (downpmt >= 10 && downpmt < 15) {
			postResults(x,.54);
		}
		if (downpmt >= 15 && downpmt < 20) {
			postResults(x,.26);
		}
	}
}
}
//-->

