function textClear (input) {
	if ( input.value == input.defaultValue ) {
		input.value = "";
	}
}

function textRestore (input) {
	if ( input.value == "" ) {
		input.value = input.defaultValue;
	}
}

function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

function FormValidator(theForm)
{
 
  if (theForm.email.value == "")
  {
    alert("Please enter your e-mail address.");
    theForm.email.focus();
    return (false);
  }
 
  if (!isEmailAddr(theForm.email.value))
  {
    alert("Please enter a complete email address in the form: name@domain.tld");
    theForm.email.focus();
    return (false);
  }
 
  if (theForm.email.value.length < 5)
  {
    alert("Please enter a valid e-mail address.");
    theForm.email.focus();
    return (false);
  }
  
    if (theForm.inquiry_type)
  {
    if (theForm.inquiry_type.selectedIndex == 0)
    {
        alert('Please select an inquiry type.');
		return false;
    }
  }
  
      if (theForm.response)
  {
    if (theForm.response.selectedIndex == 1)
    {
        alert('Please select a response method.');
        return false;
    }
  }
  
  if (theForm.name)
  {
    if (theForm.name.value.length < 5)
    {
        alert('Please enter your name; >5 characters.');
        theForm.name.focus();
        return false;
    }
  }
 
  if (theForm.AreaCode)
  {
    if (theForm.AreaCode.value.length < 3)
    {
        alert('Please properly enter your ten-digit telephone number.');
        theForm.AreaCode.focus();
        return false;
    }
  }
  
  if (theForm.Prefix)
  {
    if (theForm.Prefix.value.length < 3)
    {
        alert('Please properly enter your ten-digit telephone number.');
        theForm.Prefix.focus();
        return false;
    }
  }
  
  if (theForm.Numero)
  {
    if (theForm.Numero.value.length < 4)
    {
        alert('Please properly enter your ten-digit telephone number.');
        theForm.Numero.focus();
        return false;
    }
  }

  if (theForm.comments)
  {
    if (theForm.comments.value.length < 15)
    {
        alert('Please enter a valid comment or question.');
        theForm.comments.focus();
        return false;
    }
  }
  
  function checkKey1(e) {
	var keyChar;
	
	if (isNav == 0)	{
		if(e.which < 48 || e.which > 57) e.RETURNVALUE = false;
	} else {
		if(e.keyCode <48 || e.keyCode > 57) e.returnValue = false;
	}
}

	theForm.spam.value = "<?php echo $number; ?>";
  return (true);
}

<!--
function StartForm(){
	document.form4.name.focus();
}
//Stop hiding -->
