var DHTML = 0, DOM = 0, MS = 0;

function DHTML_init() {

 if(document.getElementById) {
   DHTML = 1;
   DOM = 1;
 }
 if(document.all) {
   DHTML = 1;
   MS = 1;
 }
}

function getElem(p1,p2,p3) {
 var Elem;
 if(DOM) {
   if(p1.toLowerCase()=="id") {
     if (typeof document.getElementById(p2) == "object")
     Elem = document.getElementById(p2);
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="name") {
     if (typeof document.getElementsByName(p2) == "object")
     Elem = document.getElementsByName(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="tagname") {
     if (typeof document.getElementsByTagName(p2) == "object" || (OP && typeof document.getElementsByTagName(p2) == "function"))
     Elem = document.getElementsByTagName(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }
 else if(MS) {
   if(p1.toLowerCase()=="id") {
     if (typeof document.all[p2] == "object")
     Elem = document.all[p2];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="tagname") {
     if (typeof document.all.tags(p2) == "object")
     Elem = document.all.tags(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="name") {
     if (typeof document[p2] == "object")
     Elem = document[p2];
     else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }

}

function getCont(p1,p2,p3) {
   var Cont;
   if(DOM && getElem(p1,p2,p3) && getElem(p1,p2,p3).firstChild) {
     if(getElem(p1,p2,p3).firstChild.nodeType == 3)
       Cont = getElem(p1,p2,p3).firstChild.nodeValue;
     else
       Cont = "";
     return(Cont);
   }
   else if(MS && getElem(p1,p2,p3)) {
     Cont = getElem(p1,p2,p3).innerText;
     return(Cont);
   }
   else return void(0);
}

function getAttr(p1,p2,p3,p4) {
   var Attr;
   if((DOM || MS) && getElem(p1,p2,p3)) {
     Attr = getElem(p1,p2,p3).getAttribute(p4);
     return(Attr);
   }
   else return void(0);
}

function setCont(p1,p2,p3,p4) {
   if(DOM && getElem(p1,p2,p3) && getElem(p1,p2,p3).firstChild)
     getElem(p1,p2,p3).firstChild.nodeValue = p4;
   else if(MS && getElem(p1,p2,p3))
     getElem(p1,p2,p3).innerText = p4;

}

DHTML_init();

function Menue(s) {

 if(DOM || MS)
 {getElem("id",s,null).style.visibility = "visible";
  getElem("id",s,null).style.background = "#DEFC58";
 }

}

function noMenue(s) {
 if(DOM || MS)
  getElem("id",s,null).style.visibility = "hidden";
  getElem("id",s,null).style.background = "#008BA7";

}

function Farbe(s) {

 if(DOM || MS)
 {getElem("id",s,null).style.color = "#DEFC58";
 }

}

function noFarbe(s) {
 if(DOM || MS)
  getElem("id",s,null).style.color = "#FFFFFF";

}

function AnHotels ()
{ Menue('log');
  Farbe('schlafen');

  noMenue('gastro');
  noMenue('shop');
  noMenue('museen');
  noFarbe('resto');
  noFarbe('einkauf');
  noFarbe('sehen');
}

function AusHotels()
{  noMenue('log');
   noFarbe('schlafen');
}

function AnRestos()
{ Menue('gastro');
  Farbe('resto');

  noMenue('log');
  noMenue('shop');
  noMenue('museen');
  noFarbe('schlafen');
  noFarbe('einkauf');
  noFarbe('sehen');
}

function AusRestos()
{  noMenue('gastro');
   noFarbe('resto');
}

function AnEinkaufen ()
{ Menue('shop');
  Farbe('einkauf');

  noMenue('log');
  noMenue('gastro');
  noMenue('museen');
  noFarbe('schlafen');
  noFarbe('resto');
  noFarbe('sehen');
}

function AusEinkaufen()
{  noMenue('shop');
   noFarbe('einkauf');
}

function AnSehen ()
{ Menue('museen');
  Farbe('sehen');

  noMenue('log');
  noMenue('gastro');
  noMenue('shop');
  noFarbe('schlafen');
  noFarbe('resto');
  noFarbe('einkauf');
}

function AusSehen()
{  noMenue('museen');
   noFarbe('sehen');
}
