<!--
function blockError(){return true;}
window.onerror = blockError;
// -->


// Utility function to strip all spaces from string passed
function stripstr (instr) {
  var result = instr.replace(/ /g,"");
  return result;
}


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 val_specform(form) {
  var name = stripstr(form.Name.value);
  var email = stripstr(form.Address.value);
  if (name == "") {        
     alert("Please enter your name.");
	 form.Name.focus();
	 return false;
  }
  if (email == "") {        
     alert("Please enter your e-mail address.");
	 form.Address.focus();
	 return false;
  }
  if ((email.length < 3) || !isEmailAddr(email)) {
     alert("Please enter a complete e-mail address in the form: yourname@yourdomain.com");
	 form.Address.focus();
	 return false; 
  }	 
  return true;
}
// end val_specform
