/**
 * This javasript code, will create a full html page.
 * The vars that are being used are the div names of the main divs being used.
 *
 *    +-main------------------------------------------------------+
 *    | +-top---------------------------------------------------+ |
 *    | |                                                       | |
 *    | |                                                       | |
 *    | +-------------------------------------------------------+ |
 *    | +-body--------------------------------------------------+ |
 *    | | +-menu----------------------------------------------+ | |
 *    | | |                                                   | | |
 *    | | +---------------------------------------------------+ | |
 *    | | +-left--+ +-content---------------------------------+ | |
 *    | | |       | |                                         | | |
 *    | | |       | |                                         | | |
 *    | | |       | |                                         | | |
 *    | | |       | |                                         | | |
 *    | | |       | |                                         | | |
 *    | | |       | |                                         | | |
 *    | | |       | |                                         | | |
 *    | | |       | |                                         | | |
 *    | | +-------+ +-----------------------------------------+ | |
 *    | +-------------------------------------------------------+ |
 *    +-----------------------------------------------------------+
 *
 * It is verry important to add this javascript under the last html tag </html>. 
 * Otherwise the divs can't be loaded in the right order.
 *
 * Good to know: if you use any margin's, add the value in the calculation:
 * document.body.clientHeight-top.offsetHeight-menu.offsetHeight - MARGIN'S VALUE
 * so try to avoid margin in the main divs, use them in the div inside the main
 * divs.
 */


var left;
var right;

left = document.getElementById('left');
right = document.getElementById('right');
	
if( content.offsetHeight > left.offsetHeight )
	left.style.height = content.offsetHeight + 'px';
else {
	if( left.offsetHeight < document.body.clientHeight )
		left.style.height = document.body.clientHeight + 'px';
}
if( left.offsetHeight > content.offsetHeight )
	content.style.height = left.offsetHeight + 'px';
else {
	if( content.offsetHeight < document.body.clientHeight )
		content.style.height = document.body.clientHeight + 'px';
}
