function showDiv(a) 
{
  		var ebene=document.getElementById(a);
    		if( document.layout ) /* Mozilla */
    		{
 			if( ebene.visibility=="hide" )
         		{
           			ebene.visibility='show';
         		}
         		else
         		{
            			ebene.visibility='hide';
         		}   
    		}
     		else /* IE */ 
     		{

  	         	if( ebene.style.visibility=="hidden" || ebene.style.visibility=="" )
         		{
         			ebene.style.visibility='visible';
         		}
         		else
         		{
           			ebene.style.visibility='hidden';
         		} 
     		}
} 

function findPos(el) {

    var xPos = 0;
    var yPos = 0;

    if(document.layers) {
        xPos = el.x;
        yPos = el.y;
    }
    else {
        while(el){
            xPos += el.offsetLeft;
            yPos += el.offsetTop;
            el   =  el.offsetParent;
        }
    }
    return {xPos: xPos, yPos: yPos};
}

function getBody(w)
{
    return (w.document.compatMode && w.document.compatMode == "CSS1Compat") ? w.document.documentElement : w.document.body || null;
}

window.onresize=resizemain;
var resized = false;
var althoehe = 0;
var doresize = false;
var footermargin = 20;
var by= getBody(window);

function resizemain( )
{
	if( document.all )
        {
		hoehe = by.clientHeight;
	}
	else
	{
		hoehe = window.innerHeight;
	}
	// Abstand des footers von oben:
	var footer = document.getElementById( "footer" );
	var footerY = findPos(footer).yPos;
	if( ! doresize && hoehe>footerY+10 )
	{
		doresize=true;
	}
	if( doresize )
	{
		if( ! resized )
		{
			footermargin = parseInt(hoehe-footerY-8)+"px";
			resized = true;
	     		althoehe = hoehe;
		 }
	 	else
		 {
	 		footermargin = parseInt(parseInt(footer.style.marginTop)-(althoehe-hoehe))+"px";
	 	 }
		 althoehe = hoehe;
		 footer.style.marginTop=footermargin;
	 }
}