ie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));
ns4 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4 ) && (parseInt(navigator.appVersion) < 5 ));
ns5 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 5 ));

geladen = false;

if (ns4)
{
    layerRef="document.layers";
    styleRef="";
    WidthRef=".clip.right";
    HeightRef=".clip.bottom";
}
if (ie4)
{
    layerRef="document.all";
    styleRef=".style";
    WidthRef=".posWidth";
    HeightRef=".posHeight";
}

function initmenue()
{
	geladen = true;
	aktimg = "";
	oldimg = "";
}

if (document.images)
{
	img = true;
}
else
{
	if (ns5)
	{
		img = true;
	}
	else
	{
		img = false;
	}
}

// Netscape Resize Fix
if (document.layers)
{
	widthCheck = window.innerWidth;
	heightCheck = window.innerHeight;
	window.onResize = resizeFix;
}
function resizeFix()
{
	if (widthCheck != window.innerWidth && heightCheck != window.innerHeight)
	document.location.href = document.location.href;
}

// normales Image-Rollon
function rollon(imgName)
{
	ie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));
	ns5 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 5 ));
	if (ie4 || ns5)
	{   
		document[imgName].src = "./menue/"+imgName+"_on.gif";
	}
}

function rolloff(imgName)
{
	ie4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));
	ns5 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 5 ));
	if (ie4 || ns5)
	{
		document[imgName].src = "./menue/"+imgName+"_off.gif";
	}
}

// Rollon in Layern
function mrollon(imgName)
{
	if (geladen)
	{
		if (ie4 || ns5)
		{
			document[imgName].src = "./menue/" + imgName + "_on.gif";
		}
		else
		{
			eval('document.'+imgName+'.document[imgName].src = "./menue/'+imgName+'_on.gif"');
		}
	}
}

function mrolloff(imgName)
{
	if ((geladen) && (aktimg != imgName))
	{
		if (ie4 || ns5)
		{
			document[imgName].src = "./menue/" + imgName + "_off.gif";
		}
		else
		{
			eval('document.'+imgName+'.document[imgName].src = "./menue/'+imgName+'_off.gif"');
		}
	}
}

function seton(imgName)
{
	if (geladen)
	{
		oldimg = aktimg;
		aktimg = imgName;
		mrollon(aktimg);
		if (oldimg)
		{
			mrolloff(oldimg);
		}
	}
}

function watching()
{

	if (document.layers)
	{
		if (document.netparklogo)
		{
			document.netparklogo.top = pageYOffset + window.innerHeight-65;
		}
	}
	if (document.all)
	{
		if (document.all.netparklogo)
		{
			document.all.netparklogo.style.top = document.body.scrollTop + window.document.all.fenstergroesse.offsetHeight-65; 
		}
	}
	window.onresize = watching;
	window.setTimeout("watching()",100);

}


function openbeitrag(url, breite, hoehe)
{
        now = new Date();
        var time = now.getTime();

                breite += 20;
                hoehe += 20;
                
        NeuesFenster = window.open(url, time, 'width='+breite+',height='+hoehe+',scrollbars=Yes,resizable=Yes');
}

function drucken()
{
	if (navigator.appName == "Netscape")
	{
		window.print();
	}
	else
	{
		self.focus();
		var OLECMDID_PRINT = 6;
		var OLECMDEXECOPT_DONTPROMPTUSER = 2;
		var OLECMDEXECOPT_PROMPTUSER = 1;
		var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
		document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
		WebBrowser1.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER);
		WebBrowser1.outerHTML = ''
	}
}

function schliessen()
{
	parent.close();
}

function checkframe(menuequer, menuev)
{
	// Frame ordnungsgemaess geladen
	
	if (this.name != 'inhalt')
	{
		akturl = this.location.href;
		pos = akturl.lastIndexOf("/");
		newurl = akturl.substr(pos+1, akturl.length-pos);
		top.location.href = 'index.pl?inhalt=' + newurl + '&menuequer=' + menuequer + '&menuev=' + menuev;
	}
}
