<!--
var opo_depa_abflug=new Array(["-1","beliebig"],["1000","Nord"],["1001","Süd"],["1002","West"],["1003","Ost"],["0","Altenburg-Nob."],["1","Amsterdam (NL)"],["2","Augsburg"],["3","Basel-Mulhouse (CH)"],["4","Berlin-Schönef."],["5","Berlin-Tegel"],["6","Berlin-Tempelh."],["7","Bern-Belp (CH)"],["8","Bremen"],["9","Brüssel (B)"],["10","Dortmund"],["11","Dresden"],["12","Düsseldorf"],["13","Enschede (NL)"],["14","Erfurt"],["15","Frankfurt"],["16","Frankfurt-Hahn"],["17","Friedrichshafen"],["18","Genf (CH)"],["19","Graz (A)"],["20","Hamburg"],["21","Hannover"],["22","Hof-Plauen"],["23","Innsbruck (A)"],["24","Karlsruhe"],["25","Kassel"],["26","Kiel"],["27","Klagenfurt (A)"],["28","Köln-Bonn"],["29","Leipzig-Halle"],["30","Linz (A)"],["31","Lübeck"],["32","Lüttich (B)"],["33","Luxemburg"],["34","Maastricht (NL)"],["35","Mönchengladb."],["36","München"],["37","Münster-Osnab."],["38","Nürnberg"],["39","Paderborn"],["40","Rostock"],["41","Saarbrücken"],["42","Salzburg (A)"],["43","Schwerin"],["44","Strasbourg (F)"],["45","Stuttgart"],["46","Wien (A)"],["47","Zürich (CH)"],["48","Zweibrücken"]);
var opo_dest_ziel=new Array(["-1","Reiseziel w&auml;hlen"],["-1","beliebig"],["0","Nahstrecke"],["1","Mittelstrecke"],["2","Fernstrecke"],["3","Mittelmeer(Gesamt)"],["4","Spanien-Portugal"],["5","Griechenland-T&uuml;rkei-Zypern"],["6","Kanarische Inseln"],["7","Mallorca-Menorca-Ibiza"],["8","Karibik-Mexico-Dom.Rep."],["9","&Auml;gypten-Israel-VAE"],["10","Asien-Thailand-Malediven"],["11","Afrika-Mauritius-Seychellen"],["12","Tunesien-Marokko"],["13","Kroatien-Bulgarien"],["14","Besondere Tauchregionen"]);
var opo_veran=new Array(["","beliebig"],["FLY","1-2-FLY"],["5VF","5 vor Flug"],["ALL","Alltours"],["ATT","ATT Touristik"],["ATK","Attika Reisen"],["BGT","BG Tours"],["BIG","Big X-tra Touristik"],["BU","Bucher Reisen"],["ALD","Club Aldiana"],["CBM","Club Blaues Meer"],["DAF","D.A. Ferntouristik KG"],["DEM","Demed"],["DER","DERTOUR"],["XDER","DERTOUR Packaging"],["ECC","Ecco Reisen"],["ETI","Express Travel International"],["FER","FERIEN"],["XFTI","FTI Packaging"],["FTI","FTI Touristik"],["FTS","FTS-Travel"],["GLA","Glauch-Reisen"],["XBU","GoBucher"],["GTI","GTI Travel"],["HUC","Holiday&Co Tagesaktuell"],["RIVA","ID Riva Tours"],["ITS","ITS"],["JAHN","Jahn Reisen"],["JT","Jasmin Taylor GmbH"],["XLMX","LMX Live"],["LTUR","LTUR Last Minute"],["MLA","Malta Direkt Reisen"],["MED","Medina Reisen"],["MPR","Mediplus Reisen"],["MWR","Meier's Weltreisen"],["NAZ","Nazar Holiday"],["NEC","Neckermann Reisen"],["XNEC","Neckermann XNEC"],["OGER","Öger Tours"],["OLI","OLIMAR Reisen"],["VTO","opodo.de"],["PHX","Phoenix Reisen"],["SLR","Schauinsland Reisen"],["TOC","Thomas Cook"],["TJAE","Tjaereborg"],["XTJA","TJAEREBORG INDI"],["TSS","TSS Schürmann"],["TUI","TUI"],["ULT","Urlaubstours"]);
var monthDays=new Array(31,28,31,30,31,30,31,31,30,31,30,31);
//-->

