

function calcSaving()

{



  fI=parseFloat(document.FORM1.Current.value);

  fW=parseFloat(document.FORM1.Width.value);

 

  

if (document.FORM1.units[0].checked)



  	if (isNaN(fI))

   

  	{

	//Calculate I

	i=3*(Math.pow(fW,2/3)); 

        strI=i.toString();

        document.FORM1.Current.value=strI;

        }



        else

  		{

	        //Calculate w

	        w=(Math.pow((fI/3),3/2));

	        strW=w.toString();

	        document.FORM1.Width.value=strW;

  }





if (document.FORM1.units[1].checked)



  	if (isNaN(fI))

   

  	{

	//Calculate I

	i=26*(Math.pow(fW,2/3)); 

        strI=i.toString();

        document.FORM1.Current.value=strI;

        }



        else

  		{

	        //Calculate w

	        w=(Math.pow((fI/26),3/2));

	        strW=w.toString();

	        document.FORM1.Width.value=strW;

  }

}



function clearbut()

{

document.FORM1.Current.value="";

document.FORM1.Width.value="";

}

