$(document).ready(function() {
						  


//On change of select/ country box	
$("#contract").change(function() {
	
	//set state div to empty to clear previous data
	data = '';
	$("#mileagediv").html(data);
	
	//Show loader msg to the user
	$("#mileagediv").html("Loading...");
	
	//Finally AJAX POST call to load data form a php file
	$.post("get_mileage.php",{contract_id:$("#contract").val()} , function(data)
	{
  			$("#mileagediv").html(data);
  			
  			//Show the dropdown because at first loading of the page we have kept this div hidden i.e. display:none
  			$("#mileagediv").slideDown("slow");
  	});

});

});

