<!--
var Flash = {}

Flash.isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
Flash.isWindows = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
Flash.isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

// JavaScript helper required to detect Flash Player PlugIn version information
Flash.FlashWithJavascript = function (i){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
      		var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			descArray = flashDescription.split(" ");
			tempArrayMajor = descArray[2].split(".");
			versionMajor = tempArrayMajor[0];
			versionMinor = tempArrayMajor[1];
			if ( descArray[3] != "" ) {
				tempArrayMinor = descArray[3].split("r");
			} else {
				tempArrayMinor = descArray[4].split("r");
			}
      		versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
            flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
      	} 
		else { flashVer = -1; }
	}
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;// older WebTV supports Flash 2
	// Can't detect in all other cases
	else { flashVer = -1; }
	return flashVer;
} 

Flash.FlashVersion = function () {
 	// loop backwards through the versions until we find the newest version	
	for (i=25;i>0;i--) {	
		if (Flash.isIE && Flash.isWindows && !Flash.isOpera) {
			versionStr = VBGetSwfVer(i);
		} else {
			versionStr = Flash.FlashWithJavascript(i);		
		}
		if (versionStr == -1 ) { 
			return [0, 0];
		} 
		else if (versionStr != 0) {
			if(Flash.isIE && Flash.isWindows && !Flash.isOpera) {
				tempArray         = versionStr.split(" ");
				tempString        = tempArray[1];
				versionArray      = tempString .split(",");				
			} 
			else { versionArray      = versionStr.split("."); }
			versionMajor      = versionArray[0];
			versionMinor      = versionArray[1];
			
			return [versionMajor, versionMinor];     	
		}
	}
}

Flash.loadSwf = function (parentNode, relPath, movieWidth, movieHeight, align, salign, flashVars){
	if(!flashVars || flashVars.length==0) { flashVars = ""; }
	var flashObject = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" type="application/x-shockwave-flash" data="' + relPath + '?relPath=' + relPath + '" '
	    + 'width="' + movieWidth + '" height="' +  movieHeight + '" '
	    + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
		+ '<param name="allowScriptAccess" value="always" />'
	    + '<param name="movie" value="' + relPath + '" />'
	    + '<param name="quality" value="high" />'
	    + '<param name="wmode" value="transparent" />'
		+ '<param name="scale" value="noscale" />'
		+ '<param name="flashvars" value="' + flashVars +'" />'
		+ '<param name="salign" value="' + salign +'" />'
	    + '<param name="bgcolor" value="#fff" />'
	    + '<embed src="' + relPath + '" quality="high" wmode="transparent" bgcolor="#fff" '
	     + 'width="' + movieWidth + '" height="' +  movieHeight + '" name="movie01" align="' + align +'" scale="noscale" salign="' + salign +'"  '
	    + 'play="true"'
	    + 'loop="false"'
	    + 'quality="high"'
	    + 'allowScriptAccess="always"'
	    + 'type="application/x-shockwave-flash"'
	    + 'pluginspage="http://www.macromedia.com/go/getflashplayer"'
		+ ' flashvars="' + flashVars + '"> '
	    + '<\/embed>'
	    + '<\/object>';
		
		parentNode.innerHTML = flashObject;	   
}
//-->
