$(document).ready(function(){
				
		$("#field3").change(function () { 
				
				var program= $('#field3').val();
				var zipcode= $('#field5').val();
			//document.getElementById('mile').value =zipcode;
				var urlx= "checkcat.php?&program="+program+"&zipcode="+zipcode;
				//alert(urlx);
				
				$.ajax({type: "GET",url: urlx,success: function(data){
				//alert(data);
							$("#field8").html(data);
							if(program!='select'){
								document.getElementById('showcat').style.display ='Block';
							}else{
								document.getElementById('showcat').style.display ='none';
								document.getElementById('showcat1').style.display ='none';
							}
						}		
				});
				
		});
		$("#field8").change(function () { 
				
				var program1= $('#field8').val();
				var program= $('#field3').val();
				var urlx= "checkcat1.php?&program="+program+"&cat="+program1;
				//alert(urlx);
				
				$.ajax({type: "GET",url: urlx,success: function(data){
				//alert(data);
							$("#field18").html(data);
							if(program1!='select'){
								document.getElementById('showcat1').style.display ='Block';
							}else{
								document.getElementById('showcat1').style.display ='none';
							}
							}		
				});
				
		});
		
		$("#field5").change(function () { 
				
				var zipcode= $('#field5').val();
				var urlx= "checkzipcode.php?&zipcode="+zipcode;
				//alert(urlx);
				$.ajax({type: "GET",url: urlx,success: function(data){
				//alert(data);
				document.getElementById('hdnmile').value=data;
							
				}		
				});
				
		});
		
});
