function entryExist(entry, err_msg)
{
  // returns true if an entry has been filled. 
  // returns false otherwise.
  if(entry.value == "")
  {
    alert(err_msg);
    entry.focus();
    return false;
  }// end if
  else
    return true;
}

/*** isNum ***/
function isNum(entry, err_msg)
{
  // return true if the entry is a number.
  // return false and err_msg if the field is not a number.
  
  var string = entry.value;

  var Chars = "0123456789";

  for (var i = 0; i < string.length; i++)
  {
    if (Chars.indexOf(string.charAt(i)) == -1)
    {
      alert(err_msg);
      entry.value = "";
      entry.focus();
      return(false);
    }// end if
  }// end for
    
  // otherwise
  return(true);
  
}// end isNum

/*** isNumWithSp ***/
function isNumWithSp(entry, err_msg)
{
  // return true if the entry is a number with spaces or hyphen.
  // return false and err_msg if the field is not a number.
  
  var string = entry.value;

  var Chars = "0123456789 -()";

  for (var i = 0; i < string.length; i++)
  {
    if (Chars.indexOf(string.charAt(i)) == -1)
    {
      alert(err_msg);
      entry.value = "";
      entry.focus();
      return(false);
    }// end if
  }// end for
    
  // otherwise
  return(true);
  
}// end isNumWithSp

/*** phone_format ***/
function phone_format(inp)
{
  // checks that inp field contains only numbers in the format 00 0000 0000
  // return
