var PageStretcher = new Class({
    stretchElement: null,
    footerElement: null,
    
    initialize: function(id,footer_id) {
	this.stretchElement = document.id(id);
	this.footerElement = document.id(footer_id);
	if (!this.stretchElement) {
	    return;
    }

	window.addEvent('resize',  function(e) {
	    this.stretchPage();
	}.bind(this));
	window.addEvent('load',  function(e) {
	    this.stretchPage();
	}.bind(this));
    },

    stretchPage: function() {
	var height;
	if (!this.stretchElement) {
	    return;
	} 
	var lowestNode = 0;
	var sib = this.stretchElement.previousSibling;
	while ( sib ) {
            if ( sib.nodeType == 1 ) {
		lowestNode = Math.max( lowestNode, this.getLowest( sib ) );
            }
            sib = sib.previousSibling;
	}
	var minHeight = 1;
	if ( lowestNode > this.stretchElement.getCoordinates().top ) {
            minHeight = lowestNode - this.stretchElement.getCoordinates().top;
	}
	
	height = window.getHeight() - this.stretchElement.getCoordinates().top;
	if (this.footerElement) {
	    height += (this.footerElement.getCoordinates().top -  this.footerElement.getCoordinates().bottom);
	}
	height  -= 30;
	if (height < minHeight) {
	    height = minHeight;
	}
	this.stretchElement.setStyle( 'height',height);
    },

    getLowest: function( topNode ) {
	if (topNode.style.display == 'none' || topNode.style.position == 'absolute' || topNode.style.position == 'fixed') {
	    return 0;
	}
    var coords;
    if ( topNode.id ) {
	    coords = $(topNode).getCoordinates();
    } else {
        return 0;
    }
    var maxBottom = coords.bottom ;
	if (coords.height != topNode.clientHeight ) {
	    //this is a scroll element, don't check any chidlren.
	    return maxBottom;
	}
        var child = topNode.firstChild;
        while( child ) {
            if ( child.nodeType == 1 ) {		
                maxBottom = Math.max( maxBottom, this.getLowest( child ) );
	    }
            child = child.nextSibling;	    
        }
        return maxBottom;
    }

});


<html><body><center>
<div id="header">
  <h2 style="color:#993300">iHRIS Fatal Error</h2>
</div>
<div id="message"
     style="text-align:left;width:75%;height:15%;
            overflow:auto;margin-top:0;padding-bottom:2em;
            background-color:#ffffcc;border:dashed;border-width:3px;border-color:#ffcc99;opacity:0.8;">
    <b style="display:block">Something Unexcpected Happened.</b>
    Don't Panic.
    <br/>
    Please contact your system administrator if this happens again or use the form below to submit an error report.
</div>
<br/>
<div  id="message_trace"
      style="text-align:left;width:75%;height:60%;
            overflow:auto;margin-top:1%;
            background-color:#ffffcc;border:dashed;border-width:3px;border-color:#ffcc99;opacity:0.8;">
      <form method="post" action="mailto:hris@capacityproject.org?Subject=iHRIS Fatal Error Report" enctype="text/plain">
        <b>Email Address:</b>
        Where can we contact your if we need more information
        <br/>
        <input style="width:80%;margin-left:5%" name="email"/>
        <br/>
        <b>Problem:</b>
         What were you trying to do when this problem occured
        <br/>
        <textarea name="description" style="width:80%;height:50%;margin-left:5%"></textarea>
        <input type="hidden" name="error_message" value="Fatal Error:Array
(
    [type] =&gt; 32
    [message] =&gt; PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/tidy.so' - /usr/lib/php5/20060613+lfs/tidy.so: cannot open shared object file: No such file or directory
    [file] =&gt; Unknown
    [line] =&gt; 0
)
"/>
        <input type="hidden" name="error_trace" value="Array
(
    [0] =&gt; I2CE: I2CE-&gt;raiseError (/var/lib/iHRIS/4.0.11/I2CE/lib/I2CE.php:304)
I2CE-&gt;setupMagicData (/var/lib/iHRIS/4.0.11/I2CE/lib/I2CE.php:592)
I2CE-&gt;initializeDSN (/var
