﻿/* calendar control JS start*/
var tempRetDate,tempRetMMYear,tempRetDay,tempDptDay,tempDptDate,tempDptMMYear;
var sType;

var RetDDMMYY;var ReDay;var Type;  
currDate=new Date();
StartingMon=currDate.getMonth;

function SetSearchEngine(num)
{
if(num=="FH"){
document.getElementById("flthtl").style.display="block";
document.getElementById("hotel").style.display="none";
document.getElementById("flight").style.display="none";
replaceDays('FH');
changePictureSrhEng(0);
}
if(num=="F"){			
document.getElementById("flthtl").style.display="none";
document.getElementById("hotel").style.display="none";
document.getElementById("flight").style.display="block";
replaceDays('F');
changePictureSrhEng(1);
}
if(num=="H"){
document.getElementById("flthtl").style.display="none";
document.getElementById("hotel").style.display="block";
document.getElementById("flight").style.display="none";
replaceDays('H');
changePictureSrhEng(2);
}		
}

function showCalender(service,type,rss)
{ 
      if(service=='H'){arr =0;}
      else{arr= rss;}
      Type =type;Service = service;
	if(service=="F")
	{
		if(type=="D"){showCalendarControl(document.FlightSearch.FDptDateDDMMYY,document.FlightSearch.FDayMonth,"Dep",document.FlightSearch.FRetDateDDMMYY,document.FlightSearch.FDayMonthRet);}
		else{showCalendarControl(document.FlightSearch.FRetDateDDMMYY,document.FlightSearch.FDayMonthRet);}
	}
	else if(service=="FH")
	{
		if(type=="D"){showCalendarControl(document.FltHtlSearch.FHDptDateDDMMYY,document.FltHtlSearch.FHDayMonth,"Dep",document.FltHtlSearch.FHRetDateDDMMYY,document.FltHtlSearch.FHDayMonthRet);}
		else{showCalendarControl(document.FltHtlSearch.FHRetDateDDMMYY,document.FltHtlSearch.FHDayMonthRet);}
	}
	else if(service=="H")
	{
		if(type=="D"){showCalendarControl(document.HotelSearch.HDptDateDDMMYY,document.HotelSearch.HDayMonth,"Dep",document.HotelSearch.HRetDateDDMMYY,document.HotelSearch.HDayMonthRet);}
		else{showCalendarControl(document.HotelSearch.HRetDateDDMMYY,document.HotelSearch.HDayMonthRet);}
	}
}

function getDateString(day,mon,year)
{	var dateString="";
	if(mon<=9 && day<=9){dateString ="0"+day+"/"+"0"+mon+"/"+year; }
	else if(mon<=9 && day>9){dateString =day+"/"+"0"+mon+"/"+year;}
	else if(mon>9 && day<=9){dateString ="0"+day+"/"+mon+"/"+year;}
	else{dateString =day+"/"+mon+"/"+year;}
	return dateString;
}
function getDayString(gDateValue)
{if(gDateValue=="0"){dayName="Sun";}
 else if(gDateValue=="1"){dayName="Mon";}
 else if(gDateValue=="2"){dayName="Tue";}
 else if(gDateValue=="3"){dayName="Wed";}
 else if(gDateValue=="4"){dayName="Thu";}
 else if(gDateValue=="5"){dayName="Fri";}
 else if(gDateValue=="6"){dayName="Sat";}
 return dayName;
}
function positionInfo(object)
{ var p_elm = object;
  this.getElementLeft = getElementLeft;
  function getElementLeft() {
    var x = 0; var elm;
    if(typeof(p_elm) == "object"){elm = p_elm;} else {elm = document.getElementById(p_elm);}
    while (elm != null) {
      x+= elm.offsetLeft;
      elm = elm.offsetParent;}
    return parseInt(x); }
  this.getElementWidth = getElementWidth;
  function getElementWidth(){var elm;
    if(typeof(p_elm) == "object"){elm = p_elm;} else {elm = document.getElementById(p_elm);}
    return parseInt(elm.offsetWidth);}
  this.getElementRight = getElementRight;
  function getElementRight(){return getElementLeft(p_elm) + getElementWidth(p_elm);}
  this.getElementTop = getElementTop;
  function getElementTop() {var y = 0;var elm;
    if(typeof(p_elm) == "object"){elm = p_elm;}else {elm = document.getElementById(p_elm);}
    while (elm != null) {y+= elm.offsetTop;elm = elm.offsetParent;}
    return parseInt(y);}
  this.getElementHeight = getElementHeight;
  function getElementHeight()
	{var elm;
    if(typeof(p_elm) == "object"){elm = p_elm;}
	else{elm = document.getElementById(p_elm);}
    return parseInt(elm.offsetHeight);}
  this.getElementBottom = getElementBottom;
  function getElementBottom(){return getElementTop(p_elm) + getElementHeight(p_elm);}
}
function CalendarControl() 
{ var calendarId = 'CalendarControl';var currentYear = 0;var currentMonth = 0;var currentDay = 0;var selectedYear = 0;var selectedMonth = 0;var selectedDay = 0;
  var months = ['January','February','March','April','May','June','July','August','September','October','November','December'];
  var dateField = null; 
  function changeMonthInc(change) 
	{
    currentMonth += change;    
    currentDay = 0;
        if(currentMonth > 12) 
		{
      	currentMonth = 1;
      	currentYear++;
    	} 
		else if(currentMonth < 1)
		{
      	currentMonth = 12;
      	currentYear--;
    	}    	
  }
   
  function getProperty(p_property)
  {var p_elm = calendarId;var elm = null;
    if(typeof(p_elm) == "object"){elm = p_elm;} else{elm = document.getElementById(p_elm);}    
	if (elm != null)
	{
      	if(elm.style)
		{ elm = elm.style;
          if(elm[p_property]){return elm[p_property];}else{return null;}
      	}else {return null;}
    }
  }
function setElementProperty(p_property, p_value, p_elmId)
{	var p_elm = p_elmId;var elm = null;
    if(typeof(p_elm) == "object"){elm = p_elm;}else {elm = document.getElementById(p_elm);}
    if((elm != null) && (elm.style != null)){elm = elm.style;elm[ p_property ] = p_value;}
}
function setProperty(p_property, p_value){setElementProperty(p_property, p_value, calendarId);}
function getDaysInMonth(year, month){return [31,((!(year % 4 ) && ( (year % 100 ) || !( year % 400 ) ))?29:28),31,30,31,30,31,31,30,31,30,31][month-1];}
function getDayOfWeek(year, month, day){var date = new Date(year,month-1,day);return date.getDay();}
this.clearDate = clearDate;
function clearDate(){dateField.value = '';hide();}
this.setDate = setDate;

  function setDate(year, month, day) 
	{
    if(dateField) 
	{
      if(month < 10){month = month;}
      if(day < 10){day =day;}
	mon=parseInt(month);
	var MMM=GetMonth(mon-1);
	var dateString=getDateString(day,mon,year);
	dateField.value = dateString;
	var gDate=new Date(year,mon-1,day);
	var gDateValue=gDate.getDay();
	
	var dayName=getDayString(gDateValue);
	document.getElementById(DateDD.id).value=dayName
	if(Type=="Dep")
		{			
			try
			{
				var RetDateTemp=document.getElementById(RetDDMMYY.id).value;
				var RRTemp=RetDateTemp.split("/");
				var RMMtemp=parseInt(RRTemp[1],10);
				RMMtemp=RMMtemp-1;			
			}catch(err){}
									
			var DDDTemp=dateString.split("/")
			var DMMtemp=parseInt(DDDTemp[1]);
			DMMtemp=DMMtemp-1;
			var ddDater=new Date();
			ddDater.setFullYear(parseInt(DDDTemp[2],10),parseInt(parseInt(DDDTemp[1],10)-1),parseInt(DDDTemp[0],10))
			
			try
			{
				var RRDater=new Date()
				RRDater.setFullYear(parseInt(RRTemp[2],10),parseInt(RMMtemp),parseInt(RRTemp[0],10))
				//if(RRDater <  ddDater)
				//{					
					if(Service=="F"){var gDate1=new Date(year,mon-1,day+7);}
					else{var gDate1=new Date(year,mon-1,day+3);}
				
				dateString1=getDateString(gDate1.getDate(),gDate1.getMonth()+1,gDate1.getFullYear());
				var gDateValue1=gDate1.getDay();
				var dayName1=getDayString(gDateValue1);
				document.getElementById(RetDay.id).value=dayName1
				document.getElementById(RetDDMMYY.id).value=dateString1
				//}
			}
			catch(err){}
		} 
		//========================
	 hide();
    }
    return;
 }

this.changeMonth = changeMonth;
function changeMonth(change) 
{  currentMonth += change;
   currentDay = 0;
  if(currentMonth > 12){currentMonth = 1;currentYear++;} 
  else if(currentMonth == 0){currentMonth = 12;currentYear--;} 
  else if(currentMonth == -1){currentMonth = 11;currentYear--;} 
  else if(currentMonth == -2){currentMonth = 10;currentYear--;}
  else if(currentMonth == -3){currentMonth = 9;currentYear--;}
  else if(currentMonth == -4){currentMonth = 8;currentYear--;}
  calendar = document.getElementById(calendarId);
  calendar.innerHTML = calendarDrawTable();
}
  this.changeYear = changeYear;
function changeYear(change){currentYear += change;currentDay = 0;calendar = document.getElementById(calendarId); calendar.innerHTML = calendarDrawTable();}
function getCurrentYear(){var year = new Date().getFullYear();if(year < 1900){year += 1900;}return year;}
function getCurrentMonth(){return new Date().getMonth() + 1;}
function getCurrentDay(){return new Date().getDate();}
function calendarDrawTable() 
{    
var dayOfMonth = 1;
var validDay = 0;
var startDayOfWeek;
var daysInMonth;
var i;


   var table = "<table cellspacing='0' cellpadding='0' border='0' bgcolor='#ffffff'>";
   
   var NoCal=2;
   if(NoCal==3)
	{ 
   table = table + "<tr class='header'>";
   table = table + "  <td class='previous' align='left'><a href='javascript:changeCalendarControlMonth(-5);'>&lt;</a><a href='javascript:changeCalendarControlMonth(-5);'>&lt;</a></td>";
   table = table + "  <td class='previous' align='center'><font color='white'>Select Your Travel Date </font></td>";
   table = table + "  <td class='next' align='right'><a href='javascript:changeCalendarControlMonth(1);'>&gt;</a><a href='javascript:changeCalendarControlMonth(1);'>&gt;</a></td>";  
   table = table + "</tr>";
   }
   else if(NoCal==2){table = table + "<tr class='header'><td class='previous' colspan='2'>&nbsp;&nbsp;<a href='javascript:changeCalendarControlMonth(-3);'>&lt;</a><a href='javascript:changeCalendarControlMonth(-3);'>&lt;</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color='white'>Select Your Travel Date </font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='javascript:changeCalendarControlMonth(1);'>&gt;</a><a href='javascript:changeCalendarControlMonth(1);'>&gt;</a></td></tr>";}
   else{table = table + "<tr class='header'><td class='previous'>&nbsp;<a href='javascript:changeCalendarControlMonth(-1);'>&lt;</a><a href='javascript:changeCalendarControlMonth(-1);'>&lt;</a> &nbsp;&nbsp; Select Your Travel Date &nbsp;&nbsp;<a href='javascript:changeCalendarControlMonth(1);'>&gt;</a><a href='javascript:changeCalendarControlMonth(1);'>&gt;</a></td></tr>";}
   
   table = table + "<tr>"
   
   
   for(i=1;i<=NoCal;i++)    
    { 
     if(i!=1){changeMonthInc(1)}   
      
    dayOfMonth = 1;
	validDay = 0;
	startDayOfWeek = getDayOfWeek(currentYear, currentMonth, dayOfMonth);
	daysInMonth = getDaysInMonth(currentYear, currentMonth);
    css_class = null; 
    
   table = table + "<td><table width='215px' cellspacing='0' cellpadding='0' border='0'>"; 
   table = table + "<tr><td colspan='7' class='title' bgcolor='#ffffff' style='color:#000; padding:3px 0 3px 0;'>" + months[currentMonth-1] + "&nbsp; &nbsp; &nbsp;" + currentYear + "</td>";
   table = table + "<tr bgcolor='lightblue'><th bgcolor=red>S</th><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th></tr>";
      
   for(var week=0; week < 6; week++) {table = table + "<tr>";
      	for(var dayOfWeek=0; dayOfWeek < 7; dayOfWeek++)
		 {   if(week == 0 && startDayOfWeek == dayOfWeek){validDay = 1;} 
			 else if (validDay == 1 && dayOfMonth > daysInMonth){validDay = 0;}
        	
        	if(validDay) 
			{
         		if (dayOfMonth == selectedDay && currentYear == selectedYear && currentMonth == selectedMonth){css_class = 'current';} 
				else if (dayOfWeek == 0 || dayOfWeek == 6){css_class = 'weekend';} 
				else {css_class = 'weekday';}
				
				var perDate;
					var DMY=new Date();
					if(Type=="Dep")
					{
					perDate=new Date(DMY.getFullYear(),DMY.getMonth(),DMY.getDate());
		            }
		            else
		            {
						var dateString11;
						if(Service=="FH")
						{
							 dateString11 = new String(document.getElementById("FHDptDateDDMMYY").value);
						}
						else if(Service=="F")
						{
							 dateString11 = new String(document.getElementById("FDptDateDDMMYY").value);
						}
						else if(Service=="H")
						{
							 dateString11 = new String(document.getElementById("HDptDateDDMMYY").value);
						}	            
										
        	        var dateParts11 = dateString11.split("/");
					var selectedMonth11,selectedDay11,selectedYear11;
					selectedMonth11 = parseInt(dateParts11[1],10)-1;
        	        selectedDay11 = parseInt(dateParts11[0],10);
        	        selectedYear11 = parseInt(dateParts11[2],10);
        	        perDate=new Date(selectedYear11,selectedMonth11,selectedDay11)
		            }
		            
				var CurDate= new Date(currentYear,currentMonth-1,dayOfMonth);
				
				
				if(Service=='H'){var LastDate=new Date(DMY.getFullYear(),DMY.getMonth()+15,DMY.getDate());}
				else if(Service=='F'){var LastDate=new Date(DMY.getFullYear(),DMY.getMonth()+11,DMY.getDate());}
				else{var LastDate=new Date(DMY.getFullYear(),DMY.getMonth()+13,DMY.getDate());}  //anju 11

                 /*avail cal changes start */
					if(arr.length >= 1) 
					{
					 var qq = 0;
					  for(q=1;q<arr.length;q=q+1)
					   {
					     var arr1  = new Array();					    
					     arr1 = arr[q].split("/");					
					     var checkdate = new Date(parseInt(arr1[2],10),parseInt(parseInt(arr1[0],10)-1,10),parseInt(arr1[1],10))    					
					    if(CurDate.getDate() == checkdate.getDate() && CurDate.getMonth() == checkdate.getMonth() && CurDate.getFullYear() == checkdate.getFullYear()){qq=1;break;}
						else{qq=0;}
					    }
					}	
					else{var qq = 0;}
				if(CurDate<perDate || CurDate>LastDate){table = table + "<td><a class='"+css_class+"'><strike><font color='#c1c1c1'>"+dayOfMonth+"</font></strike></a></td>";}
				else if(qq==0){table = table + "<td><a class='"+css_class+"' href=\"javascript:setCalendarControlDate("+currentYear+","+currentMonth+","+dayOfMonth+")\">"+dayOfMonth+"</a></td>";}
				else
				{
					if(Service=='H'){table = table + "<td><a class='"+css_class+"' href=\"javascript:setCalendarControlDate("+currentYear+","+currentMonth+","+dayOfMonth+")\">"+dayOfMonth+"</a></td>"; }
					else{table = table + "<td  class='DirectFlight' valign='middle'><a style='color:#FFFFFF; text-decoration:none'  href=\"javascript:setCalendarControlDate("+currentYear+","+currentMonth+","+dayOfMonth+")\">"+dayOfMonth+"</a></td>";}
				}
				/* avail cal changes end */

          		dayOfMonth++;
        	} 
			else{table = table + "<td class='empty'>&nbsp;</td>";}
      	 }
      	table = table + "</tr>";
      }
      
      table = table + "</table></td>";
      }
      table=table+"</tr>"
      
     if(Service=='H'){}
     else{table = table +"<tr><td colspan=\""+NoCal+"\" style='padding:5px' class='adult1'><img src='http://www.mygibraltar.co.uk/images/square.jpg'/><b>This square indicates dates where direct flights operate</b></td></tr>"} 
      
	table = table + "<tr class='header' align='center'><th colspan=\""+NoCal+"\" style='padding: 3px;'><a href='javascript:hideCalendarControl();'><b>Close</b></a></th></tr>"; //<a href='javascript:clearCalendarControl();'>Clear</a>
    table = table + "</table>";
    
	return table;
}
this.show = show;
function show(field,DD1) 	
		{
		can_hide = 0;
		if (dateField == field){return;} 
		else{dateField = field;}
		if(dateField) 	
		{
      	try {
        	var dateString = new String(dateField.value);
        	var dateParts = dateString.split("/");
        	selectedMonth = parseInt(dateParts[1],10);
        	selectedDay = parseInt(dateParts[0],10);
        	selectedYear = parseInt(dateParts[2],10);
      		} catch(e) {}
    	}

    if (!(selectedYear && selectedMonth && selectedDay)) 
	{
      selectedMonth = getCurrentMonth();
      selectedDay = getCurrentDay();
      selectedYear = getCurrentYear();
    }

    currentMonth = selectedMonth;
    currentDay = selectedDay;
    currentYear = selectedYear;
    if(document.getElementById){

      calendar = document.getElementById(calendarId);
      calendar.innerHTML = calendarDrawTable(currentYear, currentMonth);

      setProperty('display', 'block');

      var fieldPos = new positionInfo(dateField);
      var calendarPos = new positionInfo(calendarId);

      var x = fieldPos.getElementLeft()-68;
      var y = fieldPos.getElementBottom();

      setProperty('left', x + "px");
      setProperty('top', y + "px");
 
      if (document.all) {
        setElementProperty('display', 'block', 'CalendarControlIFrame');
        setElementProperty('left', x + "px", 'CalendarControlIFrame');
        setElementProperty('top', y + "px", 'CalendarControlIFrame');
        setElementProperty('width', calendarPos.getElementWidth() + "px", 'CalendarControlIFrame');
        setElementProperty('height', calendarPos.getElementHeight() + "px", 'CalendarControlIFrame');
      }
    }
  }
this.hide = hide;
function hide() {if(dateField) {setProperty('display', 'none');setElementProperty('display', 'none', 'CalendarControlIFrame');dateField = null;}}
this.visible = visible;
function visible() {return dateField;}
this.can_hide = can_hide; var can_hide = 0;
}
var calendarControl = new CalendarControl();

