var divId = null;
var quest_1 = null;
var quest_2 = null;
var quest_3 = null;
var overlayFormSubmitterchangepassword = {
	postFormData: function(thisurl,dataString,div){
                        divID=div;
                     // alert(thisurl+dataString);

			YAHOO.util.Connect.asyncRequest('GET', thisurl, overlayFormSubmitterchangepasswordcallback);
	},

		successHandler: function (obj){
//alert("success");
//	alert(ajaxResponse);
	          	var ajaxResponse = obj.responseText;
                        var xmlResponse = obj.responseXML; 
                	//alert("*"+ajaxResponse+"*");
                	 //  alert(divID); 
//=======================================================================================
		if(ajaxResponse == 'success'){
				document.getElementById("errorchangePassword").innerHTML="Password has been Send to your email id.";		
	
		}
		if(ajaxResponse == 'emptyPassword'){
				document.getElementById("errorchangePassword").innerHTML="Enter Old Password.";
				return false;
		}
		if(ajaxResponse =='emptyNewPassword'){
				document.getElementById("errorchangePassword").innerHTML="Enter New Password.";
                                return false;

		}
		if(ajaxResponse =='newpasswordlength'){
				document.getElementById("errorchangePassword").innerHTML="New password should be atlest 6 character long.";
				return false;
		}
		if(ajaxResponse =='newPasswordAlphanumric'){
				document.getElementById("errorchangePassword").innerHTML="New password should be a  alphanumric value only.";
				return false;
		} 		

		if(ajaxResponse =='retypepasswordEmpty'){
			document.getElementById("errorchangePassword").innerHTML="Enter Retype Password.";
			return false;
		}
		if(ajaxResponse =='equalpassword'){
				document.getElementById("errorchangePassword").innerHTML="Password and retype password must be same.";
				return false;
		}

		if(ajaxResponse =='emailEmpty'){
				document.getElementById("errorchangePassword").innerHTML="Enter Email Id .";
				return false;
			}
		if(ajaxResponse =='entervalidemail'){
				document.getElementById("errorchangePassword").innerHTML=" Enter a valid emailid.";
				return false;
			}
		if(ajaxResponse =='oldpasswardexist'){
			document.getElementById("errorchangePassword").innerHTML="Your old password is not in database.";
				return false;
		}	

		if(ajaxResponse =='emailexist'){
				document.getElementById("errorchangePassword").innerHTML=" You email is not exist in database.";
				return false;
			}






	
			
	},
	failureHandler: function (obj){
		alert("Failure");
		}
};


var overlayFormSubmitterchangepasswordcallback = {
			success: overlayFormSubmitterchangepassword.successHandler,
			failure: overlayFormSubmitterchangepassword.failureHandler,
 			scope  : overlayFormSubmitterchangepassword 
};

