﻿function setMargins(left, right, offset) {
    if (!offset) offset = 0;
    try {
        var height_l = $(left).height() + offset;
        var height_r = $(right).height() + offset;
        if (height_r < height_l) $(right).height(height_l);
        if (height_l < height_r) $(left).height(height_r);
    }
    catch(ex) {}
}

$(document).ready(function() {setMargins('div#left','div#right');});
setTimeout(function(){setMargins('div#left','div#right');}, 1000);