function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
/*--------------------------------------------------------------------------------------------------*/

function objExists(objId) // Prüfung auf Existenz eines Knotens mittels Objekt-ID
{
	if(document.getElementById(objId))
	{
		return true;
	}
	else
	{
		return false;
	}
}
/*--------------------------------------------------------------------------------------------------*/

function toggleObj(objId) // "display" eines Knotens wird mittels Objekt-ID ins Gegenteil gesetzt (inline/none)
{
	if(objExists(objId))
	{
		if(document.getElementById(objId).style.display=="inline")
		{
			hideObj(objId);
		}
		else
		{
			showObj(objId);
		}
	}
}

/*--------------------------------------------------------------------------------------------------*/

function hideObj(objId) // "display" eines Knotens mittels Objekt-ID (none)
{
	if(objExists(objId))
	{
		document.getElementById(objId).style.display="none";
	}
	else
	{
		return false;
	}
}

/*--------------------------------------------------------------------------------------------------*/

function showObj(objId) // "display" eines Knotens mittels Objekt-ID (inline)
{
	if(objExists(objId))
	{
		document.getElementById(objId).style.display="inline";
	}
	else
	{
		return false;
	}
}

/*----------------------------------------------------------------------------------------------------*/

function popitup(path, id, nummer) {
var newwindow;
var pwidth, pheight;

if ( !newwindow || newwindow.closed ) {
pwidth=1000;
pheight=700;
newwindow=window.open('diashow.php?verzeichnis='+path+'&id='+id+'&nummer='+nummer,'htmlname','width=' + pwidth +',height=' +pheight + ',resizable=1,top=50,left=10');

}

newwindow.document.clear();
newwindow.focus();
/*
newwindow.document.writeln('<html> <head> <title>' + title + '<\/title> <\/head> <body bgcolor= \"' + colour + '\">');
newwindow.document.writeln('<table width="100%" height="100%" border="0"><TR><TD align="center">');
newwindow.document.writeln('<img src=' + url + ' title=\"' + title + '\" alt=\"' + title + '\" valign=\"middle\">');
newwindow.document.writeln('<\/TD><\/TR><\/TABLE>');
newwindow.document.writeln('<\/body> <\/html>');
*/
newwindow.document.close();
newwindow.focus();
}

// Routines to tidy up popup windows when page is left
// Call with an onUnload="tidy()" in body tag

function tidy() {
if (newwindow && !newwindow.closed) { newwindow.close(); }
}

function move_BgImage(objId,x,y)
{
  document.getElementById(objId).style.backgroundPosition = x+" "+y;
}

/*--------------------------------------------------------------------------------------------------*/

function set_BgImage(objId,src)
{
  document.getElementById(objId).style.backgroundImage = "url("+src+")";
}

/*--------------------------------------------------------------------------------------------------*/

function set_opacity(objId,wert)
{
	if(objExists(objId))
	{
		if(BrowserDetect.browser == "Explorer")
		{
			document.getElementById(objId).style.filter = "Alpha(opacity="+wert+")";
		}
		else
		{
			document.getElementById(objId).style.opacity = wert/100;
		}
	}
}

