// JavaScript Document
function checkEmail(the_email)
{
    var the_at = the_email.indexOf("@");
    var the_dot = the_email.lastIndexOf(".");
    var a_space = the_email.indexOf(" ");
    if ((the_email != "YourEmail@domain.com") &&  //if it is not default text
		(the_at != -1) &&  // if there's an '@'
        (the_at != 0) &&  // and it's not at position 0
        (the_dot != -1) && // and there's a '.'
        (the_dot > the_at + 1) &&  // and something between the '@' and '.'
        (the_dot < the_email.length - 1) && // and something after the '.'
        (a_space  == -1))  // and there're no spaces
    	{
        	    //alert("looks good to me!");
        	    return true;
    	}  else {
        	    alert("Please enter a valid email address.");
        	    return false;
    	}
}
