var MIN_HEIGHT = 650;
var MIN_WIDTH = 900;

function getMaxWidthHeight() {
	if (self.innerWidth) {
		document.frameWidth = self.innerWidth;
		document.frameHeight = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientWidth) {
		document.frameWidth = document.documentElement.clientWidth;
		document.frameHeight = document.documentElement.clientHeight;
	}
	else if (document.body) {
		document.frameWidth = document.body.clientWidth;
		document.frameHeight = document.body.clientHeight;
	}
}

function doResize(MObj) {
	getMaxWidthHeight();
	
	winW = document.frameWidth;
	winH = document.frameHeight;
	
	//MObj = document.getElementById("site");
	if((winW <= MIN_WIDTH) && (winH <= MIN_HEIGHT)) {
	
		MObj.height = MIN_HEIGHT;
		MObj.width = MIN_WIDTH;
	}
	else if ((winW <= MIN_WIDTH) && (winH > MIN_HEIGHT)) {
		MObj.height = '100%';
		MObj.width = MIN_WIDTH;
	}
	else if ((winW > MIN_WIDTH) && (winH > MIN_HEIGHT)) {
		MObj.height = '100%';
		MObj.width = '100%';
	}
	else if ((winW > MIN_WIDTH) && (winH <= MIN_HEIGHT)) {
		MObj.height = MIN_HEIGHT;
		MObj.width = '100%';
	}
}