function open_stadtplan()
{ 
   scrwidth = 1050;
   scrheight = 750;
   option = "width="+scrwidth+", height="+scrheight+", scrollbars, toolbar, resizable=yes, status=yes";
   KarteFenster = open("./k_goe/plan.php3", "Stadtplan", option);
   KarteFenster.moveTo(1,1);
   KarteFenster.focus();

   return true;
}

function open_histlubi()
{ 
   scrwidth = 1000;
   scrheight = 700;
   option = "width="+scrwidth+", height="+scrheight+", scrollbars, toolbar, resizable=yes";
   KarteFenster = open("./k_histlubi/plan.php3", "HistLubi", option);
   KarteFenster.moveTo(1,1);
   KarteFenster.focus();

   return true;
}

function open_plz()
{ 
   scrwidth = 1000;
   scrheight = 700;
   option = "width="+scrwidth+", height="+scrheight+", scrollbars, toolbar, resizable=yes";
   KarteFenster = open("./k_plz/plan.php3", "PLZ", option);
   KarteFenster.moveTo(1,1);
   KarteFenster.focus();

   return true;
}

function open_suednds()
{ 
   scrwidth = 1000;
   scrheight = 700;
   option = "width="+scrwidth+", height="+scrheight+", scrollbars, toolbar, resizable=yes, status=yes";
   KarteFenster = open("./k_suednds/plan.php3", "SuedNds", option);
   KarteFenster.moveTo(1,1);
   KarteFenster.focus();

   return true;
}

function open_stadtr()
{ 
   scrwidth = 1000;
   scrheight = 700;
   option = "width="+scrwidth+", height="+scrheight+", scrollbars, toolbar, resizable=yes, status=yes";
   KarteFenster = open("./k_stadtr/plan.php3", "Stadtr", option);
   KarteFenster.moveTo(1,1);
   KarteFenster.focus();

   return true;
}

function OpenHelp_de()
{
   HelpWin = open("./hilfe/index_de.html", "Hilfe", "width=1000, height=550, scrollbars, resizable=yes");
   HelpWin.focus();
}

function OpenHelp_en()
{
   HelpWin = open("./hilfe/index_en.html", "Hilfe", "width=1000, height=550, scrollbars, resizable=yes");
   HelpWin.focus();
}

function OpenHelp_es()
{
   HelpWin = open("./hilfe/index_es.html", "Hilfe", "width=1000, height=550, scrollbars, resizable=yes");
   HelpWin.focus();
}

function OpenNutzung()
{
   NutzungWin = open("./nutzung.html", "Nutzung", "width=650, height=490, scrollbars, resizable=yes");
   NutzungWin.focus();
}

function OpenNutzung_es()
{
   Nutzung_esWin = open("./nutzung_es.html", "Nutzung_es", "width=650, height=490, scrollbars, resizable=yes");
   Nutzung_esWin.focus();
}

function OpenNutzung_en()
{
   Nutzung_enWin = open("./nutzung_en.html", "Nutzung_en", "width=650, height=490, scrollbars, resizable=yes");
   Nutzung_enWin.focus();
}

function OpenServices()
{
   SrWin = open("./services/services.html", "Services", "width=750, height=600, scrollbars, resizable=yes");
   SrWin.focus();
}

function OpenServices_es()
{
   Sr_esWin = open("./services/services_es.html", "Services_es", "width=750, height=600, scrollbars, resizable=yes");
   Sr_esWin.focus();
}

function OpenServices_en()
{
   Sr_enWin = open("./services/services_en.html", "Services_en", "width=750, height=600, scrollbars, resizable=yes");
   Sr_enWin.focus();
}

function open_luftbild()
{ 
   scrwidth = 1050;
   scrheight = 750;
   option = "width="+scrwidth+", height="+scrheight+", scrollbars, toolbar, resizable=yes, status=yes";
   KarteFenster = open("./k_goe/plan.php3?lubi_ganz_goe=1&karte_0=0&sna=0&snb=0", "Stadtplan", option);
   KarteFenster.moveTo(1,1);
   KarteFenster.focus();

   return true;
}

function open_plan(a_URL, a_name)
{
//   if (document.the_form)
//   {
//   document.the_form.focus();
//   document.the_form.blur();
//   }
   size = "width=1200, height=1200, resizable=yes, scrollbars=yes, status=yes, toolbar=yes";
   Neues_Fenster = open(a_URL, a_name, size);
   Neues_Fenster.focus();
}

function setAlphQuery(Wert)
{
   var s = "./start/querywin.php4?";
   s += "str=" + Wert;
   s += "&alph=1";
   querywin = open(s, "Suchanfrage", "width=350, height=230, dependent");
   querywin.focus();
}

