// If the user arrived through a fallback link, attempt to reload the page with the flash content
var version = swfobject.getFlashPlayerVersion();		

// If the user has javascript, flash, and a '?' in the url, replace the '?' with a '#' and reload the page. 
if(document.getElementById && version.major > 0 && location.href.indexOf("?") > -1) {
	var newUrl = location.href.replace("?","#");
	if (newUrl.charAt(newUrl.length-1) != "/") newUrl += "/";
	var posAfterHash = newUrl.indexOf('#') + 1;
	if (newUrl.charAt(posAfterHash) != "/") newUrl = newUrl.substring(0,posAfterHash) + '/' + newUrl.substring(posAfterHash);
	location.href = newUrl;
}

if (swfobject.hasFlashPlayerVersion("9.0.28")) {
	var headID = document.getElementsByTagName("head")[0];         
	var cssNode = document.createElement('link');
	cssNode.type = 'text/css';
	cssNode.rel = 'stylesheet';
	cssNode.href = 'css/flash.css';
	cssNode.media = 'screen';
	headID.appendChild(cssNode);
}