function checnum(as)
{
	var dd = as.value;
	
	if(isNaN(dd))
	{
		dd = dd.substring(0,(dd.length-1));
		as.value = dd;
	}		
}

function save()
{
	var a = document.first.aa.value;
	var b = document.first.bb.value;
	var c = document.first.cc.value;
	var d = document.first.dd.value;
	var e = c*Math.pow((1+(3/100)),b);
	var f = e - d;
	var g = f / (4/100);
	var h = g - a;
	var i = h / Math.pow((1+(7/100)),b);
	document.first.r1.value = Math.round(e*100)/100;
	document.first.r2.value = Math.round(f*100)/100;
	document.first.r3.value = Math.round(i*100)/100;
}
	
		


function color(test)
{

	for(var j=2; j<10; j++)
	{
		var myI=document.getElementsByTagName("input").item(j);
		//myI.setAttribute("style",ch);
		myI.style.backgroundColor=test;
	}
}


function color1(test)
{
var myI=document.getElementsByTagName("table").item(0);
//myI.setAttribute("style",ch);
myI.style.backgroundColor=test;
}



