function run_cal()
{
  if (document.getElementById && document.createTextNode) {	
    var numb1=document.getElementById("num1").value;
	var n_tomatch = /^[0-9.]+$/;
	var n_ismatch = n_tomatch.test(numb1);
	if (n_ismatch) {
      var the_ans=Math.sqrt(numb1);
      document.getElementById("the2root").value=the_ans;	
	  return false;
	}
    else {
	  window.alert("Please enter a positive number to get a square root.");
	  return false;
	}
  }
}

