function updateLaender(laender, regids) {
	

  // select resetten
 	document.destselector.landselector.length = 1;
 	document.destselector.destselector.length = 1;
	
	// index des selektieren Eintrags finden
	myIndex = document.destselector.regionselector.selectedIndex;
	
	// Einträge starten bei Index 1, die Regionen auch. Deshalb muss nicht korrigiert werden
	for (var i = 0; i < laender.length; i++) {
		ok = (myIndex == regids[i]);
		if(ok) {
		  NeuerEintrag = new Option(laender[i], laender[i], false, true);
  		document.destselector.landselector.options[document.destselector.landselector.length] = NeuerEintrag;
	  }
  }	

  document.destselector.landselector.selectedIndex = 0;
  
}	




function updateDest(destname, land) {

  // select resetten
 	document.destselector.destselector.length = 1;
	
	// index des selektieren Eintrags finden
	myIndex = document.destselector.landselector.selectedIndex;
	myLand =  document.destselector.landselector.options[myIndex].text;
	
	for (var i = 0; i < destname.length; i++) {
		ok = (myLand == land[i]);
		if(ok) {
		  NeuerEintrag = new Option(destname[i], destname[i], false, true);
  		document.destselector.destselector.options[document.destselector.destselector.length] = NeuerEintrag;
	  }
  }	

  document.destselector.destselector.selectedIndex = 0;
}



function zeigWetterdaten(iata, names, country, sprache) {
	// iata ist ein Array aller iata der sta stationen

	// index des selektieren Eintrags finden
	myIndex    =  document.destselector.destselector.selectedIndex;
	myDestName =  document.destselector.destselector.options[myIndex].text;
	
	
	// Selektiere Region
	myRegion    =  document.destselector.regionselector.selectedIndex;

	// Selektiertes Land
	myLandIndex = document.destselector.landselector.selectedIndex;
	myLand =  document.destselector.landselector.options[myLandIndex].text;


	for (var i = 0; i < names.length; i++) {
		ok = (myDestName == names[i]);
		if(ok) {
			//location.replace('http://meteo.lenaxis.ch/sta/main.php?country='+country+'&language=DE&state=daten&digmet_id='+digmet_ids[i]+'&region='+myRegion+'&land='+myLand+'&landIndex='+myLandIndex+'&regionIndex='+myRegion+'&destIndex='+myIndex);
			if (sprache == "d")location.replace('http://meteo.lenaxis.ch/planet_new/main.php?find_iata=1&destt='+iata[i]+'&language=d'+'&landIndex='+myLandIndex+'&regionIndex='+myRegion+'&destIndex='+myIndex+'&region='+myRegion+'&land='+myLand);
			if (sprache == "f")location.replace('http://meteo.lenaxis.ch/planet_new/main.php?find_iata=1&destt='+iata[i]+'&language=f'+'&landIndex='+myLandIndex+'&regionIndex='+myRegion+'&destIndex='+myIndex+'&region='+myRegion+'&land='+myLand);
			//location.replace('http://meteo.lenaxis.ch/planet_new/main.php?find_iata=1&destt='+iata[i]+'&language=d');						
	  }
  }	

	
//	location.replace('http://meteo.lenaxis.ch/sta/main.php?country=CH&language=DE&state=daten&digmet_id='+myDestName+'&region='+myRegion+'&land='+myLand);
}




function zeigSuche(country, sprache) {

	myMonth     =  document.destselector.suchsel.selectedIndex; // 1 bis 12
  myMonthName =  document.destselector.suchsel.options[myMonth].text;


  if (document.destselector.suchparam[0].checked == true) {
  	art = document.destselector.suchparam[0].value;
  	if (sprache == "d") titel = art + ' im ' + myMonthName;
		if (sprache == "d") location.replace('http://meteo.lenaxis.ch/planet_new/main.php?language=d&state=suche&such_param=luft&monat='+myMonth+'&titel='+titel);
  	if (sprache == "f") titel = art + ' en ' + myMonthName;
		if (sprache == "f") location.replace('http://meteo.lenaxis.ch/planet_new/main.php?language=f&state=suche&such_param=luft&monat='+myMonth+'&titel='+titel);
  }
  if (document.destselector.suchparam[1].checked == true) {
  	art = document.destselector.suchparam[1].value;
  	if (sprache == "d") titel = art + ' im ' + myMonthName;
		if (sprache == "d") location.replace('http://meteo.lenaxis.ch/planet_new/main.php?language=d&state=suche&such_param=sonne&monat='+myMonth+'&titel='+titel);
  	if (sprache == "f") titel = art + ' en ' + myMonthName;
		if (sprache == "f") location.replace('http://meteo.lenaxis.ch/planet_new/main.php?language=f&state=suche&such_param=sonne&monat='+myMonth+'&titel='+titel);
  }
  if (document.destselector.suchparam[2].checked == true) {
  	art = document.destselector.suchparam[2].value;
  	if (sprache == "d") titel = art + ' im ' + myMonthName;
		if (sprache == "d") location.replace('http://meteo.lenaxis.ch/planet_new/main.php?language=d&state=suche&such_param=regen&monat='+myMonth+'&titel='+titel);
  	if (sprache == "f") titel = art + ' en ' + myMonthName;
		if (sprache == "f") location.replace('http://meteo.lenaxis.ch/planet_new/main.php?language=f&state=suche&such_param=regen&monat='+myMonth+'&titel='+titel);
  }
  if (document.destselector.suchparam[3].checked == true) {
  	art = document.destselector.suchparam[3].value;
  	if (sprache == "d") titel = art + ' im ' + myMonthName;
		if (sprache == "d") location.replace('http://meteo.lenaxis.ch/planet_new/main.php?language=d&state=suche&such_param=wasser&monat='+myMonth+'&titel='+titel);
  	if (sprache == "f") titel = art + ' en ' + myMonthName;
		if (sprache == "f") location.replace('http://meteo.lenaxis.ch/planet_new/main.php?language=f&state=suche&such_param=wasser&monat='+myMonth+'&titel='+titel);
  }

}


