/*******************************************************
FLASH DETECT 2.5
All code by Ryan Parman and mjac, unless otherwise noted.
(c) 1997-2004 Ryan Parman and mjac
http://www.skyzyx.com
*******************************************************/

// This script will test up to the following version.
flash_versions = 20;

// Initialize variables and arrays
var flash = new Object();
flash.installed=false;
flash.version='0.0';

// Dig through Netscape-compatible plug-ins first.
if (navigator.plugins && navigator.plugins.length) {
	for (x=0; x < navigator.plugins.length; x++) {
		if (navigator.plugins[x].name.indexOf('Shockwave Flash') != -1) {
			flash.version = navigator.plugins[x].description.split('Shockwave Flash ')[1];
			flash.installed = true;
			break;
		}
	}
}

// Then, dig through ActiveX-style plug-ins afterwords
else if (window.ActiveXObject) {
	for (x = 2; x <= flash_versions; x++) {
		try {
			oFlash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');");
			if(oFlash) {
				flash.installed = true;
				flash.version = x + '.0';
			}
		}
		catch(e) {}
	}
}

// Create sniffing variables in the following style: flash.ver[x]
// Modified by mjac
flash.ver = Array();
for(i = 4; i <= flash_versions; i++) {
	eval("flash.ver[" + i + "] = (flash.installed && parseInt(flash.version) >= " + i + ") ? true : false;");
}

// BEGIN CUSTOM CODE

// Splash page-specific code.  Loads logo animation.
if ((flash.installed) && (flash.ver[6] == true) && (place == "splash")) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
	document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ');
	document.write(' width="758" height="400" id="pitted_intro" align="">');
	document.write(' <param name="allowScriptAccess" value="sameDomain"> <param name=movie value="f/pitted_intro.swf"> ');
	document.write(' <param name="quality" value="high"> <param name="wmode" value="transparent"> ');
	document.write(' <param name="bgcolor" value="#efe1c6"> <param name="loop" value="false"> '); 
	document.write(' <embed src="f/pitted_intro.swf" loop="false" quality="high" bgcolor="#efe1c6" width="758" height="400" ');
	document.write(' name="pitted_intro" align="" wmode="transparent" allowScriptAccess="sameDomain" ');
	document.write(' type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer" >');
	document.write(' </embed>');
	document.write(' </object>');
}
else {

// Home page-specific code.  Loads picture slide show animation.	
if ((flash.installed) && (flash.ver[6] == true) && (place == "home")) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
	document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ');
	document.write(' width="548" height="308" id="pitted_intro" align="">');
	document.write(' <param name="allowScriptAccess" value="sameDomain"> <param name=movie value="f/home_pics.swf"> ');
	document.write(' <param name="quality" value="high"> <param name="wmode" value="transparent"> ');
	document.write(' <param name="bgcolor" value="#efe1c6"> <param name="loop" value="false"> '); 
	document.write(' <embed src="f/home_pics.swf" loop="false" quality="high" bgcolor="#333" width="548" height="308" ');
	document.write(' name="pitted_intro" align="" wmode="transparent" allowScriptAccess="sameDomain" ');
	document.write(' type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer" >');
	document.write(' </embed>');
	document.write(' </object>');} 
	
	

else {
	document.getElementById('splashMain').className = 'noFlash';
}}