var MenuName='mainmenu';

var LibsSupported=(navigator.appName + navigator.appVersion.substring(0,1)=="Netscape5" || document.all || document.layers || navigator.userAgent.indexOf('Opera')>-1)?1:0;
//vraci 1 pokud je podpora, jinak vraci 0.

if (ErrorLink!='' && !LibsSupported) window.location.replace(ErrorLink);
//pokud neni podpora a je kam odkazat, udela to.

if (LibsSupported)  //je podpora
  {
  var LibsPath=RootPath+'/js';

//  if (document.all) mpi=document.all['minigif'].src; //mpi je promenna s obrazkem ze souboru nacteneho do minigif
//  if (document.layers) mpi=document.images['minigif'].src;
//  if (navigator.appName + navigator.appVersion.substring(0,1)=="Netscape5" || navigator.userAgent.indexOf('Opera')>-1) mpi=document.getElementById('minigif').src;

  var tmp=navigator.userAgent; //typ prohlizece...kompatibilita
  var BrowserType=(tmp.indexOf('Gecko')>-1)?2:((document.layers)?3:((tmp.indexOf('Opera')>-1)?4:((tmp.indexOf('Mac')>-1)?5:1)));
  //2-Gecko??? 3-Netscape 4-Opera 5-Mac 1-Iexplorer+ostatni
  document.write(("<SCRIPT SRC='"+LibsPath+"/lib"+BrowserType+".js'><\/SCRIPT>"));//natahne knihovnu pro prislusny prohlizec

  var n=null;//konstanta kvuli prehlednosti
  }

var SubFrame='';
var SubFrameOffset;
var Optimize=0;

