﻿// JScript File

    var theform;
	var postback;
			
	if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) 
		theform = document.forms["aspnetForm"];
	else
		theform = document.aspnetForm;
			
			
    function ValidateForgetLogin()
	{
	    postback = true;
	    
        if (Validate_LoginID() == false)
            postback = false;
        
		if(postback == true)
		    return true;
		else
		    return false;
		    
		    
	}
	
	function ValidateForm()
	{
	    postback = true;
	    
        if (Validate_SecretQuestion() == false)
            postback = false;
             
        if (Validate_SecretAnswer() == false)
            postback = false;
            
        if (Validate_NewPass() == false)
            postback = false;

        if (Validate_ConfNewPass() == false)
            postback = false;
             
		if(postback == true)
		    return true;
		else
		    return false;		
	}
	
	function Validate_LoginID()
	{
		var postback = true;	
		
        if (DivEmptyFieldValidation(theform.ctl00_cphMainBody_txtForgetLoginID,'Please Enter Login ID','div_error_forgot_LoginID') == false)
            postback = false;
        else
             ClearErrorMessage('div_error_forgot_LoginID'); 
             
		if(postback == true)
		    return true;
		else
		    return false;		
	}
	
	function Validate_SecretQuestion()
	{
        var postback = true;	
        
        if (DivDropDownSelectValidation(theform.ctl00_cphMainBody_drpSecretQuestion,'Select Secret Question','div_error_SecretQuestion') == false)
            postback = false;
        else
             ClearErrorMessage('div_error_SecretQuestion');  	
		
             
		if(postback == true)
		    return true;
		else
		    return false;
		
	}
	
	function Validate_SecretAnswer()
	{
        var postback = true;	
        
        if (DivEmptyFieldValidation(theform.ctl00_cphMainBody_txtSecretAnswer,'Enter Secret Answer','div_error_SecretAnswer') == false)
            postback = false;
        else
             ClearErrorMessage('div_error_SecretAnswer');  	
		
             
		if(postback == true)
		    return true;
		else
		    return false;
		
	}	
	
	function Validate_NewPass()
	{
        var postback = true;	
        
        if (DivEmptyFieldValidation(theform.ctl00_cphMainBody_txtNewPass,'Enter New Password','div_error_NewPass') == false)
            postback = false;
        else
             ClearErrorMessage('div_error_NewPass');  	
		
             
		if(postback == true)
		    return true;
		else
		    return false;
		
	}	
		
	function Validate_ConfNewPass()
	{
        var postback = true;	
        
        if (DivEmptyFieldValidation(theform.ctl00_cphMainBody_txtConfNewPass,'Enter Conf. New Password','div_error_ConfNewPass') == false)
            postback = false;
        else if (DivCompareTwoFieldValidation(theform.ctl00_cphMainBody_txtNewPass,theform.ctl00_cphMainBody_txtConfNewPass,'Conf. Password Missmatch','div_error_ConfNewPass') == false)
            postback = false;            
        else
             ClearErrorMessage('div_error_ConfNewPass');  	
		
             
		if(postback == true)
		    return true;
		else
		    return false;
		
	}
	
