

var flashvars = { };

var params = {
	bgColor: '#FFFFFF',
	menu: false,
	scale: 'noscale',
	allowFullScreen: true,
	allowScriptAccess: 'always'
};

var attributes = {
	id: 'flashSite',
	name: 'flashSite'
};

swfobject.embedSWF("/assets/swf/site.swf", "flashWrap", "100%", "101%", "9.0.0", "/assets/swf/expressInstall.swf", flashvars, params, attributes);

jQuery(document).ready(function() {
	
	// Nothing
	
});

var cHeight = -1;
var cWidth = 840;
var listenerAdded = false;

function onResize() {
	
	var newHeight = $(window).height() + 1;
	var newWidth = $(window).width();
	
	if (newHeight > cHeight) {
		$('#flashSite').css('height', newHeight);
	}
	
	if (newWidth > cWidth) {
		$('#flashSite').css('width', newWidth);
		//alert("window width greater than flash: " + newWidth);
	} else {
		$('#flashSite').css('width', cWidth);
		//alert("flash width greater than window: " + cWidth);
	}
	
}

function setSize(h) {
	//var elm = swfobject.getObjectById('flashSite');
	//elm.height = value;
	//var wWidth = $(window).width();
	var wHeight = $(window).height() + 1;
	
	/*
	if (w > wWidth) {
		$('#flashSite').css('width', w);
		cWidth = w;
	} else {
		$('#flashSite').css('width', wWidth);
		cWidth = wWidth;
	}
	*/
	
	if (h > wHeight) {
		$('#flashSite').css('height', h);
		cHeight = h;
	} else {
		$('#flashSite').css('height', wHeight);
		cHeight = wHeight;
	}
	
	if (!listenerAdded) {
		
		$(window).bind('resize', onResize);
		listenerAdded = true;
		
	}
	//alert("flash woo");
	onResize();
	
}

