function getWindowHeight() {
		
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
				}
				else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
					}
				}
			}
						
			return windowHeight;
		}
		
		
		function setFooter() {
			if (document.getElementById) {
				var windowHeight = getWindowHeight();
				if (windowHeight > 0) {
					var contentHeight = document.getElementById('content').offsetHeight;
					
					//var textfieldHeight = document.getElementById('textfield').offsetHeight;
					//var leftsideHeight = document.getElementById('leftside').offsetHeight;
											
					var footerElement = document.getElementById('footer');
					var footerHeight  = footerElement.offsetHeight;
					
					var top_position = windowHeight - (contentHeight + footerHeight );
					
					if (windowHeight - (contentHeight + footerHeight) >= 0) {
						footerElement.style.position = 'relative';
						footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px';
		
						}
					else {
						footerElement.style.position = 'static';
					}
					
					
				
				}
					
			}
			
		//alert ("windowHeight " + windowHeight + " -- contentHeight " + contentHeight + " -- footerHeight " + footerHeight + " -- top_position " + top_position + " --- leftsideHeight " + leftsideHeight + " --- textfieldHeight " + textfieldHeight );
		
			
		}
		
		//window.onload = function() {
			//setFooter();
		//}
//		window.onresize = function() {
	//		setFooter();
		//}
		
		var ioWindow;

function openWindow(url,x,y)
	{
	if (ioWindow) {if (!ioWindow.closed) ioWindow.close()}
	/*h=screen.availHeight-30;
	w=screen.availWidth-30;
	t=(h-y)/2; if (t<0) t=0;
	u=(w-x)/2; if (w<0) w=0;*/
	t=10;
	u=10;
	ioWindow = window.open(url,"popup",'width='+x+',height='+y+',left='+u+',top='+t+',scrollbars=yes,resizeable=yes');
	ioWindow.focus();
}


 
 // noch kein großes Fenster geöffnet
    var groesser=null;

    function bildGross(bildName,bildUrl,breite,hoehe)
    { 
      // Preload für Opera
      preload=new Image();
      preload.src=bildUrl;


//	if ((navigator.appName=="Microsoft Internet Explorer") && (parseInt(navigator.appVersion.substring(0,1)) > 2 )) {
//		breite=breite+20; hoehe=hoehe+10;
//	}
//	if ((navigator.appName=="Netscape") && (parseInt(navigator.appVersion.substring(0,1)) < 4)) {
//		breite=breite+5; hoehe=hoehe+10;
//	}


      // Fenstergrösse festlegen
      var fenster_property = "width=" + breite + ",height=" + hoehe + ",scrollbars=no,resizable=yes";
      
      // Variablen für Platzierung auf Bildschirmmitte
	 // var abstand_links = Math.ceil((screen.width - breite) / 2);
      //var abstand_oben = Math.ceil((screen.height - hoehe - 40) / 2);

		 // 40=ca.-Faktor für Rahmen und Titelleiste

      var abstand_links = 0;
      var abstand_oben = 0;

      // evtl. bereits vorhandenes Fenster schließen
      if (groesser != null)
        if (!groesser.closed) groesser.close();
      
      // auf Bildschirmmitte plazieren über Propertys (screenX/Y für NN, left/top für IE)
      fenster_property += ",screenX=" + abstand_links + ",screenY=" + abstand_oben 
          +",left=" + abstand_links + ",top=" + abstand_oben;
      
      // Fenster öffnen
      groesser=window.open("","bild",fenster_property);
      
      // Quellcode für Fenster erzeugen
      groesser.document.open("text/html");
      
      groesser.document.writeln("<!doctype html public '-//W3C//DTD HTML 4.01 Transitional//EN'> ");
      groesser.document.writeln("<html> ");
      groesser.document.writeln("  <head> ");
      groesser.document.writeln("    <title>" +bildName+ "</title> ");
      groesser.document.writeln("    <meta http-equiv='content-type' content='text/html;charset=ISO-8859-1'> ");
      groesser.document.writeln("  </head> ");
      groesser.document.writeln("  ");
      groesser.document.writeln("  <body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0' bgcolor='#FAFAFA'> ");
      groesser.document.writeln("    <div align='center'><a href='javascript:close()'> ");
      groesser.document.writeln("      <img src='" +bildUrl+ "' alt='Fenster schließen' border=0 hspace=0 vspace=0>" );
      groesser.document.writeln("    </a></div> ");
      groesser.document.writeln("  </body> ");
      groesser.document.writeln("</html> ");

      groesser.document.close();
      
      groesser.focus(); 
    }

    // beim Verlassen des Dokuments evtl. vorhandenes Fenster schließen
    function fensterSchliessen()
    {
      if (groesser != null)
        if (!groesser.closed) groesser.close();
    }


	
	// Javascript Fehler unterdruecken
