var BingoTest="Sie buchen ein bestimmtes Zielgebiet, eine Hotelkategorie sowie den Zimmertyp und die Verpflegung. Ihr tatsächliches Hotel erfahren Sie erst vor Ort durch die Reiseleitung."
var SparrText="<b id=lm>Sparreise</b><br>Die Unterbringung erfolgt in einem TUI-Vertragshaus O D E R in einem anderen Haus, das dem TUI-Qualitätsstandard der gebuchten Kategorie entspricht. Bitte haben sie Verständnis, daß sich bei Buchung eines Spartipps die Entscheidung, in welchem Objekt die Unterbringung erfolgt, wird erst vor Ort getroffen. Bei einer anonymen Sparreise einer Hotelkette (z.B. Riu, Grupotel, Iberotel) erfolgt die Unterbringung in einem Hotel dieser Kette."

var hh = 0;
var mousex = 0;
var mousey = 0;
document.onmousemove=saveMousePosition;
var isOpera = (navigator.userAgent.indexOf('Opera') != -1);
var isIE = (!isOpera && navigator.userAgent.indexOf('MSIE') != -1);
var isIE6Strict = (document.documentElement);
var all_o='<table height="100%" width="100%" border=0 cellPadding=0 cellSpacing=0 bgcolor="#FFFFFF"><tr><td width=10 height=10><IMG src="/oss/img/r1.gif" height=10 width=10></td><td width=10 height=10 background="/oss/img/r2.gif"></td><td width=10 height=10><img src="/oss/img/r3.gif" width=10 height=10></td></tr><tr><td width=10 background="/oss/img/r8.gif"></td><td width="100%" style="font-weight:normal;text-decoration:none;color:#000000;font-family:Arial,Helvetica;font-size:10px;">';
var all_u='</td><td width=10 background="/oss/img/r4.gif"></td></tr><tr><td width=10 height=10><IMG src="/oss/img/r5.gif" width=10 height=10></td><td height=10 background="/oss/img/r6.gif"></td><td width=10 height=10><img src="/oss/img/r7.gif" height=10 width=10></td></tr></table>';

function saveMousePosition(mouseEvent) {
if (!mouseEvent) mouseEvent = window.event;
var posx,posy;
 if (mouseEvent.pageX || mouseEvent.pageY) {
  mousex = mouseEvent.pageX;
  mousey = mouseEvent.pageY;
 }else if (mouseEvent.clientX || mouseEvent.clientY){
  mousex = mouseEvent.clientX;
  mousey = mouseEvent.clientY;
 if (isIE){
  mousex += document.body.scrollLeft;
  mousey += document.body.scrollTop;
 }
 if (isIE6Strict) {
  mousex += document.documentElement.scrollLeft;
  mousey += document.documentElement.scrollTop;
 }
}
else return;
}

function ggetElementById(id) {
 if (document.getElementById) return document.getElementById(id);
 if (document.all) return document.all[id];
 if (document.layers) return document.layers[id];
 return null
}

function auf(aText) {
 id='alertinfobox'
 setVisibility(id, 'visible', aText);
}

function zu() {
 id='alertinfobox'
 setVisibility(id, 'hidden','');
}

function setVisibility(id, vis, txt) {
 var element = ggetElementById(id);
 var IfrRef = ggetElementById('DivShim');
 var style = element;
 hplus=0,wplus=0;
 if (element.style) {
 if( txt.length >50 ) hplus=20;
 if( txt.length >70 ) hplus=30,wplus=10;
 if( txt.length >100 ) hplus=50,wplus=30;
 if( txt.length >200 ) hplus=100,wplus=50;
 if( txt.length >350 ) hplus=120,wplus=100;
 element.innerHTML = all_o+txt+all_u;

  if (element) {
   element.style.visibility=vis;
   element.style.width = 150+wplus;
   if(isIE) element.style.height = 50+hplus;
   element.style.top = mousey;
   element.style.left = (mousex + 10);
   element.style.zIndex = 2000;

	if(vis=='hidden'){
	 IfrRef.style.display = "none";
	}else{
	 IfrRef.style.zIndex = 1999;
	 IfrRef.style.width = element.style.width;
	 IfrRef.style.height = element.style.height;
	 IfrRef.style.top = mousey+6;
	 IfrRef.style.left = element.style.left;
	 IfrRef.style.display = "block";
	}
  }
 }
}

