 $(document).ready(function(){ 
//								$("#key").change(function()
//	{	//alert(($(this).val()));
//		switch ($(this).val())
//		{					
//			case 'HR':
//				$("div[id^='hr']").each(function() {   $(this).show(); });
//				$("div[id^='cr']").each(function() {   $(this).hide(); });
//				$("div[id^='rb']").each(function() {   $(this).hide(); });
//				$("div[id^='rp']").each(function() {   $(this).hide(); });
//				$("div[id^='gps']").each(function() {  $(this).hide(); });
//				$("div[id^='gcs']").each(function() {  $(this).hide(); });
//				$("div[id^='msa']").each(function() {  $(this).hide(); });
//				$("div[id^='msc']").each(function() {  $(this).hide(); });
//				$("div[id^='msb']").each(function() {  $(this).hide(); });
//				$("div[id^='msw']").each(function() {  $(this).hide(); });
//				$("div[id^='msr']").each(function() {  $(this).hide(); });
//				$("div[id^='msp']").each(function() {  $(this).hide(); });
//				$("div[id^='common']").each(function(){ $(this).hide();});
//				
//			break;
//			
//			case 'CR':
//				$("div[id^='cr']").each(function() {   $(this).show(); });
//				$("div[id^='hr']").each(function() {   $(this).hide(); });
//				$("div[id^='rb']").each(function() {   $(this).hide(); });
//				$("div[id^='rp']").each(function() {   $(this).hide(); });
//				$("div[id^='gps']").each(function() {  $(this).hide(); });
//				$("div[id^='gcs']").each(function() {  $(this).hide(); });
//				$("div[id^='msa']").each(function() {  $(this).hide(); });
//				$("div[id^='msc']").each(function() {  $(this).hide(); });
//				$("div[id^='msb']").each(function() {  $(this).hide(); });
//				$("div[id^='msw']").each(function() {  $(this).hide(); });
//				$("div[id^='msr']").each(function() {  $(this).hide(); });
//				$("div[id^='msp']").each(function() {  $(this).hide(); });
//				$("div[id^='common']").each(function(){ $(this).hide();});
//			
//			break;
//
//			case 'RP':
//				$("div[id^='rp']").each(function() {   $(this).show(); });
//				$("div[id^='hr']").each(function() {   $(this).hide(); });
//				$("div[id^='cr']").each(function() {   $(this).hide(); });
//				$("div[id^='rb']").each(function() {   $(this).hide(); });
//				$("div[id^='gps']").each(function() {  $(this).hide(); });
//				$("div[id^='gcs']").each(function() {  $(this).hide(); });
//				$("div[id^='msa']").each(function() {  $(this).hide(); });
//				$("div[id^='msc']").each(function() {  $(this).hide(); });
//				$("div[id^='msb']").each(function() {  $(this).hide(); });
//				$("div[id^='msw']").each(function() {  $(this).hide(); });
//				$("div[id^='msr']").each(function() {  $(this).hide(); });
//				$("div[id^='msp']").each(function() {  $(this).hide(); });
//				$("div[id^='common']").each(function(){ $(this).hide();});
//			
//			break;
//
//			case 'RB':
//				$("div[id^='rb']").each(function() {   $(this).show(); });
//				$("div[id^='hr']").each(function() {   $(this).hide(); });
//				$("div[id^='cr']").each(function() {   $(this).hide(); });
//				$("div[id^='rp']").each(function() {   $(this).hide(); });
//				$("div[id^='gps']").each(function() {  $(this).hide(); });
//				$("div[id^='gcs']").each(function() {  $(this).hide(); });
//				$("div[id^='msa']").each(function() {  $(this).hide(); });
//				$("div[id^='msc']").each(function() {  $(this).hide(); });
//				$("div[id^='msb']").each(function() {  $(this).hide(); });
//				$("div[id^='msw']").each(function() {  $(this).hide(); });
//				$("div[id^='msr']").each(function() {  $(this).hide(); });
//				$("div[id^='msp']").each(function() {  $(this).hide(); });
//				$("div[id^='common']").each(function(){ $(this).hide();});
//			
//			break;
//
//			case 'GPS':
//				$("div[id^='gps']").each(function() {  $(this).show(); });
//				$("div[id^='hr']").each(function() {   $(this).hide(); });
//				$("div[id^='cr']").each(function() {   $(this).hide(); });
//				$("div[id^='rb']").each(function() {   $(this).hide(); });
//				$("div[id^='rp']").each(function() {   $(this).hide(); });
//				$("div[id^='gcs']").each(function() {  $(this).hide(); });
//				$("div[id^='msa']").each(function() {  $(this).hide(); });
//				$("div[id^='msc']").each(function() {  $(this).hide(); });
//				$("div[id^='msb']").each(function() {  $(this).hide(); });
//				$("div[id^='msw']").each(function() {  $(this).hide(); });
//				$("div[id^='msr']").each(function() {  $(this).hide(); });
//				$("div[id^='msp']").each(function() {  $(this).hide(); });
//				$("div[id^='common']").each(function(){ $(this).hide();});
//					
//			break;
//
//			case 'GCS':
//				$("div[id^='gcs']").each(function() {  $(this).show(); });
//				$("div[id^='hr']").each(function() {   $(this).hide(); });
//				$("div[id^='cr']").each(function() {   $(this).hide(); });
//				$("div[id^='rb']").each(function() {   $(this).hide(); });
//				$("div[id^='rp']").each(function() {   $(this).hide(); });
//				$("div[id^='msa']").each(function() {  $(this).hide(); });
//				$("div[id^='msc']").each(function() {  $(this).hide(); });
//				$("div[id^='gps']").each(function() {  $(this).hide(); });
//				$("div[id^='msb']").each(function() {  $(this).hide(); });
//				$("div[id^='msw']").each(function() {  $(this).hide(); });
//				$("div[id^='msr']").each(function() {  $(this).hide(); });
//				$("div[id^='msp']").each(function() {  $(this).hide(); });
//				$("div[id^='common']").each(function(){ $(this).hide();});
//			
//			break;
//
//			case 'MSA':
//				$("div[id^='msa']").each(function() {  $(this).show(); });
//				$("div[id^='hr']").each(function() {   $(this).hide(); });
//				$("div[id^='cr']").each(function() {   $(this).hide(); });
//				$("div[id^='rb']").each(function() {   $(this).hide(); });
//				$("div[id^='rp']").each(function() {   $(this).hide(); });
//				$("div[id^='gcs']").each(function() {  $(this).hide(); });
//				$("div[id^='msc']").each(function() {  $(this).hide(); });
//				$("div[id^='gps']").each(function() {  $(this).hide(); });
//				$("div[id^='msb']").each(function() {  $(this).hide(); });
//				$("div[id^='msw']").each(function() {  $(this).hide(); });
//				$("div[id^='msr']").each(function() {  $(this).hide(); });
//				$("div[id^='msp']").each(function() {  $(this).hide(); });
//				$("div[id^='common']").each(function(){ $(this).hide();});
//			
//			break;
//
//			case 'MSC':
//				$("div[id^='msc']").each(function() {  $(this).show(); });
//				$("div[id^='hr']").each(function() {   $(this).hide(); });
//				$("div[id^='cr']").each(function() {   $(this).hide(); });
//				$("div[id^='rb']").each(function() {   $(this).hide(); });
//				$("div[id^='rp']").each(function() {   $(this).hide(); });
//				$("div[id^='gcs']").each(function() {  $(this).hide(); });
//				$("div[id^='msa']").each(function() {  $(this).hide(); });
//				$("div[id^='gps']").each(function() {  $(this).hide(); });
//				$("div[id^='msb']").each(function() {  $(this).hide(); });
//				$("div[id^='msw']").each(function() {  $(this).hide(); });
//				$("div[id^='msr']").each(function() {  $(this).hide(); });
//				$("div[id^='msp']").each(function() {  $(this).hide(); });
//				$("div[id^='common']").each(function(){ $(this).hide();});
//			
//			break;
//			case 'MSB':
//				$("div[id^='msb']").each(function() {  $(this).show(); });
//				$("div[id^='hr']").each(function() {   $(this).hide(); });
//				$("div[id^='cr']").each(function() {   $(this).hide(); });
//				$("div[id^='rb']").each(function() {   $(this).hide(); });
//				$("div[id^='rp']").each(function() {   $(this).hide(); });
//				$("div[id^='gcs']").each(function() {  $(this).hide(); });
//				$("div[id^='msa']").each(function() {  $(this).hide(); });
//				$("div[id^='gps']").each(function() {  $(this).hide(); });
//				$("div[id^='msw']").each(function() {  $(this).hide(); });
//				$("div[id^='msr']").each(function() {  $(this).hide(); });
//				$("div[id^='msp']").each(function() {  $(this).hide(); });
//				$("div[id^='msc']").each(function() {  $(this).hide(); });
//				$("div[id^='common']").each(function(){ $(this).hide();});
//			
//			break;
//
//			case 'MSW':
//				$("div[id^='msw']").each(function() {  $(this).show(); });
//				$("div[id^='hr']").each(function() {   $(this).hide(); });
//				$("div[id^='cr']").each(function() {   $(this).hide(); });
//				$("div[id^='rb']").each(function() {   $(this).hide(); });
//				$("div[id^='rp']").each(function() {   $(this).hide(); });
//				$("div[id^='gcs']").each(function() {  $(this).hide(); });
//				$("div[id^='msa']").each(function() {  $(this).hide(); });
//				$("div[id^='gps']").each(function() {  $(this).hide(); });
//				$("div[id^='msb']").each(function() {  $(this).hide(); });
//				$("div[id^='msr']").each(function() {  $(this).hide(); });
//				$("div[id^='msp']").each(function() {  $(this).hide(); });
//				$("div[id^='msc']").each(function() {  $(this).hide(); });
//				$("div[id^='common']").each(function(){ $(this).hide();});
//			
//			break;
//
//			case 'MSR':
//				$("div[id^='msr']").each(function() {  $(this).show(); });
//				$("div[id^='hr']").each(function() {   $(this).hide(); });
//				$("div[id^='cr']").each(function() {   $(this).hide(); });
//				$("div[id^='rb']").each(function() {   $(this).hide(); });
//				$("div[id^='rp']").each(function() {   $(this).hide(); });
//				$("div[id^='gcs']").each(function() {  $(this).hide(); });
//				$("div[id^='msa']").each(function() {  $(this).hide(); });
//				$("div[id^='gps']").each(function() {  $(this).hide(); });
//				$("div[id^='msb']").each(function() {  $(this).hide(); });
//				$("div[id^='msw']").each(function() {  $(this).hide(); });
//				$("div[id^='msp']").each(function() {  $(this).hide(); });
//				$("div[id^='msc']").each(function() {  $(this).hide(); });
//				$("div[id^='common']").each(function(){ $(this).hide();});
//			
//			break;
//
//			case 'MSP':
//				$("div[id^='msp']").each(function() {  $(this).show(); });
//				$("div[id^='hr']").each(function() {   $(this).hide(); });
//				$("div[id^='cr']").each(function() {   $(this).hide(); });
//				$("div[id^='rb']").each(function() {   $(this).hide(); });
//				$("div[id^='rp']").each(function() {   $(this).hide(); });
//				$("div[id^='gcs']").each(function() {  $(this).hide(); });
//				$("div[id^='msa']").each(function() {  $(this).hide(); });
//				$("div[id^='gps']").each(function() {  $(this).hide(); });
//				$("div[id^='msb']").each(function() {  $(this).hide(); });
//				$("div[id^='msw']").each(function() {  $(this).hide(); });
//				$("div[id^='msr']").each(function() {  $(this).hide(); });
//				$("div[id^='msc']").each(function() {  $(this).hide(); });
//				$("div[id^='common']").each(function(){ $(this).hide();});
//			
//			break;
//				case 'NONE':
//				$("div[id^='msp']").each(function() {  $(this).hide(); });
//				$("div[id^='hr']").each(function() {   $(this).hide(); });
//				$("div[id^='cr']").each(function() {   $(this).hide(); });
//				$("div[id^='rb']").each(function() {   $(this).hide(); });
//				$("div[id^='rp']").each(function() {   $(this).hide(); });
//				$("div[id^='gcs']").each(function() {  $(this).hide(); });
//				$("div[id^='msa']").each(function() {  $(this).hide(); });
//				$("div[id^='gps']").each(function() {  $(this).hide(); });
//				$("div[id^='msb']").each(function() {  $(this).hide(); });
//				$("div[id^='msw']").each(function() {  $(this).hide(); });
//				$("div[id^='msr']").each(function() {  $(this).hide(); });
//				$("div[id^='msc']").each(function() {  $(this).hide(); });
//				$("div[id^='common']").each(function(){ $(this).show();});
//			
//			break;
//						
//			default:
//				$("#other").hide();
//		}
//	});


 $('input[name="Enter"]').click(function(event){	
 var id = this.id;
     $.ajax({	
      type: "POST",
      url: "submit_form_hr.php",
      data: "thickness="+$("#thickness_"+id).val()+"&width="+$("#width_"+id).val()+"&surface="+$("input[@name='surface']:checked").val()+"&length="+$("#length_"+id).val()+"&quantity="+$("#quantity_"+id).val()+"&csp="+$("input[@name='csp']:checked").val()+"&grade="+$("#grade_"+id).val()+"&date1="+$("#date1_"+id).val()+"&details="+$("#details_"+id).val()+"&town="+$("#town_"+id).val()+"&destination="+$("#destination_"+id).val()+"&Address1="+$("#Address1_"+id).val()+"&Address2="+$("#Address2_"+id).val()+"&City="+$("#City_"+id).val()+"&Country="+$("#Country_"+id).val()+"&Remarks="+$("#Remarks_"+id).val()+"&Name="+$("#Name_"+id).val()+"&email="+$("#email_"+id).val()+"&Tel="+$("#Tel_"+id).val()+"&letters_ccode="+$("#letters_code_"+id).val()+"&mode_hr="+$("#mode_hr").val()+"&mode_cr="+$("#mode_cr").val()+"&mode_rb="+$("#mode_rb").val()+"&mode_rp="+$("#mode_rp").val(),
      success: function(msg){	alert(msg);	
     if(msg == 'Your message has been posted successfully.'){	
		 window.location.replace("thankyou.php");
     } 
      }
    });
   });
 });