// JavaScript Document

//////// deny php script injection with the method so far as i know
function ban_injection(val){
   inj=new Array("/","\\","'","{","}","[","]","|","&","$",";");
   for(nums=0; nums<inj.length; nums++){
	   for(y=0; y<val.length; y++){
	     if(val.charAt(y)==inj[nums]){
			alert("Illegal character detected on the field.");
			return true;
	     }
	   }
   }
   return false;
}


function validate_mail(val){
   //////// check for the mail if it's valid or not
  validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
  strEmail = val.value;
  if (strEmail.search(validRegExp) == -1){
    alert("The email address is invalid.");
    return false;
  }
  return true;
}