var ie = document.all ? true : false;
var ns6 = (document.getElementById)? true:false;
var ns4 = (document.layers)? true:false;
var menu_max_id = 2;
var metamenu_start_id = 3;
var metamenu_max_id = 5;

function printMenus() {
 document.write("<div id=\"dynav\">");
 for (var i=0;i<=menu_max_id;i++) {
 //print menurahmen anfang
 if(is.ns4){
  document.write("<DIV ID=\"menu"+ (i+1) +"\" style=\"position:absolute; left:209px; top:18px; width:176px; height:115px; visibility:hidden; z-index:101; display:block;\" onmouseover=\"showObject(l"+ (i+1) +");showObject(bl"+ (i+1) +");\" onmouseout=\"hideObject('l"+ (i+1) +"')\">")
 } else {
 //if(ie || ns6)
  document.write("<div id=\"menu"+ (i+1) +"\" onmouseover=\"showObject(l"+ (i+1) +");showObject(bl"+ (i+1) +");\" onmouseout=\"hideObject('l"+ (i+1) +"')\">")
 }
 document.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"175\" height=\"20\">");
 var header=true;
         var linecount = 1;
 for (var text in menuLinks[i]) {
          //print Menuzeile
          if(header) {
                  //Beim ersten Eintrag Menuüberschrift
                   document.write("<tr>");
                   document.write("  <td><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"1\" border=\"0\"><\/td>");
                   document.write("  <td bgcolor=\"#FFFFFF\"><img src=\"../designelemente/1t.gif\" width=\"20\" height=\"1\" border=\"0\"><\/td>");
                   document.write("  <td bgcolor=\"#FFFFFF\"><img src=\"../designelemente/1t.gif\" width=\"153\" height=\"1\" border=\"0\"><\/td>");
                   document.write("  <td><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"1\" border=\"0\"><\/td>");
                   document.write("<\/tr><tr>");
                   document.write("  <td bgcolor=\"#FFFFFF\"><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"3\" border=\"0\"><\/td>");
                   document.write("  <td bgcolor=\"#E3E1CC\" colspan=\"2\"><img src=\"../designelemente/1t.gif\" width=\"2\" height=\"1\" border=\"0\"><\/td>");
                   document.write("  <td bgcolor=\"#FFFFFF\"><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"3\" border=\"0\"><\/td>");
                   document.write("<\/tr>");
                   header=false;
          } else {
                   //normale Menuzeile
                   document.write("<tr>");
                   document.write("  <td bgcolor=\"#FFFFFF\"><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"2\" border=\"0\"><\/td>");
//                   document.write("  <td bgcolor=\"#E3E1CC\" valign=\"top\"><a href=\""+menuLinks[i][text]+"\" target=\"_top\" onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('Image"+i+linecount+"','','<img src="../designelemente/pf_mnav_hi.gif">',1)\"><img name=\"Image"+i+linecount+"\" src=\"../designelemente/pf_mnav.gif\" width=\"20\" height=\"13\" border=\"0\"><\/a><\/td>");
//                   document.write("  <td bgcolor=\"#E3E1CC\"><a href=\""+menuLinks[i][text]+"\" target=\"_top\" class=\"hp-navi-1\" onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('Image"+i+linecount+"','','<img src="../designelemente/pf_mnav_hi.gif">',1)\">"+text+"<\/a><\/td>");

                   document.write("  <td bgcolor=\"#E3E1CC\" valign=\"top\"><a href=\""+menuLinks[i][text]+"\" target=\"_top\" onmouseover=\"TV_swapImage('Image"+i+linecount+"')\"><img name=\"Image"+i+linecount+"\" src=\"../designelemente/pf_mnav.gif\" width=\"20\" height=\"13\" border=\"0\"><\/a><\/td>");
                   document.write("  <td bgcolor=\"#E3E1CC\"><a href=\""+menuLinks[i][text]+"\" target=\"_top\" class=\"hp-navi-1\" onmouseover=\"TV_swapImage('Image"+i+linecount+"')\">"+text+"<\/a><\/td>");



                   document.write("  <td bgcolor=\"#FFFFFF\"><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"2\" border=\"0\"><\/td>");
                   document.write("<\/tr>");
           } 
         linecount++;
         }
 //print menurahmen ende
 document.write("<tr>");
 document.write("  <td bgcolor=\"#FFFFFF\"><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"3\" border=\"0\"><\/td>");
 document.write("  <td bgcolor=\"#E3E1CC\" colspan=\"2\"><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"3\" border=\"0\"><\/td>");
 document.write("  <td bgcolor=\"#FFFFFF\"><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"3\" border=\"0\"><\/td>");
 document.write("<\/tr><tr>");
 document.write("  <td><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"1\" border=\"0\"><\/td>");
 document.write("  <td bgcolor=\"#FFFFFF\" colspan=\"2\"><img src=\"../designelemente/1t.gif\" width=\"173\" height=\"1\" border=\"0\"><\/td>");
 document.write("  <td><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"1\" border=\"0\"><\/td>");
 document.write("<\/tr></table>");
 if(is.ns4){
  document.write("<\/layer>")
 }else {
  document.write("<\/div>")
 }
 }//end for menus
 document.write("</div>");
}