function sendStr(strausw, hnr)
{
   if (strausw.selectedIndex == -1)
   {
     alert("Wählen Sie eine Straße aus.");
   }
   else
   {
   str = strausw.options[strausw.selectedIndex].value;
   str = replaceumlaute(str);
   a_url = "../k_goe/plan.php3?oper=2&abstr=" + str + "&abhnr=" + hnr;
   open_plan(a_url, $c_stadtplan_name);
   window.close();
   }
}

function sendStr2(str, hnr)
{
   str = replaceumlaute(str);
   alert(str);
   a_url = "../k_goe/plan.php3?oper=2&abstr=" + str + "&abhnr=" + hnr;
   open_plan(a_url, $c_stadtplan_name);
   window.close();
}

function FormQuery(str, hnr)
{
   if (str != '') setQuery(str, hnr);
   else alert("Keine Daten zur Strassensuche eingegeben.");
}

function setQuery(str, hnr)
{
   str = replaceumlaute(str);
   var s = "./start/querywin.php4?";
   s += "str=" + str;
   s += "&hnr=" + hnr;
   s += "&alph=0";
   querywin = open(s, "Suchanfrage", "width=350, height=230, dependent, scrollbars");
   querywin.focus();
}

function replaceumlaute(a_string)
{
    a_string = a_string.replace("ß", "szlig;");
    a_string = a_string.replace("ö", "ouml;");
    a_string = a_string.replace("ä", "auml;");
    a_string = a_string.replace("ü", "uuml;");
    a_string = a_string.replace("Ö", "Ouml;");
    a_string = a_string.replace("Ä", "Auml;");
    a_string = a_string.replace("Ü", "Uuml;");
    
    return a_string;
}


// Konstanten
$c_stadtplan_link 	= "./k_goe/plan.php3";
$c_stadtplan_name 	= "Stadtplan";
$c_innenplan_link 	= "./k_goe/plan.php3?karte_0=0&karte_0g=1&karte_1=1";
$c_innenplan_name 	= "Stadtplan";
$c_lubi_link 		= "./k_goe/plan.php3?lubi_ganz_goe=1&karte_0=0&sna=0&snb=0";
$c_lubi_name 		= "Stadtplan";
$c_oeffentl_link 	= "./k_goe/plan.php3?mode=2&oeinr=1";
$c_oeffentl_name 	= "Stadtplan";
$c_notdienst_link 	= "./k_goe/plan.php3?mode=4&notdienst=1&zoomC=2&dvert=1300&dhorz=1427&vmin=5710800&hmin=3564100&xref=280&yref=255";
$c_notdienst_name 	= "Stadtplan";
$c_kult_link 		= "./k_goe/plan.php3?mode=5&kult=1";
$c_kult_name 		= "Stadtplan";
$c_sehens_link 		= "./k_goe/plan.php3?mode=6&sehens=1";
$c_sehens_name 		= "Stadtplan";
$c_park_link 		= "./k_goe/plan.php3?mode=3&verkehr=1";
$c_park_name 		= "Stadtplan";
$c_bus_link 		= "./k_bus/plan.php3";
$c_bus_name 		= "Haltestellen";
$c_hist_link 		= "./k_histlubi/plan.php3";
$c_hist_name 		= "HistLubi";
$c_hist1936_link 	= "./k_histlubi/plan.php3?hist_36=1&hist_71=0&hist_1999=0";
$c_hist1936_name 	= "HistLubi";
$c_hist1971_link 	= "./k_histlubi/plan.php3?hist_36=0&hist_71=1&hist_1999=0";
$c_hist1971_name 	= "HistLubi";
$c_hilfe_link 		= "./hilfe/index_de.html";
$c_hilfe_name 		= "Hilfe";
$c_help_link 		= "./hilfe/index_en.html";
$c_help_name 		= "Hilfe";
$c_ayuda_link 		= "./hilfe/index_es.html";
$c_ayuda_name 		= "Hilfe";
$c_nutz_link 		= "./nutzung.html";
$c_nutz_name 		= "Nutzung";
$c_nutz_es_link 	= "./nutzung_es.html";
$c_nutz_es_name 	= "Condiciones de uso";
$c_nutz_en_link 	= "./nutzung_en.html";
$c_nutz_en_name 	= "Condtions of use";
$c_plz_link 		= "./k_plz/plan.php3";
$c_plz_name 		= "PLZ";
$c_sat_link 		= "./k_suednds/plan.php3";
$c_sat_name 		= "SuedNds";
$c_service_link 	= "./services/services.html";
$c_service_name 	= "Service";
$c_services_es_link = "./services/services_es.html";
$c_services_es_name = "Services_es";
$c_services_en_link = "./services/services_en.html";
$c_services_en_name = "Services_en";
$c_tourist_link 	= "./k_goe/plan.php3?mode=4&info=1";
$c_tourist_name 	= "Stadtplan";
$c_baum_link 		= "./baum/faellungen.php";
$c_baum_name 		= "Baumfällungen";
$c_kinder_link 		= "./jugend/kinderbetreuung.php";
$c_kinder_name 		= "kinderbetreuung";

