﻿function AdjustColumnsHeight()
{
    var hColumnL = 0;
    var hColumnM = 0;
    var hColumnR = 0;

    // get a reference to the DIVS that make up the columns

    var columnL = window.document.getElementById('menucol');
    var columnM = window.document.getElementById('mainpage');
    var columnR = window.document.getElementById('basketcol');
    
    // calculate the max height

    if (columnL != null) {hColumnL = columnL.offsetHeight;}
    if (columnM != null) {hColumnM = columnM.offsetHeight;}
    if (columnR != null) {hColumnR = columnR.offsetHeight;}
    
    var maxHeight = Math.max(hColumnL,Math.max(hColumnM,hColumnR)) + 5;

//            alert("L:" + hColumnL.toString() + "; " + "M:" + hColumnM.toString() + "; " + "R:" + hColumnR.toString() + "; " + "max:" + maxHeight.toString());

    // set the height of all DIVS to the max height
    if (columnL != null) {columnL.style.height = maxHeight + 'px';}
    if (columnM != null) {columnM.style.height = maxHeight + 'px';}
    if (columnR != null) {columnR.style.height = maxHeight + 'px';}
}


function popupPage(pagename)
{
	window.open ("PopupPage.aspx?PageName=" + pagename, "myPopup","resizable=1,width=450,height=350");
}

if (typeof(Sys) !== "undefined") Sys.Application.notifyScriptLoaded();
