// 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(" strange character detected ");
			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("Votre adresse email n'est pas valide");
    return false;
  }
  return true;
}