// Div Resize
var myWidth = 0, myHeight = 0;
var divHeight = 0, divWidth = 0;
var scrOfX = 0, scrOfY = 0;
isNS4 = (document.layers) ? 1 : 0;
isIE4 = (document.all) ? 1 : 0;
isW3C = (document.getElementById && !document.all) ? 1 : 0;

function getWindowSize() {
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
}

function resizeDiv(objName) {
	getWindowSize();
	width = (myWidth > 200) ? myWidth - 20 : 200;
	height = (myHeight > 200) ? myHeight - 80 : 200;
	
	if (width < 550) { width = 550; }
	
	if (isW3C) {
		docObj = document.getElementById(objName);
		eval("docObj.style.width = '" + width + "px'");
		eval("docObj.style.height = '" + height + "px'");
	}
	if (isNS4) {
		docObj = document.layers[objName];
		eval("docObj.style.width = '" + width + "px'");
		eval("docObj.style.height = '" + height + "px'");
	}
	if (isIE4) {
		docObj = document.getElementById(objName);
		eval("docObj.style.width = '" + width + "px'");
		eval("docObj.style.height = '" + height + "px'");
	}
}