﻿// JScript File

//This file is used for validations on ForgotPassword page

function ForgotPasswordValidation()
{   
    
    var Email=document.getElementById("TxtForgotPasswordEmail").value;
    if(Email!="")
    {   
        var ErrorMsg="Please Enter a Valid Email-Id";
			EmailPattern = /^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9])+(\.[a-zA-Z0-9_-]+)+$/;
			if(!EmailPattern.test(document.getElementById("TxtForgotPasswordEmail").value))
			{
				alert(ErrorMsg);
				document.getElementById("TxtForgotPasswordEmail").focus();
				document.getElementById("TxtForgotPasswordEmail").select();
				return false;
			}
    }
    else
    {
        alert("Enter Email-Id");
        document.getElementById("TxtForgotPasswordEmail").focus();
		document.getElementById("TxtForgotPasswordEmail").select();
        return false;
    }
}

function AlertAndRedirection()
{   
    
    alert("Please check your email for your login information!");
    window.parent.location="../Home.aspx";
    
}