
/* Set the main content (#inhalt) to the right height*/
function hoeheInhalt()
{
		
	var fensterHoehe    = window.getInnerHeight();
	var containerHoehe 	= $("container").getHeight();
    var headerHoehe     = $("header").getHeight();
    var footerHoehe     = $("foot").getHeight();
	var leftheader		= $("head").getHeight();
    var inhalt          = $("inhalt");
	
    var maxheightRechts = containerHoehe - ( parseInt(headerHoehe)) - 15;
	var maxheightLinks =  containerHoehe - ( parseInt(headerHoehe) + parseInt(leftheader) + parseInt(footerHoehe ))- 5;
	
	
	var rechtsHoehe = fensterHoehe - ( parseInt(headerHoehe)  + parseInt(footerHoehe) ) - 15;
	var linksHoehe = fensterHoehe - ( parseInt(headerHoehe)  + parseInt(leftheader) + parseInt(footerHoehe)*2 ) - 15;
	
	
	if 	(rechtsHoehe > maxheightRechts)	rechtsHoehe = maxheightRechts;
	if 	(linksHoehe > maxheightLinks)	linksHoehe = maxheightLinks;
	
	$('inhaltlinks').style.height = '' + linksHoehe  + 'px';
	$('inhaltrechts').style.height = '' + rechtsHoehe + 'px';
}

/* footer show 'Importing ... images' + Errors - Output

  H�he des mittleren <DIV>-Tags beim Laden der seite und �ndern der
 Fenstergr��e setzen*/

Event.observe( window, 'load', hoeheInhalt );
Event.observe( window, 'resize', hoeheInhalt );


/* checks whether a value of a valiable is empty. Works like php's empty()*/
function empty( mixed_val )
{
   if (
        mixed_val == ""
     || mixed_val == null
     || mixed_val == undefined
      )
      return true;

   return false;
}


