
var bgOut = "#cc6633";
var bgIn  = "#996633";
var fgIn  = "black";
var fgOut = "white";

function focusColor(form){ setColor(form, bgIn, fgIn); }

function blurColor(form) { setColor(form, bgOut, fgOut);}

function setColor(el, bg, fg) {
   if (el.style) {
      el.style.backgroundColor = bg;
      el.style.color = fg;
   }
}

function go(target){
      window.location.href=target;
}

function back(){
      history.go(-1);
}

function actMenuButtonNr(layerName)
{
   var vld;
   if (document.getElementById && !document.all){ //NN56
      var numLayer;
      var layerNames = new Array();
      layerNames = ['22', '15', '10', '12', '13', '14', '19', '16', '18'];

      for(i=0; i < layerNames.length; i++){
         if(layerNames[i] == layerName){
            numLayer = i;
         }
      }
      for(j = 0; j < layerNames.length; j++){
         if(j != numLayer){
            var nam = "veld" + layerNames[j];
            vld = document.getElementById(nam).style;
            vld.backgroundColor = "#d5b272";
            vld.color           = "#000000";
            vld.fontWeight      = "normal";
            vld.backgroundImage = 'none';
         }
      }
      vld = document.getElementById(layerName).style;
   }
   else if (document.layers) { //NN4
      vld = document.layers[layerName]; }
   else { vld = 'document.all[layerName].style';
      document.all[layerName].style.backgroundColor = "#FFFFFF";
      document.all[layerName].style.color           = "#d5a650";
      document.all[layerName].style.fontWeight      = "bold";
      document.all[layerName].style.backgroundImage = 'none';
   }
   vld.backgroundColor = "#FFFFFF";
   vld.color           = "#d5a650";
   vld.fontWeight      = "bold";
   vld.backgroundImage = 'none';

}


function actMenuButtonNr11(layerName)
{
   if (document.getElementById && !document.all) { //NN56
      var vld = document.getElementById(layerName).style;
   }
   else if (document.layers) { //NN4
      var vld = document.layers[layerName];
   }
   else {
      var vld = document.all[layerName].style;
   }
   vld.color              = '#666666';
   vld.backgroundColor    = '#FFFFFF';
   vld.fontWeight         = 'bold';
   vld.backgroundPosition = '0px 22px';
}


function showMenuItem()
{
   var pos1 = (document.location.href).indexOf("menu=");
   if ((document.location.href).substr(pos1 + 6, 1) != "&")
   {
      var pos2 = 2;
   }
   else
   {
      var pos2 = 1;
   }
   var ret = "veld" + (document.location.href).substr(pos1 + 5, pos2);

   actMenuButtonNr(ret);
}


