Problem whit resize

Problem whit resize


hi, i'm italian developer, i use jquery to yesterday, :)
...i have try to write my function to resize a div some a windows whit
a varible difference to height of header, footer and more..
the script is this :
function RidimenzionaDivContent() {
var header = 50;
var footer = 37;
var spacing = 92;
var WinSize = $(document).height();
var divSize = (WinSize - (header + footer + spacing));
var Hstr = "" + divSize + "px";
$("#content").animate({ height: Hstr });
};
var resizeTimer = null;
$(window).bind('resize', function() {
RidimenzionaDivContent();
});
$(window).bind('load', function() {
RidimenzionaDivContent();
});
it work, but work only want i enlange my windows not if i
reduce....why?
everyone can help me?
ps: sorry for my no good english ;)