var flashvars = {
	xmlPath: 'heist.xml'
};
var params = {
	bgcolor: 'F2F2F2',
	scale: 'noscale',
	allowfullscreen: 'true',
	salign: 'tl'
};
var attributes = {
  id: 'heist_flash',
  name: 'heist_flash'
};

swfobject.embedSWF('heist.swf', 'body', '1003', '715', '9.0.115', false, flashvars, params, attributes);

window.addEvent('domready', function () {
	if (!swfobject.hasFlashPlayerVersion('9.0.115')) {
		var div  = new Element('div');
		div.set('html', '<a href="http://www.adobe.com/go/getflashplayer">This site requires Flash Player 9. Please click here to upgrade.</a>');
		
		div.inject($('body'), 'top');
	} else {
		if (window.location.pathname != '/') {
			window.location = '/#' + window.location.pathname;
		} else {
			swffit('heist_flash', 1003, 1);
		}
	}
});

window.addEvent('load', function() {
	if (screen.availWidth <= 1024 || document.body.offsetWidth < 1003 || document.body.offsetHeight < 605) {
		window.moveTo(0, 0);
		window.resizeTo(screen.availWidth, screen.availHeight);
	}
});