	//global const
	var image_root = "http://dede.lastminute.com/oss/img/wl//lmn/";
	var style_root = "";
	var js_root = "";
	var duration = 14;	

//unser zeug

		var  s_account = 'lastmindeDE';
		var s_cookieDomainPeriods = 3;
		
		
		var s_pageName = 'Category Homepage'; 
		var s_channel = 'Category Homepage';
		
		var s_eVar4='Packaging';
		var s_prop4='Packaging';
		
		// Optional
		var s_prop1 = '';
		var s_eVar2 = '';



		function changeLayer(sel){
		index = sel.selectedIndex;
		option = sel.options[index];
		showLayer(option.value);
	}
	function showLayer(name){
  Layers=document.getElementsByTagName("DIV");
   for(i=0;i<Layers.length;i++){
     Layers[i].style.display="none";
  }
   var tgLayer=Layers[name];
   if(tgLayer)tgLayer.style.display="block";
  
  //* Before initing the calendar make sure drop downs are set properly

  //* offset defines the number of days from today to set dep. date to
  offset = 2;
 
  _now = new Date();
  _now.setTime(_now.getTime() + offset * 24 * 60 * 60 * 1000 );
  
  _nowDay=_now.getDate();
  _nowMonth=_now.getMonth();
  
  //* delta variable allows to define intial difference between
  //* departure and return in days
  delta = 14;
  
  //* add deltat * 24 (hours) * 60 (minutes) * 60 (seconds) * 1000 = delta in mS. 
  _now.setTime(_now.getTime() + delta * 24 * 60 * 60 * 1000 );
  
  // * set dropdowns
  document.forms[name].depDay.selectedIndex = _nowDay-1;
  document.forms[name].depMonth.selectedIndex = _nowMonth ;
  document.forms[name].retDay.selectedIndex = _now.getDate()-1
  document.forms[name].retMonth.selectedIndex = _now.getMonth();
  
  initCalendar(name);
 }
function clearDest(inp){
		if(inp.value==''){
			inp.value='';
		}
	}


function checkInput(vForm){
	//destination (dp)
	if(vForm.destName){
		if(vForm.destName.value==""){
			alert("Bitte ein Reiseziel angeben!");
			return false;
		}
	}
	//date check
	if(!checkDepartureReturn(vForm.depDate.value,vForm.retDate.value)) {
		alert("Das Abflugdatum muss vor dem Rückflugdatum liegen!");
		return false;
	}		
	//duration
	if(vForm.duration && vForm.duration.value!=''){
		if(!durationMatches(vForm.depDate.value,vForm.retDate.value,vForm.duration.value)){
			alert('Die Reisedauer liegt nicht innerhalb des gewählten Zeitraums für Abflug und Rückflug. Bitte passen Sie die Daten an!');
			return false;
		}
	}
	//room allocation (dp)
	if(vForm.roomCount && !checkRoomAllocation()){
		alert("Die Summe der Erwachsenen in der Zimmerzuordnung stimmt nicht mit der Anzahl der reisenden Erwachsenen überein!");
		return false;	
	}
	//services count (dp)
	
	var servCount = 0;
	var dp = false;
	var flightSelected = false;
	
	if (vForm.hotelSelected){
		dp = true;
		if (vForm.hotelSelected.checked){
			servCount = servCount +1;
		}
	}	
	if (vForm.carSelected){
		dp = true;
		if (vForm.carSelected.checked){
			servCount = servCount +1;
		}
	}	
	if (vForm.flightSelected){
		dp = true;
		if (vForm.flightSelected.checked){
			flightSelected = true;
			servCount = servCount +1;
		} else {
			servCount = 0;
		}
	}
	
	if (dp & !flightSelected){
		alert("Bitte mind. 2 Leistungen (Flug+Hotel od. Flug+Mietwagen) wählen!");
		return false;
	}
	return true;
}



			
	function updateRoomAllocation(src){//src:0-initialization,1-adult combo,2-kid combos,3 room count combo
	if (!document.getElementsByName('adultsInRoom')[0]){ //quick hack to save us fomr JS error if hotel part is missing e.g.  Fly-n-Drive
		return;
	}
	var adultAmount = parseInt(document.getElementById('adultAmount').value,10);
	var roomCount;var adultPreset1;var adultPreset2;var adultPreset3; var adultPreset4;
	var selAdults1 = document.getElementsByName('adultsInRoom')[0];
	var selAdults2 = document.getElementsByName('adultsInRoom')[1];
	var selAdults3 = document.getElementsByName('adultsInRoom')[2];
	var selAdults4 = document.getElementsByName('adultsInRoom')[3];

	// 1 or mores combination lines	
	if(src<=1){//adult combo or init
		if(adultAmount>2){
			initSel(document.getElementById('roomCount'),1,adultAmount,2);
			adultPreset1=Math.ceil(adultAmount/2);adultPreset2=adultAmount-Math.ceil(adultAmount/2);				
		}else{
			initSel(document.getElementById('roomCount'),1,adultAmount,1);
			adultPreset1=adultAmount;adultPreset2=0;		
		}											
	}else{
		adultPreset1=selAdults1.value;
		adultPreset2=selAdults2.value;
		adultPreset3=selAdults3.value;
		adultPreset4=selAdults4.value;
	}
	roomCount = parseInt(document.getElementById('roomCount').value,10);

	// transfer adult amount to combos
	initSel(selAdults1,1,parseInt(adultAmount,10),adultPreset1);
	initSel(selAdults2,1,parseInt(adultAmount,10),adultPreset2);
	initSel(selAdults3,1,parseInt(adultAmount,10),adultPreset3);
	initSel(selAdults4,1,parseInt(adultAmount,10),adultPreset4);

	//show/hide room lines
	for(var i=1;i<=4;i++){
		if(i<=roomCount) document.getElementById('room'+i).style.display='block';
		else document.getElementById('room'+i).style.display='none';
	}

	updateKidSelection(1,document.getElementById('kid1Age'),src);
	updateKidSelection(2,document.getElementById('kid2Age'),src);
	updateKidSelection(3,document.getElementById('kid3Age'),src);

}

