function emailCheck(str) {
	/*
	-- RULES:
	-- 0. @ sign cannot be first character
	-- 1. There must be 1 @ sign in the address
	-- 2. No commas are allowed
	-- 3. There must be at least one . after the @ sign
	-- 4. There must be no .. anywhere in the address
	-- 5. The address cannot start with a ., next check is for ending with a.
	*/
	var pattern = /^(?!.*[.]{2}.*)(?![.].*)[^@,]+[^@,.]+@[^@,.]+(\.[^@,.]+)+$/;
	if(!pattern.test(str))
	{
		alert("Please enter a valid email address.");
		return false;
	}
	else
	{
		return true
	}

	
}


