
var mi = 0;
var menu = new Array();


function menuobj(text, href, name)
{
        this.text = text;
        this.href = href;
        this.name = name;
}

function addmenup(text, href, name)
{
        menu[menu.length] = new menuobj(text, href, "menup" + name);
}

function addsubmenup(menup, text, href, name)
{
        var i = 0;

        for(i = 0; i < menu.length; i++)
        {
                if(menu[i].name == menup)
                {
                        if(menu[i].sm)
                        {
                                menu[i].sm[menu[i].sm.length] = new menuobj(text, href, menu[i].name + "_" + name);
                        }

                        else
                        {
                                menu[i].sm = new Array();
                                menu[i].sm[menu[i].sm.length] = new menuobj(text, href, menu[i].name + "_" + name);
                                //alert();
                        }
                }
        }
}

function writemenu(activep)
{
        var i = 0;
        var j = 0;

        var activemenup = activep.split("_");

        // Tabellenanfang
        document.writeln("<table border=0 cellpadding=0 cellspacing=0 width=150 align=left>");

        for(i = 0; i < menu.length; i++)
        {
                if((menu[i].name == activep) && (menu[i].name == "menuphome"))
                {
                        document.writeln("<tr>");
                        document.writeln("<td align=left valign=top width=2 bgcolor=\"#1188ff\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                        document.writeln("<td align=left valign=middle width=5 bgcolor=\"#f6f6fa\"><img src=\"gfx/pfeil.gif\" width=5 height=5 alt=\"\" name=\"" + menu[i].name + "\"></td>");
                        document.writeln("<td align=left valign=top width=142 bgcolor=\"#86CAFB\" background=\"gfx/homebg.jpg\"><span class=\"menuactive\"><a class=\"menuactive\" href=\"" + menu[i].href + "\" onmouseover=\"mover(\'" + menu[i].name + "\');\" onmouseout=\"mout(\'" + menu[i].name + "\');\">" + menu[i].text + "</a></span></td>");
                        document.writeln("<td align=left valign=top width=1 bgcolor=\"#86CAFB\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                        document.writeln("</tr>");
                }

                else if(menu[i].name == activep)
                {
                        document.writeln("<tr>");
                        document.writeln("<td align=left valign=top width=2 bgcolor=\"#1188ff\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                        document.writeln("<td align=left valign=middle width=5 bgcolor=\"#FFFFFF\"><img src=\"gfx/pfeil.gif\" width=5 height=5 alt=\"\" name=\"" + menu[i].name + "\"></td>");
                        document.writeln("<td align=left valign=top width=142 bgcolor=\"#FFFFFF\" background=\"gfx/menubg.jpg\"><span class=\"menuactive\"><a class=\"menuactive\" href=\"" + menu[i].href + "\" onmouseover=\"mover(\'" + menu[i].name + "\');\" onmouseout=\"mout(\'" + menu[i].name + "\');\">" + menu[i].text + "</a></span></td>");
                        document.writeln("<td align=left valign=top width=1 bgcolor=\"#F6F6FA\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                        document.writeln("</tr>");
                }

                else
                {
                        document.writeln("<tr>");
                        document.writeln("<td align=left valign=top width=2 bgcolor=\"#1188ff\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                        document.writeln("<td align=left valign=middle width=5 bgcolor=\"#FFFFFF\"><img src=\"gfx/pfeil.gif\" width=5 height=5 alt=\"\" name=\"" + menu[i].name + "\"></td>");
                        document.writeln("<td align=left valign=top width=142 bgcolor=\"#FFFFFF\"><span class=\"menu\"><a class=\"menu\" href=\"" + menu[i].href + "\" onmouseover=\"mover(\'" + menu[i].name + "\');\" onmouseout=\"mout(\'" + menu[i].name + "\');\">" + menu[i].text + "</a></span></td>");
                        document.writeln("<td align=left valign=top width=1 bgcolor=\"#888888\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                        document.writeln("</tr>");
                }

                document.writeln("<tr>");
                document.writeln("<td align=left valign=top width=2 height=1 bgcolor=\"#FFFFFF\"><img src=\"gfx/menulu.gif\" width=2 height=1 alt=\"\"></td>");
                document.writeln("<td align=left valign=top width=5 height=1 bgcolor=\"#888888\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                document.writeln("<td align=left valign=top width=142 height=1 bgcolor=\"#888888\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                document.writeln("<td align=left valign=top width=1 height=1 bgcolor=\"#888888\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                document.writeln("</tr>");



                if((menu[i].sm) && (activemenup[0] == menu[i].name))
                {
                        for(j = 0; j < menu[i].sm.length; j++)
                        {
                                if(menu[i].sm[j].name == activep)
                                {
                                        document.writeln("<tr>");
                                        document.writeln("<td align=left valign=top width=2 bgcolor=\"#FFFFFF\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                                        document.writeln("<td align=left valign=middle width=5 background=\"gfx/submenu.gif\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                                        document.writeln("<td align=left valign=top width=142 bgcolor=\"#F6F6FA\" background=\"gfx/menubg.jpg\"><span class=\"submenuactive\"><a class=\"submenuactive\" style=\"color: #444444;\" href=\"" + menu[i].sm[j].href + "\">&middot;&nbsp;" + menu[i].sm[j].text + "</a></span></td>");
                                        document.writeln("<td align=left valign=top width=1 bgcolor=\"#F6F6FA\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                                        document.writeln("</tr>");
                                }

                                else
                                {
                                        document.writeln("<tr>");
                                        document.writeln("<td align=left valign=top width=2 bgcolor=\"#FFFFFF\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                                        document.writeln("<td align=left valign=middle width=5 background=\"gfx/submenu.gif\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                                        document.writeln("<td align=left valign=top width=142 bgcolor=\"#FFFFFF\"><span class=\"submenu\"><a class=\"submenu\" href=\"" + menu[i].sm[j].href + "\">&middot;&nbsp;" + menu[i].sm[j].text + "</a></span></td>");
                                        document.writeln("<td align=left valign=top width=1 bgcolor=\"#888888\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                                        document.writeln("</tr>"); //Z100
                                }


                                if((menu[i].sm.length == (j + 1)))
                                {
                                        if(menu[i + 1])
                                        {
                                                document.writeln("<tr>");
                                                document.writeln("<td align=left valign=top width=2 height=1 bgcolor=\"#FFFFFF\"><img src=\"gfx/menulu.gif\" width=2 height=1 alt=\"\"></td>");
                                                document.writeln("<td align=left valign=top width=5 height=1 bgcolor=\"#888888\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                                                document.writeln("<td align=left valign=top width=142 height=1 bgcolor=\"#888888\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                                                document.writeln("<td align=left valign=top width=1 height=1 bgcolor=\"#888888\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                                                document.writeln("</tr>");
                                        }

                                        else
                                        {
                                                document.writeln("<tr>");
                                                document.writeln("<td align=left valign=top width=2 height=1 bgcolor=\"#FFFFFF\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                                                document.writeln("<td align=left valign=top width=5 height=1 bgcolor=\"#FFFFFF\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                                                document.writeln("<td align=left valign=top width=142 height=1 bgcolor=\"#888888\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                                                document.writeln("<td align=left valign=top width=1 height=1 bgcolor=\"#888888\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
                                                document.writeln("</tr>");
                                        }
                                }
                        }
                }
        }

        // Tabellenende
        document.writeln("<tr>");
        document.writeln("<td align=left valign=top width=2 height=100 bgcolor=\"#FFFFFF\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
        document.writeln("<td align=left valign=top width=5 height=100 bgcolor=\"#FFFFFF\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
        document.writeln("<td align=left valign=top width=142 height=100 bgcolor=\"#FFFFFF\"><img src=\"gfx/space.gif\" width=1 height=1 alt=\"\"></td>");
        document.writeln("<td align=left valign=top width=1 height=100 bgcolor=\"#888888\"><img src=\"gfx/gw.jpg\" width=1 height=100 alt=\"\"></td>");
        document.writeln("</tr>");
        document.writeln("</table>");

}


addmenup("Home", "index.php", "home");
<!--addmenup("Arzneimittel-Bestellung", "https://www.aponet.de/vorbestellung/apotheken_bestaetigung.php?apoID=15339&homeservice=N", "arzneimittel-bestellung");-->
addmenup("Aktuelles", "aktuelles.php", "aktuelles");
addmenup("Schwerpunkte", "schwerpunkte.php", "schwerpunkte");
        addsubmenup("menupschwerpunkte", "Bachbl&uuml;ten", "sp_bachblueten.php", "bachblueten");
        addsubmenup("menupschwerpunkte", "Hom&ouml;opathie", "sp_homoeopathie.php", "homoeopathie");
        addsubmenup("menupschwerpunkte", "Inkontinenzberatung", "sp_inkontinenzberatung.php", "inkontinenzberatung");
        addsubmenup("menupschwerpunkte", "Kosmetik Serien", "sp_kosmetikserien.php", "kosmetikserien");
        addsubmenup("menupschwerpunkte", "Reiseimpfberatung", "sp_reiseimpfberatung.php", "reiseimpfberatung");
        addsubmenup("menupschwerpunkte", "Spagyrik", "sp_spagyrik.php", "spagyrik");
addmenup("Service", "service.php", "service");
addmenup("&Ouml;ffnungszeiten", "oeffnungszeiten.php", "oeffnungszeiten");
        addsubmenup("menupoeffnungszeiten", "Notdienst", "notdienst.php", "notdienst");
addmenup("Anfahrt", "anfahrt.php", "anfahrt");
addmenup("&Uuml;ber uns", "ueberuns.php", "ueberuns");
        addsubmenup("menupueberuns", "Team", "team.php", "team");
        addsubmenup("menupueberuns", "Foto Galerie", "fotogalerie.php", "fotogalerie");
addmenup("Kontakt", "kontakt.php", "kontakt");
addmenup("Links", "links.php", "links");
