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

		var dte =  new Date();
		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 + "--" + "date_img",value="",null, '/');
			Zapatec.Utils.writeCookie(window.location.href + "--" + "date_img1",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.
			*/

			
			
			//alert(nights);
			var currdate = startDate.getDate()+7;
			var currmonth = startDate.getMonth();
			var curryear = startDate.getFullYear();
			var dteNow = new Date(curryear,currmonth,currdate);
			
			currdate = dteNow.getDate();
			currmonth = dteNow.getMonth()+1;
			curryear = dteNow.getFullYear();
			if(currdate < 10)
				currdate = '0'+currdate;
			if(currmonth < 10)
				currmonth = '0'+currmonth;
			var currdates = currdate+'/'+currmonth+'/'+curryear;
			
			document.getElementById("RepDate").value=currdates;
		}

		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     :    "DepDate",   // id of the input field
				button         :    "DepDate_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     :    "RepDate",   // id of the input field
				button         :    "RepDate_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
				onUpdate       :    filterDates2,
				theme          :    "aqua"
				});

			
			function EA_DepAirport(str1,str2)
            { 
                var url="index_ajax.php?option=get_arrairport&task=EA_DepAirport&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('DepAirportId').innerHTML=trimmed;
                            document.getElementById('DepAirportId').style.display='block';
                        }
                     });
                }
                // display the error in case of failure
                catch (e)
                {
                    alert("Error: " + e.toString());
                }
            
            }
			
            function EA_DesAirport(str1,str2)
            { 
                var url="index_ajax.php?option=get_arrairport&task=EA_DesAirport&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('DesAirportId').innerHTML=trimmed;
                            document.getElementById('DesAirportId').style.display='block';
                        }
                     });
                }
                // display the error in case of failure
                catch (e)
                {
                    alert("Error: " + e.toString());
                }
            
            }
			
            function OneWayFlights(str1)
            { 
            	if(str1==0)
            	document.getElementById('RepDate').disabled=true;
                else 
                document.getElementById('RepDate').disabled=false;
            	//document.searchForm.RepDate.disabled = str1;
                //alert(str1);
            }
            function EA_LuggageFee(str1,str2,str3,str4,str5)
            { 
                var url="index_ajax.php?option=get_arrairport&task=EA_LuggageFee&ms="+new Date().getTime();
                url=url+"&q="+str1;
                url=url+"&r="+str2;	
                url=url+"&s="+str3;
                url=url+"&t="+str4;
                url=url+"&u="+str5;
                try
                {
                    bodyContent = $.ajax({
                        url: url,
                        global: false,
                        cache: false,
                        type: "GET",				   		    
                        success: function(msg)
                        {				 	
                            var	trimmed=msg.replace(/^\s+|\s+$/g, '');
                            document.getElementById('calculationId').innerHTML=trimmed;
                            document.getElementById('calculationId').style.display='block';
                        }
                     });
                }
                // display the error in case of failure
                catch (e)
                {
                    alert("Error: " + e.toString());
                }
            
            }
             function EA_CcFee(str1,str2,str3,str4,str5)
            { 
                var url="index_ajax.php?option=get_arrairport&task=EA_CcFee&ms="+new Date().getTime();
                url=url+"&q="+str1;
                url=url+"&r="+str2;	
                url=url+"&s="+str3;
                url=url+"&t="+str4;
                url=url+"&u="+str5;
                try
                {
                    bodyContent = $.ajax({
                        url: url,
                        global: false,
                        cache: false,
                        type: "GET",				   		    
                        success: function(msg)
                        {				 	
                            var	trimmed=msg.replace(/^\s+|\s+$/g, '');
                            document.getElementById('calculationId').innerHTML=trimmed;
                            document.getElementById('calculationId').style.display='block';
                        }
                     });
                }
                // display the error in case of failure
                catch (e)
                {
                    alert("Error: " + e.toString());
                }
            
            }
