
		<!--  to hide script contents from old browsers
		var startDate;
		var endDate;
		var callbacks = 0;

		var dte =  new Date();
		var exCode= document.getElementById('EXCode').value;
        
        if(exCode=='bookadmin')currdatex = dte.getDate();
        else currdatex = dte.getDate()+2;
		currmonthx = dte.getMonth();
		curryearx = dte.getFullYear();
		if(currdatex < 10)
			currdatex = '0'+currdatex;
		if(currmonthx < 10)
			currmonthx = '0'+currmonthx;
		var dteStart = new Date(curryearx,currmonthx,currdatex);
		startDate = dteStart;
		
		var ONEDAY = 3600 * 24;

		function resetDates() {
			startDate = endDate = null;
			Zapatec.Utils.writeCookie(window.location.href + "--" + "PickupDate_img",value="",null, '/');
			Zapatec.Utils.writeCookie(window.location.href + "--" + "ArrivalDate_img",value="",null, '/');
		}
		/*
		 * Given two dates (in seconds) find out if date1 is bigger, date2 is bigger or
		 * they're the same, taking only the dates, not the time into account.
		 * In other words, different times on the same date returns equal.
		 * returns -1 for date1 bigger, 1 for date2 is bigger 0 for equal
		 */

		function compareDatesOnly(date1, date2) {
			var year1 = date1.getYear();
			var year2 = date2.getYear();
			var month1 = date1.getMonth();
			var month2 = date2.getMonth();
			var day1 = date1.getDate();
			var day2 = date2.getDate();

			if (year1 > year2) {
				return -1;
			}
			if (year2 > year1) {
				return 1;
			}

			//years are equal
			if (month1 > month2) {
				return -1;
			}
			if (month2 > month1) {
				return 1;
			}

			//years and months are equal
			if (day1 > day2) {
				return -1;
			}
			if (day2 > day1) {
				return 1;
			}

			//days are equal
			return 0;

			/* Can't do this because of timezone issues
			var days1 = Math.floor(date1.getTime()/Date.DAY);
			var days2 = Math.floor(date2.getTime()/Date.DAY);
			return (days1 - days2);
			*/
		}

		function filterDates1(cal) {
			startDate = cal.config.date;
			/* If they haven't chosen an
			end date before we'll set it to the same date as the start date This
			way if the user scrolls in the start date 5 months forward, they don't
			need to do it again for the end date.
			*/

			if (endDate == null) {
			        cal1.config.date = startDate;
			        cal1.config.timeFormat = "24";
                        }
		}

		function filterDates2(cal) {
			endDate = cal.config.date;			
		}

		/*
		* Both functions disable and hilight dates.
		*/

		/*
		* Can't choose days after the
		* end date if it is choosen, hilights start and end dates with one style and dates between them with another
		*/
		function dateInRange1(date) {			

			//disable days prior to today
			var today = dteStart;
			var compareToday = compareDatesOnly(date, today);
			if (compareToday > 0) {
				return(true);
			}

			//all other days are enabled
			return false;
			//alert(ret + " " + today + ":" + date + ":" + compareToday + ":" + days1 + ":" + days2);
			return(ret);
		}

		/*
		* Can't choose days before the
		* start date if it is choosen, hilights start and end dates with one style and dates between them with another
		*/
		function dateInRange2(date) {
			if (startDate != null) {
				// Disable dates before start date
				var compareDays = compareDatesOnly(startDate, date);
				if  (compareDays < 0) {
					return (true);
				}

				// Hilight end date with "edges" style
				if  (compareDays == 0) {
					{return "edges";}
				}

				// Hilight inner dates with "between" style
				if ((endDate != null) && (date > startDate) && (date < endDate)) {
					return "between";
				}
			}

			var now = new Date();
			if (compareDatesOnly(now, date) < 0) {
				return (true);
			}

			//all other days are enabled
			return false;
		}
		// end hiding contents from old browsers  -->
	
		var cal = new Zapatec.Calendar({				
			inputField     :    "PickupDate",
			button         :    "PickupDate_img",  // What will trigger the popup of the calendar
			ifFormat       :    "%d/%m/%Y", 
			electric       :     false,
			numberMonths   :    2,
			weekNumbers    :    false,
			noHelp		   :    true,
			align             : "CR",
			themeSize         : "small",
			dateStatusFunc :    dateInRange1, //the function to call
			onUpdate       :    filterDates1,
			theme          :    "aqua"
		
		});			
		
		var cal1 = new Zapatec.Calendar({
			
			inputField     :    "ArrivalDate",   // id of the input field
			button         :    "ArrivalDate_img",  // What will trigger the popup of the calendar	
			ifFormat       :    "%d/%m/%Y", 			
			electric       :     false,
			numberMonths   :    2,
			weekNumbers    :    false,
			align             : "CR",
			themeSize         : "small",
			noHelp		   :    true,
			dateStatusFunc :    dateInRange2, //the function to call	
			theme          :    "aqua"
			});
					
