var browserOK = false;
var Bilder;
var anzahlObj = 0;
var a=0;
var browserOK = true;
var browser , os , version ;

if (document.getElementById) // IE 5.x und NN 6
{browser = 'W3Cdom';}
if (document.layers) // NN 4.x
{browser = 'Netscape';}
if (document.all && !document.getElementById) // IE 4
{browser = 'Explorer';}
function zeigen(name)
{
if (browser=="W3Cdom"){document.getElementById(name).style.visibility="visible";}
if (browser=="Netscape"){document.rand.layers[name].visibility="show";}
if (browser=="Explorer"){document.all[name].style.visibility="visible";}
}
function verbergen(name)
{
if (browser=="W3Cdom"){document.getElementById(name).style.visibility="hidden";}
if (browser=="Netscape"){document.rand.layers[name].visibility="hide";}
if (browser=="Explorer"){document.all[name].style.visibility="hidden";}
}

Bilder = new Array();
function weg()
{
 verbergen('sub0');
 verbergen('sub1');
}
function weg1()
{
 verbergen('subv1');
 verbergen('subv2');
}
var browser , os , version ;

if (document.getElementById) // IE 5.x und NN 6
{browser = 'W3Cdom';}
if (document.layers) // NN 4.x
{browser = 'Netscape';}
if (document.all && !document.getElementById) // IE 4
{browser = 'Explorer';}


var anzahlObj = 0;

function laden(name, erstes, zweites)
{
 if (browserOK)
    {
     Bilder [anzahlObj] = new Array(3);
     Bilder [anzahlObj] [0] = new Image();
     Bilder [anzahlObj] [0].src = erstes;
     Bilder [anzahlObj] [1] = new Image();
     Bilder [anzahlObj] [1].src = zweites;
     Bilder [anzahlObj] [2] = name;
     anzahlObj++;
    }
}
function an(name)
{
 if (browserOK)
    {
     for (i=0; i<anzahlObj; i++)
         {
          if (document.images[Bilder[i][2]] !=null)
             if (name !=Bilder[i][2]&&a !=i)
                {document.images[Bilder[i][2]].src=Bilder[i][0].src}
             else
                 {document.images[Bilder[i][2]].src=Bilder[i][1].src;}
         }
     }
}


laden("restaurant", "img/nav/restaurant.gif", "img/nav/restaurant1.gif");
laden("partyservice", "img/nav/partyservice.gif", "img/nav/partyservice1.gif");
laden("aktionen", "img/nav/aktionen.gif", "img/nav/aktionen1.gif");
laden("kontakt", "img/nav/kontakt.gif", "img/nav/kontakt1.gif");
function aus()
{
 if (browserOK)
    {
     for (i=0; i<anzahlObj; i++)
         {if (document.images[Bilder[i][2]] !=null && a !=i)
             document.images[Bilder[i][2]].src=Bilder[i][0].src;
         }
    }
}
function init()
{
if (a==0) an("restaurant")
if (a==1) an("partyservice")
if (a==2) an("aktionen")
if (a==3) an("kontakt")
if (a==4) an("")
if (a==5) an("bild6")
if (a==6) an("bild7")
if (a==7) an("bild8")
if (a==8) an("bild9")
if (a==9) aus()}


function on()
{
if(!on)
 {
  aktnr=0;
  halt=1;
  on=1;
 }
 else
 {
  on=0;
 }
 }


/*copyright Antje Hofmann  mail:ah@pc-anfaenger.de*/
/*um Funktionalität in NS6 erweitert durch DTD-Webdesign*/
var nc  = !!(document.captureEvents && !document.getElementById);
var nc6 = !!(document.captureEvents && document.getElementById);

b=0;c=0;


    if(nc)
    document.captureEvents(Event.MOUSEMOVE);
    document.onmousemove = move;


function move(e)
 {
   c=(nc || nc6)? e.pageY : window.event.y;// alert(c);
   b=(nc || nc6)? e.pageX : window.event.x;
 }
function tips(text)
{
if(navigator.appVersion.substring(0,1) > "3")
 {
  if (window.name != "no")
   {
    if (document.all)    /* Part Internet Explorer */
    {
    document.all.Tip.innerHTML=text;

    if( navigator.appVersion.substring(22,23)==5)

        document.all.Tip.style.width="auto";

    document.all.Tip.style.left = window.event.clientX
                                + document.body.scrollLeft
                                - document.all.Tip.offsetWidth/2;
    document.all.Tip.style.top  = window.event.clientY
                                + document.body.scrollTop
                                - document.all.Tip.offsetHeight
                                - 25;

    document.all.Tip.style.visibility="visible";
    }
  if(nc)                   /* Part Netscape Navigator */
   {
    text="<div class=\"tipp\">"+text+"</div>"
    document.Tip.document.open();
    document.Tip.document.write(text);
    document.Tip.document.close();

    document.Tip.bgColor = "fffff0";
    document.Tip.left = b - document.Tip.clip.right/2;
    document.Tip.top  = c - document.Tip.clip.bottom - 25;

    document.Tip.visibility="visible";
    }
   if(nc6)
   {tip=document.createElement("DIV");   //Div wird generiert

   tip.style.position="absolute";        //hier wird der Style festgelegt

   tip.style.left=b-50;
   tip.style.top=c-30;
   tip.style.height="20px";
   tip.style.backgroundColor="#FFFFF0";
   //tip.style.border="solid";
   tip.style.borderWidth="1px";
   tip.style.color="#000000";
   typ=document.createElement("p1");       //das ganze wird unter einem P-Tag gebracht
   inhalt=document.createTextNode(text);   //Übergabe des Tip-Textes an Text-Knoten
   typ.appendChild(inhalt);                //
   tip.appendChild(typ);                   //Einklinken des ganzen in die generierte Div
   document.body.appendChild(tip);
    }
  }
 }}



function ende()
{
 if(navigator.appVersion.substring(0,1) > "3")
 {
  if (document.all){document.all.Tip.style.visibility = "hidden";}
  if(nc) {document.Tip.visibility = "hidden";}
  if(nc6){
        tip.style.visibility="hidden";

    }
 }
}

function anaus()
{
 if (window.name != "no") { window.name = "no";}
    else { window.name = "yes";}
}
function Fensterweite()
{
 if (window.innerWidth) return window.innerWidth;
 else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
 else return 0;
}

function Fensterhoehe()
{
 if (window.innerHeight) return window.innerWidth;
 else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
 else return 0;
}

function neuAufbau()
{
 if (Weite != Fensterweite() || Hoehe != Fensterhoehe())
 window.history.go(0);
}
/*Überwachung von Netscape initialisieren*/
if(!window.Weite && window.innerWidth)
  {
   window.onresize = neuAufbau;
   Weite = Fensterweite();
   Hoehe = Fensterhoehe();
  }
  function WebSite(fenster_url)
{
  Edit_Fenster = window.open(fenster_url,'edit','top=0,left=5,resizable=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,toolbar=0,width=260,height=230,screenX=0,screenY=0');
}
function WebSite1(fenster_url)
{
  Edit_Fenster = window.open(fenster_url,'edit','top=0,left=5,resizable=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,toolbar=0,width=610,height=530,screenX=0,screenY=0');
}