// onerror = stopError;
function stopError()
{
return true;
}

// Umgebungsvariablen auslesen

	// convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase();

    // *** BROWSER VERSION ***
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    // Note: Opera and WebTV spoof Navigator.  We do strict client detection.
    // If you want to allow spoofing, take out the tests for opera and webtv.
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_gecko = (agt.indexOf('gecko') != -1);


    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);

    // KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
    // or if this is the first browser window opened.  Thus the
    // variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.
    var is_aol   = (agt.indexOf("aol") != -1);
    var is_aol3  = (is_aol && is_ie3);
    var is_aol4  = (is_aol && is_ie4);
    var is_aol5  = (agt.indexOf("aol 5") != -1);
    var is_aol6  = (agt.indexOf("aol 6") != -1);

    var is_opera = (agt.indexOf("opera") != -1);
    var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
    var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
    var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
    var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
    var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);

    var is_webtv = (agt.indexOf("webtv") != -1); 

    var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1)); 
    var is_AOLTV = is_TVNavigator;

    var is_hotjava = (agt.indexOf("hotjava") != -1);
    var is_hotjava3 = (is_hotjava && (is_major == 3));
    var is_hotjava3up = (is_hotjava && (is_major >= 3));


myload=0;
// blur focus

function bluur(x)
	{
	if(x.blur)x.blur();
	}

// preload images, mouseover

function initImages()
	{
	imo = new Array(); // Mouseover-Bilder
	ino = new Array(); // Normal-Zustand-Bilder
	if (document.images)
		{
		for (i=0;i<80;i++) 
			{
			ll=0;
			if (is_nav4) ll=document.layers.length;
			for (l=-1; l<ll; l++)
				{
				dok=document;
				if ((is_nav4)*(l!=-1)) dok=document.layers[l].document;
				if (dok.images["b"+i])
					{
					// Folder ermitteln
					url=dok.images["b"+i].src;
					found=url.split("/");
					nfound=found[found.length-1].split(".");
					nlength=nfound[0].length-1;
					folder=url.replace(found[found.length-1],"");
					name=nfound[0].substr(0,nlength);
					imo[i] = new Image(); imo[i].src = folder+name+"1."+nfound[1];
					ino[i] = new Image(); ino[i].src = url;
					}
				}
			}
		}
	myload=1;
	}


function over(x,lay) // x=Bildnummer lay=Ebenen-id
	{
	if (!myload) return;
	if (myload==0) return;
	dok=document;
	if (lay) dok=getdok(lay);
	xx="b"+x;
	dok.images[xx].src = imo[x].src;
	}

function out(x,lay)
	{
	if (!myload) return;
	if (myload==0) return;
	dok=document;
	if (lay) dok=getdok(lay);
	xx="b"+x;
	if (dok.images[xx].src.indexOf("1.")>-1) dok.images[xx].src = ino[x].src;
	}



	
// IE Onclick-Rahmen ausblenden

function nix(x)
	{
	if ((is_nav6)+(is_ie)) x.blur();
	}
	

// Formular-Buttons Rollover

function butover(x)
	{
	if (is_nav4) return;
	url=x.src;
	found=url.split("/");
	nfound=found[found.length-1].split(".");
	nlength=nfound[0].length-1;
	folder=url.replace(found[found.length-1],"");
	name=nfound[0].substr(0,nlength);
	x.src = folder+name+"1."+nfound[1];
	}
	
function butout(x)
	{
	if (is_nav4) return;
	url=x.src;
	found=url.split("/");
	nfound=found[found.length-1].split(".");
	nlength=nfound[0].length-1;
	folder=url.replace(found[found.length-1],"");
	name=nfound[0].substr(0,nlength);
	x.src = folder+name+"0."+nfound[1];
	}


	
/*
function blaettern_2(){ document.blaetterfeld_2.submit(); }
function filtern_1(){ document.filterfeld_1.submit(); }
function neueSeite_1(){ document.sortierfeld_1.submit(); }
function blaettern_1(){ document.blaetterfeld_1.submit(); }
function neueSeite_2(){ document.sortierfeld_2.submit(); }
	*/	
		