// JavaScript Document
function howMuch() { 
var weight,caratage,price;
weight = document.goldCalculator.weight.value;
caratage = document.goldCalculator.caratage.value;
answerBox = document.goldCalculator.total.value;
isITaNumber = isNaN(weight);
if (isITaNumber==true)
{
alert('That is not a number!');
}
else if (weight!="") 
{
firstResult = weight*caratage;
result=Math.round((firstResult*100))/100;
document.goldCalculator.total.value = result + "GBP";
}
else
{
alert('Please enter your weight into the box!');
}

}

