
var menu = [ [ "index","home.gif" ],
              [ "siefindenuns", "siefindenuns.gif" ],
              [ "selbstverstaendnis", "selbstverstaendnis.gif" ],
              [ "teilnahmebed", "teilnahmebed.gif" ],
              [ "formulare", "formulare.gif" ],
              [ "tauschliste", "tauschliste.gif" ],
              [ "termine", "termine.gif" ],
              [ "bildergalerie", "bildergalerie.gif" ],
              [ "empfehlungen", "empfehlungen.gif" ],
              [ "impressum", "impressum.gif" ]
            ];

var path0  = "pic/common/";
var path   = "../pic/common/";



function print (msg) {
  document.write(msg);
  return;
}

// setzte actNumber anhand der URL
var tStr = String(document.URL);
var tUrl = "";
var ss;
var actNumber = 0;
var actPath="";
var relPath="";
var indPath="";
var mmm = 0;


for (mmm = 0; mmm < menu.length; mmm++) {
  tUrl = tStr.indexOf( menu[mmm][0] );
  ss = menu[mmm][1].split(".");
  if ( tUrl!=-1 ) {
   if ( mmm==0 ) { 
     actNumber = mmm; actPath = path0; 
     break; }
   else 
     if ( ss[0]==menu[mmm][0] ) { 
       actNumber = mmm; actPath = path; relPath="../"; 
       break; 
     }     
   }
}

print("<td>\n");
print("<table align=\"center\" border=0>\n");

// Hier Impressum Button als letzten raus, deshalb menu.length-1
for (mmm = 0; mmm < menu.length-1; mmm++) {
 ss = menu[mmm][1].split(".");
 if ( actNumber == 0 ) {
   indPath = "htm/";
 }
 else {
  if ( mmm == 0) { indPath = "../"; }
  else { indPath = ""; }
 }

 if ( actNumber == mmm ) {
  if ( actNumber == 0 && mmm == 0 ) { indPath = ""; } 
  print("<tr><td>\n");
  print("<a href=\""+indPath+menu[mmm][0]+".htm\"  target=\"_top\">");
  print("<img src=\""+relPath+"pic/common/"+ss[0]+"1."+ss[1]+"\" border=\"0\" alt=\"\"></a></td></tr>\n");
 }
 else {
  print("<tr valign=\"top\"><td>\n");
  print("<a href=\""+indPath+menu[mmm][0]+".htm\" onClick=\"Group('down','group1','b"+mmm+"','"+relPath+"pic/common/"+menu[mmm][1]+"',1)\" ");
  print("onMouseOver=\"Group('over','b"+mmm+"','"+relPath+"pic/common/"+ss[0]+"1."+ss[1]+"','"+relPath+"pic/common/"+menu[mmm][1]+"',1)\" ");
  print("onMouseOut=\"Group('out')\" target=\"_top\">");
  print("<img name=\"b"+mmm+"\" src=\""+relPath+"pic/common/"+menu[mmm][1]+"\" border=\"0\" alt=\"\"></a>\n");
  print("</td></tr>\n");
 }
}

 if ( actNumber == 0 ) {
  print ("<tr valign=\"top\">\n");
//  print("<td align=\"center\">&nbsp;\n");
//  print("<a class=\"infotxt\" href=\"htm/termine.htm\"><div id=\"info\" class=\"imgBorder\"><br><br><br>Nächster<br>Tauschringtreff<br>am 23.03.2011</div></td></tr>\n");
  print("<td>&nbsp;\n");
  print("<a href=\"htm/termine.htm\"><img src=\"pic/infobox.jpg\" class=\"imgBorder\" alt=\"\"></a></td></tr>\n");
 }

print ("</table></td>\n");


