/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function checkBalance()
{
	//alert(85885885);
	$.ajax({
		    type: "POST",
      url: "../BusinessLogic/userDetail.php",

	  data: "userId="+$("#userId").val()+"&amount="+$("#amount").val()+"&option=checkBalance",
      async:false,
      success: function(msg){
		//alert(msg);
        response=msg;
      }
   }
);
	if(response=='0')
	{
		 //alert("you have entered max amount");
		 $("#balanceNotification").show();
		 $("#balanceNotification").text("you have entered max amount.");
	         event.returnValue=false;
	         return false;
	}
	else
	{
		 $("#balanceNotification").hide();
		 $("#balanceNotification").text("");
		 return true;
	}

}

function validateSummary()
{
    if(checkBalance())
        {
return true;
        }
        else
            {
                return false;
            }
}



