var oldIndex=9;
var ElemList=new Array(9);
ElemList[0]="Ala";
ElemList[1]="Unt";
ElemList[2]="Stu";
ElemList[3]="Kin";
ElemList[4]="Auf";
ElemList[5]="Rev";
ElemList[6]="Tae";
ElemList[7]="Bas";
ElemList[8]="Kon";

var ButtonList=new Array(9);
ButtonList[0]="Aladdina";
ButtonList[1]="Unterricht";
ButtonList[2]="Studio";
ButtonList[3]="Kinder";
ButtonList[4]="Auftritte";
ButtonList[5]="Revue";
ButtonList[6]="Taenze";
ButtonList[7]="Basar";
ButtonList[8]="Kontakt";

function InitImages()
{
  Up = new Array(9);
  Down = new Array(9);

  if (document.images) {
    Up[0] = new Image();
    Up[0].src = "images/Buttons/AladdinaUp.gif";
    Down[0] = new Image();
    Down[0].src = "images/Buttons/AladdinaDown.gif";

    Up[1] = new Image();
    Up[1].src = "images/Buttons/UnterrichtUp.gif";
    Down[1] = new Image();
    Down[1].src = "images/Buttons/UnterrichtDown.gif";

    Up[2] = new Image();
    Up[2].src = "images/Buttons/StudioUp.gif";
    Down[2] = new Image();
    Down[2].src = "images/Buttons/StudioDown.gif";

    Up[3] = new Image();
    Up[3].src = "images/Buttons/KinderUp.gif";
    Down[3] = new Image();
    Down[3].src = "images/Buttons/KinderDown.gif";

    Up[4] = new Image();
    Up[4].src = "images/Buttons/AuftritteUp.gif";
    Down[4] = new Image();
    Down[4].src = "images/Buttons/AuftritteDown.gif";

    Up[5] = new Image();
    Up[5].src = "images/Buttons/RevueUp.gif";
    Down[5] = new Image();
    Down[5].src = "images/Buttons/RevueDown.gif";

    Up[6] = new Image();
    Up[6].src = "images/Buttons/TaenzeUp.gif";
    Down[6] = new Image();
    Down[6].src = "images/Buttons/TaenzeDown.gif";

    Up[7] = new Image();
    Up[7].src = "images/Buttons/BasarUp.gif";
    Down[7] = new Image();
    Down[7].src = "images/Buttons/BasarDown.gif";

    Up[8] = new Image();
    Up[8].src = "images/Buttons/KontaktUp.gif";
    Down[8] = new Image();
    Down[8].src = "images/Buttons/KontaktDown.gif";
  }
  else {
    Down[0]=Down[1]=Down[2]=Down[3]=Down[4]=Down[5]=Down[6]=Down[7]=Down[8]=0;
    Up[0]=Up[1]=Up[2]=Up[3]=Up[4]=Up[5]=Up[6]=Up[7]=Up[8]=0;
    ButtonStop=ButtonMove=0;
  }
}

function Mouse_Over(index)
{/*alert("index = " + index + ", oldIndex = " + oldIndex);*/
  if (index == oldIndex)
    return (0);
  if (document.images) {
    Aktivieren (index);
    Deaktivieren(oldIndex);
    oldIndex = index;
  }
}

function Aktivieren(index)
{
  getElement("id",ButtonList[index],null).style.backgroundImage = "url(images/Buttons/ButtonHi.gif)";
  switch (index) {
  case 1 : case 2 : case 3 : case 4 : case 6 :
    getElement("id",ElemList[index],null).style.display = "block";
  }
}

function Deaktivieren(index)
{
  if (index != 9)
    getElement("id",ButtonList[index],null).style.backgroundImage = "url(images/Buttons/ButtonLo.gif)";
  switch (index) {
  case 1 : case 2 : case 3 : case 4 : case 6 :
    getElement("id",ElemList[index],null).style.display = "none";
  }
}

function ButtonDown(index)
{
  Bild (index, Down[index]);
}

function ButtonUp(index)
{
  Bild (index, Up[index]);
}

function Bild(Bildnr,Bildobjekt)
{
  if (document.images)
    window.document.images[Bildnr].src = Bildobjekt.src;
}

function clearList()
{
  if (oldIndex == 9)
    return (0);
  getElement("id",ElemList[oldIndex],null).style.display = "none";
  Deaktivieren (oldIndex);
  oldIndex = 9;
}