var progressStep= 5;
var progressStop= 120;
var progressAt= progressStep;
var progressColor= '#ff0099';
var progressInterval= 1000;
var progressTimer;
var Taskrun

function progress_clear() {
 clearTimeout(progressTimer);
 document.getElementById('progress').style.backgroundColor = 'transparent';
 progressAt=0;
}

function progress_work() {
 progressAt+= progressStep;
 if(progressAt >progressStop){
  progressAt= progressStep,
  progress_clear();
 }else{
  if(document.getElementById('progress')){
   document.getElementById('progress').style.backgroundColor = 'transparent';
   document.getElementById('progress').style.width = progressAt;
   document.getElementById('progress').style.backgroundColor = progressColor;
   progressTimer = setTimeout('progress_work()',progressInterval);
  }else{
   progress_clear();
  }
 }
}

function AniRun(){
  if(wcu >=100){
	document.getElementById('progress').style.visibility = 'hidden';
	clearTimeout(Taskrun);
	return(false);
  }else{
	wcu+=4;
	document.images['img_rest'].width = 100-wcu+1;
	document.images['img_weit'].width = wcu;
	Taskrun=setTimeout("AniRun()",1000)
  }
}

var ClickCo="#fee7f1"
var OverCo ="#f8cde0"
var OutCo  ="#ffffff"

function mCC(thisObj) {
 if(thisObj.bgColor==ClickCo) thisObj.bgColor=OverCo;
 else if(thisObj.bgColor==OverCo) thisObj.bgColor=ClickCo;
}

function mOver(thisObj) {
 if(thisObj.bgColor==OutCo || thisObj.bgColor=='') thisObj.bgColor=OverCo;
}

function mOut(thisObj) {
 if(thisObj.bgColor== OverCo) thisObj.bgColor= OutCo;
}

function FZ(theUrl){
 window.open(theUrl, 'fZeit', 'scrollbars=yes,toolbar=no,location=no,status=no,menubar=no,resizable=yes,width=640,height=320');
}

function displayImage(nBild) {
 cBild = new Image();
 cBild.src = "/pic/"+nBild;
 document.images["Vollbild"].src= cBild.src;
 if(document.images["Vollbild"].width >400) document.images["Vollbild"].width=400;
}

function HdI(URL){
 window.open(URL,'HotelInfo','width=640,height=700,resizable=yes,toolbar=no,scrollbars=yes')
}

function xHdI(URL){
 window.open(URL,'Landkarte','width=640,height=700,resizable=yes,toolbar=no,scrollbars=yes')
}

function INF(REG,LC,OUT,ANK,STK,TG,NA,WA){
 xKLICK='<a href="/page.asp?s='+ANK+'&to='+LC+'&an='+REG+'" onMouseover="'+"Klima('"+OUT+"','"+TG+"','"+NA+"','"+WA+"');return true"+'" onMouseout="window.status=STAT;return true">';
 tt='<tr><td colspan=2 background="/oss/img/wl/lmn/dl3.gif"><img src="/img/pixel.gif" border=0 width=580 height=1></td></tr>'
 +'<tr height=20>'
 +'<td valign=center>'+xKLICK+'<b class="gross">'+OUT+'</a></td>'
 +'<td valign=center class="norm" align=right>'+xKLICK+STK+' Angebote</a></td>'
 +'</tr>'
 +'<tr><td colspan=2><img src="/img/pixel.gif" border=0 width=1 height=4></td></tr>';
document.write(tt);
}

function Linf(LAND){
tt='<tr><td colspan=2 background="/oss/img/wl/lmn/dl5.gif"><img src="/img/pixel.gif" border=0 width=580 height=1></td></tr>'
+'<tr>'
+'<td height=20 colspan=2 class="norm">'+LAND+'</td></tr>'
+'<tr><td colspan=2><img src="/img/pixel.gif" border=0 width=1 height=4></td></tr>';
document.write(tt);
}

