function Browser() {
	var b=navigator.appName
	if (b=="Netscape") this.b="ns"
	else if (b=="Microsoft Internet Explorer") this.b="ie"
	else this.b=b
	this.version=navigator.appVersion
	this.v=parseInt(this.version)
	this.ns=(this.b=="ns" && this.v>=4)
	this.ns4=(this.b=="ns" && this.v==4)
	this.ns5=(this.b=="ns" && this.v==5)
	this.ie=(this.b=="ie" && this.v>=4)
	this.ie4=(this.version.indexOf('MSIE 4')>0)
	this.ie5=(this.version.indexOf('MSIE 5')>0)
	this.ie55=(this.version.indexOf('MSIE 5.5')>0)
	this.dom=((document.createRange&&(document.createRange().createContextualFragment))?true:false)
	this.min=(this.ns||this.ie)
	var ua=navigator.userAgent.toLowerCase()
	if (ua.indexOf("win")>-1) this.platform="win32"
	else if (ua.indexOf("mac")>-1) this.platform="mac"
	else this.platform = "other"
}
is=new Browser()
/*
 * Given a selector string, return a style object
 * by searching through stylesheets. Return null if
 * none found
 */
function getStyleBySelector( selector ) {
    if (!is.ns5) return null
    var sheetList = document.styleSheets;
    var ruleList;
    var i, j;

    /* look through stylesheets in reverse order that they appear in the document */
    for (i=sheetList.length-1; i >= 0; i--) {
        ruleList = sheetList[i].cssRules;
        for (j=0; j<ruleList.length; j++) {
            if (ruleList[j].type == CSSRule.STYLE_RULE && ruleList[j].selectorText == selector) return ruleList[j].style
        }
    }
    return null;
}

/*
 * Given an id and a property (as strings), return
 * the given property of that id.  Navigator 6 will
 * first look for the property in a tag; if not found,
 * it will look through the stylesheet.
 *
 * Note: do not precede the id with a # -- it will be
 * appended when searching the stylesheets
 */
function getIdProperty( id, property ) {
    if (is.ns5) {
        var styleObject = document.getElementById( id );
        if (styleObject != null) {
            styleObject = styleObject.style;
            if (styleObject[property]) return styleObject[ property ];
        }
        styleObject = getStyleBySelector( "#" + id );
        return (styleObject != null) ?
            styleObject[property] :
            null;
    }
    else if (is.ns4) return document[id][property];
    else return document.all[id].style[property];
}

/*
 * Given an id and a property (as strings), set
 * the given property of that id to the value provided.
 *
 * The property is set directly on the tag, not in the
 * stylesheet.
 */
function setIdProperty( id, property, value ) {
  if (id!=null && !id=='') {
    if (is.ns5) {
        var styleObject = document.getElementById( id );
        if (styleObject != null) {
            styleObject = styleObject.style;
            styleObject[ property ] = value;
        }
    } else if (is.ns4) {
    	document[id][property] = value;
    } else if (is.ie) {
        document.all[id].style[property] = value;
    }
  }
}
/*
 * Return a division's document
 */
function getDocument( divName ) {
    var doc;
    if (is.ns4) doc = window.document[divName].document;
    else if (is.ns5 || is.ie4) doc = document;
    return doc;
}

function init(eintrag,ersteEbene,zweiteEbene){
  setIdProperty(eintrag,'fontWeight','bold')
  showMenu(ersteEbene,zweiteEbene)
}