function BuildMainMenu() //hlavni funkce
  {
  if (LibsSupported)  //podpora?
    {
    z_index=1000;//index viditelnosti (poradi)
    MenuImages=[ImgPath+'/flag_en.gif',20,13];//vlajecka na prepinani jazykove verze stranek
	//definice styluu
    CreateStyle(1,2,0,'#FFFFFF','#640890',n,'bold 4mm sans-serif',n,'none',2,'#FFFFFF',0,0);
    CreateStyle(0,1,0,n,'#640890',n,n,n,'outset',2,'#400080',0,0);
    CreateStyle(1,2,1,'#FFFFFF',n,n,'bold 4mm sans-serif',n,'none',1,'#FFFFFF',0,1);
    CreateStyle(0,2,1,'#FF00FF',n,n,'bold 4mm sans-serif',n,'outset',1,'#FFFFFF',0,0);
    CreateStyle(0,2,1,'#FFFFFF','#0000A0',n,'bold 4mm sans-serif',n,'inset',1,'#FFFFFF',0,0);
    CreateStyle(0,2,1,'#FF00FF',n,n,'bold 4mm sans-serif',n,'none',1,'#FFFFFF',0,0);
    CreateStyle(1,2,1,'#FFFFFF','#640890',n,'bold 4mm sans-serif',n,'solid',2,'#FFFFFF',0,0);
    CreateStyle(0,1,0,n,'#8000FF',n,n,n,'solid',2,'#000040',0,0);
    CreateStyle(1,2,0,'#FFFFFF',n,n,'bold 4mm sans-serif',n,'outset',1,'#8080FF',0,1);
    CreateStyle(0,2,0,'#FFFFFF','#000080',n,'bold 4mm sans-serif',n,'solid',1,'#8080FF',0,1);
    CreateStyle(0,2,0,'#FFFFFF','#0000FF',n,'bold 4mm sans-serif',n,'inset',1,'#8080FF',0,1);

    var MenuBar=MakeMenu(0,0,0,0,3,0,0,2,5,0,0,0,2,1,0,n,"",n,1,5,1,1,n,n);//menu
    it=MenuBar.additemwithimage(2,3,4,"","","","English version of this site",0,0,0,0,0,0,n,n,n,"",n,n,n,'./../html_en/about.html',n);

    it=MenuBar.additem(2,3,4,"O nás",n,n,"Jak nás kontaktovat?","",n,n,n,'./..'+LangPath+'/about.html',n);

    it=MenuBar.additem(2,5,5,"&nbsp Kapely &nbsp",n,n,"","",n,n,n,n,n);
     var BandsSubmenu=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);

       it=BandsSubmenu.additem(8,9,10,"* ŠVEJK BAND",n,n,"","",n,n,n,'./..'+LangPath+'/svejkband/about.html',n);
         var band=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
           it=band.additem(8,9,10,"O kapele",n,n,"","about.html",n,n,n,'./..'+LangPath+'/svejkband/about.html',n);
//           it=band.additem(8,9,10,"Kdy a kde",n,n,"","future.html",n,n,n,'./..'+LangPath+'/svejkband/future.html',n);
           it=band.additem(8,9,10,"Hudba",n,n,"","download.html",n,n,n,'./..'+LangPath+'/svejkband/download.html',n);
           it=band.additem(8,9,10,"Foto",n,n,"","foto.html",n,n,n,'./..'+LangPath+'/svejkband/foto.html',n);

       it=BandsSubmenu.additem(8,9,10,"* COLLEGIUM FIDDLE DOLCE",n,n,"","",n,n,n,'./..'+LangPath+'/colfiddol/about.html',n);
         var band=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
           it=band.additem(8,9,10,"O kapele",n,n,"","about.html",n,n,n,'./..'+LangPath+'/colfiddol/about.html',n);
//           it=band.additem(8,9,10,"Kdy a kde",n,n,"","future.html",n,n,n,'./..'+LangPath+'/colfiddol/future.html',n);
           it=band.additem(8,9,10,"Hudba",n,n,"","download.html",n,n,n,'./..'+LangPath+'/colfiddol/download.html',n);
           it=band.additem(8,9,10,"Foto",n,n,"","foto.html",n,n,n,'./..'+LangPath+'/colfiddol/foto.html',n);

       it=BandsSubmenu.additem(8,9,10,"ŠVEJK - DUO",n,n,"","",n,n,n,'./..'+LangPath+'/svejkduo/about.html',n);
         var band=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
           it=band.additem(8,9,10,"O kapele",n,n,"","about.html",n,n,n,'./..'+LangPath+'/svejkduo/about.html',n);
//           it=band.additem(8,9,10,"Kdy a kde",n,n,"","future.html",n,n,n,'./..'+LangPath+'/svejkduo/future.html',n);
//           it=band.additem(8,9,10,"Hudba",n,n,"","download.html",n,n,n,'./..'+LangPath+'/svejkduo/download.html',n);

       it=BandsSubmenu.additem(8,9,10,"KING SWING",n,n,"","",n,n,n,'./..'+LangPath+'/kingswing/about.html',n);
       var band=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
         it=band.additem(8,9,10,"O kapele",n,n,"","about.html",n,n,n,'./..'+LangPath+'/kingswing/about.html',n);
//         it=band.additem(8,9,10,"Kdy a kde",n,n,"","future.html",n,n,n,'./..'+LangPath+'/kingswing/future.html',n);
//         it=band.additem(8,9,10,"Hudba",n,n,"","download.html",n,n,n,'./..'+LangPath+'/kingswing/download.html',n);

       it=BandsSubmenu.additem(8,9,10,"BENEDICTUS",n,n,"","",n,n,n,'./..'+LangPath+'/benedictus/about.html',n);
       var band=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
         it=band.additem(8,9,10,"O kapele",n,n,"","about.html",n,n,n,'./..'+LangPath+'/benedictus/about.html',n);
//         it=band.additem(8,9,10,"Kdy a kde",n,n,"","future.html",n,n,n,'./..'+LangPath+'/benedictus/future.html',n);
//         it=band.additem(8,9,10,"Hudba",n,n,"","download.html",n,n,n,'./..'+LangPath+'/benedictus/download.html',n);

       it=BandsSubmenu.additem(8,9,10,"DUO AD LIBITUM",n,n,"","",n,n,n,'./..'+LangPath+'/duoadlib/about.html',n);
         var band=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
           it=band.additem(8,9,10,"O kapele",n,n,"","about.html",n,n,n,'./..'+LangPath+'/duoadlib/about.html',n);
//           it=band.additem(8,9,10,"Kdy a kde",n,n,"","future.html",n,n,n,'./..'+LangPath+'/duoadlib/future.html',n);
//           it=band.additem(8,9,10,"Hudba",n,n,"","download.html",n,n,n,'./..'+LangPath+'/duoadlib/download.html',n);

       it=BandsSubmenu.additem(8,9,10,"DUO BOIOHAEMUM",n,n,"","",n,n,n,'./..'+LangPath+'/duoboioh/about.html',n);
         var band=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
           it=band.additem(8,9,10,"O kapele",n,n,"","about.html",n,n,n,'./..'+LangPath+'/duoboioh/about.html',n);
//           it=band.additem(8,9,10,"Kdy a kde",n,n,"","future.html",n,n,n,'./..'+LangPath+'/duoboioh/future.html',n);
//           it=band.additem(8,9,10,"Hudba",n,n,"","download.html",n,n,n,'./..'+LangPath+'/duoboioh/download.html',n);

       it=BandsSubmenu.additem(8,9,10,"GOLD TIMES",n,n,"","",n,n,n,'./..'+LangPath+'/gtimes/about.html',n);
         var band=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
           it=band.additem(8,9,10,"O kapele",n,n,"","about.html",n,n,n,'./..'+LangPath+'/gtimes/about.html',n);
//           it=band.additem(8,9,10,"Kdy a kde",n,n,"","future.html",n,n,n,'./..'+LangPath+'/oldgtimes/future.html',n);
//           it=band.additem(8,9,10,"Hudba",n,n,"","download.html",n,n,n,'./..'+LangPath+'/oldgtimes/download.html',n);

       it=BandsSubmenu.additem(8,9,10,"ŠVANDA - BANDA",n,n,"","",n,n,n,'./..'+LangPath+'/svandab/about.html',n);
         var band=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
           it=band.additem(8,9,10,"O kapele",n,n,"","about.html",n,n,n,'./..'+LangPath+'/svandab/about.html',n);
//           it=band.additem(8,9,10,"Kdy a kde",n,n,"","future.html",n,n,n,'./..'+LangPath+'/svandab/future.html',n);
//           it=band.additem(8,9,10,"Hudba",n,n,"","download.html",n,n,n,'./..'+LangPath+'/svandab/download.html',n);

       it=BandsSubmenu.additem(8,9,10,"TEQUILA AMIGOS",n,n,"","",n,n,n,'./..'+LangPath+'/teqami/about.html',n);
         var band=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
           it=band.additem(8,9,10,"O kapele",n,n,"","about.html",n,n,n,'./..'+LangPath+'/teqami/about.html',n);
//           it=band.additem(8,9,10,"Kdy a kde",n,n,"","future.html",n,n,n,'./..'+LangPath+'/teqami/future.html',n);
//           it=band.additem(8,9,10,"Hudba",n,n,"","download.html",n,n,n,'./..'+LangPath+'/teqami/download.html',n);

       it=BandsSubmenu.additem(8,9,10,"* E.F.S. alias EXPERIMENTÁLNÍ FOLKOVÉ STUDIO",n,n,"","",n,n,n,'./..'+LangPath+'/efs/about.html',n);
         var band=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
           it=band.additem(8,9,10,"O kapele",n,n,"","about.html",n,n,n,'./..'+LangPath+'/efs/about.html',n);
//           it=band.additem(8,9,10,"Kdy a kde",n,n,"","future.html",n,n,n,'./..'+LangPath+'/efs/future.html',n);
           it=band.additem(8,9,10,"Hudba",n,n,"","download.html",n,n,n,'./..'+LangPath+'/efs/download.html',n);

       it=BandsSubmenu.additem(8,9,10,"ELEKTROFONICKÉ HOUSLE",n,n,"","",n,n,n,'./..'+LangPath+'/elhousle/about.html',n);
         var band=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
           it=band.additem(8,9,10,"Nabídka",n,n,"","about.html",n,n,n,'./..'+LangPath+'/elhousle/about.html',n);
//           it=band.additem(8,9,10,"Kdy a kde",n,n,"","future.html",n,n,n,'./..'+LangPath+'/elhousle/future.html',n);
//           it=band.additem(8,9,10,"Hudba",n,n,"","download.html",n,n,n,'./..'+LangPath+'/elhousle/download.html',n);

       it=BandsSubmenu.additem(8,9,10,"PONOŽKY PANA SEMTAMŤUKA",n,n,"","",n,n,n,'./..'+LangPath+'/semtamtuk/about.html',n);
         var band=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
           it=band.additem(8,9,10,"Nabídka",n,n,"","about.html",n,n,n,'./..'+LangPath+'/semtamtuk/about.html',n);
//           it=band.additem(8,9,10,"Kdy a kde",n,n,"","future.html",n,n,n,'./..'+LangPath+'/semtamtuk/future.html',n);
//           it=band.additem(8,9,10,"Hudba",n,n,"","download.html",n,n,n,'./..'+LangPath+'/semtamtuk/download.html',n);

     it=MenuBar.additem(2,5,5,"Divadlo",n,n,"","",n,n,n,n,n);
      var TheatreSubmenu=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);

       it=TheatreSubmenu.additem(8,9,10,"KABARETNÍ A ŠANTÁNOVÉ C.K. DIVADLO PLUTO",n,n,"","",n,n,n,'./..'+LangPath+'/pluto/about.html',n);
         var Pluto=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
           it=Pluto.additem(8,9,10,"Nabídka",n,n,"","about.html",n,n,n,'./..'+LangPath+'/pluto/about.html',n);