function showCalendarControl(DDMMYY,DD,type,retddmmyy,retday)
{ 
	RetDDMMYY=retddmmyy;
	RetDay=retday;
	Type=type;
	DateDD=DD;
	calendarControl.show(DDMMYY,DD);
}
function clearCalendarControl() {calendarControl.clearDate();}
function hideCalendarControl(){if (calendarControl.visible()){calendarControl.hide();}}
function setCalendarControlDate(year, month, day){calendarControl.setDate(year, month, day);}
function changeCalendarControlYear(change){calendarControl.changeYear(change);}
function changeCalendarControlMonth(change){calendarControl.changeMonth(change);}
document.write("<iframe id='CalendarControlIFrame'  frameBorder='0' scrolling='no'></iframe>");
document.write("<div id='CalendarControl'></div>");
/* calendar control end - fhvalidationsearch1 js start*/

function replaceDays(num)
{
	if(num=='FH'){ChangeDayDepRet(document.FltHtlSearch.FHDptDateDDMMYY,document.FltHtlSearch.FHDayMonth,document.FltHtlSearch.FHRetDateDDMMYY,document.FltHtlSearch.FHDayMonthRet);}
	if(num=='F'){ChangeDayDepRet(document.FlightSearch.FDptDateDDMMYY,document.FlightSearch.FDayMonth,document.FlightSearch.FRetDateDDMMYY,document.FlightSearch.FDayMonthRet);}
	if(num=='H'){ChangeDayDepRet(document.HotelSearch.HDptDateDDMMYY,document.HotelSearch.HDayMonth,document.HotelSearch.HRetDateDDMMYY,document.HotelSearch.HDayMonthRet);}
}
function ChangeDayDepRet(DptDateDDMMYY,DptDateDay,RetDateDDMMYY,RetDateDay)
{
	var year=document.getElementById(DptDateDDMMYY.id).value.substr(6,4);
	var mon=document.getElementById(DptDateDDMMYY.id).value.substr(3,2);
	var day=document.getElementById(DptDateDDMMYY.id).value.substr(0,2);	
	var year1=document.getElementById(RetDateDDMMYY.id).value.substr(6,4);
	var mon1=document.getElementById(RetDateDDMMYY.id).value.substr(3,2);
	var day1=document.getElementById(RetDateDDMMYY.id).value.substr(0,2);	
	var gDeptDate= new Date(year,mon-1,day);
	var gDeptDate1= new Date(year1,mon1-1,day1);	
	var dValue=gDeptDate.getDay();
	var dValue1=gDeptDate1.getDay();
	var dayName="";
	var dayName1="";
	if(dValue=="0"){dayName="Sun";}
	else if(dValue=="1"){dayName="Mon";}
	else if(dValue=="2"){dayName="Tue";}
	else if(dValue=="3"){dayName="Wed";}
	else if(dValue=="4"){dayName="Thu"}
	else if(dValue=="5"){dayName="Fri";}
	else if(dValue=="6"){dayName="Sat";}		
	if(dValue1=="0"){dayName1="Sun";}
	else if(dValue1=="1"){dayName1="Mon";}
	else if(dValue1=="2"){dayName1="Tue";}
	else if(dValue1=="3"){dayName1="Wed";}
	else if(dValue1=="4"){dayName1="Thu";}
	else if(dValue1=="5"){dayName1="Fri";}
	else if(dValue1=="6"){dayName1="Sat";}
document.getElementById(DptDateDay.id).value=dayName;
document.getElementById(RetDateDay.id).value=dayName1;
}
function setDMY(num)
{if(num=='FH'){setDatMonYear(document.FltHtlSearch.FHDptDateDDMMYY,document.FltHtlSearch.FHDayMonth,document.FltHtlSearch.FHDptMon,document.FltHtlSearch.FHDptDate,document.FltHtlSearch.FHDptMonYr,document.FltHtlSearch.FHRetDateDDMMYY,document.FltHtlSearch.FHDayMonthRet,document.FltHtlSearch.FHRetMon,document.FltHtlSearch.FHRetDate,document.FltHtlSearch.FHRetMonYr,document.FltHtlSearch.FHDptMonthName,document.FltHtlSearch.FHRetMonthName,"0");}
 if(num=='F'){setDatMonYear(document.FlightSearch.FDptDateDDMMYY,document.FlightSearch.FDayMonth,document.FlightSearch.FDptMon,document.FlightSearch.FDptDate,document.FlightSearch.FDptMonYr,document.FlightSearch.FRetDateDDMMYY,document.FlightSearch.FDayMonthRet,document.FlightSearch.FRetMon,document.FlightSearch.FRetDate,document.FlightSearch.FRetMonYr,document.FlightSearch.FDptMonthName,document.FlightSearch.FRetMonthName,"0");	}
 if(num=='H'){setDatMonYear(document.HotelSearch.HDptDateDDMMYY,document.HotelSearch.HDayMonth,document.HotelSearch.HDptMon,document.HotelSearch.HDptDate,document.HotelSearch.HDptMonYr,document.HotelSearch.HRetDateDDMMYY,document.HotelSearch.HDayMonthRet,document.HotelSearch.HRetMon,document.HotelSearch.HRetDate,document.HotelSearch.HRetMonYr,document.HotelSearch.HDptMonthName,document.HotelSearch.HRetMonthName,"0");}
}
function setDatMonYear(DptDateDDMMYY,DptYr,DptMon,DptDate,DptMonYr,RetDateDDMMYY,RetYr,RetMon,RetDate,RetMonYr,DptMonName,RetMonName,JrnType)
{
	var DepMMYY="";
	var RetMMYY="";
	var Dep=document.getElementById(DptDateDDMMYY.id).value;
	var day=document.getElementById(DptYr.id).value;
	var year=Dep.substring(2);
	var mon;
	if (Dep.substring(0,1)==0){mon=parseInt(Dep.substring(1,2));}
	else{mon=parseInt(Dep.substring(0,2));}
	monn=parseInt(mon);
	var monName=getMonthNameString(monn);	
	var Ret=document.getElementById(RetDateDDMMYY.id).value;
	var Ret2="0";
	/* Ret2= document.getElementById(JrnType.id).value; */
		if(Ret2=="1")
		{	var year1=Dep.substring(2);
	        var mon1;
			if (Dep.substring(0,1)==0){mon1=parseInt(Dep.substring(1,2));}
			else{mon1=parseInt(Dep.substring(0,2));}
	        var day1=document.getElementById(DptDate.id).value;	}
		else
		{	var year1=Ret.substring(2);
	        var mon1;
			if (Ret.substring(0,1)==0){mon1=parseInt(Ret.substring(1,2));}
			else{mon1=parseInt(Ret.substring(0,2));}
	        var day1=document.getElementById(RetYr.id).value;
		}		        
    monnn=parseInt(mon1);
    var monName1=getMonthNameString(monnn);
    if(mon<10){mon="0"+mon;}
    if (mon1<10){mon1="0"+mon1;}
	    if(mon<=11)
		{DepMMYY=mon+year;
		if(day<10){day="0"+day;}
		document.getElementById(DptDate.id).value=day;
		document.getElementById(DptMonYr.id).value=DepMMYY;
		}
		else
		{
		DepMMYY=mon+year;
		document.getElementById(DptDate.id).value=day;
		document.getElementById(DptMonYr.id).value=DepMMYY;
		}
		document.getElementById(DptMon.id).value=monn;	
	    if(mon1<=12)
		{ RetMMYY=mon1+year1;
		  if(Ret=="00" || Ret2=="1") {document.getElementById(RetDate.id).value=day;}
		  else { if(day1<10){day1="0"+day1;}
		        document.getElementById(RetDate.id).value=day1;}		       
		        document.getElementById(RetMonYr.id).value=RetMMYY;
	    }
		else
		{
		RetMMYY=mon1+year1;
		document.getElementById(RetDate.id).value=day1;
		document.getElementById(RetMonYr.id).value=RetMMYY;
		}		
	 document.getElementById(RetMon.id).value=monnn;		
}
function fHValidateSearch() 
{		if(fHDateValidation()==false){return false;}
		if(FlightHotelSearch()==false){return false;}	
return true;
}

