/* Email Validation. Written by PerlScriptsJavaScripts.com
 */
 
 
function check_email(e) {
	ok = "1234567890qwertyuiop[]asdfghjklzxcvbnm.@-_QWERTYUIOPASDFGHJKLZXCVBNM";

	for(i=0; i < e.length ;i++){
		if(ok.indexOf(e.charAt(i))<0){ 
			return (false);
		}	
	} 

	if (document.images) {
		re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
		// Note the {2,4} in the regular expression. This used to be {2,3} before
		// the new domain suffixes were released (.info, .name). However, now that
		// 4 characters are allowed in the suffix, a user could enter 
		// name@server.conm and the error would not be detected.	
		re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		if (!e.match(re) && e.match(re_two)) {
			return (-1);		
		} 

	}

}