// JavaScript Document
    var centerHeightOrg = 0;
    function SetHeights()
    {
        // var centerHeightOrg = 0;
		try
        {
            //1) We want to set the height of divCenter to, at least, a designed height (eg 768px)...
            var marginTop = Val(document.body.style.marginTop);
            var marginBottom = Val(document.body.style.marginBottom);
            //...store the mimimum required height...
            if(centerHeightOrg == 0)
            {
				centerHeightOrg = Val(document.getElementById('divPage').getAttribute('designHeight'))/*768*/ - document.getElementById('divTop').offsetHeight - document.getElementById('divBottom').offsetHeight - marginTop - marginBottom;
                centerHeightOrg = Max(centerHeightOrg, document.getElementById('divMiddle').offsetHeight); //ironically, Max() here returns the minimum required height
                centerHeightOrg = Max(centerHeightOrg, document.getElementById('divMiddleCentreRightBottom_Content').offsetHeight);
				centerHeightOrg = Max(centerHeightOrg, document.getElementById('divMiddleLeft').offsetHeight + 4);
			//	window.alert(document.getElementById('divMiddleLeft').scrollHeight);
            }
           
            //...calc divCenter's maximum height relative to screen real-estate...
            var centerCalcHeight = document.body.clientHeight - document.getElementById('divTop').offsetHeight - document.getElementById('divBottom').offsetHeight - marginTop - marginBottom;
            
            //...set divCenter's height...
            document.getElementById('divMiddle').style.height = ' ' + (Max(centerHeightOrg, centerCalcHeight) + 1) + 'px';
            
			//...and the heights of its main elements
			//window.alert(document.getElementById('divMiddleLeft').style.height);
            document.getElementById('divMiddleLeft').style.height = document.getElementById('divMiddle').style.height;
            document.getElementById('divMiddleCentreLeft_Pic').style.height =  document.getElementById('divMiddle').style.height;
			document.getElementById('divMiddleCentre').style.height =  document.getElementById('divMiddle').style.height;
//incorrect div			document.getElementById('divMiddleCentreRightBottom_Content').style.height = document.getElementById('divMiddle').style.height;
            document.getElementById('divMiddleRight').style.height = ' ' +  (Val(document.getElementById('divMiddle').style.height) -1)  + 'px';
        }
        catch(e)
        {
        	window.alert(e);
        }
    }
    function Min(a, b)
    {
        return a < b ? a : b;
    }
    function Max(a, b)
    {
        return a > b ? a : b;
    }
    function Val(str)
    {
        var answer = parseInt(str);
        if(isNaN(answer))
            answer = 0;
        return answer;
    }
	
	function CloseMe()
	{
		var thisWin = window.open('','_parent','');
		//window.alert('About to close...');
		thisWin.close();
		window.close();
		location.href = "home_UP.html";
	}
	
	function Test()
	{
	    window.alert(document.getElementById('divMiddleLeft').scrollHeight);
	}