function checnum(as)
{
	var a = as.value;
}

function dist()
{
	var x1 = document.first.x1.value;
	var y1 = document.first.y1.value;
	var z1 = document.first.z1.value;
	var x2 = document.first.x2.value;
	var y2 = document.first.y2.value;
	var z2 = document.first.z2.value;
	var aa = (Math.pow((x2-x1),2)) + (Math.pow((y2-y1),2)) + (Math.pow((z2-z1),2));
	var bb = Math.sqrt(aa);
	if(Math.round(bb)==bb)
	{
		document.first.r1.value=bb ;
	}
	else
	{
		document.first.r1.value="Sqrt(" + aa + ")";
	}
}
	

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;
}