function fHDateValidation()
{   
   
    var CurDate=new Date(currDate.getYear(),currDate.getMonth(),currDate.getDate()); 
    
    var dateStrTemp = new String(document.getElementById("FHDptDateDDMMYY").value);
	var datePartsTemp = dateStrTemp.split("/");			
	var DptDate= new Date(parseInt(datePartsTemp[2],10),parseInt(datePartsTemp[1],10)-1,parseInt(datePartsTemp[0],10))
    
	var dateStrTemp = new String(document.getElementById("FHRetDateDDMMYY").value);
	var datePartsTemp = dateStrTemp.split("/");	
	var RetDate= new Date(parseInt(datePartsTemp[2],10),parseInt(datePartsTemp[1],10)-1,parseInt(datePartsTemp[0],10))
	
		var DD=new Date();
		var D =new Date(DD.getFullYear(),DD.getMonth(),(DD.getDate()+1));		
			
		if(DptDate<=D)
		{alert("IF DEPARTURE IS WITHIN 48 HOURS, PLEASE CONTACT OUR RESERVATIONS DEPARTMENT ON 020 8518 4181");
		document.FltHtlSearch.FHDptDateDDMMYY.focus();
		return false;}
		
		if(RetDate<=DptDate)
		{alert("Return Date Must be greater than Depart date");
		document.FltHtlSearch.FHRetDateDDMMYY.focus();
		return false;}			
}
function FlightHotelSearch()  
{
		var adValue,twValue,doValue,siValue,triValue,total;
		adValue=new Number(document.FltHtlSearch.FHAdult.value);
		chValue=new Number(document.FltHtlSearch.FHChild.value);
		invalue=new Number(document.FltHtlSearch.FHInfant.value);
		siValue=new Number(document.FltHtlSearch.FHSngRoom.value);
		twValue=new Number(document.FltHtlSearch.FHTwnRoom.value);
		doValue=new Number(document.FltHtlSearch.FHDblRoom.value);
		triValue=new Number(document.FltHtlSearch.FHTplRoom.value);		
		twValue=twValue*2;
		doValue=doValue*2;
		triValue=triValue*3;
		total=(twValue+doValue+siValue+triValue);
		if(adValue == 0)
			{alert("Invalid Room Selection.");
			document.FltHtlSearch.FHAdult.focus();
			return false;}
			else if (chValue==0 && invalue==0)
			{
			  if(total!=adValue)
               {
                 if((document.FltHtlSearch.FHDblRoom.value==adValue) && (document.FltHtlSearch.FHSngRoom.value==0) && (document.FltHtlSearch.FHTwnRoom.value==0) && (document.FltHtlSearch.FHTplRoom.value==0)){return true; }
                 else if((document.FltHtlSearch.FHTwnRoom.value==adValue) && (document.FltHtlSearch.FHSngRoom.value==0) && (document.FltHtlSearch.FHDblRoom.value==0) && (document.FltHtlSearch.FHTplRoom.value==0)) { return true; }
                 else{ alert("Invalid Room Selection..");
                        document.FltHtlSearch.FHAdult.focus();
                        return false;}
                }
			}
			else if (chValue>0 && invalue==0)
			{ 
			var adchtotal=chValue+adValue;
				if (adchtotal>9)
  				{alert("Total no of person should not be more than 9");
				document.FltHtlSearch.FHAdult.focus();
				return false;}	
				if(triValue==adValue && chValue>0 && doValue==0 && twValue==0 && siValue==0)
					{
					alert("Invalid Room Selection.")
					document.FltHtlSearch.FHAdult.focus();
					return false;
					}			
				if ((doValue==adValue || twValue==adValue || (twValue+doValue)==adValue || total==adValue ) && chValue<=adValue/2 )
				{
				   if (total!=adValue)  /*adchtotal if child is treated as adult  */
					{alert("Invalid Room Selection.");
					document.FltHtlSearch.FHAdult.focus();
					return false;}
				}
				else if (total!=adchtotal)
 	 			{
				alert("Invalid Room Selection.");
				document.FltHtlSearch.FHAdult.focus();
				return false;
    	     	}
			}
			else if (chValue==0 && invalue>0)
			{
			var inadtotal=invalue+adValue;
  			if (inadtotal>9)
  				{
				alert("Total no of person should not be more than 9");
				document.FltHtlSearch.FHAdult.focus();
				return false;
  				}
				if (invalue>adValue)
			  	{
				alert("Number of infants should be equal to or less then number of adults");
				document.FltHtlSearch.FHAdult.focus();
				return false;
			  	}
				else if(total!=adValue)
				{
				alert("Invalid Room Selection.");
				document.FltHtlSearch.FHAdult.focus();
				return false;
				}
			}
			else if (chValue>0 && invalue>0)
			{
			var chinadtotal=invalue+adValue+chValue;
			if (chinadtotal>9)
  				{
				alert("Total no of person should not be more than 9");
				document.FltHtlSearch.FHAdult.focus();
				return false;
               }
			   
			if (invalue>adValue)
  				{
				alert("Number of infants should be equal to or less then number of adults");
				document.FltHtlSearch.FHAdult.focus();
				return false;
  				}
			if ((doValue==adValue || twValue==adValue || (twValue+doValue)==adValue || total==adValue) && chValue<=adValue/2 && invalue<=adValue)
				{
				if (total!=adValue) /* +chValue if child is treated as adult*/
					{
					alert("Invalid Room Selection.");
					document.FltHtlSearch.FHAdult.focus();
					return false;
					}
				}
		 if(total!=adValue+chValue)
				{
				alert("Invalid Room Selection.");
				document.FltHtlSearch.FHAdult.focus();
				return false;
				}
		}
}
function fValidateSearch() 
{
	var Adult,child,Infant,total;
	Adult=new Number(document.FlightSearch.FAdult.value);
	child=new Number(document.FlightSearch.FChild.value);
	Infant=new Number(document.FlightSearch.FInfant.value);
	total=(Adult+child+Infant);	
	if (Infant > Adult) 
	{alert("Number of infants should be equal to or less then number of adults");
	return false;
	}	
	if(total>9)
	{alert("Total no of person should not be more than 9");
	return false;
	}
	if(fDateValidation()==false){return false;}	
return true;
}
function fDateValidation()
{	
	var CurDate=new Date(currDate.getYear(),currDate.getMonth(),currDate.getDate()); /*new Date(document.FlightSearch.FBookYr.value, document.FlightSearch.FBookMon.value, document.FlightSearch.FBookDD.value); */
	//var Dptdate= new Date(document.FlightSearch.FDptMonYr.value.substr(2,4), (document.FlightSearch.FDptMonYr.value.substr(0,2)-1), document.FlightSearch.FDptDate.value);
	//var retDate= new Date(document.FlightSearch.FRetMonYr.value.substr(2,4), (document.FlightSearch.FRetMonYr.value.substring(0,2)-1), document.FlightSearch.FRetDate.value);
		
	var dateStrTemp = new String(document.getElementById("FDptDateDDMMYY").value);
	var datePartsTemp = dateStrTemp.split("/");			
	var DptDate= new Date(parseInt(datePartsTemp[2],10),parseInt(datePartsTemp[1],10)-1,parseInt(datePartsTemp[0],10))	
		
	var dateStrTemp = new String(document.getElementById("FRetDateDDMMYY").value);
	var datePartsTemp = dateStrTemp.split("/");			
	var RetDate= new Date(parseInt(datePartsTemp[2],10),parseInt(datePartsTemp[1],10)-1,parseInt(datePartsTemp[0],10))	
		
		var DD=new Date();
		var D =new Date(DD.getFullYear(),DD.getMonth(),DD.getDate()+1);	
		
		if(DptDate<=D)
		{		
		alert("IF DEPARTURE IS WITHIN 48 HOURS, PLEASE CONTACT OUR RESERVATIONS DEPARTMENT ON 020 8518 4181");
		try{document.getElementById("FDayMonth").options[StartingDate].selected=true;}catch(e){}
		document.FlightSearch.FDptDateDDMMYY.focus();
		return false;
		}
var DMM=document.FlightSearch.FRetMonYr.value.substring(0,2)
DDD=document.FlightSearch.FRetDate.value;
 /*if (document.getElementById("FDayMonthRet").value=="00"){document.FlightSearch.FJrnType.value=1;}*/
 var JType="0" /*document.FlightSearch.FJrnType.value;*/
 if(DMM!="00" && DDD!="000" && JType!="1")
 {   if(RetDate<=DptDate)
		{ alert("Return Date Must be greater than Depart date");
		  document.FlightSearch.FRetDateDDMMYY.focus();
		 return false;}	
 }			
}
  //for old hotel sytem
function hValidateSearch() 
{
var DFrom=0
		var twnRoom,dblRoom,sngRoom,tplRoom,total;
		if(hDateValidation()==false){return false;}		
		twnRoom=new Number(document.HotelSearch.HTwnRoom.value);
		dblRoom=new Number(document.HotelSearch.HDblRoom.value);
		sngRoom=new Number(document.HotelSearch.HSngRoom.value);
		tplRoom=new Number(document.HotelSearch.HTplRoom.value);
		total=(twnRoom+dblRoom+sngRoom+tplRoom);
		if(total<1)
		{alert("Please select a room type");
		document.HotelSearch.HSngRoom.value;
		return false;
		}
return true;
} 

