var widthLimit  = 800;
var heightLimit = 600;

function setScroll () {
	
	var width = getSize()[0];
	var height = getSize()[1];
	var table = document.getElementById("tableGeral");
	
	if (width < widthLimit) {
		table.style.width = widthLimit + "px";
	} else {
		table.style.width = "100%";
	}
	
	if (height < heightLimit) {
		table.style.height = heightLimit + "px";
	} else {
		table.style.height = "100%";
	}
	
}

function getSize () {
	
	var myWidth = 0;
	var myHeight = 0;
	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;
	}
	return [ myWidth, myHeight ];
	
}