function checkvisit(theForm) {
var reason = "";
reason += check(theForm.frm_name);
reason += IsNumeric(theForm.frm_phone);
reason += checks(theForm.frm_phone);
if (reason != "") {
    alert("Oops! You left some fields out. Please fill them in and try again!");
    return false;
  }

  return true;
}


function IsNumeric(sText)
{
   b = sText.value
   var ValidChars = "0123456789. ";
   var IsNumber=true;
   error = "";
   var Char;

   for (i = 0; i < b.length && IsNumber == true; i++) 
      {  
      Char =b.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
	        error = "error";
         }
         } 
         
  if (error == "error") {
     sText.style.background = "#FEBF65";
  } else {
      sText.style.background = "White";
  }
     return error;
}
function checks(field) {
    var error = "";
 
    if (field.value.length == 0) {
	   field.style.background = "#FEBF65";
       error = "error"
    } else {
      
    }
    return error;  
}