var fLoaded = false;
var Knop = new Array();

function menuKnop(imgNaam, offImg, onImg, holdImg) {
  this.naam = imgNaam;
  this.imgOff = new Image();
  this.imgOff.src = offImg;
  this.imgOn = new Image();
  this.imgOn.src = onImg;
  this.imgHold = new Image();
  this.imgHold.src = holdImg;
  this.pageOn = false;
}

function eenKnop(imgNaam, offImg, onImg, holdImg) {
  Knop[Knop.length] = new menuKnop(
    imgNaam, offImg, onImg, holdImg);
}

// Forceer prototype Obj in Nav 3
    new menuKnop('','','','');

// Methods om menuKnop Aan/Uit/Vast te zetten
menuKnop.prototype.aan = function() {
    document[this.naam].src = this.imgOn.src;
}

menuKnop.prototype.uit = function() {
    document[this.naam].src = this.imgOff.src;
}

menuKnop.prototype.vast = function() {
    document[this.naam].src = this.imgHold.src;
}

/////////////////////////////////////////
// De Knoppen
/////////////////////////////////////////

  eenKnop('menu0',
          "gfx/butt00a.gif",
          "gfx/butt00b.gif",
          "gfx/butt00c.gif"
         );

  eenKnop('menu1',
          "gfx/butt00a.gif",
          "gfx/butt00b.gif",
          "gfx/butt00c.gif"
         );

  eenKnop('menu2',
          "gfx/butt00a.gif",
          "gfx/butt00b.gif",
          "gfx/butt00c.gif"
         );

  eenKnop('menu3',
          "gfx/butt00a.gif",
          "gfx/butt00b.gif",
          "gfx/butt00c.gif"
         );

  eenKnop('menu4',
          "gfx/butt00a.gif",
          "gfx/butt00b.gif",
          "gfx/butt00c.gif"
         );

  eenKnop('menu5',
          "gfx/butt00a.gif",
          "gfx/butt00b.gif",
          "gfx/butt00c.gif"
         );

  eenKnop('menu6',
          "gfx/butt00a.gif",
          "gfx/butt00b.gif",
          "gfx/butt00c.gif"
         );

  eenKnop('menu7',
          "gfx/butt00a.gif",
          "gfx/butt00b.gif",
          "gfx/butt00c.gif"
         );

  eenKnop('menu8',
          "gfx/butt00a.gif",
          "gfx/butt00b.gif",
          "gfx/butt00c.gif"
         );
		 
  eenKnop('menu9',
          "gfx/butt00a.gif",
          "gfx/butt00b.gif",
          "gfx/butt00c.gif"
         );
  
  eenKnop('menu10',
          "gfx/butt00a.gif",
          "gfx/butt00b.gif",
          "gfx/butt00c.gif"
         );
  
  eenKnop('menu11',
          "gfx/butt00a.gif",
          "gfx/butt00b.gif",
          "gfx/butt00c.gif"
         );
  
/////////////////////////////////////////

function mOp(KnopNum) {
  if (!Knop[KnopNum].pageOn) Knop[KnopNum].aan();
}

function mUit(KnopNum) {
  if (!Knop[KnopNum].pageOn) Knop[KnopNum].uit();
}

function zetVast(KnopNum) {
  for (var i=0; i < Knop.length; i++) {
    Knop[i].uit();
    Knop[i].pageOn = false;
  }
  Knop[KnopNum].vast();
  Knop[KnopNum].pageOn = true;
}

