// lmweb funktionen
function Open_Window(Url,WindowName,Options,ww,wh)
{
  WindowParam = Options
  WindowParam += ',left='+(screen.width-ww)/2 + ',top='+(screen.height-wh)/2+',width='+ww+',height='+wh

  NewWindow=window.open(Url, WindowName, WindowParam);

  return NewWindow
}

function HotelPopup(PARAMS)
{
  Url = 'http://www.lmweb.net/scripts/lmplusi.dll?FORM=msk/hotel.htm&CFG=669d&'+PARAMS

  NewWindow =  Open_Window(Url,'', 'scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=yes', 350 , 200);
}//-->

DatArray = new Array("So","Mo","Di","Mi","Do","Fr","Sa","??" )


function Hotelsuche(Name, Code)
{
   with (parent.main.document.SUCH)
   {
     HOTEL.value = Code
     ZIEL.value  = ""
     SO.value = ""
   }

   parent.main.Search()
}

function SUCHE(ZielName, TLC)
{

   with (parent.main.document.SUCH)
   {
     HOTEL.value = ""
     ZIEL.value  = TLC
     SO.value = ""
   }

//  parent.main.document.INFO.ZIEL.value = ZielName

   parent.main.Search()
}

function ORTSUCHE(Name, ORTNR)
{
   with (parent.main.document.SUCH)
   {
     HOTEL.value = ""
     ZIEL.value  = ""
     SO.value = ORTNR

   }

//  parent.main.document.INFO.ZIEL.value = Name
   parent.main.Search()
}


function Search()
{
  with (window.document.SUCH)
  {
   if (LMIN.value == "") MIN=0;  else  MIN = parseInt(LMIN.value);
   if (LMAX.value == "") MAX=28; else  MAX = parseInt(LMAX.value);

//    Tol = parseInt(xTol.options[xTol.selectedIndex].value)

    Von = parseInt(VON.options[VON.selectedIndex].value)

//    alert("MAX= "+MAX+" Tol:"+Tol+" BIS:"+ BIS.value)

    BIS.value = MAX+Von

    submit()

   }

//   parent.main.document.SUCH.submit()

}


function SELECT_VON()
{
  document.write("<select name='VON' size=1 class=small>")

  for (var i=2; i<=100;i++)
  {
     document.write('<option value='+i+'>'+GetDatum(i)+'</option>')
  }
  document.write("</select>")
}

function SELECT_BIS()
{
  document.write("<select name='BIS' size=1>")

  for (var i=4; i<=120;i++)
  {
     if (i==15) document.write('<option selected ');  else document.write('<option ');
     document.write('value='+i+'>'+GetDatum(i)+'</option>')
  }
  document.write('</select>')
}
function GetDatum(offset)
{
  var time = new Date()

  time.setTime( time.getTime()+offset*86400000)
  return DatArray[time.getDay()]+' '+time.getDate()+'.'+(1+time.getMonth())+'.'+(2000+(time.getYear()%100))
}
Deep = new Array();
Deep[0]='ZIEL=E&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[1]='ZIEL=C&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[2]='ZIEL=B&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[3]='ZIEL=K&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[4]='ZIEL=FUE&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[5]='ZIEL=TFS&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[6]='ZIEL=LPA&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[7]='ZIEL=ACE&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[8]='ZIEL=SPC&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[9]='ZIEL=D&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[10]='ZIEL=F&SF=2&TV=7&TR=28&XS=0&XV=0'

Deep[11]='ZIEL=J&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[12]='ZIEL=M&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[13]='ZIEL=MLE&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[14]='ZIEL=P&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[15]='ZIEL=T&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[16]='ZIEL=Q&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[17]='ZIEL=DXB&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[18]='ZIEL=MRU&SF=2&TV=7&TR=28&XS=0&XV=0'
Deep[19]='ZIEL=V&SF=2&TV=7&TR=28&XS=0&XV=0'

Deep[20]='SF=3&TV=7&TR=28&XS=0&XV=0'
Deep[21]='ZIEL=FUE&SF=3&TV=7&TR=28&XS=0&XV=0&HOTEL=$LFUE159'
Deep[22]='ZIEL=LPA&SF=3&TV=7&TR=28&XS=0&XV=0&HOTEL=$LLPA045'
Deep[23]='ZIEL=TFS&SF=3&TV=7&TR=28&XS=0&XV=0&HOTEL=$LTFS097'
Deep[24]='ZIEL=ACE&SF=3&TV=7&TR=28&XS=0&XV=0&HOTEL=$LACE108'

function LM(Id)
{
  location.href='machinelink.php?FORM=msk/iframe9.htm&mid=4&CFG=669d&DLI='+Id+'&'+Deep[Id]+'&TITLE=Last%20Minute&GO=1#top"'
}

function LmPreis(Id)
{
  document.write('<a href=javascript:LM('+Id+')>')
  if (MPL[Id]) 
  {  if (MPL[Id]>=0)  document.write(MPL[Id]+' ') 
     else document.write('ausgeb.')
  }
  else document.write('>prüfen') 
}