function printMetaMenus()
  {
for (var i=0;i<=metamenu_max_id-metamenu_start_id;i++) {
 //print menurahmen anfang
  if(is.ns4){
    document.write("<layer name=\"metamenu" + (i+1) + "\" onmouseover=\"showMetamenu('metamenu"+ (i+1) +"');top.frames[0].navimetaframe.hiliteTop('metamenu"+ (i+1) +"');\" onmouseout=\"hideMetamenu('metamenu"+ (i+1) +"');top.frames[0].navimetaframe.loliteTop();\">")
  }else{
    document.write("<div id=\"metamenu" + (i+1) + "\" onmouseover=\"showMetamenu('metamenu"+ (i+1) +"');top.frames[0].navimetaframe.hiliteTop('metamenu"+ (i+1) +"');\" onmouseout=\"hideMetamenu('metamenu"+ (i+1) +"');top.frames[0].navimetaframe.loliteTop();\">")
  }
  document.write("<table width=\"100%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
  document.write("<tr>");
  document.write("<td align=\"left\">");
  document.write("<table  border=\"0\" width=\"162\" cellspacing=\"0\" cellpadding=\"0\">");
  document.write("<tr>");
  document.write("  <td><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"1\" border=\"0\"><\/td>");
  document.write("  <td bgcolor=\"#FFFFFF\"><img src=\"../designelemente/1t.gif\" width=\"20\" height=\"1\" border=\"0\"><\/td>");
  document.write("  <td bgcolor=\"#FFFFFF\"><img src=\"../designelemente/1t.gif\" width=\"140\" height=\"1\" border=\"0\"><\/td>");
  document.write("  <td><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"1\" border=\"0\"><\/td>");
  document.write("<\/tr><tr>");
  document.write("  <td bgcolor=\"#FFFFFF\"><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"3\" border=\"0\"><\/td>");
  document.write("  <td bgcolor=\"#E3E1CC\" colspan=\"2\"><img src=\"../designelemente/1t.gif\" width=\"2\" height=\"1\" border=\"0\"><\/td>");
  document.write("  <td bgcolor=\"#FFFFFF\"><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"3\" border=\"0\"><\/td>");
  document.write("<\/tr>");
  var linecount = metamenu_start_id;
  var header=true;

  for (var text in menuLinks[i+metamenu_start_id]) {
    //print Menuzeile
   if(header){
    header=false;
   }else{
    document.write("<tr>");
    document.write("  <td bgcolor=\"#FFFFFF\"><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"2\" border=\"0\"><\/td>");
    document.write("  <td bgcolor=\"#E3E1CC\" valign=\"top\"><a href=\""+menuLinks[i+metamenu_start_id][text]+"\" target=\"_top\" onmouseover=\"TV_swapImage('ImageM"+i+linecount+"')\"><img name=\"ImageM"+i+linecount+"\" src=\"../designelemente/pf_mnav.gif\" width=\"20\" height=\"13\" border=\"0\"><\/a><\/td>");
    document.write("  <td bgcolor=\"#E3E1CC\"><a href=\""+menuLinks[i+metamenu_start_id][text]+"\" target=\"_top\" class=\"hp-navi-1\" onmouseover=\"TV_swapImage('ImageM"+i+linecount+"')\">"+text+"<\/a><\/td>");
    document.write("  <td bgcolor=\"#FFFFFF\"><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"2\" border=\"0\"><\/td>");
    document.write("<\/tr>");
    linecount++;
   }
  }
  document.write("<tr>");
  document.write("  <td bgcolor=\"#FFFFFF\"><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"3\" border=\"0\"><\/td>");
  document.write("  <td bgcolor=\"#E3E1CC\" colspan=\"2\"><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"3\" border=\"0\"><\/td>");
  document.write("  <td bgcolor=\"#FFFFFF\"><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"3\" border=\"0\"><\/td>");
  document.write("<\/tr><tr>");
  document.write("  <td><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"1\" border=\"0\"><\/td>");
  document.write("  <td bgcolor=\"#FFFFFF\" colspan=\"2\"><img src=\"../designelemente/1t.gif\" width=\"140\" height=\"1\" border=\"0\"><\/td>");
  document.write("  <td><img src=\"../designelemente/1t.gif\" width=\"1\" height=\"1\" border=\"0\"><\/td>");
  document.write("<\/tr></table>");
  document.write("<\/td><\/tr>");
  document.write("<\/table>");
  document.write("");
  if(is.ns4){
    document.write("<\/layer>")
  } else {
    document.write("<\/div>")
  }
}
}