function isEmail(x,y,theEmail){
	var s = theEmail;
	var ok = 1;
	
	//Check to make sure it is more than 6 characters in length
	if ((s.length < 7)){
		ok = 0;
	}

	//Check to make sure it is has an @ character and there is at least one character before it
	var at = s.indexOf('@');
	if (at < 1){
		ok = 0;
	}
	
	//Check to make sure it is has only one @ character
	if (at != s.lastIndexOf('@')){
		ok = 0;
	}

	//Check to make sure there is at least one full stop after the @ character and the number of characters from the full stop to the end is between 2-5 characters in length
	if ((s.lastIndexOf('.') < (at+1)) || (s.lastIndexOf('.') > (s.length-3)) || (s.lastIndexOf('.') < (s.length-6))){
		ok = 0;
	}

	//Check to make sure there are no funny characters
	if ((s.indexOf(',') != -1) || 
		(s.indexOf(' ') != -1) || 
		(s.indexOf(';') != -1) || 
		(s.indexOf(':') != -1) || 
		(s.indexOf('?') != -1) || 
		(s.indexOf('/') != -1) || 
		(s.indexOf('"') != -1) || 
		(s.indexOf('\\') != -1) || 
		(s.indexOf("'") != -1) || 
		(s.indexOf('[') != -1) || 
		(s.indexOf(']') != -1)){
		ok = 0;
	}
	
	if (s.length == 0){
		ok = 1
	}
	
	if (ok == 1){
	return true;}
	else
	{
	return false;}
}