function hDateValidation()
{
	var CurDate=new Date(currDate.getYear(),currDate.getMonth(),currDate.getDate()); /* new Date(document.HotelSearch.hHBookYr.value, document.HotelSearch.hHBookMon.value, document.HotelSearch.hHBookDD.value); */
	//var Dptdate= new Date(document.HotelSearch.HDptMonYr.value.substring(2,7), (document.HotelSearch.HDptMonYr.value.substring(0,2)-1), document.HotelSearch.HDptDate.value);
	//var RetDate= new Date(document.HotelSearch.HRetMonYr.value.substring(2,7), (document.HotelSearch.HRetMonYr.value.substring(0,2)-1), document.HotelSearch.HRetDate.value);
	
	var dateStrTemp = new String(document.getElementById("HDptDateDDMMYY").value);
	var datePartsTemp = dateStrTemp.split("/");			
	var DptDate= new Date(parseInt(datePartsTemp[2],10),parseInt(datePartsTemp[1],10)-1,parseInt(datePartsTemp[0],10))
	
	var dateStrTemp = new String(document.getElementById("HRetDateDDMMYY").value);
	var datePartsTemp = dateStrTemp.split("/");			
	var RetDate= new Date(parseInt(datePartsTemp[2],10),parseInt(datePartsTemp[1],10)-1,parseInt(datePartsTemp[0],10))
	
		var DD=new Date();
		var D =new Date(DD.getFullYear(),DD.getMonth(),DD.getDate()+1);			
					
		if(DptDate<=D)
		{
		alert("IF CHECK-IN DATE IS WITHIN 48 HOURS, PLEASE CONTACT OUR RESERVATIONS DEPARTMENT ON 020 8518 4181");
		try{document.getElementById("HDayMonth").options[StartingDate].selected=true;}catch(e){}
		document.HotelSearch.HDptDateDDMMYY.focus();
		return false;
		}
		if(RetDate<=DptDate)
		{
		alert("Return Date Must be greater than Depart date");
		document.HotelSearch.HRetDateDDMMYY.focus();
		return false;
		}			
}
function GetMonth(mon)
{
switch(mon)
	{
	case 0: return "JAN"; break;
	case 1: return "FEB"; break;
	case 2: return "MAR"; break;
	case 3: return "APR"; break;
	case 4: return "MAY"; break;
	case 5: return "JUN"; break;
	case 6: return "JUL"; break;
	case 7: return "AUG"; break;
	case 8: return "SEP"; break;
	case 9: return "OCT"; break;
	case 10: return "NOV"; break;
	case 11: return "DEC"; 
	}
}

function getMonthNameString(num)
{
	var ll=num;
	if(ll==1){return "Jan";}
	if(ll==2){return "Feb";}
	if(ll==3){return "Mar";}
	if(ll==4){return "Apr";}
	if(ll==5){return "May";}
	if(ll==6){return "Jun";}
	if(ll==7){return "Jul";}
	if(ll==8){return "Aug";}
	if(ll==9){return "Sep";}
	if(ll==10){return "Oct"}
	if(ll==11){return "Nov";}
	if(ll==12){return "Dec";}
}
function validDate(YYYY,MM,DD)
{
var gg;
	gg=new Number(MM);
	MM=gg;
		if(MM==4 || MM==6 || MM==9 || MM==11 ){if(parseInt(DD)>=31){return false;}}		
		else if(MM==2 && YYYY%4 ==0){if(DD>=30){return false;}}		
		else if(MM==2){if(DD>=29){return false;}
		else if(DD==" " || DD=="0"){return false;}}
return true;
} 

/* fhvalidationsearch1 end - searchengine js start*/
function MM_openBrWindow(theURL,winName,features) {window.open(theURL,winName,features);}
function getOptions(str,fin){for(i=str;i<=fin;i++){document.write("<option value=\""+i+"\">"+i+"</option>");}}
function selectDropDown(ddlNameId,SelVal){document.getElementById(ddlNameId).options[SelVal].selected=true;}
function nonstop(nstopID)
{
    try{if (document.getElementById(nstopID).checked==false){document.getElementById(nstopID).value=0;}
	else{document.getElementById(nstopID).value=1;	}}
	catch(e){document.getElementById(nstopID).value=0;}	
}	
function classtype(c,hiddenfldID,rdobtnID)
{try{	if(c=="ECONOMY")
	     {document.getElementById(hiddenfldID).value="ECONOMY";
		  document.getElementById(rdobtnID).checked=true; }
	if(c=="BUSINESS")
	     {	document.getElementById(hiddenfldID).value="BUSINESS";
		    document.getElementById(rdobtnID).checked=true; }
	if(c=="FIRST")
	     {	document.getElementById(hiddenfldID).value="FIRST";
		    document.getElementById(rdobtnID).checked=true;  }   
}catch(e){}
}
function selectDestDropDown(Dest,ddlNameId)
{var F;
    try{for(F=0;F<document.getElementById(ddlNameId).length;F++)
		{if(document.getElementById(ddlNameId).options[F].value==Dest.toUpperCase())
			{document.getElementById(ddlNameId).options[F].selected=true;
			break;}
		}}catch(e){document.getElementById(ddlNameId).options[0].selected=true;}
}

function fillDestTo(destfromID,desttoID,nstopID)
{ try{
        if(document.getElementById(destfromID).value=='GIB')
	     {	
			document.getElementById(desttoID).options.length=0;				
	        document.getElementById(desttoID).options[0] =  new Option('London Gatwick','LGW');	
	        document.getElementById(desttoID).options[1] =  new Option('London Luton','LTN');
	        document.getElementById(desttoID).options[2] =  new Option('London Heathrow','LHR');
	        document.getElementById(desttoID).options[3] =  new Option('East Midlands','EMA');				
	        document.getElementById(desttoID).options[4] =  new Option('Edinburgh','EDI');
	        document.getElementById(desttoID).options[5] =  new Option('Glasgow','GLA');			
	        document.getElementById(desttoID).options[6] =  new Option('Manchester','MAN'); 
			document.getElementById(desttoID).options[7] =  new Option('Liverpool','LPL');       			
	      }
	    else{document.getElementById(desttoID).options.length=0;document.getElementById(desttoID).options[0] =  new Option('Gibraltar','GIB');}
}catch(e){document.getElementById(desttoID).options.length=0;				
		document.getElementById(desttoID).options[0] =  new Option('Gibraltar','GIB');}	
}
function manShowHide(ddlFromID,ddlToID,num)
{	
	
	var destFrom=document.getElementById(ddlFromID).options[document.getElementById(ddlFromID).selectedIndex].value;
	var destTo=document.getElementById(ddlToID).options[document.getElementById(ddlToID).selectedIndex].value;

    if((destFrom=="EMA" && destTo=="GIB")||(destFrom=="GIB" && destTo=="EMA"))
    {    
    if(ddlFromID="FDestFrom"){setdatesEMA('FDayMonth','FDptDateDDMMYY','FDayMonthRet','FRetDateDDMMYY');}
    if(ddlFromID="FHDestFrom"){setdatesEMA('FHDayMonth','FHDptDateDDMMYY','FHDayMonthRet','FHRetDateDDMMYY');}
    }
    
    if((destFrom=="ABZ" && destTo=="GIB")||(destFrom=="GIB" && destTo=="ABZ")||(destFrom=="GLA" && destTo=="GIB")||(destFrom=="GIB" && destTo=="GLA"))
    {    
    if(ddlFromID="FDestFrom"){setdatesGLA('FDayMonth','FDptDateDDMMYY','FDayMonthRet','FRetDateDDMMYY');}
    if(ddlFromID="FHDestFrom"){setdatesGLA('FHDayMonth','FHDptDateDDMMYY','FHDayMonthRet','FHRetDateDDMMYY');}
    }

//      if((destFrom=="LPL"  && destTo=="GIB")||(destFrom=="GIB"  && destTo=="LPL")){alert("Please note. Now you can fly nonstop three times a week from Liverpool to Gibraltar  every TUESDAY / THURSDAY and SATUREDAY and same day return");}
//      if((destFrom=="MAN"  && destTo=="GIB")||(destFrom=="GIB"  && destTo=="MAN")){if (num=="1"){MM_openBrWindow('../News.html','','width=380,height=180,left=250,top=350');} else{MM_openBrWindow('News.html','','width=380,height=180,left=250,top=350');}	}	
//      if((destFrom=="LGW"  && destTo=="GIB")||(destFrom=="GIB"  && destTo=="LGW")){alert("WE ARE EXPERIENCING DIFFICULTIES WITH BOOKING EASYJET AT PRESENT.  FOR ANY GATWICK DEPARTURES, PLEASE CALL US ON 020 8518 4181 TO BOOK YOUR HOLIDAY MANUALLY.  ALTERNATIVELY, YOU MAY FLY WITH BRITISH AIRWAYS FROM HEATHROW OR MONARCH FROM LUTON OR MANCHESTER");}						

}
function changePictureSrhEng(num)
{
if(num==0){ document.getElementById("flthtlbutton").setAttribute("src","http://www.mygibraltar.co.uk/Images/FH_Selected1.gif"); 
			document.getElementById("fltbutton").setAttribute("src","http://www.mygibraltar.co.uk/Images/F_UnSelected1.gif"); 
			document.getElementById("htlbutton").setAttribute("src","http://www.mygibraltar.co.uk/Images/H_UnSelected1.gif");}
if(num==1){	document.getElementById("fltbutton").setAttribute("src","http://www.mygibraltar.co.uk/Images/F_Selected1.gif"); 
			document.getElementById("flthtlbutton").setAttribute("src","http://www.mygibraltar.co.uk/Images/FH_UnSelected1.gif"); 
			document.getElementById("htlbutton").setAttribute("src","http://www.mygibraltar.co.uk/Images/H_UnSelected1.gif");}
if(num==2){	document.getElementById("htlbutton").setAttribute("src","http://www.mygibraltar.co.uk/Images/H_Selected1.gif"); 
			document.getElementById("flthtlbutton").setAttribute("src","http://www.mygibraltar.co.uk/Images/FH_UnSelected1.gif"); 
			document.getElementById("fltbutton").setAttribute("src","http://www.mygibraltar.co.uk/Images/F_UnSelected1.gif"); }			
}

function doUnload()
{	var myclose = false;
	if (event.clientY < 0){myclose=true;}
	if (myclose==true){document.close();}
}
function MM_showHideLayers() { 
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function MM_findObj(n, d) { 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;}
  
var iframeids=["hod_breaks"]
var iframehide="yes"
var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 
function resizeCaller() 
{var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids)
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids] : document.getElementById(iframeids);
tempobj.style.display="block";}}
}
function resizeIframe(frameid)
{var currentfr=document.getElementById(frameid)
    if (currentfr && !window.opera)
    {currentfr.style.display="block";
    if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) 
    currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; 
    else if (currentfr.Document && currentfr.Document.body.scrollHeight) 
    currentfr.height = currentfr.Document.body.scrollHeight;
    if (currentfr.addEventListener)
    currentfr.addEventListener("load", readjustIframe, false)
    else if (currentfr.attachEvent){
    currentfr.detachEvent("onload", readjustIframe) 
    currentfr.attachEvent("onload", readjustIframe)}}
}
function readjustIframe(loadevt)
{var crossevt=(window.event)? event : loadevt;
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement;
if (iframeroot)
resizeIframe(iframeroot.id);
}
function loadintoIframe(iframeid, url)
{if (document.getElementById)
document.getElementById(iframeid).src=url;
}
function MM_reloadPage(init) {  
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}
 /* for page load of flight section result page */ 
var pickedUp = new Array("", false);
function getReadyToMove(element,evt)
{pickedUp[0] = element;
pickedUp[1] = true;}
function checkLoadedObjects(evt)
 {
  if (pickedUp[1] == true){
  var currentSelection = document.getElementById(pickedUp[0]);
  currentSelection.style.position = "absolute";
  currentSelection.style.top = (evt.clientY) + "px";
  currentSelection.style.left = (evt.clientX) + "px";} 
}
function dropLoadedObject(evt)
 {
 if (pickedUp[1] == true){
  var currentSelection = document.getElementById(pickedUp[0]);
  currentSelection.style.position = "absolute";
  currentSelection.style.top = (evt.clientY) + "px";
  currentSelection.style.left = (evt.clientX) + "px";
   pickedUp = new Array("", false);}
}
  