function updateKidSelection(kidNo,sel,src){
	if(sel.value==-1){
		for(var i=0;i<document.getElementsByName('kid'+kidNo+'room').length;i++){
			document.getElementsByName('kid'+kidNo+'room')[i].checked=false;	
			document.getElementsByName('kid'+kidNo+'room')[i].disabled=true;
		}
	}else{
		for(var i=0;i<document.getElementsByName('kid'+kidNo+'room').length;i++){
			if(document.getElementsByName('kid'+kidNo+'room')[i].disabled==true || src==0){
				document.getElementsByName('kid'+kidNo+'room')[0].checked=true;
			}else{
				if(document.getElementById('room'+(i+1)).style.display=='none' && 					document.getElementsByName('kid'+kidNo+'room')[i].checked==true){
					document.getElementsByName('kid'+kidNo+'room')[0].checked=true;	
				}
			}
			document.getElementsByName('kid'+kidNo+'room')[i].disabled=false;
		}
	}
}
		
function initSel(sel,low,high,preset){
	sel.length=0;
	for(i=low;i<high+1;i++){
		if(low==0) sel.options[i]=new Option(i,i);
		else sel.options[i-1]=new Option(i,i);
	}
	if(hasOptionVal(sel,preset))selOptionVal(sel,preset);
	else sel[0].selected=true;
}

function checkRoomAllocation() {
	var adultsAllocated=0;var adultsSelected;
	for(var i=0;i<parseInt(document.getElementById('roomCount').value,10);i++)
		adultsAllocated=adultsAllocated+parseInt(document.getElementsByName('adultsInRoom')[i].value,10);
	adultsSelected=parseInt(document.getElementById('adultAmount').value,10);
	if(adultsSelected==adultsAllocated)return true;
	else return false;
}


//CALENDAR
	var n=navigator,B=(n.userAgent+n.appName).toLowerCase(),V=parseInt(n.appVersion);
	var N4=(B.indexOf("netscape")!=-1&&V==4),IE=(B.indexOf("microsoft")!=-1);

	var calForm;
	var dropDay1,dropMonth1,dropDay2,dropMonth2;
	var currButtonNo;

	var initDay,initMonth,initYear;
	var endDay,endMonth;
	var numMonths;

	var calWidth=142;
	var calHeight=182;

	var bPressed,calendar;
	var calendarHTML="";
	var monthNames=new Array("x","x","x","x","x","x","x","x","x","x","x","x");//placeholders
	var calBgColor = "";
	var arrowr_img = "";
	var arrowl_img = "";
	var week_days = "";
	var window_close = "";

	if(!N4)document.onmouseup=function(e){
		calendar.hide();
		if(bPressed){
			bPressed=false;
			showCalendar(e);}
	}

	writeIFrame();
	//duration
	var dur=14; if(!isNaN(dur)==true){duration=dur;}


//unser zeug ende