
// Major version of Flash required
var requiredMajorVersion = Number("9");
// Minor version of Flash required
var requiredMinorVersion = Number("0");
// Minor version of Flash required
var requiredRevision = Number("124");
function showNoFlash() {
	document.body.className = "on";
	var html = '<div class="no-flash-content">\
			<h3>Your computer requires flash to view this site.</h3>\
			<p>\
			Russell Outdoors APXG2 provides layers of protection from the elements.\
			</p><p>\
			To experience the gear and how it works download the latest version of flash here.\
			</p>\
			<a href="http://get.adobe.com/flashplayer/" class="flash-url"><span>Install Flash</span></a>\
			<a href="http://www.russelloutdoorsgear.com/" target="_blank" class="footer1"></a>\
      	<a href="http://www.russelloutdoorsgear.com/portal/site/russelloutdoors/privacy" target="_blank" class="footer2"></a>\
			</div>';
	var noFlash = document.getElementById('no-flash');
	noFlash.innerHTML = html;
	noFlash.style.display = 'block';
	noFlash.style.height = "500px";
	document.getElementById('flash-ok').style.display = 'none';
	//document.write("<style>#no-flash {background:transparent url(./images/accessories.png);}</style>");
}
var hasProductInstall = DetectFlashVer(6, 0, 65);

// Version check based upon the values defined in globals
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
function loadApp(id) {
	//return true;
	var hash = document.location.hash.toString().replace('#','');
	if (hash != "") id = hash;
	
	if (hash == 'shownoflash') {
		showNoFlash();
		return;
	} 
	if ( hasProductInstall && !hasRequestedVersion ) {
      showNoFlash();
      return;
      // var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
      // var MMredirectURL = window.location;
      //        document.title = document.title.slice(0, 47) + " - Flash Player Installation";
      //        var MMdoctitle = document.title;
      //    
      // AC_FL_RunContent(
      //    "src", "playerProductInstall",
      //    "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
      //    "width", "100%",
      //    "height", "100%",
      //    "align", "middle",
      //    "id", "Main",
      //    "quality", "high",
      //    "wmode","transparent",
      //    "name", "Main",
      //    "allowScriptAccess","sameDomain",
      //    "type", "application/x-shockwave-flash",
      //    "pluginspage", "http://www.adobe.com/go/getflashplayer"
      // );
	} else if (hasRequestedVersion) {
		// if we've detected an acceptable version
		// embed the Flash Content SWF when all tests are passed
		AC_FL_RunContent(
				"src", "prepreloader",
				"width", "100%",
				"height", "100%",
				"align", "middle",
				"id", "RussellOutdoor",
				"wmode", "opaque",
				"quality", "high",
				"name", "Main",
				"allowScriptAccess","sameDomain",
				"flashVars","id="+id,
				"type", "application/x-shockwave-flash",
				"pluginspage", "http://www.adobe.com/go/getflashplayer"
		);
	} else {  // flash is too old or we can't detect the plugin
		showNoFlash();
	}
	
}
function showBackground() {
	return;
}
function changeHash(hash) {
	document.location.hash = hash;
}
function stopEvent(e) {
	var event = e || window.event;
	if (event.stopPropagation) event.stopPropagation();
	else event.cancelBubble = true;
}