function validate()
{//Function 'validate' Opens Here

	//Declaring Variables
	
	var currentPassword;
	var newPassword;
	var confirmPassword
		
	//Declaring Error Message
	
	var currentPasswordErrorMessage = "Enter Current Password" ;
	var newPasswordErrorMessage = "Enter New Password";
	var confirmPasswordErrorMessage = "Enter Confirm Password <br/> Password Does Not Match";
	
	//Retrieving Form Fields
	
	currentPassword = document.getElementById("pasCurrentPassword").value;
	newPassword = document.getElementById("pasNewPassword").value;
	confirmPassword = document.getElementById("pasConfirmPassword").value; 
	
	//alert("currentPassword");
	//Checking Compulsion for Current Password
	
	if(currentPassword.length == "")
	{
		document.getElementById("errorMessage").innerHTML = currentPasswordErrorMessage;
		document.getElementById("pasCurrentPassword").focus();
		return false;
	}
	
	//Checking Compulsion for New Password
	
	if(newPassword.length == "")
	{
		document.getElementById("errorMessage").innerHTML = newPasswordErrorMessage;
		document.getElementById("pasNewPassword").focus();
		return false;
	}

	//Checking Compulsion for Confirm Password
	
	if(confirmPassword.length == "")
	{
		document.getElementById("errorMessage").innerHTML = confirmPasswordErrorMessage;
		document.getElementById("pasConfirmPassword").focus();
		return false;
	}
	
	if(newPassword != confirmPassword)
	{
		document.getElementById("errorMessage").innerHTML = confirmPasswordErrorMessage;
		document.getElementById("pasConfirmPassword").focus();
		return false;
	}   
	
			
}//Function 'validate' Closes Here