
<script type="text/javascript">
function checkSearchform_Mo(){	
	var IsValid = true;
	var services_id = $('#services_id_Mo').val();
	if(services_id == ''){
		$('#services_id_Mo').css("border", "2px solid #FF0000");
		IsValid = false;
	}
	else{
		$('#services_id_Mo').css("border", "1px solid #a1a1a1");
	}
	var pickup_date = $('#pickup_date_Mo').val();
	if(pickup_date == ''){
		$('#pickup_date_Mo').css("border", "2px solid #FF0000");
		IsValid = false;
	}
	else{
		$('#pickup_date_Mo').css("border", "1px solid #a1a1a1");
	}
	var pickup_timeH = $('#pickup_timeH_Mo').val();
	if(pickup_timeH == ''){
		$('#pickup_timeH_Mo').css("border", "2px solid #FF0000");
		IsValid = false;
	}
	else{
		$('#pickup_timeH_Mo').css("border", "1px solid #a1a1a1");
	}
	var no_of_passengers = $('#no_of_passengers_Mo').val();
	if(no_of_passengers == ''){
		$('#no_of_passengers_Mo').css("border", "2px solid #FF0000");
		IsValid = false;
	}
	else{
		$('#no_of_passengers_Mo').css("border", "1px solid #a1a1a1");
	}
	var autocomplete = $('#autocomplete_Mo').val();
	if(autocomplete == ''){
		$('#autocomplete_Mo').css("border", "2px solid #FF0000");
		IsValid = false;
	}
	else{
		$('#autocomplete_Mo').css("border", "1px solid #a1a1a1");
	}
	
	if(services_id==1000 || services_id==1001 || services_id==1002){		
		var autocomplete_DA = $('#autocomplete_DA_Mo').val();
		if(autocomplete_DA == ''){
			$('#autocomplete_DA_Mo').css("border", "2px solid #FF0000");
			IsValid = false;
		}
		else{
			$('#autocomplete_DA_Mo').css("border", "1px solid #a1a1a1");
		}		
	}else{
		var no_of_hrs = $('#no_of_hrs_Mo').val();
		if(no_of_hrs == ''){
			$('#no_of_hrs_Mo').css("border", "2px solid #FF0000");
			IsValid = false;
		}
		else{
			$('#no_of_hrs_Mo').css("border", "1px solid #a1a1a1");
		}
	}
	if(IsValid==true){
		$('#loadingsearch').html('<center><img class="Iconsimg" src="/ajax-loading.gif" alt="Ajax Loading"></center>');
		$('#loadingsearch').show();
	}	
	return IsValid;	
}

