function square()
{
var calc = document.forms[0].miles.value.toLowerCase();
if ((calc =="")||(calc <=0))
{
alert("You must input a positive number, please try again");
return;
}
if (isNaN(calc))
{
alert("Input numbers only");
return;
}
var h = ((calc * 3) / 2)
var z = Math.sqrt(h)
alert("Your distance to the Horizon is " + (Math.ceil(z)) + " miles away from a height of " + calc + "ft");
}