// ------------------------------------------------------------------------------------------------------------
function BrowserCheck(){

	pform   = navigator.platform.toLowerCase();
	ver     = navigator.appVersion;
	
	
	this.dom     = document.getElementById?1:0;
	this.ie5     = (ver.indexOf("MSIE 5")>-1 && this.dom)||(ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;   // Internet Explorer >= 5.x
	this.macie5  = (ver.indexOf("MSIE 5")>-1 && this.dom && pform.indexOf("mac")>-1)?1:0;   // PPC Internet Explorer 5.x
	this.ie4     = (document.all && !this.dom)?1:0;   // Internet Explorer 4.x
	this.macie4  = (document.all && !this.dom && pform.indexOf("mac")>-1)?1:0;   // PPC Internet Explorer 4.x
	this.ns6     = (this.dom && parseInt(ver) >= 5)?1:0;   // Netscape 6.x
	this.ns4     = (document.layers && !this.dom)?1:0;   // Netscape 4.x
	this.macns4  = (document.layers && !this.dom && pform.indexOf("mac")>-1)?1:0;   // PPC Netscape 4.x
	this.mac = (this.macie5 || this.macie4 || this.macns4)?1:0;
	
	// zusaetzl. opera abfrage (egal mit welcher user-einstellung)
	browser = navigator.appName.toLowerCase();
	check   = navigator.userAgent.toLowerCase();
	//this.op = check.match("opera")?1:0;
	if (this.op==1) {
	    this.ie4=0; this.ie5=0; this.ns4=0; this.ns6=0;
	}
}


// ------------------------------------------------------------------------------------------------------------
var is = new BrowserCheck();
if (is.ns4)
	{
	widthCheck = window.innerWidth;
	heightCheck = window.innerHeight;
	window.onResize = reloadOnResize;
	}


// ------------------------------------------------------------------------------------------------------------
function reloadOnResize() 
	{
	if (widthCheck != window.innerWidth || heightCheck != window.innerHeight)
		{
		document.location.href = document.location.href;
		}
	}


// ------------------------------------------------------------------------------------------------------------
var layerda = false;
function init() {
	layerda = true;

	if (is.dom) {
		document.getElementById('mitteDiv').onmouseover = mouseOverHandler;
	}
	else if (is.ns4) {
		document.layers['mitteDiv'].document.captureEvents(Event.MOUSEOVER);
		document.layers['mitteDiv'].document.onmouseover = mouseOverHandler;
	}	
	else
	{
		document.all.mitteDiv.onmouseover = mouseOverHandler;
	}
	
}


// ------------------------------------------------------------------------------------------------------------
// close all navigation menus; called by mouseOver mitteDiv 
function mouseOverHandler(e) 
{ 
    clearAll();
    //if (is.ns4) routeEvent(e)
    return true;
} 


// ------------------------------------------------------------------------------------------------------------
function aktion_verzoegert(func,time)
{
	var action=setTimeout(func,time);
}


// ------------------------------------------------------------------------------------------------------------
function hide(id) {
	if (is.dom) {
		document.getElementById(id).style.display = "none";
	}
	else if (is.ns4) {
		document.layers[id].display = "none";
	}
	else {
		document.all[id].style.display = "none";
	}
}


// ------------------------------------------------------------------------------------------------------------
function show(id) {
	if (is.dom) {
		document.getElementById(id).style.display = "block";
	}
	else if (is.ns4) {
		document.layers[id].display = "list-item";
	}
	else {
		document.all[id].style.display = "list-item";
	}
}