function SUCH(AB,REG,LC,OUT,STK,TG,NA,WA,LS,ST){
 xKLICK='<a href="/suchen.asp?ID='+AB+REG+'200000OO'+LS+ST+'0000&Plus=28" onMouseover="'+"Klima('"+OUT+"','"+TG+"','"+NA+"','"+WA+"');return true"+'" onMouseout="window.status=STAT;return true">';
 tt='<tr><td colspan=2 background="/oss/img/wl/lmn/dl3.gif"><img src="/img/pixel.gif" border=0 width=580 height=1></td></tr>'
 +'<tr height=20>'
 +'<td valign=center>'+xKLICK+'<b class="gross">'+OUT+'</b></font></a></td>'
 +'<td valign=center class="norm" align=right>'+xKLICK+STK+' Angebote</a></td>'
 +'</tr>'
 +'<tr><td colspan=2><img src="/img/pixel.gif" border=0 width=1 height=4></td></tr>';
document.write(tt);
}

function  MLT(AB,REG,LC,OUT,STK,TG,NA,WA,LS,ST){
 xKLICK='<a href="http://top.lastminute.de/nf/?r01='+AB+'&r02='+ST+'&r03=00&r04='+REG+'&r05=200" onMouseover="'+"Klima('"+OUT+"','"+TG+"','"+NA+"','"+WA+"');return true"+'" onMouseout="window.status=STAT;return true">';
 xKLICK='<a href="/nfplus.asp?ID='+AB+REG+'200000OO'+LS+ST+'0000&Plus=28" onMouseover="'+"Klima('"+OUT+"','"+TG+"','"+NA+"','"+WA+"');return true"+'" onMouseout="window.status=STAT;return true">';
 tt='<tr><td colspan=2 background="/oss/img/wl/lmn/dl3.gif"><img src="/img/pixel.gif" border=0 width=580 height=1></td></tr>'
 +'<tr height=20>'
 +'<td valign=center>'+xKLICK+'<b class="gross">'+OUT+'</b></font></a></td>'
 +'<td valign=center class="norm" align=right>'+xKLICK+STK+' Angebote</a></td>'
 +'</tr>'
 +'<tr><td colspan=2><img src="/img/pixel.gif" border=0 width=1 height=4></td></tr>';
document.write(tt);
}

function L(LAND,ANK){
 LNK='/suchen.asp?ID='+ANK
 out='<tr><td colspan=7><img border=0 width=1 height=4 src="/img/pixel.gif"></td></tr>'
 +'<tr><td colspan=7 background="/oss/img/wl/lmn/h_bg_list.gif"><img border=0 width=1 height=1 src="/img/pixel.gif"></td></tr>'
 +'<tr height=30>'
 +'<td align=center><img src="/oss/img/wl/lmn/ic_path.gif" width=21 height=20 border=0></td>'
 +'<td class=gross><a href="'+LNK+'" title="Angebote in '+LAND+' anzeigen"><b>'+LAND+'</b></a></td>'
 +'<td></td>'
 +'<td align=center><img border=0 src="/oss/img/wl/lmn/ic_sun.gif" alt="Tagestemperatur"></td>'
 +'<td align=center><img border=0 src="/oss/img/wl/lmn/ic_moon.gif" alt="Nachttemperatur"></td>'
 +'<td align=center><img border=0 src="/oss/img/wl/lmn/ic_waves.gif" alt="Wassertemperatur"></td>'
 +'<td>&nbsp;</td></tr>'
 +'<tr><td colspan=7 background="/oss/img/wl/lmn/dl3.gif"><img border=0 width=1 height=1 src="/img/pixel.gif"></td></tr>'
 +'<tr><td colspan=7><img border=0 width=1 height=4 src="/img/pixel.gif"></td></tr>';
document.write(out);
}