function Xfers_Airport_CT(str1,str2)
{ 
	ById="airportTO";
	var url="index_ajax.php?option=get_arrairport&task=XFERS_Airport_CT&ms="+new Date().getTime();
	url=url+"&q="+str1;
	url=url+"&r="+str2;	
	try
	{
		bodyContent = $.ajax({
		    url: url,
		    global: false,
		    cache: false,
		    type: "GET",				   		    
		    success: function(msg)
		    {				 	
		    	var	trimmed=msg.replace(/^\s+|\s+$/g, '');
		    	document.getElementById(ById).innerHTML=trimmed;
			    document.getElementById(ById).style.display='block';
		    }
		 });
	}
	// display the error in case of failure
	catch (e)
	{
		alert("Error: " + e.toString());
	}
	
}




function Xfers_Destination_CT(str1,str2,str3)
{ 
	ById="resortTO";
	var url="index_ajax.php?option=get_arrairport&task=XFERS_Destination_CT&ms="+new Date().getTime();
	url=url+"&q="+str1;
	url=url+"&r="+str2;	 
	url=url+"&s="+str3;
	url=url+"&ms="+new Date().getTime();
	try
	{
		bodyContent = $.ajax({
		    url: url,
		    global: false,
		    cache: false,
		    type: "GET",				   		    
		    success: function(msg)
		    {				 	
		    	var	trimmed=msg.replace(/^\s+|\s+$/g, '');
		    	document.getElementById(ById).innerHTML=trimmed;
			    document.getElementById(ById).style.display='block';
		    }
		 });
	}
	// display the error in case of failure
	catch (e)
	{
		alert("Error: " + e.toString());
	}
}	

