function reloadPage(init) {
	if(init==true)with(navigator) {
		if((appName=="Netscape")&&(parseInt(appVersion)==4)) {
			document.pgW=innerWidth;
			document.pgH=innerHeight;
			onresize=reloadPage;
		}
	} else if(innerWidth!=document.pgW||innerHeight!=document.pgH)location.reload(); 
}
reloadPage(true);
	
function adjustColumnsHeight() {
	//if(document.getElementById&&navigator.appVersion.indexOf("MSIE")>-1&&!window.opera) {
		if(window.attachEvent){ //IE exclusive method for binding an event
			window.attachEvent("onresize",calcColumnsHeight);
			window.attachEvent("onload",calcColumnsHeight);
		} else if(window.addEventListener){ //DOM method for binding an event
			window.addEventListener("load", calcColumnsHeight, false) 
			window.addEventListener("resize", calcColumnsHeight, false) 
		} else if (document.getElementById) {		
			window.onload=calcColumnsHeight;
			window.onresize=calcColumnsHeight;
		}
	//}
}
adjustColumnsHeight();

function calcColumnsHeight() {
    var divIds = new Array();
    var parentId, childId, grandChildId, parent, child, grandChild, i;

    if (document.getElementById) {
        var divIds = new Array()
        divIds[0] = 'left_content';
        divIds[1] = 'main_content';
        divIds[2] = 'right_content';

        document.getElementById('main_content').style.minHeight = '0px';

        childId = divIds[0];
        for(i = 1; i < divIds.length; i++) {
            if (document.getElementById(childId).offsetHeight < document.getElementById(divIds[i]).offsetHeight) {
                childId = divIds[i];
            }
        }

        parentId = 'container';
                grandChildId = 'footer';

        parent = document.getElementById(parentId);
        grandChild = document.getElementById(grandChildId);
        child = document.getElementById(childId);

        
        parent.style.height = child.offsetHeight + 'px';
        grandChild.style.display = 'block';

        return true
    }
}
