// JavaScript Document

// This function checks to see if the user entered a vaild email addrerss.
function checkEmail(str) {

	var checkStr = str;
	var allValid = false;
	var regex = /^(([\-\w]+)\.?)+@(([\-\w]+)\.?)+\.[a-zA-Z]{2,4}$/;
	
	if(regex.test(checkStr)){
	
		allValid = true;
	
	}else{
		
		allValid = false;
	}
	
	return allValid;
} // end check email.