
//this function use to display cat product using on chnage 
function check_numeric_value(getValue) {

	getValue = document.getElementById(getValue);
	if(numValue(getValue)== false) return false;

}

function check_present_value() {

	future_value = document.getElementById("future_value");
	if(blankValidation(future_value,"Future value cannot be blank.")== false) return false;

	years = document.getElementById("years");
	if(blankValidation(years,"Year value cannot be blank.")== false) return false;

	discount_rate = document.getElementById("discount_rate");
	if(blankValidation(discount_rate, "Discount Rate value cannot be blank.")== false) return false;

}

function doCalc()
{
	zeroBlanks(document.mainform);
	var fv = numval(document.mainform.fv.value);
	var r = numval(document.mainform.r.value)/100;
	var y = numval(document.mainform.y.value);

	document.mainform.pv.value = formatNumber(presentValue(fv,r,y),2);
}