function XfersCustomerDetails()
{
		var docForm=document.frmXfersCustomer;
		var str='';
		var params='';
		var param='';
        var TranferType=document.getElementById('TranferType').value;
       		
		docForm.first_name.value=remove_special_char(docForm.first_name.value);
		docForm.last_name.value=remove_special_char(docForm.last_name.value);
		docForm.mobile.value=remove_special_char(docForm.mobile.value);
			
			if(docForm.first_name.value=='')
			{
					if(str!='')
					{
						str+=', ';						
					}
					str+='first_name';					
			}
			
			if(docForm.last_name.value=='')
			{
					if(str!='')
					{
						str+=', ';
					}
					str+='last_name';
			}
			
			if(docForm.mobile.value!='')
			{
			   if(isInteger(docForm.mobile.value) && docForm.mobile.value.length>6)
			   {
			   }
				else
				{
					if(str!='')str+=', ';
					str+='mobile is not valid';
				}
			}
			else 
			{
				if(str!='')str+=', ';
					str+='mobile';
			}
				
		
			if(docForm.email.value=='')
			{
					if(str!='')
					{
						str+=', ';
					}
					str+='email';
			}
			else
			{
				if (EmailCheck(docForm.email.value)==false)
				{
					if(str!='')
						str+=', ';
					str+='Invalid Emailaddress';
			
				}
				
			}
			if(docForm.confirm_email.value=='')
			{
					if(str!='')
					{
						str+=', ';
					}
					str+='confirm email';
			}	
			
			if(TranferType == '1' || TranferType == '2')
			{
				//str+='\n\n';
				
				
				if(docForm.DepCountry.options[docForm.DepCountry.selectedIndex].value=='0')
				{
					if(str!='')
					{
						str+=', ';
					}
					str+='Deprture Country';
				}
				
				
				if(docForm.ArrFltsNumber.value=='')
				{
					if(str!='')
					{
						str+=', ';
					}
					str+='Arrival Flight Number';
				}
				
				
				
					 
				var dd2 = docForm.arrivalday.options[docForm.arrivalday.selectedIndex].value;
				var dm2 = docForm.arrivalmonth.options[docForm.arrivalmonth.selectedIndex].value;
				var dy2 = docForm.arrivalyear.options[docForm.arrivalyear.selectedIndex].value;
				var dh2 = docForm.arrivalhours.options[docForm.arrivalhours.selectedIndex].value;
				var dmi2 = docForm.arrivalminutes.options[docForm.arrivalminutes.selectedIndex].value;
					
				// Make new date
				var arrivaldatetime = dy2+'-'+dm2+'-'+dd2+' '+dh2+':'+dmi2;				
				//pram=pram+'&arrivaldatetime='+arrivaldatetime;
				   
				if(docForm.outAccomName.value=='')
				{
					if(str!='')
					{
						str+=', ';
					}
					str+='outbound Accom Name';
				}
				
				 
				
				//pram=pram+'&outAccomAddress1='+docForm.outAccomAddress1.value;
				//pram=pram+'&outAccomAddress2='+docForm.outAccomAddress2.value;
				//pram=pram+'&outAccomTelephone='+docForm.outAccomTelephone.value;			
				
			}
			if(TranferType == '1' || TranferType == '3')
			{
				//str+='\n\n';
				
				if(docForm.ArrCountry.options[docForm.ArrCountry.selectedIndex].value=='0')
				{
					if(str!='')
					{
						str+=', ';
					}
					str+='Arrival Country';
				}
				
				
				if(docForm.DepFltsNumber.value=='')
				{
					if(str!='')
					{
						str+=', ';
					}
					str+='Departure Flight Number';
				}
				
					
				
				var dd3 = docForm.departureday.options[docForm.departureday.selectedIndex].value;
				var dm3 = docForm.departuremonth.options[docForm.departuremonth.selectedIndex].value;
				var dy3 = docForm.departureyear.options[docForm.departureyear.selectedIndex].value;
				var dh3 = docForm.departurehours.options[docForm.departurehours.selectedIndex].value;
				var dmi3 = docForm.departureminutes.options[docForm.departureminutes.selectedIndex].value;				
				// Make new date			
				var departuredatetime = dy3+'-'+dm3+'-'+dd3+' '+dh3+':'+dmi3;	
				//pram=pram+'&departuredatetime='+departuredatetime;			    
				
				
				//pram=pram+'&pickupdatetime='+docForm.Pickupdatetime.value;
				   
				if(docForm.inAccomName.value=='')
				{
					if(str!='')
					{
						str+=', ';
					}
					str+='inbound Accom Name';
				}
				//else pram=pram+'&inAccomName='+docForm.inAccomName.value;
				 
				
				//pram=pram+'&inAccomAddress1='+docForm.inAccomAddress1.value;
				//pram=pram+'&inAccomAddress2='+docForm.inAccomAddress2.value;
				//pram=pram+'&inAccomTelephone='+docForm.inAccomTelephone.value;
                
			}
		
                 
                    
		if(str!='')alert('Please complete the following field(s): '+str+'.');
		else
		{
        	$.showprogress('Please wait','Loading .....');
			updateProgress(10);
			docForm.submit();
           
		}
				
}



