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

function calsi()
{
	var ty = document.sint.ss.value;
	var n = document.sint.res1.value;
	var d = document.sint.res2.value;
	var p = document.sint.res3.value;
	var ff = false;

	if(ty == 1)
		n = null;
	if(ty == 2)
		d = null;
	if(ty == 3)
		p = null;

	if(n == "" || d == "" || p == "")
	{
		alert(" Please enter all required feilds ");
	}

	if(n != null && n != 0 && d != null && d != 0){
		p = Math.round(((n*100)/d)*100)/100;
		document.sint.res3.value=p;
	}
	else if(p != null && p != 0 && d != null && d != 0){
		n = Math.round(((p*d)/100)*100)/100;
		document.sint.res1.value=n;
	}
	else if(p != null && p != 0 && n != null && n != 0){
		d = Math.round(((n * 100)/p)*100)/100;
		document.sint.res2.value=d;
	}

	return false;
}

function modf()
{
	for(var h=1; h<4; h++)
	{
		var dd = "document.sint.res"+h;
		ss = eval(dd);
		ss.disabled=false;
		ss.style.backgroundColor="#eefaff";
		ss.style.color= "#000000";
	}
	var vv = document.sint.ss.value;
	sse(vv);
}

function sse(vv){
	var dd = "document.sint.res"+vv;
	ss = eval(dd);
	ss.disabled=true;
	ss.value="";
	ss.style.color= "black";
	ss.style.backgroundColor="#bbc7dd";
}

function color(test)
{
	var myI=document.getElementsByTagName("input").item(4);
	myI.style.backgroundColor=test;
}


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



