function validateReg() {

var x=document.forms["submission"]["username"].value
if (x.length < 6)
  {
  alert("Username is too short");
  return false;
  }
  
var x=document.forms["submission"]["firstn"].value
if (x==null || x=="")
  {
  alert("Name cannot be blank");
  return false;
  }

 var email =document.forms["submission"]["email"].value
filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (!filter.test(email)) {
	  alert("Email address is invalid");
 	 return false;
}

var pw =document.forms["submission"]["pWord"].value
if (pw==null || pw=="")
  {
  alert("Password cannot be blank");
  return false;
  }
  
 var pw =document.forms["submission"]["pWord"].value
if (pw.length < 6)
  {
  alert("Password must be at least 6 characters");
  return false;
  }

var cpw=document.forms["submission"]["cpWord"].value
if (pw != cpw)
  {
  alert("Password's don't match!");
  return false;
  }



}
