// <script language="javascript">

function doMath() 
   {
	var one = eval(document.theForm.elements[0].value)
	var two = eval(document.theForm.elements[1].value)
	var three = eval(document.theForm.elements[2].value)
	var part1 = Math.sqrt(three/two)
	var part2 = Math.sqrt(part1)
	var prod = one * (part2*(three/two))
	var loaddata = Round(prod,1)

	if (three < two) { document.theForm.elements[4].value = loaddata }
	else if (three > two) { document.theForm.elements[4].value = "Error" }
   }
   
function Round(num, precision) 
{ 
//convert num to string 
	num = "" + num 
	precision = parseInt(precision); 
	
	var fullNum = "" + Math.round(num* Math.pow(10, precision)); 

//Looking for the decimal point 
	var decPoint = fullNum.length - precision; 
	
	if(decPoint != 0) 
	{ 
//Merging the left and right part to the decimal together 
	result = fullNum.substring(0, decPoint); 
	result += "."; 
	result += fullNum.substring(decPoint, fullNum.length); 
	} 
	else 
	{ 
	result = fullNum; 
	} 
	return result; 
} 


// </script>


// Pcharge*((SQRT(SQRT(DesFPS/MaxFPS)))*(DesFPS/MaxFPS))

 
