function checkMail(email) {
	var blanks = ''*100;
	var naughty = new Array("arse","bastard","cunt","fuck","shit","wanker","piss","twat");
	var sneaky = email.toLowerCase();
	//var illegal = "You have entered illegal characters.\nOnly characters listed here allowed.\n\nLetters of Alphabet [lower and upper case]\nNumbers\nOne @ symbol only\nFull stops\nHyphens [Minus sign]\nUnderscores\n\n";
	//mail check
	if (email <= blanks){
	  //alert("Please enter your e-mail address.");
	  return false;
	  }
	else if (email.length > 62){
	   //alert('Max character length for any e-mail address is 63.');
	   return false;
	   }
	else if (email.charAt(0) == " "){
	   //alert('You have typed a space at the - START - of your e-mail address');
	   return false;
	   }
	else if (email.charAt(email.length-1) == " "){
	   //alert('You have typed a space at the - END - of your e-mail address');
	   return false;
	   }
	else if (email.indexOf(" ") !=-1){
	   //alert('You have typed a space - IN - your e-mail address');
	   return false;
	   }
	
	//CHECK FOR ILLEGAL CHARACTERS 1
	for (i=0; i < email.length; i++){
	var caps = "a".toUpperCase();
	var E = email.substring(i, i + 1);
	if ((E < "0" || "9" < E ) && E != "@"  && E !="." && E !="-"  && E !="_"  &&  E < caps || "z" < E){
	 //alert(illegal);
	 return false;
	 }
	}
	
	//CHECK FOR ILLEGAL CHARACTERS 2
	if ((email.indexOf('`',0) != -1) || (email.indexOf(String.fromCharCode(94)) != -1) || (email.indexOf(String.fromCharCode(92)) != -1) || (email.indexOf('[',0) != -1) || (email.indexOf(']',0) != -1)){
	 //alert(illegal);
	 return false;
	}
	
	//CHECK FOR SWEARING
	for (i=0; i < email.length; i){  
	 if (sneaky.indexOf(naughty[i]) != -1){
	 //alert('Please remove the swear word - '+naughty[i].toUpperCase());
	 return false;
	 }
	i++;
	}

	for (i=0; i < email.length; i++){
		if (email.charAt(i) ==" ")
			email.charAt(i)="";
	}
	//alert(email);
	
	
	//GENERAL FORMATING
	if (email.charAt(0) =="."){
	 //alert('An e-mail address cannot start with a full stop');
	 return false;
	}
	else if (email.split('@').length > 2){
	 //alert('Only 1 @ allowed in e-mail address.');
	 return false;
	}
	else if (email.indexOf ('@',0) == -1){
	 //alert("The @ symbol is missing");
	 return false;
	}
	else if (email.indexOf("@") < 1){
	 //alert("There must be at least 1 characters before @ symbol.");
	 return false;
	}
	else if (email.charAt(email.length-1) == "@"){
	 //alert('An e-mail address cannot finnish with @');
	 return false;
	}
	else if (email.indexOf ('.') == -1){
	 //alert("An e-mail address must contain at least 1 full stop");
	 return false;
	}
	else if (email.indexOf('.',email.indexOf('@')) == -1){
	 //alert('The full stop after the @ is missing');
	 return false;
	}
	else if (email.substring(email.indexOf('@'),email.length).indexOf(".") < 3){
	 //alert('There must be at least 2 characters between @ and following full stop');  
	 return false;
	}
	else if (email.lastIndexOf(".")+2 == email.length){
	 //alert('There must be at least 2 characters after last full stop');
	 return false;
	}
	else if (email.substring(email.lastIndexOf("."),email.length).length > 5){
	 //alert('Only 4 characters allowed after last full stop');
	 return false;
	}
	else if (email.charAt(email.length-1) =="."){
	 //alert('An e-mail address cannot finnish with a full stop');
	 return false;
	}
	return true;
}