function showhideDiv(num,i)
{ 
try{
var roomtype="RoomTypeDiv"+i;
var hideroomtype="HideRoomType"+i;
if(num==0)
{
document.getElementById(roomtype).style.display="block";
document.getElementById(hideroomtype).style.display="block";
}
else{document.getElementById(roomtype).style.display="none";
document.getElementById(hideroomtype).style.display="none";}
}catch(e){}
}
function setIndex(hiddenID,ddlID){document.getElementById(hiddenID).value=document.getElementById(ddlID).selectedIndex;}

/* availablity calender */
function AvailFlight1(Type,Flight,p)
{

var rss="";
var countryNode="";
var DestFrom,DestTo;
if (Flight=="FH"){DestFrom=document.getElementById("FHDestFrom").value;DestTo=document.getElementById("FHDestTo").value;}
else if (Flight=="F"){DestFrom=document.getElementById("FDestFrom").value;DestTo=document.getElementById("FDestTo").value;}
else{showCalender(Flight,Type,rss);return;}

//if ((DestFrom == 'LON' && DestTo == 'GIB') || (DestFrom == 'GIB' && DestTo == 'LON')) { countryNode = "|7/23/2011|7/24/2011|7/25/2011|7/26/2011|7/27/2011|7/28/2011|7/29/2011|7/30/2011|7/31/2011|8/1/2011|8/2/2011|8/3/2011|8/4/2011|8/5/2011|8/6/2011|8/7/2011|8/8/2011|8/9/2011|8/10/2011|8/11/2011|8/12/2011|8/13/2011|8/14/2011|8/15/2011|8/16/2011|8/17/2011|8/18/2011|8/19/2011|8/20/2011|8/21/2011|8/22/2011|8/23/2011|8/24/2011|8/25/2011|8/26/2011|8/27/2011|8/28/2011|8/29/2011|8/30/2011|8/31/2011|9/1/2011|9/2/2011|9/3/2011|9/4/2011|9/5/2011|9/6/2011|9/7/2011|9/8/2011|9/9/2011|9/10/2011|9/11/2011|9/12/2011|9/13/2011|9/14/2011|9/15/2011|9/16/2011|9/17/2011|9/18/2011|9/19/2011|9/20/2011|9/21/2011|9/22/2011|9/23/2011|9/24/2011|9/25/2011|9/26/2011|9/27/2011|9/28/2011|9/29/2011|9/30/2011|10/1/2011|10/2/2011|10/3/2011|10/4/2011|10/5/2011|10/6/2011|10/7/2011|10/8/2011|10/9/2011|10/10/2011|10/11/2011|10/12/2011|10/13/2011|10/14/2011|10/15/2011|10/16/2011|10/17/2011|10/18/2011|10/19/2011|10/20/2011|10/21/2011|10/22/2011|10/23/2011|10/24/2011|10/25/2011|10/26/2011|10/27/2011|10/28/2011|10/29/2011|10/30/2011|10/31/2011|11/1/2011|11/2/2011|11/3/2011|11/4/2011|11/5/2011|11/6/2011|11/7/2011|11/8/2011|11/9/2011|11/10/2011|11/11/2011|11/12/2011|11/13/2011|11/14/2011|11/15/2011|11/16/2011|11/17/2011|11/18/2011|11/19/2011|11/20/2011|11/21/2011|11/22/2011|11/23/2011|11/24/2011|11/25/2011|11/26/2011|11/27/2011|11/28/2011|11/29/2011|11/30/2011|12/1/2011|12/2/2011|12/3/2011|12/4/2011|12/5/2011|12/6/2011|12/7/2011|12/8/2011|12/9/2011|12/10/2011|12/11/2011|12/12/2011|12/13/2011|12/14/2011|12/15/2011|12/16/2011|12/17/2011|12/18/2011|12/19/2011|12/20/2011|12/21/2011|12/22/2011|12/23/2011|12/24/2011|12/26/2011|12/27/2011|12/28/2011|12/29/2011|12/30/2011|12/31/2011|1/1/2012|1/2/2012|1/3/2012|1/4/2012|1/5/2012|1/6/2012|1/7/2012|1/8/2012|1/9/2012|1/11/2012|1/12/2012|1/13/2012|1/14/2012|1/15/2012|1/16/2012|1/18/2012|1/19/2012|1/20/2012|1/21/2012|1/22/2012|1/23/2012|1/25/2012|1/26/2012|1/27/2012|1/28/2012|1/29/2012|1/30/2012|2/1/2012|2/2/2012|2/3/2012|2/4/2012|2/5/2012|2/6/2012|2/7/2012|2/8/2012|2/9/2012|2/10/2012|2/11/2012|2/12/2012|2/13/2012|2/14/2012|2/15/2012|2/16/2012|2/17/2012|2/18/2012|2/19/2012|2/20/2012|2/21/2012|2/22/2012|2/23/2012|2/24/2012|2/25/2012|2/26/2012|2/27/2012|2/28/2012|2/29/2012|3/1/2012|3/2/2012|3/3/2012|3/4/2012|3/5/2012|3/6/2012|3/7/2012|3/8/2012|3/9/2012|3/10/2012|3/11/2012|3/12/2012|3/13/2012|3/14/2012|3/15/2012|3/16/2012|3/17/2012|3/18/2012|3/19/2012|3/20/2012|3/21/2012|3/22/2012|3/23/2012|3/24/2012|3/25/2012|3/26/2012|3/27/2012|3/28/2012|3/29/2012|3/30/2012|3/31/2012|4/1/2012|4/2/2012|4/3/2012|4/4/2012|4/5/2012|4/6/2012|4/7/2012|4/8/2012|4/9/2012|4/10/2012|4/11/2012|4/12/2012|4/13/2012|4/14/2012|4/15/2012|4/16/2012|4/17/2012|4/18/2012|4/19/2012|4/20/2012|4/21/2012|4/22/2012|4/23/2012|4/24/2012|4/25/2012|4/26/2012|4/27/2012|4/28/2012|4/29/2012|4/30/2012|5/1/2012|5/2/2012|5/3/2012|5/4/2012|5/5/2012|5/6/2012|5/7/2012|5/8/2012|5/9/2012|5/10/2012|5/11/2012|5/12/2012|5/13/2012|5/14/2012|5/15/2012|5/16/2012|5/17/2012|5/18/2012|5/19/2012|5/20/2012|5/21/2012|5/22/2012|5/23/2012|5/24/2012|5/25/2012|5/26/2012|5/27/2012|5/28/2012|5/29/2012|5/30/2012|5/31/2012|6/1/2012|6/2/2012|6/3/2012|6/4/2012|6/5/2012|6/6/2012|6/7/2012|6/8/2012|6/9/2012|6/10/2012|6/11/2012|6/12/2012|6/13/2012|6/14/2012|6/15/2012|6/16/2012|6/17/2012|6/18/2012|6/19/2012|6/20/2012|6/21/2012|6/22/2012|6/23/2012|6/24/2012|6/25/2012|6/26/2012|6/27/2012|6/28/2012|6/29/2012|6/30/2012|7/1/2012|7/2/2012|7/3/2012|7/4/2012|7/5/2012|7/6/2012|7/7/2012|7/8/2012|7/9/2012|7/10/2012|7/11/2012|7/12/2012|7/13/2012|7/14/2012|7/15/2012|7/16/2012|7/17/2012|7/18/2012|7/19/2012|7/20/2012|7/21/2012|7/22/2012|7/23/2012|7/24/2012|7/25/2012|7/26/2012|7/27/2012|7/28/2012|7/29/2012|7/30/2012|7/31/2012|8/1/2012|8/2/2012|8/3/2012|8/4/2012|8/5/2012|8/6/2012|8/7/2012|8/8/2012|8/9/2012|8/10/2012|8/11/2012|8/12/2012|8/13/2012|8/14/2012|8/15/2012|8/16/2012|8/17/2012|8/18/2012|8/19/2012|8/20/2012|8/21/2012|8/22/2012|8/23/2012|8/24/2012|8/25/2012|8/26/2012|8/27/2012|8/28/2012|8/29/2012|8/30/2012|8/31/2012|9/1/2012|9/2/2012|9/3/2012|9/4/2012|9/5/2012|9/6/2012|9/7/2012|9/8/2012|9/9/2012|9/10/2012|9/11/2012|9/12/2012|9/13/2012|9/14/2012|9/15/2012|9/16/2012|9/17/2012|9/18/2012|9/19/2012|9/20/2012|9/21/2012|9/22/2012|9/23/2012|9/24/2012|9/25/2012|9/26/2012|9/27/2012|9/28/2012|9/29/2012|9/30/2012|10/1/2012|10/2/2012|10/3/2012|10/4/2012|10/5/2012|10/6/2012|10/7/2012|10/8/2012|10/9/2012|10/10/2012|10/11/2012|10/12/2012|10/13/2012|10/14/2012|10/15/2012|10/16/2012|10/17/2012|10/18/2012|10/19/2012|10/20/2012|10/21/2012|10/22/2012|10/23/2012|10/24/2012|10/25/2012|10/26/2012|10/27/2012"; }
//else if ((DestFrom == 'LTN' && DestTo == 'GIB') || (DestFrom == 'GIB' && DestTo == 'LTN')) { countryNode = "|7/23/2011|7/24/2011|7/25/2011|7/26/2011|7/27/2011|7/28/2011|7/29/2011|7/30/2011|7/31/2011|8/1/2011|8/2/2011|8/3/2011|8/4/2011|8/5/2011|8/6/2011|8/7/2011|8/8/2011|8/9/2011|8/10/2011|8/11/2011|8/12/2011|8/13/2011|8/14/2011|8/15/2011|8/16/2011|8/17/2011|8/18/2011|8/19/2011|8/20/2011|8/21/2011|8/22/2011|8/23/2011|8/24/2011|8/25/2011|8/26/2011|8/27/2011|8/28/2011|8/29/2011|8/30/2011|8/31/2011|9/1/2011|9/2/2011|9/3/2011|9/4/2011|9/5/2011|9/6/2011|9/7/2011|9/8/2011|9/9/2011|9/10/2011|9/11/2011|9/12/2011|9/13/2011|9/14/2011|9/15/2011|9/16/2011|9/17/2011|9/18/2011|9/19/2011|9/20/2011|9/21/2011|9/22/2011|9/23/2011|9/24/2011|9/25/2011|9/26/2011|9/27/2011|9/28/2011|9/29/2011|9/30/2011|10/1/2011|10/2/2011|10/3/2011|10/4/2011|10/5/2011|10/6/2011|10/7/2011|10/8/2011|10/9/2011|10/10/2011|10/11/2011|10/12/2011|10/13/2011|10/14/2011|10/15/2011|10/16/2011|10/17/2011|10/18/2011|10/19/2011|10/20/2011|10/21/2011|10/22/2011|10/23/2011|10/24/2011|10/25/2011|10/26/2011|10/27/2011|10/28/2011|10/29/2011|10/30/2011|10/31/2011|11/1/2011|11/2/2011|11/3/2011|11/4/2011|11/6/2011|11/7/2011|11/8/2011|11/9/2011|11/10/2011|11/11/2011|11/13/2011|11/14/2011|11/16/2011|11/17/2011|11/18/2011|11/20/2011|11/21/2011|11/23/2011|11/24/2011|11/25/2011|11/27/2011|11/28/2011|11/30/2011|12/2/2011|12/4/2011|12/5/2011|12/7/2011|12/9/2011|12/11/2011|12/12/2011|12/14/2011|12/16/2011|12/18/2011|12/19/2011|12/20/2011|12/21/2011|12/22/2011|12/23/2011|12/26/2011|12/27/2011|12/28/2011|12/29/2011|12/30/2011|1/1/2012|1/2/2012|1/3/2012|1/4/2012|1/5/2012|1/6/2012|1/8/2012|1/9/2012|1/11/2012|1/13/2012|1/15/2012|1/16/2012|1/18/2012|1/20/2012|1/22/2012|1/23/2012|1/25/2012|1/27/2012|1/29/2012|1/30/2012|2/1/2012|2/3/2012|2/5/2012|2/6/2012|2/8/2012|2/10/2012|2/12/2012|2/13/2012|2/14/2012|2/15/2012|2/16/2012|2/17/2012|2/19/2012|2/20/2012|2/21/2012|2/22/2012|2/23/2012|2/24/2012|2/26/2012|2/27/2012|2/28/2012|2/29/2012|3/1/2012|3/2/2012|3/4/2012|3/5/2012|3/6/2012|3/7/2012|3/8/2012|3/9/2012|3/11/2012|3/12/2012|3/13/2012|3/14/2012|3/15/2012|3/16/2012|3/18/2012|3/19/2012|3/20/2012|3/21/2012|3/22/2012|3/23/2012|3/25/2012|3/26/2012|3/27/2012|3/28/2012|3/29/2012|3/30/2012|3/31/2012|4/1/2012|4/2/2012|4/3/2012|4/4/2012|4/5/2012|4/6/2012|4/7/2012|4/8/2012|4/9/2012|4/10/2012|4/11/2012|4/12/2012|4/13/2012|4/14/2012|4/15/2012|4/16/2012|4/17/2012|4/18/2012|4/19/2012|4/20/2012|4/21/2012|4/22/2012|4/23/2012|4/24/2012|4/25/2012|4/26/2012|4/27/2012|4/28/2012|4/29/2012|4/30/2012|5/1/2012|5/2/2012|5/3/2012|5/4/2012|5/5/2012|5/6/2012|5/7/2012|5/8/2012|5/9/2012|5/10/2012|5/11/2012|5/12/2012|5/13/2012|5/14/2012|5/15/2012|5/16/2012|5/17/2012|5/18/2012|5/19/2012|5/20/2012|5/21/2012|5/22/2012|5/23/2012|5/24/2012|5/25/2012|5/26/2012|5/27/2012|5/28/2012|5/29/2012|5/30/2012|5/31/2012|6/1/2012|6/2/2012|6/3/2012|6/4/2012|6/5/2012|6/6/2012|6/7/2012|6/8/2012|6/9/2012|6/10/2012|6/11/2012|6/12/2012|6/13/2012|6/14/2012|6/15/2012|6/16/2012|6/17/2012|6/18/2012|6/19/2012|6/20/2012|6/21/2012|6/22/2012|6/23/2012|6/24/2012|6/25/2012|6/26/2012|6/27/2012|6/28/2012|6/29/2012|6/30/2012|7/1/2012|7/2/2012|7/3/2012|7/4/2012|7/5/2012|7/6/2012|7/7/2012|7/8/2012|7/9/2012|7/10/2012|7/11/2012|7/12/2012|7/13/2012|7/14/2012|7/15/2012|7/16/2012|7/17/2012|7/18/2012|7/19/2012|7/20/2012|7/21/2012|7/22/2012|7/23/2012|7/24/2012|7/25/2012|7/26/2012|7/27/2012|7/28/2012|7/29/2012|7/30/2012|7/31/2012|8/1/2012|8/2/2012|8/3/2012|8/4/2012|8/5/2012|8/6/2012|8/7/2012|8/8/2012|8/9/2012|8/10/2012|8/11/2012|8/12/2012|8/13/2012|8/14/2012|8/15/2012|8/16/2012|8/17/2012|8/18/2012|8/19/2012|8/20/2012|8/21/2012|8/22/2012|8/23/2012|8/24/2012|8/25/2012|8/26/2012|8/27/2012|8/28/2012|8/29/2012|8/30/2012|8/31/2012|9/1/2012|9/2/2012|9/3/2012|9/4/2012|9/5/2012|9/6/2012|9/7/2012|9/8/2012|9/9/2012|9/10/2012|9/11/2012|9/12/2012|9/13/2012|9/14/2012|9/15/2012|9/16/2012|9/17/2012|9/18/2012|9/19/2012|9/20/2012|9/21/2012|9/22/2012|9/23/2012|9/24/2012|9/25/2012|9/26/2012|9/27/2012|9/28/2012|9/29/2012|9/30/2012|10/1/2012|10/2/2012|10/3/2012|10/4/2012|10/5/2012|10/6/2012|10/7/2012|10/8/2012|10/9/2012|10/10/2012|10/11/2012|10/12/2012|10/13/2012|10/14/2012|10/15/2012|10/16/2012|10/17/2012|10/18/2012|10/19/2012|10/20/2012|10/21/2012|10/22/2012|10/23/2012|10/24/2012|10/25/2012|10/26/2012|10/27/2012"; }
if ((DestFrom == 'LTN' && DestTo == 'GIB') || (DestFrom == 'GIB' && DestTo == 'LTN')) { countryNode = "|9/1/2011|9/2/2011|9/3/2011|9/4/2011|9/5/2011|9/6/2011|9/7/2011|9/8/2011|9/9/2011|9/10/2011|9/11/2011|9/12/2011|9/13/2011|9/14/2011|9/15/2011|9/16/2011|9/17/2011|9/18/2011|9/19/2011|9/20/2011|9/21/2011|9/22/2011|9/23/2011|9/24/2011|9/25/2011|9/26/2011|9/27/2011|9/28/2011|9/29/2011|9/30/2011|10/1/2011|10/2/2011|10/3/2011|10/4/2011|10/5/2011|10/6/2011|10/7/2011|10/8/2011|10/9/2011|10/10/2011|10/11/2011|10/12/2011|10/13/2011|10/14/2011|10/15/2011|10/16/2011|10/17/2011|10/18/2011|10/19/2011|10/20/2011|10/21/2011|10/22/2011|10/23/2011|10/24/2011|10/25/2011|10/26/2011|10/27/2011|10/28/2011|10/29/2011|10/30/2011|10/31/2011|11/1/2011|11/2/2011|11/3/2011|11/4/2011|11/6/2011|11/7/2011|11/9/2011|11/11/2011|11/13/2011|11/14/2011|11/16/2011|11/18/2011|11/20/2011|11/21/2011|11/23/2011|11/25/2011|11/27/2011|11/28/2011|11/30/2011|12/2/2011|12/4/2011|12/5/2011|12/7/2011|12/9/2011|12/11/2011|12/12/2011|12/14/2011|12/16/2011|12/18/2011|12/19/2011|12/20/2011|12/21/2011|12/22/2011|12/23/2011|12/26/2011|12/27/2011|12/28/2011|12/29/2011|12/30/2011|1/1/2012|1/2/2012|1/3/2012|1/4/2012|1/6/2012|1/8/2012|1/9/2012|1/13/2012|1/15/2012|1/16/2012|1/20/2012|1/22/2012|1/23/2012|1/27/2012|1/29/2012|1/30/2012|2/3/2012|2/5/2012|2/6/2012|2/10/2012|2/12/2012|2/13/2012|2/17/2012|2/19/2012|2/20/2012|2/24/2012|2/26/2012|2/27/2012|3/2/2012|3/4/2012|3/5/2012|3/9/2012|3/11/2012|3/12/2012|3/16/2012|3/18/2012|3/19/2012|3/23/2012|3/25/2012|3/26/2012|3/27/2012|3/28/2012|3/29/2012|3/30/2012|3/31/2012|4/1/2012|4/2/2012|4/3/2012|4/4/2012|4/5/2012|4/6/2012|4/7/2012|4/8/2012|4/9/2012|4/10/2012|4/11/2012|4/12/2012|4/13/2012|4/14/2012|4/15/2012|4/16/2012|4/17/2012|4/18/2012|4/19/2012|4/20/2012|4/21/2012|4/22/2012|4/23/2012|4/24/2012|4/25/2012|4/26/2012|4/27/2012|4/28/2012|4/29/2012|4/30/2012|5/1/2012|5/2/2012|5/3/2012|5/4/2012|5/5/2012|5/6/2012|5/7/2012|5/8/2012|5/9/2012|5/10/2012|5/11/2012|5/12/2012|5/13/2012|5/14/2012|5/15/2012|5/16/2012|5/17/2012|5/18/2012|5/19/2012|5/20/2012|5/21/2012|5/22/2012|5/23/2012|5/24/2012|5/25/2012|5/26/2012|5/27/2012|5/28/2012|5/29/2012|5/30/2012|5/31/2012|6/1/2012|6/2/2012|6/3/2012|6/4/2012|6/5/2012|6/6/2012|6/7/2012|6/8/2012|6/9/2012|6/10/2012|6/11/2012|6/12/2012|6/13/2012|6/14/2012|6/15/2012|6/16/2012|6/17/2012|6/18/2012|6/19/2012|6/20/2012|6/21/2012|6/22/2012|6/23/2012|6/24/2012|6/25/2012|6/26/2012|6/27/2012|6/28/2012|6/29/2012|6/30/2012|7/1/2012|7/2/2012|7/3/2012|7/4/2012|7/5/2012|7/6/2012|7/7/2012|7/8/2012|7/9/2012|7/10/2012|7/11/2012|7/12/2012|7/13/2012|7/14/2012|7/15/2012|7/16/2012|7/17/2012|7/18/2012|7/19/2012|7/20/2012|7/21/2012|7/22/2012|7/23/2012|7/24/2012|7/25/2012|7/26/2012|7/27/2012|7/28/2012|7/29/2012|7/30/2012|7/31/2012|8/1/2012|8/2/2012|8/3/2012|8/4/2012|8/5/2012|8/6/2012|8/7/2012|8/8/2012|8/9/2012|8/10/2012|8/11/2012|8/12/2012|8/13/2012|8/14/2012|8/15/2012|8/16/2012|8/17/2012|8/18/2012|8/19/2012|8/20/2012|8/21/2012|8/22/2012|8/23/2012|8/24/2012|8/25/2012|8/26/2012|8/27/2012|8/28/2012|8/29/2012|8/30/2012|8/31/2012|9/1/2012|9/2/2012|9/3/2012|9/4/2012|9/5/2012|9/6/2012|9/7/2012|9/8/2012|9/9/2012|9/10/2012|9/11/2012|9/12/2012|9/13/2012|9/14/2012|9/15/2012|9/16/2012|9/17/2012|9/18/2012|9/19/2012|9/20/2012|9/21/2012|9/22/2012|9/23/2012|9/24/2012|9/25/2012|9/26/2012|9/27/2012|9/28/2012|9/29/2012|9/30/2012|10/1/2012|10/2/2012|10/3/2012|10/4/2012|10/5/2012|10/6/2012|10/7/2012|10/8/2012|10/9/2012|10/10/2012|10/11/2012|10/12/2012|10/13/2012|10/14/2012|10/15/2012|10/16/2012|10/17/2012|10/18/2012|10/19/2012|10/20/2012|10/21/2012|10/22/2012|10/23/2012|10/24/2012|10/25/2012|10/26/2012|10/27/2012";}
else if ((DestFrom == 'LGW' && DestTo == 'GIB') || (DestFrom == 'GIB' && DestTo == 'LGW')) { countryNode = "|7/23/2011|7/24/2011|7/25/2011|7/26/2011|7/27/2011|7/28/2011|7/29/2011|7/30/2011|7/31/2011|8/1/2011|8/2/2011|8/3/2011|8/4/2011|8/5/2011|8/6/2011|8/7/2011|8/8/2011|8/9/2011|8/10/2011|8/11/2011|8/12/2011|8/13/2011|8/14/2011|8/15/2011|8/16/2011|8/17/2011|8/18/2011|8/19/2011|8/20/2011|8/21/2011|8/22/2011|8/23/2011|8/24/2011|8/25/2011|8/26/2011|8/27/2011|8/28/2011|8/29/2011|8/30/2011|8/31/2011|9/1/2011|9/2/2011|9/3/2011|9/4/2011|9/5/2011|9/6/2011|9/7/2011|9/8/2011|9/9/2011|9/10/2011|9/11/2011|9/12/2011|9/13/2011|9/14/2011|9/15/2011|9/16/2011|9/17/2011|9/18/2011|9/19/2011|9/20/2011|9/21/2011|9/22/2011|9/23/2011|9/24/2011|9/25/2011|9/26/2011|9/27/2011|9/28/2011|9/29/2011|9/30/2011|10/1/2011|10/2/2011|10/3/2011|10/4/2011|10/5/2011|10/6/2011|10/7/2011|10/8/2011|10/9/2011|10/10/2011|10/11/2011|10/12/2011|10/13/2011|10/14/2011|10/15/2011|10/16/2011|10/17/2011|10/18/2011|10/19/2011|10/20/2011|10/21/2011|10/22/2011|10/23/2011|10/24/2011|10/25/2011|10/26/2011|10/27/2011|10/28/2011|10/29/2011|10/30/2011|11/1/2011|11/2/2011|11/3/2011|11/4/2011|11/5/2011|11/6/2011|11/7/2011|11/8/2011|11/9/2011|11/10/2011|11/11/2011|11/12/2011|11/13/2011|11/14/2011|11/15/2011|11/16/2011|11/17/2011|11/18/2011|11/19/2011|11/20/2011|11/21/2011|11/22/2011|11/23/2011|11/24/2011|11/25/2011|11/26/2011|11/27/2011|11/28/2011|11/29/2011|11/30/2011|12/1/2011|12/2/2011|12/3/2011|12/4/2011|12/5/2011|12/6/2011|12/7/2011|12/8/2011|12/9/2011|12/10/2011|12/11/2011|12/12/2011|12/13/2011|12/14/2011|12/15/2011|12/16/2011|12/17/2011|12/18/2011|12/19/2011|12/20/2011|12/21/2011|12/22/2011|12/23/2011|12/24/2011|12/26/2011|12/27/2011|12/28/2011|12/29/2011|12/30/2011|12/31/2011|1/1/2012|1/2/2012|1/3/2012|1/4/2012|1/5/2012|1/6/2012|1/7/2012|1/8/2012|1/9/2012|1/11/2012|1/12/2012|1/13/2012|1/14/2012|1/15/2012|1/16/2012|1/18/2012|1/19/2012|1/20/2012|1/21/2012|1/22/2012|1/23/2012|1/25/2012|1/26/2012|1/27/2012|1/28/2012|1/29/2012|1/30/2012|2/1/2012|2/2/2012|2/3/2012|2/4/2012|2/5/2012|2/6/2012|2/7/2012|2/8/2012|2/9/2012|2/10/2012|2/11/2012|2/12/2012|2/13/2012|2/14/2012|2/15/2012|2/16/2012|2/17/2012|2/18/2012|2/19/2012|2/20/2012|2/21/2012|2/22/2012|2/23/2012|2/24/2012|2/25/2012|2/26/2012|2/27/2012|2/28/2012|2/29/2012|3/1/2012|3/2/2012|3/3/2012|3/4/2012|3/5/2012|3/6/2012|3/7/2012|3/8/2012|3/9/2012|3/10/2012|3/11/2012|3/12/2012|3/13/2012|3/14/2012|3/15/2012|3/16/2012|3/17/2012|3/18/2012|3/19/2012|3/20/2012|3/21/2012|3/22/2012|3/23/2012|3/24/2012"; }
else if ((DestFrom == 'MAN' && DestTo == 'GIB') || (DestFrom == 'GIB' && DestTo == 'MAN')) { countryNode = "|8/12/2011|8/14/2011|8/15/2011|8/17/2011|8/18/2011|8/19/2011|8/21/2011|8/22/2011|8/24/2011|8/25/2011|8/26/2011|8/28/2011|8/29/2011|8/31/2011|9/1/2011|9/2/2011|9/4/2011|9/5/2011|9/7/2011|9/9/2011|9/11/2011|9/12/2011|9/14/2011|9/16/2011|9/18/2011|9/19/2011|9/21/2011|9/23/2011|9/25/2011|9/26/2011|9/28/2011|9/30/2011|10/3/2011|10/5/2011|10/7/2011|10/10/2011|10/12/2011|10/14/2011|10/17/2011|10/19/2011|10/21/2011|10/24/2011|10/26/2011|10/28/2011|10/31/2011|11/2/2011|11/4/2011|11/7/2011|11/9/2011|11/11/2011|11/14/2011|11/16/2011|11/18/2011|11/21/2011|11/23/2011|11/25/2011|11/28/2011|11/30/2011|12/2/2011|12/5/2011|12/7/2011|12/9/2011|12/12/2011|12/14/2011|12/16/2011|12/19/2011|12/21/2011|12/23/2011|12/26/2011|12/28/2011|12/30/2011|1/2/2012|1/4/2012|1/6/2012|1/9/2012|1/11/2012|1/13/2012|1/16/2012|1/18/2012|1/20/2012|1/23/2012|1/25/2012|1/27/2012|1/30/2012|2/1/2012|2/3/2012|2/6/2012|2/8/2012|2/10/2012|2/13/2012|2/15/2012|2/17/2012|2/20/2012|2/22/2012|2/24/2012|2/27/2012|2/29/2012|3/2/2012|3/5/2012|3/7/2012|3/9/2012|3/12/2012|3/14/2012|3/16/2012|3/19/2012|3/21/2012|3/23/2012|3/25/2012|3/26/2012|3/28/2012|3/30/2012|4/1/2012|4/2/2012|4/4/2012|4/6/2012|4/8/2012|4/9/2012|4/11/2012|4/13/2012|4/15/2012|4/16/2012|4/18/2012|4/20/2012|4/22/2012|4/23/2012|4/25/2012|4/27/2012|4/29/2012|4/30/2012|5/2/2012|5/3/2012|5/4/2012|5/6/2012|5/7/2012|5/9/2012|5/10/2012|5/11/2012|5/13/2012|5/14/2012|5/16/2012|5/17/2012|5/18/2012|5/20/2012|5/21/2012|5/23/2012|5/24/2012|5/25/2012|5/27/2012|5/28/2012|5/30/2012|5/31/2012|6/1/2012|6/3/2012|6/4/2012|6/6/2012|6/7/2012|6/8/2012|6/10/2012|6/11/2012|6/13/2012|6/14/2012|6/15/2012|6/17/2012|6/18/2012|6/20/2012|6/21/2012|6/22/2012|6/24/2012|6/25/2012|6/27/2012|6/28/2012|6/29/2012|7/1/2012|7/2/2012|7/4/2012|7/5/2012|7/6/2012|7/8/2012|7/9/2012|7/11/2012|7/12/2012|7/13/2012|7/15/2012|7/16/2012|7/18/2012|7/19/2012|7/20/2012|7/22/2012|7/23/2012|7/25/2012|7/26/2012|7/27/2012|7/29/2012|7/30/2012|8/1/2012|8/2/2012|8/3/2012|8/5/2012|8/6/2012|8/8/2012|8/9/2012|8/10/2012|8/12/2012|8/13/2012|8/15/2012|8/16/2012|8/17/2012|8/19/2012|8/20/2012|8/22/2012|8/23/2012|8/24/2012|8/26/2012|8/27/2012|8/29/2012|8/30/2012|8/31/2012|9/2/2012|9/3/2012|9/5/2012|9/6/2012|9/7/2012|9/9/2012|9/10/2012|9/12/2012|9/13/2012|9/14/2012|9/16/2012|9/17/2012|9/19/2012|9/20/2012|9/21/2012|9/23/2012|9/24/2012|9/26/2012|9/27/2012|9/28/2012|9/30/2012|10/1/2012|10/3/2012|10/4/2012|10/5/2012|10/7/2012|10/8/2012|10/10/2012|10/11/2012|10/12/2012|10/14/2012|10/15/2012|10/17/2012|10/18/2012|10/19/2012|10/21/2012|10/22/2012|10/24/2012|10/25/2012|10/26/2012";}
else if ((DestFrom == 'LPL' && DestTo == 'GIB') || (DestFrom == 'GIB' && DestTo == 'LPL')) { countryNode = "|7/23/2011|7/26/2011|7/28/2011|7/30/2011|8/2/2011|8/4/2011|8/6/2011|8/9/2011|8/11/2011|8/13/2011|8/16/2011|8/18/2011|8/20/2011|8/23/2011|8/25/2011|8/27/2011|8/30/2011|9/1/2011|9/3/2011|9/6/2011|9/8/2011|9/10/2011|9/13/2011|9/15/2011|9/17/2011|9/20/2011|9/22/2011|9/24/2011|9/27/2011|9/29/2011|10/1/2011|10/4/2011|10/6/2011|10/8/2011|10/11/2011|10/13/2011|10/15/2011|10/18/2011|10/20/2011|10/22/2011|10/25/2011|10/27/2011|10/29/2011|11/1/2011|11/3/2011|11/5/2011|11/8/2011|11/10/2011|11/12/2011|11/15/2011|11/17/2011|11/19/2011|11/22/2011|11/24/2011|11/26/2011|11/29/2011|12/1/2011|12/3/2011|12/6/2011|12/8/2011|12/10/2011|12/13/2011|12/15/2011|12/17/2011|12/20/2011|12/22/2011|12/24/2011|12/27/2011|12/29/2011|12/31/2011|1/3/2012|1/5/2012|1/7/2012|1/10/2012|1/12/2012|1/14/2012|1/17/2012|1/19/2012|1/21/2012|1/24/2012|1/26/2012|1/28/2012|1/31/2012|2/2/2012|2/4/2012|2/7/2012|2/9/2012|2/11/2012|2/14/2012|2/16/2012|2/18/2012|2/21/2012|2/23/2012|2/25/2012|2/28/2012|3/1/2012|3/3/2012|3/6/2012|3/8/2012|3/10/2012|3/13/2012|3/15/2012|3/17/2012|3/20/2012|3/22/2012|3/24/2012|3/27/2012|3/29/2012|3/31/2012|4/3/2012|4/5/2012|4/7/2012|4/10/2012|4/12/2012|4/14/2012|4/17/2012|4/19/2012|4/21/2012|4/24/2012|4/26/2012|4/28/2012|5/1/2012|5/3/2012|5/5/2012|5/8/2012|5/10/2012|5/12/2012|5/15/2012|5/17/2012|5/19/2012|5/22/2012|5/24/2012|5/26/2012|5/29/2012|5/31/2012|6/2/2012|6/5/2012|6/7/2012|6/9/2012|6/12/2012|6/14/2012|6/16/2012|6/19/2012|6/21/2012|6/23/2012|6/26/2012|6/28/2012|6/30/2012|7/3/2012|7/5/2012|7/7/2012|7/10/2012|7/12/2012|7/14/2012|7/17/2012|7/19/2012|7/21/2012|7/24/2012|7/26/2012|7/28/2012|7/31/2012|8/2/2012|8/4/2012|8/7/2012|8/9/2012|8/11/2012|8/14/2012|8/16/2012|8/18/2012|8/21/2012|8/23/2012|8/25/2012|8/28/2012|8/30/2012|9/1/2012|9/4/2012|9/6/2012|9/8/2012|9/11/2012|9/13/2012|9/15/2012|9/18/2012|9/20/2012|9/22/2012|9/25/2012|9/27/2012|9/29/2012|10/2/2012|10/4/2012|10/6/2012|10/9/2012|10/11/2012|10/13/2012|10/16/2012|10/18/2012|10/20/2012|10/23/2012|10/25/2012|10/27/2012";}
else if ((DestFrom == 'EMA' && DestTo == 'GIB') || (DestFrom == 'GIB' && DestTo == 'EMA')) { countryNode = "|3/31/2012|4/3/2012|4/5/2012|4/7/2012|4/10/2012|4/12/2012|4/14/2012|4/17/2012|4/19/2012|4/21/2012|4/24/2012|4/26/2012|4/28/2012|5/1/2012|5/3/2012|5/5/2012|5/8/2012|5/10/2012|5/12/2012|5/15/2012|5/17/2012|5/19/2012|5/22/2012|5/24/2012|5/26/2012|5/29/2012|5/31/2012|6/2/2012|6/5/2012|6/7/2012|6/9/2012|6/12/2012|6/14/2012|6/16/2012|6/19/2012|6/21/2012|6/23/2012|6/26/2012|6/28/2012|6/30/2012|7/3/2012|7/5/2012|7/7/2012|7/10/2012|7/12/2012|7/14/2012|7/17/2012|7/19/2012|7/21/2012|7/24/2012|7/26/2012|7/28/2012|7/31/2012|8/2/2012|8/4/2012|8/7/2012|8/9/2012|8/11/2012|8/14/2012|8/16/2012|8/18/2012|8/21/2012|8/23/2012|8/25/2012|8/28/2012|8/30/2012|9/1/2012|9/4/2012|9/6/2012|9/8/2012|9/11/2012|9/13/2012|9/15/2012|9/18/2012|9/20/2012|9/22/2012|9/25/2012|9/27/2012|9/29/2012|10/2/2012|10/4/2012|10/6/2012|10/9/2012|10/11/2012|10/13/2012|10/16/2012|10/18/2012|10/20/2012|10/23/2012|10/25/2012|10/27/2012"; }
else if ((DestFrom == 'GLA' && DestTo == 'GIB') || (DestFrom == 'GIB' && DestTo == 'GLA')) { countryNode = "|10/31/2011|11/1/2011|11/2/2011|11/3/2011|11/4/2011|11/7/2011|11/8/2011|11/9/2011|11/10/2011|11/11/2011|11/14/2011|11/15/2011|11/16/2011|11/17/2011|11/18/2011|11/21/2011|11/22/2011|11/23/2011|11/24/2011|11/25/2011|11/28/2011|11/29/2011|11/30/2011|12/1/2011|12/2/2011|12/5/2011|12/6/2011|12/7/2011|12/8/2011|12/9/2011|12/12/2011|12/13/2011|12/14/2011|12/15/2011|12/16/2011|12/19/2011|12/20/2011|12/21/2011|12/22/2011|12/23/2011|12/26/2011|12/27/2011|12/28/2011|12/29/2011|12/30/2011|1/2/2012|1/3/2012|1/4/2012|1/5/2012|1/6/2012|1/9/2012|1/10/2012|1/11/2012|1/12/2012|1/13/2012|1/16/2012|1/17/2012|1/18/2012|1/19/2012|1/20/2012|1/23/2012|1/24/2012|1/25/2012|1/26/2012|1/27/2012|1/30/2012|1/31/2012|2/1/2012|2/2/2012|2/3/2012|2/6/2012|2/7/2012|2/8/2012|2/9/2012|2/10/2012|2/13/2012|2/14/2012|2/15/2012|2/16/2012|2/17/2012|2/20/2012|2/21/2012|2/22/2012|2/23/2012|2/24/2012|2/27/2012|2/28/2012|2/29/2012|3/1/2012|3/2/2012|3/5/2012|3/6/2012|3/7/2012|3/8/2012|3/9/2012|3/12/2012|3/13/2012|3/14/2012|3/15/2012|3/16/2012|3/19/2012|3/20/2012|3/21/2012|3/22/2012|3/23/2012|3/26/2012|3/27/2012|3/28/2012|3/29/2012|3/30/2012|4/2/2012|4/3/2012|4/4/2012|4/5/2012|4/6/2012|4/9/2012|4/10/2012|4/11/2012|4/12/2012|4/13/2012|4/16/2012|4/17/2012|4/18/2012|4/19/2012|4/20/2012|4/23/2012|4/24/2012|4/25/2012|4/26/2012|4/27/2012|4/30/2012|5/1/2012|5/2/2012|5/3/2012|5/4/2012|5/7/2012|5/8/2012|5/9/2012|5/10/2012|5/11/2012|5/14/2012|5/15/2012|5/16/2012|5/17/2012|5/18/2012|5/21/2012|5/22/2012|5/23/2012|5/24/2012|5/25/2012|5/28/2012|5/29/2012|5/30/2012|5/31/2012|6/1/2012|6/4/2012|6/5/2012|6/6/2012|6/7/2012|6/8/2012|6/11/2012|6/12/2012|6/13/2012|6/14/2012|6/15/2012|6/18/2012|6/19/2012|6/20/2012|6/21/2012|6/22/2012|6/25/2012|6/26/2012|6/27/2012|6/28/2012|6/29/2012|7/2/2012|7/3/2012|7/4/2012|7/5/2012|7/6/2012|7/9/2012|7/10/2012|7/11/2012|7/12/2012|7/13/2012|7/16/2012|7/17/2012|7/18/2012|7/19/2012|7/20/2012|7/23/2012|7/24/2012|7/25/2012|7/26/2012|7/27/2012|7/30/2012|7/31/2012|8/1/2012|8/2/2012|8/3/2012|8/6/2012|8/7/2012|8/8/2012|8/9/2012|8/10/2012|8/13/2012|8/14/2012|8/15/2012|8/16/2012|8/17/2012|8/20/2012|8/21/2012|8/22/2012|8/23/2012|8/24/2012|8/27/2012|8/28/2012|8/29/2012|8/30/2012|8/31/2012|9/3/2012|9/4/2012|9/5/2012|9/6/2012|9/7/2012|9/10/2012|9/11/2012|9/12/2012|9/13/2012|9/14/2012|9/17/2012|9/18/2012|9/19/2012|9/20/2012|9/21/2012|9/24/2012|9/25/2012|9/26/2012|9/27/2012|9/28/2012|10/1/2012|10/2/2012|10/3/2012|10/4/2012|10/5/2012|10/8/2012|10/9/2012|10/10/2012|10/11/2012|10/12/2012|10/15/2012|10/16/2012|10/17/2012|10/18/2012|10/19/2012|10/22/2012|10/23/2012|10/24/2012|10/25/2012|10/26/2012|10/29/2012|10/30/2012|10/31/2012|11/1/2012|11/2/2012|11/5/2012|11/6/2012|11/7/2012|11/8/2012|11/9/2012|11/12/2012|11/13/2012|11/14/2012|11/15/2012|11/16/2012|11/19/2012|11/20/2012|11/21/2012|11/22/2012|11/23/2012|11/26/2012|11/27/2012|11/28/2012|11/29/2012|11/30/2012|12/3/2012|12/4/2012|12/5/2012|12/6/2012|12/7/2012|12/10/2012|12/11/2012|12/12/2012|12/13/2012|12/14/2012|12/17/2012|12/18/2012|12/19/2012|12/20/2012|12/21/2012|12/24/2012|12/25/2012|12/26/2012|12/27/2012|12/28/2012|12/31/2012"; }
else if ((DestFrom == 'ABZ' && DestTo == 'GIB') || (DestFrom == 'GIB' && DestTo == 'ABZ')) { countryNode = "|10/31/2011|11/1/2011|11/2/2011|11/3/2011|11/4/2011|11/7/2011|11/8/2011|11/9/2011|11/10/2011|11/11/2011|11/14/2011|11/15/2011|11/16/2011|11/17/2011|11/18/2011|11/21/2011|11/22/2011|11/23/2011|11/24/2011|11/25/2011|11/28/2011|11/29/2011|11/30/2011|12/1/2011|12/2/2011|12/5/2011|12/6/2011|12/7/2011|12/8/2011|12/9/2011|12/12/2011|12/13/2011|12/14/2011|12/15/2011|12/16/2011|12/19/2011|12/20/2011|12/21/2011|12/22/2011|12/23/2011|12/26/2011|12/27/2011|12/28/2011|12/29/2011|12/30/2011|1/2/2012|1/3/2012|1/4/2012|1/5/2012|1/6/2012|1/9/2012|1/10/2012|1/11/2012|1/12/2012|1/13/2012|1/16/2012|1/17/2012|1/18/2012|1/19/2012|1/20/2012|1/23/2012|1/24/2012|1/25/2012|1/26/2012|1/27/2012|1/30/2012|1/31/2012|2/1/2012|2/2/2012|2/3/2012|2/6/2012|2/7/2012|2/8/2012|2/9/2012|2/10/2012|2/13/2012|2/14/2012|2/15/2012|2/16/2012|2/17/2012|2/20/2012|2/21/2012|2/22/2012|2/23/2012|2/24/2012|2/27/2012|2/28/2012|2/29/2012|3/1/2012|3/2/2012|3/5/2012|3/6/2012|3/7/2012|3/8/2012|3/9/2012|3/12/2012|3/13/2012|3/14/2012|3/15/2012|3/16/2012|3/19/2012|3/20/2012|3/21/2012|3/22/2012|3/23/2012|3/26/2012|3/27/2012|3/28/2012|3/29/2012|3/30/2012|4/2/2012|4/3/2012|4/4/2012|4/5/2012|4/6/2012|4/9/2012|4/10/2012|4/11/2012|4/12/2012|4/13/2012|4/16/2012|4/17/2012|4/18/2012|4/19/2012|4/20/2012|4/23/2012|4/24/2012|4/25/2012|4/26/2012|4/27/2012|4/30/2012|5/1/2012|5/2/2012|5/3/2012|5/4/2012|5/7/2012|5/8/2012|5/9/2012|5/10/2012|5/11/2012|5/14/2012|5/15/2012|5/16/2012|5/17/2012|5/18/2012|5/21/2012|5/22/2012|5/23/2012|5/24/2012|5/25/2012|5/28/2012|5/29/2012|5/30/2012|5/31/2012|6/1/2012|6/4/2012|6/5/2012|6/6/2012|6/7/2012|6/8/2012|6/11/2012|6/12/2012|6/13/2012|6/14/2012|6/15/2012|6/18/2012|6/19/2012|6/20/2012|6/21/2012|6/22/2012|6/25/2012|6/26/2012|6/27/2012|6/28/2012|6/29/2012|7/2/2012|7/3/2012|7/4/2012|7/5/2012|7/6/2012|7/9/2012|7/10/2012|7/11/2012|7/12/2012|7/13/2012|7/16/2012|7/17/2012|7/18/2012|7/19/2012|7/20/2012|7/23/2012|7/24/2012|7/25/2012|7/26/2012|7/27/2012|7/30/2012|7/31/2012|8/1/2012|8/2/2012|8/3/2012|8/6/2012|8/7/2012|8/8/2012|8/9/2012|8/10/2012|8/13/2012|8/14/2012|8/15/2012|8/16/2012|8/17/2012|8/20/2012|8/21/2012|8/22/2012|8/23/2012|8/24/2012|8/27/2012|8/28/2012|8/29/2012|8/30/2012|8/31/2012|9/3/2012|9/4/2012|9/5/2012|9/6/2012|9/7/2012|9/10/2012|9/11/2012|9/12/2012|9/13/2012|9/14/2012|9/17/2012|9/18/2012|9/19/2012|9/20/2012|9/21/2012|9/24/2012|9/25/2012|9/26/2012|9/27/2012|9/28/2012|10/1/2012|10/2/2012|10/3/2012|10/4/2012|10/5/2012|10/8/2012|10/9/2012|10/10/2012|10/11/2012|10/12/2012|10/15/2012|10/16/2012|10/17/2012|10/18/2012|10/19/2012|10/22/2012|10/23/2012|10/24/2012|10/25/2012|10/26/2012|10/29/2012|10/30/2012|10/31/2012|11/1/2012|11/2/2012|11/5/2012|11/6/2012|11/7/2012|11/8/2012|11/9/2012|11/12/2012|11/13/2012|11/14/2012|11/15/2012|11/16/2012|11/19/2012|11/20/2012|11/21/2012|11/22/2012|11/23/2012|11/26/2012|11/27/2012|11/28/2012|11/29/2012|11/30/2012|12/3/2012|12/4/2012|12/5/2012|12/6/2012|12/7/2012|12/10/2012|12/11/2012|12/12/2012|12/13/2012|12/14/2012|12/17/2012|12/18/2012|12/19/2012|12/20/2012|12/21/2012|12/24/2012|12/25/2012|12/26/2012|12/27/2012|12/28/2012|12/31/2012"; }
else { countryNode = "" }

var rss=countryNode.split("|");
showCalender(Flight,Type,rss);
return;
}


function setdatesEMA(DayMonth,DptDateDDMMYY,DayMonthRet,RetDateDDMMYY)
{
try{
document.getElementById(DayMonth).value="Tue";
document.getElementById(DptDateDDMMYY).value="03/04/2012";
document.getElementById(DayMonthRet).value="Thu";
document.getElementById(RetDateDDMMYY).value="05/04/2012";
}catch(e){} 
}

function setdatesGLA(DayMonth,DptDateDDMMYY,DayMonthRet,RetDateDDMMYY)
{
try{
document.getElementById(DayMonth).value="Mon";
document.getElementById(DptDateDDMMYY).value="31/10/2011";
document.getElementById(DayMonthRet).value="Thu";
document.getElementById(RetDateDDMMYY).value="03/11/2011";
}catch(e){} 
}
