var topW = 0;
var topH = 0;

function buildWH() {
	if (document.all&&document.getElementById){
		 cW=document.body.offsetWidth;
		 cH=document.body.offsetHeight;
		 window.resizeTo(500,500)
		 barsW=500-document.body.offsetWidth;
		 barsH=500-document.body.offsetHeight;
		 wW=barsW+cW;
		 wH=barsH+cH;
		 window.resizeTo(wW,wH)

	} else {
		wW=window.outerWidth;
		wH=window.outerHeight;
	}

	topW = wW;
	topH = wH;
	topW = topW - document.body.clientWidth;
	topH = topH - document.body.clientHeight;

	if (document.getElementById('popsize')){
		 popW = document.getElementById('popsize').offsetWidth;
		 popH = document.getElementById('popsize').offsetHeight;
	}
	resizeWH(popW,popH);
}

function resizeWH(width,height) {
   reW = width + topW;
   reH = height + topH;
   window.resizeTo(reW,reH);
}
