function resize_embed(el, width) {
   old_width = $(el).attr('width');
   old_height = $(el).attr('height');
   t = old_height * width;
   height = Math.round(t / old_width);
   obj = $(el).parent('object');
   obj.attr('width', width);
   obj.attr('height', height);
   $(el).attr('width', width);
   $(el).attr('height', height);
}

$.postJSON = function(url, data, callback) {
    $.post(url, data, callback, "json");
};
