﻿function OnLoadAdjust()
{
    // get a reference to the three DIVS that make up the columns
    var Body = document.getElementById('body');
    var Mcol = document.getElementById('middlecol');
    var Lcol = document.getElementById('leftcol');
    var Rcol = document.getElementById('rightcol');
    
    // calculate the max height
    var maxHeight = Math.max(Body.offsetHeight, Math.max(Mcol.offsetHeight, Lcol.offsetHeight, Rcol.offsetHeight));
    
    // set the height of all 3 DIVS to the max height
    Body.style.height = maxHeight + 'px';
    Mcol.style.height = maxHeight + 'px';
    Lcol.style.height = maxHeight + 'px';
	Rcol.style.height = maxHeight + 'px';
	
	/*
	//Automatically add the class "inputBTN" to all buttons that are of type button, submit, or reset
	var BTN = document.getElementById("middlecol").getElementsByTagName("input");
	for(var i = 0; i < BTN.length; i++)
	{
	    if(BTN[i].type == "button" || BTN[i].type == "submit" || BTN[i].type == "reset")
	    {
	        if(BTN[i].className.length > 0)
	            BTN[i].className += " inputBTN";
	        else
	            BTN[i].className = "inputBTN";
	    }
	}
	*/
}