// 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("it is not allowed to use \" / \\ ' { } [ ] | & $ ( ) * \" please recheck your entry ");
			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("Please check your email address... it seems to be not a valid one");
    return false;
  }
  return true;
}

function clean(addFrm){
	if(ban_injection(addFrm.keywords.value)==false){
	  return true;
	}else{ 
	  return false;
	}
}
	