function resize()
{
	$width = Math.max(window.minWidth, getBodyWidth());
	$height = Math.max(window.minHeight, getBodyHeight());

	if (isNaN($width) || isNaN($height)) return;

	$movie = document.getElementById('flash');
	$movie.style.width = (getBodyWidth() < window.minWidth ? $width + 'px' : '100%');
	$movie.style.height = (getBodyHeight() < window.minHeight ? $height + 'px' : '100%');
}

function getBodyWidth() { return document.body.clientWidth; }
function getBodyHeight() { return document.body.clientHeight; }
function setMinHeight($height) { window.minHeight = $height; resize() }
function setMinWidth($width) { window.minWidth = $width; resize() }

$movie = new SWFObject('index.swf', 'flash', '100%', '1000', '8', '#000000');
$movie.addParam('menu', 'true');
$movie.addParam('quality', 'high');
$movie.addParam('allowScriptAccess', 'always');
$movie.addParam('allowFullScreen', 'true');
$movie.addVariable('historyTitle', 'Latin Vibes');
$movie.addVariable('path', document.location.href.split('#').shift());
$movie.write('content');