/**

This will set the swf container to either its minimum height (which is the total height of the swf as built) or 100% width and height if viewable space allows.  Always manually set your min-height as the value of "swfMinHeight".

The height of the wrapper will be set based on the sizing of the swfwrapper and the explicitly set height of the billing block (as set in style.css).

 */
 
 
 
function setSwfSize() {

	windowHeight = $(window).height();
	swfMinHeight = 540;
	billingBlockOffset = $('#billingblock').height();

	
	if (swfMinHeight > windowHeight) {	
		$('#swfwrapper').height(swfMinHeight);
	} else {		
		$('#swfwrapper').height(windowHeight);
	}	
	
	revisedSwfWrapperHeight = $('#swfwrapper').height();

	finalHeight = billingBlockOffset + revisedSwfWrapperHeight;
	$('#wrapper').height(finalHeight);
	
};

function loadResize() {
window.moveTo(screen.availLeft, screen.availTop);
window.resizeTo(screen.availWidth, screen.availHeight);
setSwfSize();	
}


$(window).resize(function(){
	setSwfSize();	
});

