// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function SelectAll(id)
{
    document.getElementById(id).focus();
    document.getElementById(id).select();
}

function sortNum(a,b) {
    return b-a
}

function fixH(one,two) {
    if (document.getElementById(one)) {
        var lh=document.getElementById(one).offsetHeight;
        var rh=document.getElementById(two).offsetHeight;
        var nh = Math.max(lh, rh);
        document.getElementById(one).style.height=nh+"px";
        document.getElementById(two).style.height=nh+"px";
    }
}

function fixH2(one,two,three) {
    if (document.getElementById(one)) {
        var obj=new Array(3);
        var option=[one,two,three];
        for(var i=0; i<option.length; i++) {
            document.getElementById(option[i]).style.height="auto";
            obj[i]=document.getElementById(option[i]).offsetHeight;
            nh=obj.sort(sortNum);
        }
        nh1=nh.splice(1,2);
        for(var i=0; i<option.length; i++) {
            document.getElementById(option[i]).style.height=nh+"px";
        }
    }
}


window.onload = function() {
    fixH('right_hand_column_landing','left_landing');
    fixH('left_landing','off_center_landing');
    fixH('right_kr', 'left_landing');
    fixH2('left_view','right_view','center_view');
    fixH('yield_kr', 'right_kr');
}


