BrowserSniffer();

//detects the capabilities of the browser
function BrowserSniffer() {
        if (navigator.userAgent.indexOf("Opera")!=-1 && document.getElementById) type="OP";                //Opera
        else if (document.all) type="IE";                                                                                                                //Internet Explorer e.g. IE4 upwards
        else if (document.layers) type="NN";                                                                                                        //Netscape Communicator 4
        else if (!document.all && document.getElementById) type="MO";                                                        //Mozila e.g. Netscape 6 upwards
        else type = "IE";                //I assume it will not get here
}

//Displays the generic browser type
function whatBrows() {
        window.alert("Browser is : " + type);
}

//Puts the contents of str into the layer id
//id is the name of the layer
//str is the required content
//Works with all browsers except Opera
function ChangeContent(id, str) {
        if (type=="IE") {
                document.all[id].innerHTML = str;
        }
        if (type=="NN") {
                document.layers[id].document.open();
                document.layers[id].document.write(str);
                document.layers[id].document.close();
        }
        if (type=="MO" || type=="OP") {
                document.getElementById(id).innerHTML = str;
        }
}

// Standardcolor definieren

var scolor = "#A90305"; // default
var shopcolor = "#333333";
var verzeichniscolor = "#008000";
var forumcolor = "#4C6074";
var blogcolor = "#D87315";
var ratgebercolor ="#A90305"; // nicht definiert da default bzw. current

//Change the color of the layer background
//id is the name of the layer
//color is the required color
//Works with all browsers except NN4
function ChangeLayerBgColor(id, color){
        if (type=="IE") document.all[id].style.borderColor=color;
        if (type=="NN") document.layer['id'].style.borderColor=color;
        if (type=="MO" || type=="OP") document.getElementById(id).style.borderColor=color;
}