<!-- Begin


function milestokm(m2kform) {
	if ((m2kform.miles.value == null) || (m2kform.miles.value.length == "")) {
		alert("Please enter the number of miles");
		return;
	}

	var miles = m2kform.miles.value;

	km = 1.609344 * miles;
	km = Math.round(km * 100) / 100;
	m2kform.km.value = km;
}


function kmtomi(k2mform) {
	if ((k2mform.km.value == null) || (k2mform.km.value.length == "")) {
		alert("Please enter the number of kilometers");
		return;
	}

	var km = k2mform.km.value;

	miles = .621371 * km;
	k2mform.miles.value = miles
      miles = Math.round(miles * 100) / 100;
	k2mform.miles.value = miles;
}


function inchesconv(inchesform) {
	var inches = inchesform.inches.value;
	ft = 1 / 12 * inches;
	ft = Math.round(ft * 100) / 100;
	inchesform.ft.value = ft;

      yds = 1 / 12 / 3 * inches
      yds = Math.round(yds * 100) / 100;
      inchesform.yds.value = yds;

      mm = 25.4 * inches
      mm = Math.round(mm * 100) / 100;
      inchesform.mm.value = mm;

      cm = 25.4 / 10 * inches
      cm = Math.round(cm * 100) / 100;
      inchesform.cm.value = cm;

      m = 25.4 / 1000 * inches
      m = Math.round(m * 100) / 100;
      inchesform.m.value = m;
}


function ftconv(ftform) {
	var ft = ftform.ft.value;

	inches = 12 * ft;
	inches = Math.round(inches * 100) / 100;
	ftform.inches.value = inches;

       yds = 1 / 3 * ft;
       yds = Math.round(yds * 100) / 100;
       ftform.yds.value = yds;

       mm = 25.4 * 12 * ft;
       mm = Math.round(mm * 100) / 100;
       ftform.mm.value = mm;

       cm = 25.4 * 12 / 10 * ft;
       cm = Math.round(cm * 100) / 100;
       ftform.cm.value = cm;

       m = 25.4 * 12 / 1000 * ft;
       m = Math.round(m * 100) / 100;
       ftform.m.value = m;
}


function ydsconv(ydsform) {
	var yds = ydsform.yds.value;

	inches = 12 * 3 * yds;
	inches = Math.round(inches * 100) / 100;
	ydsform.inches.value = inches;

       ft = 3 * yds;
       ft = Math.round(ft * 100) / 100;
       ydsform.ft.value = ft;

       mm = 25.4 * 12 * 3 * yds;
       mm = Math.round(mm * 100) / 100;
       ydsform.mm.value = mm;

       cm = 25.4 * 12 * 3 / 10 * yds;
       cm = Math.round(cm * 100) / 100;
       ydsform.cm.value = cm;

       m = 25.4 * 12 * 3 / 1000 * yds;
       m = Math.round(m * 100) / 100;
       ydsform.m.value = m;
}


function mmconv(mmform) {
	var mm = mmform.mm.value;

	inches = 1 / 25.4 * mm;
	inches = Math.round(inches * 100) / 100;
	mmform.inches.value = inches;

       ft = 1 / 25.4 / 12 * mm;
       ft = Math.round(ft * 100) / 100;
       mmform.ft.value = ft;

       yds = 1 / 25.4 / 12 / 3 * mm;
       yds = Math.round(yds * 100) / 100;
       mmform.yds.value = yds;

       cm = 1 / 10 * mm;
       cm = Math.round(cm * 100) / 100;
       mmform.cm.value = cm;

       m = 1 / 1000 * mm;
       m = Math.round(m * 100) / 100;
       mmform.m.value = m;
}


function cmconv(cmform) {
	var cm = cmform.cm.value;

	inches = 1 / 25.4 * 10 * cm;
	inches = Math.round(inches * 100) / 100;
	cmform.inches.value = inches;

       ft = 1 / 25.4 / 12 * 10 * cm;
       ft = Math.round(ft * 100) / 100;
       cmform.ft.value = ft;

       yds = 1 / 25.4 / 12 / 3 * 10 * cm;
       yds = Math.round(yds * 100) / 100;
       cmform.yds.value = yds;

       mm = 10 * cm;
       mm = Math.round(mm * 100) / 100;
       cmform.mm.value = mm;

       m = 1 / 100 * cm;
       m = Math.round(m * 100) / 100;
       cmform.m.value = m;
}


function mconv(mform) {
	var m = mform.m.value;

	inches = 1 / 25.4 * 1000 * m;
	inches = Math.round(inches * 100) / 100;
	mform.inches.value = inches;

       ft = 1 / 25.4 / 12 * 1000 * m;
       ft = Math.round(ft * 100) / 100;
       mform.ft.value = ft;

       yds = 1 / 25.4 / 12 / 3 * 1000 * m;
       yds = Math.round(yds * 100) / 100;
       mform.yds.value = yds;

       mm = 1000 * m;
       mm = Math.round(mm * 100) / 100;
       mform.mm.value = mm;

       cm = 1 * 100 * m;
       cm = Math.round(cm * 100) / 100;
       mform.cm.value = cm;
}


function loanpmt(loanform) {

var i = loanform.rate.value;
if (i > 1.0) {
i = i / 100.0;
/* loanform.rate.value = i; */
}

i /= 12;

var pow = 1;
for (var j = 0; j < loanform.months.value; j++)
pow = pow * (1 + i);
money = "" + .01* Math.round(100*(loanform.loanamt.value * pow * i) / (pow - 1));
dec = money.indexOf(".");
dollars = money.substring(0,dec); 
cents = money.substring(dec+1,dec+3);
cents = (cents.length < 2) ? cents + "0" : cents;
money = "$" + dollars + "." + cents;
loanform.payment.value = money;
}


function FtoC(Fform) {
	var fdegrees = Fform.fdegrees.value;
	cdegrees = 5/9 * (fdegrees - 32);
	cdegrees = Math.round(cdegrees * 10) / 10;
	Fform.cdegrees.value = cdegrees;

}


function CtoF(Cform) {
	var cdegrees = Cform.cdegrees.value;

	fdegrees = 9/5 * cdegrees + 32;
	Cform.fdegrees.value = fdegrees

}


// done hiding from old browsers -->