rightnow = new Date();
function month(i,name) {
	var thisyear = rightnow.getFullYear();
	var nextyear = thisyear + 1;
	var a = "<option value=\"";
	(i<rightnow.getMonth()) ? a +=nextyear : a +=thisyear;
	(i<9) ? a += "0"+(i+1) : a +=(i+1);
	a += "\">"+name+" ";
	(i<rightnow.getMonth()) ? a +=(nextyear-2000) : a +=(thisyear-2000);
	a += "</option>\n";
	this.option = a;
}
															
var months = new Array(new month(0,"Januar"), new month(1,"Februar"),new month(2,"März"),new month(3,"April"),new month(4,"Mai"), new month(5,"Juni"), new month(6,"Juli"), new month(7,"August"), new month(8,"September"), new month(9,"Oktober"), new month(10,"November"), new month(11,"Dezember"));

function last_searchSubmit(){
	d = document.last_search2;
	d2 = document.last_search;
	var monthVal,dayVal,yearVal;
	var secMonthVal,secDayVal,secYearVal;
	monthYear= d.D_Month.options[d.D_Month.selectedIndex].value;
	monthVal= monthYear.substr(4,2);
	yearVal = monthYear.substring(0,4);
	dayVal = d.D_Day.options[d.D_Day.selectedIndex].value;
	secMonthYear= d.R_Month.options[d.R_Month.selectedIndex].value;
	secMonthVal= secMonthYear.substr(4,2);
	secYearVal = secMonthYear.substring(0,4);
	secDayVal = d.R_Day.options[d.R_Day.selectedIndex].value;
	abf = d.abf.options[d.abf.selectedIndex].value;
	flu = d.flu.options[d.flu.selectedIndex].value;
	erw1 = d.adult1.options[d.adult1.selectedIndex].value;
	child1 = d.kind1.options[d.kind1.selectedIndex].value;
	child2 = d.kind2.options[d.kind2.selectedIndex].value;
	var date = new Date(yearVal, monthVal-1, dayVal);
	var secdate = new Date(secYearVal, secMonthVal-1, secDayVal);
	var theDate = date.getDate();
	var theSecDate = secdate.getDate();
	if ((rightnow > date)&&(rightnow > secdate)) {
		alert("Bitte geben Sie ein g&uuml;ltiges Abflug/Rückflug Datum ein");
		return false;			
	}
	if (!((rightnow.valueOf() < date.valueOf()) && (date.valueOf() < secdate.valueOf()))) { 
		alert("Bitte geben Sie ein g&uuml;ltiges Abflug/Rückflug Datum ein");
		return false;
	} else {
		d2.termin.value = dayVal +'.'+ monthVal +'.' + yearVal;
		d2.ruecktermin.value = secDayVal +'.'+ secMonthVal +'.' + secYearVal;
		d2.abflughafen.value = abf;
		d2.flugdauer.value = flu;
		d2.alter1.value = child1
		d2.alter2.value = child2
		d2.erwachsene.value = erw1
		return true;
		d.submit();
	}	
}
	
function opo_search_fruehbucher_init() {
	tomorrow = new Date(rightnow.getTime()+(259200000));
	document.last_search2.D_Day.selectedIndex = tomorrow.getDate()-1;
	document.last_search2.D_Month.selectedIndex = tomorrow.getMonth();	
	then = new Date(tomorrow.getTime()+(604800000))
	document.last_search2.R_Day.selectedIndex = then.getDate()-1;
	document.last_search2.R_Month.selectedIndex = then.getMonth();
}

function opo_search_fruehbucher_kind(selc) {
    if (-1 == selc) {
		document.write('<option value="-1" selected>--- </option>');
	} else {
		document.write('<option value="-1">--- </option>');	
	}

    if (1 == selc) {
		document.write('<option value="1" selected>&lt; 2 Jah.</option>');
	} else {
		document.write('<option value="1">&lt; 2 Jah.</option>');	
	}
	
	for(i=2;i<=16;i++)	{
	    if(i==selc)	{
	        document.write('<option value="'+i+'" selected>'+i+' Jahre</option>');
	    } else {
			document.write('<option value="'+i+'">'+i+' Jahre</option>');
	    }
	}
}

function opo_search_fruehbucher_erwach(selc){	
	option_value = "25";
	for(i=1;i<=4;i++)	{
	    if (i == selc) { sel = " selected "; } else { sel =""; }
		document.write('<option value="'+option_value+'" '+sel+'>'+i+' Erw.</option>');
		option_value += ";25";		
	}	
}

function opo_search_fruehbucher_ver(selc){	
	for(i in opo_veran) {
	    if (opo_veran[i][0] == selc) { sel = " selected "; } else { sel =""; }
		document.write('<option value="'+ opo_veran[i][0] +'" '+sel+'>'+opo_veran[i][1]+'</option>');		
	}
}

