var timerate,rate
timerate=0.3;
rate=0.1;

function doCacl(obj){
var gamecurrency;

gamecurrency=document.thisformonly.num_gamecurrency.value;
if(gamecurrency=="")
 {
  alert("Please enter the amount of Gold.");
  return false;
  }
 /*for(var i=0;i<gamecurrency.length;i++)
 {
   if(gamecurrency.charAt(i)<48||gamecurrency.charAt(i)>57)
   {
     alert("The amount of Gold is not valid.");
      return   false;   
      break;   
   }
 }*/
if(/[^0-9]/g.test(gamecurrency))
{
  alert("The amount of Gold is not valid.");
  return false;
}
document.thisformonly.totaltime.value=Math.round(gamecurrency*timerate) + " hours";
document.thisformonly.price.value=Math.round(gamecurrency*rate);
document.thisformonly.amount.value=Math.round(gamecurrency*rate);
document.getElementById("pay").style.display="";

}