function chkNumeric(strString)
   //  check for valid numeric strings  
   {
   var strValidChars = "0123456789";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }
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 validate(form)
{
	retval = false;
	if (document.form.wedplan.value == "") 
	{
	alert("Please enter your name.")
	document.form.wedplan.focus()
	return false;
	}
	if (document.form.email.value == "") 
	{
	alert("Please enter your email address.")
	document.form.email.focus()
	return false;
	}
	if (!isEmailAddr(document.form.email.value))
	{
	alert("Please enter a valid email address.");
	document.form.email.focus();
	return (false);
	}
	if (document.form.message.value.length < 20) 
	{
	alert("Please enter a message to send to this wedding professional.")
	document.form.message.focus()
	return false;
	}
	alert("Your email is being sent...");
return true;
}