function Z(ZIEL,PREIS,TAG,NACHT,WASSER,ANK,LAND){
 LNK='/suchen.asp?ID='+ANK
 out="<tr onMouseOver=\"mOver(this);auf('"+LAND+" "+ZIEL+" ab&nbsp;Euro&nbsp;"+PREIS+".- Angebote anzeigen');\" onMouseOut=\"mOut(this);zu();\" onclick=\"mCC(this)\" height=20>"
 +'<td><img border=0 width=1 height=20 src="/img/pixel.gif"></td>'
 +'<td class=norm>&nbsp;<a href="'+LNK+'"><u>'+ZIEL+'</u></a></td>'
 +'<td></td>'
 +'<td align=center bgcolor="#FFF9EB">'+TAG+'&deg;</td>'
 +'<td align=center bgcolor="#FFF9EB">'+NACHT+'&deg;</td>'
 +'<td align=center bgcolor="#FFF9EB">'+WASSER+'&deg;</td>'
 +'<td align=right class=norm><a href="'+LNK+'"><u>ab <b>'+PREIS+'.-</b> &euro;</u></a></td></tr>'
 +'<tr><td></td><td colspan=6 background="/oss/img/wl/lmn/dl3.gif"><img border=0 width=1 height=1 src="/img/pixel.gif"></td></tr>';
document.write(out);
}

function xL(LAND){
 out="<tr height=20>"
 +'<td colspan=7 class=norm>&nbsp;&nbsp;&nbsp;<b id=lm>'+LAND+'</b></td></tr>'
 +'<tr><td colspan=7 background="/oss/img/wl/lmn/dl3.gif"><img border=0 width=1 height=1 src="/img/pixel.gif"></td></tr>';
document.write(out);
}

function xZ(ZIEL,PREIS,TAG,NACHT,WASSER,ANK,LAND,CODE,IMG){
 LNK='/suchen.asp?ID='+ANK
 out="<tr onMouseOver=\"mOver(this)\" onMouseOut=\"mOut(this);zu();\" onclick=\"mCC(this)\" height=20>"
 +'<td><img border=0 width=1 height=20 src="/img/pixel.gif"></td>'
 +'<td onmouseover="auf('+"'<b class=norm id=lm>"+LAND+"</b><br>"+(IMG==''? ' ':'<img align=right src=/px/70/'+CODE+'/'+IMG+' class=pic border=0 width=50 height=40> ')+ZIEL+"<br>ab&nbsp;<b class=klno>"+PREIS+".-&nbsp;Euro</b>"+"'"+')" onmouseout="zu()" class=norm>&nbsp;<a href="'+LNK+'"><u>'+ZIEL+'</u></a></td>'
 +"<td><img src=\"/oss/img/wl/lmn/ic_attention.gif\" border=0 height=11 onmouseover=\"auf('"+LAND+(IMG==''? ' ':'<img align=right src=/px/70/'+CODE+'/'+IMG+' class=pic border=0 width=50 height=40> ')+ZIEL+" ab&nbsp;Euro&nbsp;"+PREIS+".-<br>'+ShowOrtInfo('"+CODE+"'))\" onmouseout=\"zu()\"></td>"
 +'<td align=center bgcolor="#FFF9EB">'+TAG+'&deg;</td>'
 +'<td align=center bgcolor="#FFF9EB">'+NACHT+'&deg;</td>'
 +'<td align=center bgcolor="#FFF9EB">'+WASSER+'&deg;</td>'
 +'<td onmouseover="auf('+"'<b class=norm id=lm>"+LAND+"</b><br>"+(IMG==''? ' ':'<img align=right src=/px/70/'+CODE+'/'+IMG+' class=pic border=0 width=50 height=40> ')+ZIEL+"<br>ab&nbsp;<b class=klno>"+PREIS+".-&nbsp;Euro</b>"+"'"+')" onmouseout="zu()" align=right class=norm><a href="'+LNK+'"><u>ab <b>'+PREIS+'.-</b> &euro;</u></a></td></tr>'
 +'<tr><td></td><td colspan=6 background="/oss/img/wl/lmn/dl3.gif"><img border=0 width=1 height=1 src="/img/pixel.gif"></td></tr>';
document.write(out);
}

var openedId;
var normalsrc;

