// JavaScript Document
<!--

function Is() {
var agent = navigator.userAgent.toLowerCase();
this.major = parseInt(navigator.appVersion);
this.minor = parseFloat(navigator.appVersion);
this.ns = ((agent.indexOf('mozilla') != -1) &&
(agent.indexOf('spoofer') == -1) &&
(agent.indexOf('compatible') == -1) &&
(agent.indexOf('opera') == -1) &&
(agent.indexOf('webtv') == -1));
this.ns2 = (this.ns && (this.major == 2));
this.ns3 = (this.ns && (this.major == 3));
this.ns4 = (this.ns && (this.major == 4));
this.ns6 = (this.ns && (this.major >= 5));
this.ie = (agent.indexOf("msie") != -1);
this.ie3 = (this.ie && (this.major < 4));
this.ie4 = (this.ie && (this.major >= 4));
this.ie5 = (this.ie && (this.major == 4) &&
(agent.indexOf("msie 5.0") != -1));
this.ieX = (this.ie && !this.ie3 && !this.ie4);
}

var is = new Is();

function layerObject(id,visibility) {
if (is.ie5||is.ns6){
this.obj = document.getElementById(id).style;
this.obj.visibility = visibility;
return this.obj;
} else if(is.ie4) {
this.obj = document.all[id].style;
this.obj.visibility = visibility;
return this.obj;
} else if(is.ns4) {
this.obj = document.layers[id];
this.obj.visibility = visibility;
return this.obj;
}
}

var aktuell;
var einkaufsfuehrer;
var dialog;
var information;

function layerSetup() {
aktuell = new layerObject('aktuell','hidden');
einkaufsfuehrer = new layerObject('einkaufsfuehrer','hidden');
dialog = new layerObject('dialog','hidden');
information = new layerObject('information','hidden');
}

var old;
var memold;
var subold;
var txtold = "akt-0";

if(document.layers) {
        window.captureEvents(Event.MOUSEDOWN);
        window.onmousedown=do_out;
} else {
        document.onmousedown=do_out;
        }

function show_layer(x) {
        layerObject(x,"visible");
        }

function hide_layer(x) {
        layerObject(x,"hidden");
        }

function do_menu(x) {
        if(!old)
                old=memold;
    if(old!=x) {
                show_layer(x);
        old=x;
        } else
            old="";
}

function do_check(x) {
        if(old && old!=x) {
            hide_layer(old);
        show_layer(x);
                old=x;
                }
        do_submenu();
        }

function do_out() {
        if(old)
                hide_layer(old);
        memold=old; old="";
    do_submenu();
    }

function do_submenu(x) {
        if(subold) {
            hide_layer(subold);
        subold="";
        }
        if(x) {
                show_layer(x);
                subold=x;
    }
}

function do_txt(x) {
        if(txtold) {
            hide_layer(txtold);
        txtold="";
        }
        if(x) {
                show_layer(x);
                txtold=x;
    }
}

// -->
