I don't know of any easy way to do this, but I don't like giving up...
Do you know how to work with negative margins?
I'd try to give your main content element a height of 100% and using a negative top and bottom margin to make place for header and footer. If that works you still *might* have to add in a couple of tweaks to make it appear the way you want it, but that might just do the trick.
EDIT:
Or did I just misunderstand you too? Do you really want to make the entire window grey if the content isn't big enough? :\
I don't think that'll look too good...
You could use almost the same trick to achieve this. Give the footer a giant height (eg. 10000px) and then add a negative margin. Say your footer should be at least 100px, then add a margin-bottom of -9900px.