// JavaScript Document
function Validate()	{
	if(!isEmail(document.getElementById('MERGE0').value))	{
		document.getElementById('MERGE0').focus();
		return false;
	}
	return true;
}

function Validateeventmail()	{
	if(!isEmail(document.getElementById('mce-EMAIL').value))	{
		document.getElementById('mce-EMAIL').value = "";
		document.getElementById('mce-EMAIL').focus();
		return false;
	}
	return true;
}

function isEmail(s)
{
	var i = 1,Length = s.length,result;
	
	if(s==""){
		
		alert("Please provide a valid email address");
		return false;
	}
	
	while((i<Length) && (s.charAt(i) != '@')) i++;
	
	if ((i == Length) || (s.charAt(i) != '@'))
	{
		if(s == "Enter Email Here To Get Updates")	{
			alert("Please provide a valid email address");
			return false;
		}
		alert("Your email address does not appear to be valid. (Ex: name@domain.com)");
		return false;
	}
	
	i+=2;
	
	while((i<Length) && (s.charAt(i) != '.')) i++;

	if ((i == Length) || (s.charAt(i) != '.'))
	{
		alert("Email Address don\'t have the character after the domain name ");
		return false;
	}

	if (i+1 >= Length)
	{
		alert("Email Address should have atleast one character after.");
		return false;
	}
	
	return true;
}