function changeSalection_Mo(services_id,services_id_B,isfrom){
	if(services_id==1000){
		$('#autocomplete_Mo').attr("placeholder", "Pickup: Address, City, or Zip");
		$('#autocomplete_DA_Mo').attr("placeholder", "Drop-off: Airport Name, Code Or City");
		$('#hdn_airport').show();
		$('#dropup_timeDIV').hide();
	}else if(services_id==1001){
		$('#autocomplete_Mo').attr("placeholder", "Pickup: Airport Name, Code Or City");
		$('#autocomplete_DA_Mo').attr("placeholder", "Drop-off: Address, City, or Zip");
		$('#hdn_airport').show();
		$('#dropup_timeDIV').hide();
	}else if(services_id==1002){
		$('#autocomplete_Mo').attr("placeholder", "Pickup: Address, City, or Zip");
		$('#autocomplete_DA_Mo').attr("placeholder", "Drop-off: Address, City, or Zip");
		$('.dropoffAddressFeild').show();
		$('#hdn_airport').show();
		$('#dropup_timeDIV').hide();
	}else{
		$('#autocomplete_Mo').attr("placeholder", "Pickup: Address, City, or Zip");
		$('#dropup_timeDIV').show();
		$('#hdn_airport').hide();
		if(services_id_B!=''){
			$('#services_id_Mo').val(services_id_B);
		}
	}
	if(services_id==27){		
		getDropupTime_Mo();
	}else{
	
	}		
	$('#no_of_hrs_Mo').val(4);
}
function  getDropupTimeHr_Mo(){
	var pickup_timeH=$('#pickup_timeH_Mo').val();
	var pickup_timeM=$('#pickup_timeM_Mo').val();
	var pickup_time=pickup_timeH+':'+pickup_timeM;
	
	var dropup_timeH=$('#dropup_timeH_Mo').val();
	var dropup_timeM=$('#dropup_timeM_Mo').val();
	var dropup_time=dropup_timeH+':'+dropup_timeM;
	var strURL="/ajax_data.php?step=501&type=2&pickup_time="+pickup_time+"&no_of_hrs="+no_of_hrs+"&dropup_time="+dropup_time+"";
	$('#loadingsearch').html('<center><img class="Iconsimg" src="/ajax-loading.gif" alt="Ajax Loading"></center>');
	$('#loadingsearch').show();
	$.get(strURL,function(data,status){  
		if(status=="success") {			
			$('#no_of_hrs_Mo').val(data);
			$('#loadingsearch').html('');
			$('#loadingsearch').hide();	
		}else {
			alert("There was a problem while using XMLhttps:\n" + req.statusText);
		}
		//alert("Data: " + data + "\nStatus: " + status);
	});
}
function  getDropupTime_Mo(){	
	var services_id=$('#services_id_Mo').val();
	if(services_id!=1000 || services_id!=1001 || services_id!=1002){
		var pickup_timeH=$('#pickup_timeH_Mo').val();
		var pickup_timeM=$('#pickup_timeM_Mo').val();
		var pickup_time=pickup_timeH+':'+pickup_timeM;
		var no_of_hrs=$('#no_of_hrs_Mo').val();
		if(pickup_timeH!=''){
			var strURL="/ajax_data.php?step=502&type=2&pickup_time="+pickup_time+"&no_of_hrs="+no_of_hrs+"";
			$('#loadingsearch').html('<center><img class="Iconsimg" src="/ajax-loading.gif" alt="Ajax Loading"></center>');
			$('#loadingsearch').show();
			$.get(strURL,function(data,status){  
				if(status=="success") {									
					var rtnD=data.split('|');				
					var rtnD1=rtnD[1].split(':');
					$('#dropup_timeH_Mo').val(rtnD1[0]);
					$('#dropup_timeM_Mo').val(rtnD1[1]);
					$('#loadingsearch').html('');
					$('#loadingsearch').hide();
				}else {
					alert("There was a problem while using XMLhttps:\n" + req.statusText);
				}
				//alert("Data: " + data + "\nStatus: " + status);
			});
		}
	}
}
</script>

<div id="formSearchModal" class="registerPopup">

  <div class="modal-dialog"> 

    <!-- Modal content-->

    <div class="modal-content">

    <button type="button" class="close closeBtn" data-dismiss="modal">×</button>



		  <div class="modal-body">

				<div class="popupTopSteps">

			  <div class="popupContainer">

			  	<div id="popupHeading"><ul class="stageList cf"><li class="active"><span class="count">1</span> Ride Details</li><li><span class="count">2</span> Select Vehicles</li><li><span class="count">3</span>  Confirm & Pay<span class="smTxt">(no deposit needed)</span> </li></ul></div>

			  </div>

			</div>

   

   	

