function allinclusive(u, t, w, h){
	window.open(u, t, "width=" + w + " , height=" + h + " , top=0, left=0, dependent=yes, scrollbars=yes, resizable=yes");
}

Von=0;
Bis=11;

function TCHECK(VonBis){
	with (document.SUCH){
		Von1 = document.SUCH.VON.selectedIndex
		Bis = Math.max(Math.min( document.SUCH.BIS.selectedIndex + Von1-Von ,document.SUCH.BIS.length-1),0);
		document.SUCH.BIS.selectedIndex = Bis;
		Von=Von1
		window.status="Von: "+Von
	}	
}

function SELECT_VON(){
	document.write("<select name='VON' size=1 onChange=TCHECK(0)>")
	for (var i=2; i<=100;i++){
		document.write('<option value='+i+'>'+GetDatum(i)+'')
	}
	document.write("</select>")
}

function SELECT_BIS(){
	document.write("<select name='BIS' size=1 >")
//document.write('<option value=-14>max. 14 Tage später')
	for (var i=5; i<=120;i++){
		if (i==16)
			document.write('<option selected ');
		else
			document.write('<option ');
		document.write('value='+i+'>'+GetDatum(i)+'')
	}
	document.write('</select>')
}

function GetDatum(offset){ 
	DatArray = new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","??" )
	var time = new Date()
	time.setTime( time.getTime()+offset*86400000);

	tag     = time.getDate();
	monat   = time.getMonth()+1;
	jahr    = time.getYear() % 100;
	if (tag   < 10)
		tag   = "0"+tag;
	if (monat < 10)
		monat = "0"+monat;
	if (jahr  < 10)
		jahr  = "0"+jahr;
	return tag+'.'+monat+'.'+jahr+' - '+DatArray[time.getDay()]
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	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();
}

MM_reloadPage(true);

function Search(){
		document.SUCH.submit();
}

AbflugArray = new Array(  
	"AMSAmsterdam (NL)",
	"AGBAugsburg",
	"AOCAltenburg",
	"MLHBasel (CH)",
	"TXLBerlin Tegel",
	"SXFBerlin Schönefeld",
	"THFBerlin Tempelhof",
	"BREBremen",
	"DTMDortmund",
	"DRSDresden",
	"DUSDüsseldorf",
	"ENSEnschede (NL)",
	"EINEindhoven (NL)",
	"ERFErfurt",
	"FRAFrankfurt/Main",
	"FDHFriedrichshafen",
	"GRQGroningen (NL)",
	"HHNHahn",
	"HAMHamburg",
	"HAJHannover",
	"HOQHof",
	"INNInnsbruck (AU)",
	"FKBKarlsruhe",
	"LEJLeipzig",
	"CGNKöln/Bonn",
	"LNZLinz (AU)",
	"LUXLuxemburg (L)",
	"LGGLüttich (B)",
	"LBCLübeck",
	"MSTMaastricht",
	"MUCMünchen",
	"FMOMünster",
	"FNBNeubrandenburg",
	"NUENürnberg",
	"PADPaderborn",
	"RLGRostock",
	"SZGSalzburg (AU)",
	"SZWSchwerin",
	"SCNSaarbrücken",
	"STRStuttgart",
	"WAWWarschau (PL)",
	"VIEWien (AU)",
	"ZRHZürich (CH)" 
);

function AH(){
	document.write('<select name=RW size=1> <option selected value=->&lt; weitere Abflüge&gt;');
	for (i=0; i < AbflugArray.length; i++){
	 document.write('<option value='+ AbflugArray[i].substr(0,3)+'>'+AbflugArray[i].substr(3)+'');
	}
	document.write('</select>');
}

function Ziele(){
	document.write('<select size=14 name=ZIEL><option value=->&lt; alle Zielgebiete &gt;') 
	for (i=0; i < ZieleArray.length; i++){
	 ziel = ZieleArray[i];
	 
	 if (ziel.substr(1,1) == ' ')  
	 	document.write('<option value='+ ziel.substr(0,1)+'>'+'<== '  +ziel.substr(3)+'  ==>');
	 else 
	 	document.write('<option value='+ ziel.substr(0,3)+'>'+ziel.substr(3));
	}
	document.write('</select>');
}