//           it=Pluto.additem(8,9,10,"Kdy a kde",n,n,"","future.html",n,n,n,'./..'+LangPath+'/pluto/future.html',n);

       it=TheatreSubmenu.additem(8,9,10,"DIVADELNÍ SPOLEK DINO",n,n,"","",n,n,n,'./..'+LangPath+'/dino/about.html',n);
         var Deti=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
           it=Deti.additem(8,9,10,"Nabídka",n,n,"","about.html",n,n,n,'./..'+LangPath+'/dino/about.html',n);
//           it=Deti.additem(8,9,10,"Kdy a kde",n,n,"","future.html",n,n,n,'./..'+LangPath+'/dino/future.html',n);
           it=Deti.additem(8,9,10,"Foto",n,n,"","foto.html",n,n,n,'./..'+LangPath+'/dino/foto.html',n);

    it=MenuBar.additem(2,3,4,"Archiv",n,n,"Starší verze těchto stránek (již neaktualizovaná)","old/default.htm",n,n,"window.open(RootPath+'/old/default.htm','_blank','resizable=yes,status=1,toolbar=1,menubar=1,location=1')",n,n);
     var ArcSubmenu=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
       it=ArcSubmenu.additem(8,9,10,"Staré stránky",n,n,"Starší verze těchto stránek (již neaktualizovaná)","old/default.htm",n,n,"window.open(RootPath+'/old/default.htm','_blank','resizable=yes,status=1,toolbar=1,menubar=1,location=1')",n,n);

    it=MenuBar.additem(2,5,5,"Admin",n,n,"","",n,n,n,n,n);
     var AdminSubmenu=it.addSubmenu(0,0,-4,0,0,0,0,7,6,n,"",n,1,0,1,1,n,n);
       it=AdminSubmenu.additem(8,9,10,"E-mail",n,n,"Administrátor","mailto:dmatej@seznam.cz",n,n,n,"mailto:dmatej@seznam.cz",n);
       it=AdminSubmenu.additem(8,9,10,"Internetové stránky",n,n,"dmatej-osobní stránky, překlady, texty","http://dem.wz.cz",n,n,"window.open('http://dem.wz.cz','_blank','resizable=yes,status=1,toolbar=1,menubar=1,location=1')",n,n);
    MenuBar.thisMenu.buildMenu();
    }
  }