function SwapField () {
  var txtPauschal = "Reiseziel (z.B. Mallorca) oder Hotelnamen eingeben";
  var txtHotels   = "Reiseziel eingeben (z.B. Berlin)";
  var SelField  = document.getElementById("Schnellsuche-Service");
  var DesField  = document.getElementById("Schnellsuche-Reiseziel");
  var SelFieldIdx   = SelField.selectedIndex;
  var SelFieldIdxNr = SelFieldIdx;

  if (SelFieldIdxNr == 0) { 
    DesField.value = txtPauschal; 
  } else { 
    DesField.value = txtHotels; 
  }
}


function sendSchnellsuche() {
  var produkt = document.getElementById("Schnellsuche-Service").value;
  var suchwort = document.getElementById("Schnellsuche-Reiseziel").value;
  if (produkt=="pau") {
    link = "http://xxl.lastminute.de/Hotel_Finder.asp?HXSUCH="+suchwort;
    } else if (produkt="hotel") {
      if(suchwort.indexOf('(z.B. Berlin)') >0) suchwort="";
      var now = new Date();
      var depTime = new Date();
      var retTime = new Date();
      depTime.setTime(now.getTime() + (28*24*3600*1000));
      retTime.setTime(now.getTime() + (35*24*3600*1000));	
      var depDate = depTime.getDate() + "." + (depTime.getMonth()*1+1) + "." + depTime.getFullYear();
      var retDate = retTime.getDate() + "." + (retTime.getMonth()*1+1) + "." + retTime.getFullYear();
      link = "http://www.lastminute.de/de_DE/lmn2/travel/hotel/search.do?search.do?agent_id=LAD&railSelected=off&adultAmount=2&kidAge=-1&kidAge=-1&kidAge=-1&hotelSelected=on&hotelCategory=&hotelName=&roomCount=1&catering=&adultsInRoom=2&adultsInRoom=1&adultsInRoom=1&adultsInRoom=1&adultsInRoom=1&adultsInRoom=1&adultsInRoom=1&adultsInRoom=1&flightType=return&scat=hotel";
      link += "&destName=" + (suchwort=="" ? "Berlin" :suchwort);
      link += "&depDate=" + depDate;
      link += "&retDate=" + retDate;
  }
  window.location.href = link;
  return false;
}


function moveIn(id) {
  if (openedId){
    if (normalsrc) {
      tab = document.getElementById(openedId+'Tab');
	  tab.src = normalsrc;
	}
	popup = document.getElementById(openedId+'Popup');
	if (popup) {
	  popup.style.display = "none";
	}
  }
			
  popup = document.getElementById(id+'Popup');
  closureCanceled = true;
  openedId = id;
  if (popup) {
      popup.style.display = "block";
  }
}
		
moveOut = function () {
  if (normalsrc && !closureCanceled) {
    tab = document.getElementById(openedId);
    if (tab) tab.src = normalsrc;
  }
  popup = document.getElementById(openedId+'Popup');
  if (popup && !closureCanceled) {
      openedId = null;
      popup.style.display = "none";
  }
}
		
function closeWithDelay(){
  closureCanceled = false;
  setTimeout("moveOut();",600);
}

function RTeCollector(strParam) {
intHeight = 460;
intWidth = 640;
intTop=(screen.height/2)-(intHeight/2)
intLeft=(screen.width/2)-(intWidth/2)
strFeatures='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,height='+intHeight+',width='+intWidth+',top='+intTop+',left='+intLeft;
winEcollector=window.open('http://ecollector.responsetek.com/eCollector.asp?' + strParam, 'eCollector', strFeatures);
}

function kBox(a){
 out='';
 for(i=0; i<17;i++) out+='<option value="'+i+'"'+(a==i ? ' selected':'')+'>'+(i==0 ? 'Alter': (i==1 ? 'bis 2 J.': '&nbsp;'+i+' J.' ))+'</option>'
 document.write(out);
}

function getCookie(Name) {
   var search = Name + "="
   if (document.cookie.length > 0) {
      offset = document.cookie.indexOf(search) 
      if (offset != -1) {
         offset += search.length 
         end = document.cookie.indexOf(";", offset) 
         if (end == -1) 
            end = document.cookie.length
         return unescape(document.cookie.substring(offset, end))
      } 
   }
}

function setCookie(name, value, expire) {
   document.cookie = name + "=" + escape(value)
   + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()))
}


