// This Javascript is written by Peter Velichkov (www.creonfx.com)
// and is distributed under the following license : http://creativecommons.org/licenses/by-sa/3.0/
// Use and modify all you want just keep this comment. Thanks

function equalHeight(cl,num,defheight) {

    var className = '.' + cl;
    var maxHeight = 0;

    $$(className).each(function(el) {
        if (el.offsetHeight > maxHeight) {
            maxHeight = el.offsetHeight;
        }
    });
    
    $$(className).each(function(el) {
    el.setStyle('height', maxHeight + (defheight));
      
    });

}

function equalHeightNoExtender(cl, defheight) {
    cl.setStyle('height', cl.offsetHeight + (defheight));
}

function vIE()
{ return (navigator.appName == 'Microsoft Internet Explorer') ? parseFloat((new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})")).exec(navigator.userAgent)[1]) : -1; }

//window.onload = equalHeight('equals');
window.addEvent('load', function() {
equalHeight('eq2',1,-60);
equalHeight('equals', 2, 0);
equalHeight('eq_news', 3, -75);
//equalHeightNoExtender(document.getElementById('Div1'), 885)
//  
});

