function _column_adjust ()
{
    var all_divs = document.getElementsByTagName("div");
    var col_groups = new Array();
    
    for(index = 0; index < all_divs.length; index++)
    {
        div = all_divs[index];
        
        if((offset = div.className.indexOf("col_group_")) != -1)
        {
            remainder = div.className.substring(offset + 10, div.className.length);
            if(remainder.indexOf(" ") != -1)
                remainder = remainder.substring(0, remainder.indexOf(" "));
                
            group_id = remainder;
            group_index = -1;
            
            for(col_index = 0; col_index < col_groups.length; col_index++)
            {
                if(col_groups[col_index].group_id == group_id)
                {
                    group_index = col_index;
                    break;
                }
            }
            if(group_index == -1)
            {
                group_index = col_groups.length;
                col_groups[group_index] = new ColumnAdjustmentGroup(group_id);
            }
            
            col_groups[group_index].addDiv(div);
        }
    }
    
    for(index = 0; index < col_groups.length; index++)
    {
        max_height = 0;
        col_group = col_groups[index];
        
        for(div_index = 0; div_index < col_group.divs.length; div_index++)
        {
            height = col_group.divs[div_index].clientHeight;
            
            if(height > max_height)
                max_height = height;
        }
        
        for(div_index = 0; div_index < col_group.divs.length; div_index++)
        {
            col_group.divs[div_index].style.height = max_height + "px";
        }
    }
}

function ColumnAdjustmentGroup (group_id)
{
    this.group_id = group_id;
    this.divs = new Array();
    
    this.addDiv = function (div) { this.divs[this.divs.length] = div; };
}

function addEventHandler (elem, evtName, handler)
{
    if(elem.addEventListener)
        elem.addEventListener(evtName, handler, false);
    else if(elem.attachEvent)
        elem.attachEvent("on" + evtName, handler);
    else
    {
        if(typeof(eval("elem.on" + evtName)) == "function")
        {
            existing_handler = eval("elem.on" + evtName);
            
            eval("elem.on" + evtName + " = function () { existing_handler(); handler(); };");
        }
    }
}

addEventHandler(window, "load", _column_adjust);