function ValidEmail(FieldVal) 
{
	if (window.RegExp) 
	{
		var strCheck1 = "^[a-zA-Z0-9\-\_\.\'\]+@[a-zA-Z0-9\-\_\.]+[.]+[a-zA-Z0-9\-\_\.]+$"
		var objCheck1 = new RegExp(strCheck1);
		if (objCheck1.test(FieldVal))
		{
			return true;
		}
		else
			return false;
	}
	else 
	{
		if(FieldVal.indexOf("@") >= 0)
			return true;
		else
			return false;
	}
}

function ValidEmailCheck(Email)
{
    var valid = false;
    if (ValidEmail(Email))
    {
       $.ajax({
          type: "POST",
          contentType: "application/json; charset=utf-8",
          url: '/services/emailverificationsvc.asmx/EmailValidate',
          data: "{'Email':'" + Email + "'}",
          async: false,
          success:
            function(result)
            {
                if(eval(result.toLowerCase()) == "y")
                {
                    valid = true;
                }
            },
          error:
            function(XMLHttpRequest, textStatus, errorThrown)
            {
                valid = true;
            }
         });   
         return valid;
    }
    else
    {
        return false;
    }
}
