<!--
	/*******************************************************
	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
	Additional code by Semantic: www.semantic.co.uk
	*******************************************************/
	
	// 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';
	
	
	var isOpera = window.opera ? true : false;
	var doDetection = true;
	
	if(isOpera) {
		
		//detect version 9,10 or 11
		if(navigator.userAgent.indexOf("Opera/9")!=-1 || navigator.userAgent.indexOf("Opera/10")!=-1 || navigator.userAgent.indexOf("Opera/11")!=-1) {
			doDetection = true;
		} else {
			doDetection = false;
		}
	}
	
	if(doDetection) {
	
		// 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;");
		}
	
	} else {
		
		// turn flash support off for all versions
		flash.ver = Array();
		for(i = 4; i <= flash_versions; i++) {
			flash.ver[i] = false;
		}
		
	}



// Flash functions

	function embedFlashMovie(getID,getPath,getWidth,getHeight,getTransparency,getReturn) {
		// embed flash movie
		flashString = "<object id='" + getID + "' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=8,0,0,0' width='" + getWidth + "' height='" + getHeight + "'>";
		flashString += "<param name='movie' value='" + getPath + "'><param name='quality' value='high'>";
		if(getTransparency) flashString += "<param name='wmode' value='transparent'>";
		flashString += "<embed name='" + getID + "' src='" + getPath + "' ";
		if(getTransparency) flashString += "wmode='transparent' ";
		flashString += "quality='high' pluginspage='http:\/\/www.macromedia.com\/go\/getflashplayer' type='application\/x-shockwave-flash' width='" + getWidth + "' height='" + getHeight + "' \/>";
		flashString += "<\/object>";
		if(getReturn) {
			return flashString;
		} else {
			document.write(flashString);
		}
	}
	

// -->
	
