
function setFlashWidth(divid, newW){
	$(divid).setStyle('width', newW);
	
}
function setFlashHeight(divid, newH){
	$(divid).setStyle('height', newH);		
}
function setFlashSize(divid, newW, newH){
	$(divid).setStyle('width', newW);
	$(divid).setStyle('height', newH);
}


var rightPadding=100, bottomPadding=50;

function adjustHeight() {
		
	var targetElement = $('background');
	var	contElement = $('pageBottom');
	
	if (targetElement && contElement) {
		
		var documentDims = window.document.getSize();
		
		var contentHeight = contElement.getPosition().y+bottomPadding;
		var contentWidth = 902;
		
		if (contentHeight>documentDims.y) targetElement.setStyle('height', contentHeight);
		else targetElement.setStyle('height', '100%');
		
		if (contentWidth>documentDims.x)targetElement.setStyle('width', contentWidth);
		else targetElement.setStyle('width', '100%');
	}
}

function horizontalScrollbar() {
	var wW = $(window).getSize();
	var body= document.getElementsByTagName('body')[0];
	if (wW.x <= 1162 && wW.x >= 962) {
	//alert(wW.x);
		body.setStyle('overflow-x', 'hidden');
	}
	else {
		body.setStyle('overflow-x', 'auto');
	}
}

function doBoth() {
	adjustHeight();
	horizontalScrollbar();
}

window.onresize=doBoth;
window.onload=doBoth;