<!--

document.write('<'+'iframe style="position:absolute;width:'+calWidth+'px;height:'+calHeight+'px;left:34px;top:-500px;z-index:100;" noresize frameborder="0" scrolling="no" id="cIframe" name="cIframe" src="javascript:\'Loading...\'"><'+'/iframe>');
// start,end,form,day1,month1,day2,month2
var theDate = new Date(2009,01-1,11);
// CSS include is used on the calendar to provide branding
var CSSinclude = '<link HREF="http://www.jdoqocy.com/click-1553088-10424452?URL=%2Fsite%2Ffrontier_section.css%3Fskin%3Dengb.lastminute.com%26amp%3Bsection%3Dtravel%2Fholidays" rel="stylesheet" type="text/css" />';
theDate = theDate.getDate()+'/'+(theDate.getMonth()+1)+'/'+theDate.getFullYear();
function submitSearch(myForm,farandAway) {
  if(farandAway) {
	var destValue;
	if (document.getElementById('destination_name')!=null) {
		destValue = document.getElementById('destination_name').value;
	    if (destValue=='' || destValue=='Show me all') {document.getElementById('farandaway').value='2147443425';}
		else {document.getElementById('farandaway').value='';}		
	}
	if (document.getElementById('l_360')!=null) {
		destValue = document.getElementById('l_360').value;
    	if (destValue=='0') {document.getElementById('farandaway').value='2147443425';}
		else {document.getElementById('farandaway').value='';}
	}
  }
  elements = myForm.elements;
  cleanup(elements['dest_search']);
  cleanup(elements['keyword_search']);
  parseDate();
  CookieForms('save','holidays_search','l_61','i','l_95','i','l_3','s','depDay','s','depMonth','s','giveOrTake','s','l_94','s','l_13','s','temperatureField','s','travelTime','s','destination_name','s','l_360','s');
  return true;
}
function cleanup(obj,defaultValue){
  if (!defaultValue) defaultValue = document.getElementById('holidays_search_default_text').value;
  if (obj.value == defaultValue) obj.value = '';
}
/* Takes day and month values, generates year. Sets dep_date to string value (yyyymmdd).  mm is 0 based (0-11) */
function parseDate(){
  var currentDate = new Date();
  var dep_date = document.getElementById('dep_date');
  var dayDropDown = document.getElementById('depDay');
  var monthDropDown = document.getElementById('depMonth');
  var depDay = dayDropDown.selectedIndex
  var depMonth = monthDropDown.selectedIndex
  if (depDay!=0 && depMonth==0){
    searchForm.dep_month.selectedIndex=1;
  }  
  day = dayDropDown.options[dayDropDown.selectedIndex].value;
  month = monthDropDown.options[monthDropDown.selectedIndex].value;
  if ((month > 0)&&(day>0)){
    if (day.length == 1) day='0'+ day;
    myDate = new Date();
    year = myDate.getYear();
    if (month < myDate.getMonth()) year+=1;
    month-=1;
    if (month<10) month = '0' + month;
    if (year < 2000) year+= 1900;
    dep_date.value=''+year+month+day;
    document.getElementById('holidays_month_N').value='0'
  }
  else if (month>0){
	months = new Array('3000259','3000266','3000273','3000280','3000287','3000294','3000301','3000308','3000315','3000322','3000329','3000336');
    document.getElementById('holidays_month_N').value=months[month-1];
    dep_date.value = '0';
  }
  else {
    dep_date.value = '0';
    document.getElementById('holidays_month_N').value='0'
  }
  /* if the day or month is a single digit, add a preceeding 0 
  day = document.getElementById('depDay');
  if (day.options[day.selectedIndex].value < 10) day.options[day.selectedIndex].value = '0' + day.options[day.selectedIndex].value;
  month = document.getElementById('depMonth');
  if (month.options[month.selectedIndex].value < 10) month.options[month.selectedIndex].value = '0' + month.options[month.selectedIndex].value;
  */
}
function setPartnerId(){
	partnerId = readCookie('partnerId');
	document.getElementById('h_hs_partner_id').value = partnerId;
}
function submitPopUnder(){
}
SafeAddOnload(setPartnerId);

//-->
