// JavaScript Document

function forgot_pwd_check()
{
	if($("#UserEmail").val() == '')
	{
		$("#errormsg").html("Please Enter Email Address");
		$("#UserEmail").focus();
		return false;
	}
	else
	{
		if(!checkEmail($("#UserEmail").val()))
		{
			$("#errormsg").html("Please enter a valid email address, example: you@yourdomain.com");
			$("#UserEmail").focus();
			return false;
		}
	}

       $("#errormsg").css('display','none');
	        var useremail = $("#UserEmail").val();
			var links = server_path+"/users/forgot_pwd/";

	        $.post(links,{email:'ybinds@gmail.com'},function(data) {
				alert(data);
	            if (data == 0) {
	                $("#errormsg").html('Email does not exist');
	                $("#errormsg").css('display','inline');					
	            } else {
	            	
	                $("#errormsg").html('Your password is sent your email.');
	                $("#errormsg").css('display','inline');					
					$('#UserEmail').focus();
	            }
	                });
return false;
}
