il body lascialo stare,
quello che scriveresti in <body onload="..." onresize="...">
e' gia' qui
codice:
window.onload=function(){
	resizeDiv('right',300);
	window.onresize=function(){resizeDiv('right',300);}
}
anche tutto quello che hai scritto in questo nuovo messaggio e' gia' condensato in quello che ho scritto io
codice:
function getViewportHeight(){
	return (
		(self.innerHeight)?self.innerHeight:
		((document.documentElement && document.documentElement.clientHeight)?
			document.documentElement.clientHeight:
			document.body.clientHeight
		)
	)
}
function resizeDiv(id,minHeight){
	var el=document.getElementById(id);
	var h=getViewportHeight();
	el.style.height=((h<minHeight)?minHeight:h)+'px';	
}