<form action="/proccessform.php?actions=apisearchfleets"  name="tripSarch_Mo" id="tripSarch_Mo" method="post" onsubmit="return checkSearchform_Mo();">
	<input type="hidden" id="searchfrom" name="searchfrom" value="Mobile"/>
	<input type="hidden" id="customers_id" name="customers_id" value="<?=$customers_id_UL?>"/>
             <div id="popupForm3" class="popupFormDetailsWrap">

                            <div class="popLogoRow"><!--<a href="#" class="backBtnclose">Back</a>--></div>

                            <div class="popupFormDetailsWrap">

                              <div class="steps">

                                <div id="airPortStep1" class="steps steps1">

                                  <div class="popupContainer">

                                    <div class="popupForm">

                                      <div class="row text-center gutter-5">

                                        <div class="col-sm-3"></div>

                                        <div class="col-sm-6 topServicesAppend">

										<select name="services_id" id="services_id_Mo" class="form-control selectPerhour" onchange="changeSalection_Mo(this.value,'','desktop');">
										   <?=fnGetSearchService($responseJO->services_id,$responseJO->services_id_B)?>
										</select>

                                        </div>

                                        <div class="col-sm-3"></div>

                                      </div>

                                      <div class="row gutter-5">

                                       <div class="col-sm-4">	

										  <input type="text" class="form-control PickupDate datepicker" placeholder="Pickup Date" id="pickup_date_Mo" name="pickup_date" value="<?=date('m/d/Y',strtotime($responseJO->pickup_date))?>">
                                       </div>

                                       <div class="col-sm-8">

									   		

										<input id="autocomplete_Mo" name="autocomplete" type="text" placeholder="<?=$autocompletePH?>"  autocomplete="off" class="form-control commonTopForm" >

										<input id="street_number_Mo" name="street_number" type="hidden"/>

										<input id="country_Mo" name="country" type="hidden"/>

										<input type="hidden" id="route_Mo" name="route" value="<?=$responseJO->pa_address?>"/>

										<input type="hidden" id="locality_Mo" name="locality" value="<?=$responseJO->pa_city?>"/>

										<input type="hidden" id="administrative_area_level_1_Mo" name="administrative_area_level_1" value="<?=$responseJO->pa_state?>"/>

										<input type="hidden" id="postal_code_Mo" name="postal_code" value="<?=$responseJO->pa_zip?>"/>

											   

                                        </div>     

									  </div>

									  <div class="row gutter-5" id="hdn_airport" >	                                   

                                        <div class="col-sm-12">

										   <input type="text" autocomplete="off" class="form-control location ones" placeholder="Drop-off: Address, city, or zip-code" name="autocomplete_DA" id="autocomplete_DA_Mo">

											<input id="street_number_DA_Mo" name="street_number_DA" type="hidden"/>

											<input id="country_DA_Mo" name="country_DA" type="hidden"/>

											<input type="hidden" id="route_DA_Mo" name="route_DA" value="<?=$responseJO->da_address?>"/>

											<input type="hidden" id="locality_DA_Mo" name="locality_DA" value="<?=$responseJO->da_city?>"/>

											<input type="hidden" id="administrative_area_level_1_DA_Mo" name="administrative_area_level_1_DA" value="<?=$responseJO->da_state?>"/>

											<input type="hidden" id="postal_code_DA_Mo" name="postal_code_DA" value="<?=$responseJO->da_zip?>"/>	

                                        </div>

                                      </div>

                                      <div class="row gutter-5">

                                        <div class="col-sm-2 fPopupColWidth">

											<? $pickup_timeA=explode(':',$responseJO->pickup_time,2);?>	        

											 <select id="pickup_timeH_Mo" name="pickup_timeH" onchange="getDropupTime_Mo();" class="form-control selectPerhour">

												<option value="">Pickup Time</option>

												<?=fnGetSearchTime($pickup_timeA[0])?>				

											</select>

										</div>

                                        <div class="col-sm-2 fPopupColWidth">

										<select id="pickup_timeM_Mo" name="pickup_timeM" onchange="getDropupTime_Mo();" class="form-control selectPerhour">

										   <option value="" disabled="">Pickup Min</option>

										   <option value="00" <? if($pickup_timeA[1]=="00"){?> selected="selected"<? }?>>:00</option>

										   <option value="15" <? if($pickup_timeA[1]=="15"){?> selected="selected"<? }?>>:15</option>

										   <option value="30" <? if($pickup_timeA[1]=="30"){?> selected="selected"<? }?>>:30</option>

										   <option value="45" <? if($pickup_timeA[1]=="45"){?> selected="selected"<? }?>>:45</option>

										 </select>

										</div>

										<div id="dropup_timeDIV" class="gutter-5">

											<div class="col-sm-2 fPopupColWidth">

												 <? $dropup_timeA=explode(':',$responseJO->dropup_time,2);?>	

												<select id="dropup_timeH_Mo" name="dropup_timeH" onchange="getDropupTimeHr_Mo();" class="form-control selectPerhour">

													<option value="">Drop-Off Time</option>

													<?=fnGetSearchTime($dropup_timeA[0])?>

												</select>

											</div>

											<div class="col-sm-2 fPopupColWidth">

												<select id="dropup_timeM_Mo" name="dropup_timeM" onchange="getDropupTimeHr_Mo();" class="form-control selectPerhour">

													<option value="" disabled="">Drop-Off Min</option>

													<option value="00" <? if($dropup_timeA[1]=="00"){?> selected="selected"<? }?>>:00</option>

													<option value="15" <? if($dropup_timeA[1]=="15"){?> selected="selected"<? }?>>:15</option>

													<option value="30" <? if($dropup_timeA[1]=="30"){?> selected="selected"<? }?>>:30</option>

													<option value="45" <? if($dropup_timeA[1]=="45"){?> selected="selected"<? }?>>:45</option>

												</select>

											</div>

										</div>

                                        <div class="col-sm-4 fPopupColWidth fPopupColMSizefull">

											<select id="no_of_passengers_Mo" name="no_of_passengers" class="form-control selectPerhour">

												<option value="">Number of passengers?</option>

												<?							

												for($i=1;$i<=50;$i=$i+1){

													if($i<10){

														$ddText="0".$i;

													}else{

														$ddText=$i;

													}

													?>

													<option value="<?=$ddText?>" <? if($responseJO->no_of_passengers==$ddText){?> selected="selected"<? }?>><?=$ddText?></option>

												<? }?>

											</select>

                                        </div>

                                      </div>

									  

										

                                      <div class="btnRow text-center">

										<input type="hidden" id="no_of_hrs_Mo" name="no_of_hrs" value="04"/>

                                        <input type="submit" class="formBtn" value="See Vehicles"/> <span id="loadingsearch"></span>

                                      </div>

                                    </div>

                                  </div>

                                  

                                  <!--PopupReviewSection -->

                                  <div class="PopupReviewSection">

                                    <div class="popupContainer">

                                      <div class="row">

                                        <div class="col-sm-4 colWidthbx">

                                          <div class="PopupReviewInner">

                                            <div class="PopupReviewImg"> <img src="<?php echo get_template_directory_uri(); ?>/assets/images/state-of-california1.png" alt="State of California Licensed" /> </div>

                                          </div>

                                        </div>

                                        <div class="col-sm-4 colWidthbx">

                                          <div class="PopupReviewInner">

                                            <div class="PopupReviewImg"> <img src="<?php echo get_template_directory_uri(); ?>/assets/images/5-star-reviews1.png" alt="5 Star Reviews" /> </div>

                                          </div>

                                        </div>

                                        <div class="col-sm-4 colWidthbx">

                                          <div class="PopupReviewInner">

                                            <div class="PopupReviewImg"> <img src="<?php echo get_template_directory_uri(); ?>/assets/images/fully-insured-bonded1.png" alt="Fully Insured & Bonded" /> </div>

                                          </div>

                                        </div>

                                        <div class="col-sm-4 colWidthbx">

                                          <div class="PopupReviewInner">

                                            <div class="PopupReviewImg"> <img src="<?php echo get_template_directory_uri(); ?>/assets/images/locally-owned-for-10-years1.png" alt="Locally Owned for 10 Years" /> </div>

                                          </div>

                                        </div>

                                        <div class="col-sm-4 colWidthbx">

                                          <div class="PopupReviewInner">

                                            <div class="PopupReviewImg"> <img src="<?php echo get_template_directory_uri(); ?>/assets/images/cancellation-policy1.png" alt="Cancellation Policy" /> </div>

                                          </div>

                                        </div>

                                      </div>

                                    </div>

                                  </div>

                                  <!--/PopupReviewSection --> 

                                  

                                </div>

                              </div>

                            </div>

                          </div>
</form>		
        

             </div>

	  

    </div>

  </div>

</div>