function emailValidation(email)
{
	
	var at = "@";
	var dot = ".";
	var length = email.length;
	
	var iat = email.indexOf(at);
	var idot = email.indexOf(dot);
	
	if(length < 6 ) return false;
	
	//Make sure there is an @ and it is not at the end or beginning of the email
	if(iat == -1 || iat == 0 || iat == length || iat == 1 || email.indexOf(at, iat + 1) != -1) return false;
	
	//Make sure there is at least a . and it is not at the end or beginning of the email.
	if(idot == -1 || idot == length || idot == 1) return false;
	
	//Make sure there is one dot after the @ but not right next to it
	if(email.indexOf(dot, iat) == -1 || email.indexOf(dot, iat) == iat + 1) return false;
	
	//Make sure that there are at least two characters after the last 'dot'
	if(email.indexOf(dot, iat) > length - 2) return false;
	
	//If this line is reached means it has passed all the other tests. Not very secure.
	return true;
}