// Detect browser for Flash Detect

var userAgent = " " + navigator.userAgent.toLowerCase();
nn = userAgent.indexOf( "mozilla" ) > 0;
if( userAgent.indexOf( "compatible" ) > 0 )
    nn = false;
ie = userAgent.indexOf( "msie" ) > 0;
mac = userAgent.indexOf( "mac" ) > 0;
if(ie && !mac)
	{
	var vb= "";	
      	vb += '<SCR' + 'IPT LANGUAGE=VBScript\> \n';
		vb += 'Function VBFlash() \n';
        vb += 'on error resume next \n';
        vb += 'Dim C \n';
        vb += 'set C = vbNull \n';
        vb += 'Dim tver \n';
        vb += 'set tver = 0 \n';
		vb += 'Dim svr \n';
        vb += 'svr = "ShockwaveFlash.ShockwaveFlash" \n';
        vb += 'set C = CreateObject(svr) \n';
        vb += 'if (IsObject(C)) then \n';
		vb += 'Dim mVer \n';
        vb += 'Dim sVer \n';
        vb += 'Dim cVer \n';
        vb += 'cVer = C.FlashVersion() \n';
        vb += 'mVer = int(cVer / 65536) \n';
        vb += 'sVer = cVer mod 65536 \n';
        vb += 'if (sVer < 100) then sVer = "0" + CStr(sVer) \n';
        vb += 'if (sVer < 10)  then sVer = "0" + CStr(sVer) \n';
        vb += 'tver = CStr(mVer) + ".0" + CStr(sVer) \n';
        vb += 'end if \n';
        vb += 'VBFlash = tver \n';
        vb += 'End Function \n';
      	vb += 'Function VBGetFlashTE \n';
        vb += 'on error resume next \n';
        vb += 'Dim C \n';
        vb += 'set C = vbNull \n';
        vb += 'Dim svVer \n';
        vb += 'set svVer = 0 \n';
        vb += 'For i = 10 To 1 Step -1 \n';
        vb += 'Dim svr \n';
        vb += 'svr = "ShockwaveFlash.ShockwaveFlash." + CStr(i) \n';
        vb += 'set C = CreateObject(svr) \n';
        vb += 'if (IsObject(C)) then \n';
        vb += 'svVer = i \n';
        vb += 'Exit For \n';
        vb += 'end if \n';
        vb += 'Next \n';
        vb += 'VBGetFlashTE = svVer \n';
        vb += 'End Function \n';
	vb += '</SCR' + 'IPT\> \n';
	document.write(vb);
	}
    if(ie && !mac)
		{
	      	var fVer = VBFlash() || 0;
		if (fVer == 3.0008){var svVer = VBGetFlashTE();
        	if (svVer > fVer){fVer = 4.0000;}}
		else if (!fVer){fVer = VBGetFlashTE() || 0;}
		else if (fVer == 4){fVer = 4.0015;}}
    else{var fVer=0;}
      function setF()
      {arr = navigator.plugins;arrl = arr.length;
        for (var i=0; i < arrl; i++){plug = arr[i];desc   = plug.description;
          if (desc.indexOf("Shockwave Flash ") != -1){var vLoc = desc.indexOf("Shockwave Flash ");
            var vStr = desc.substring(vLoc + 16,desc.length);var sVer;var mVer;vLoc = vStr.indexOf(" r");
            if (vLoc != -1){mVer = vStr.substring(0,vLoc);sVer = vStr.substring(vLoc + 2,vStr.length);
            fnVer = parseFloat(mVer + (sVer < 100 ? "0" : "") + (sVer < 10 ? "0" : "") + sVer);}
            else{fnVer = parseFloat(vStr);}}}}
var fnVer = 0;
setF();
var myFlash;
if(!fVer || fVer==0){myFlash=fnVer;}
else{myFlash=fVer;}
function hasFlash(bVer){if(myFlash<bVer){return false;}else{return true;}}
flashEnabled = hasFlash(7);

function drawQuicktime ( qtPath, staticPath, width, height, url ) {
	if( quicktime != "FALSE" ){
		document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="' + width + '" height="' + height + '" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0">' );
		document.write('  <param name="src" value="' + qtPath + '">' );
		document.write('  <param name="loop" value="true">' );
		document.write('  <param name="controller" value="true">' );
		document.write('<embed src="' + qtPath + '" width="' + width + '" height="' +  height + '" loop="TRUE" controller="TRUE" pluginspage="http://www.apple.com/quicktime/download/"></embed>' );
		document.write('</object>' );
	} else {
		document.write('<a href="http://www.apple.com/quicktime/download/" target="_blank"><img src="' + staticPath + '" width="' + width + '" height="' + height + '" border="0" /></a>' );
	}
}
/********************************************************
	SWF Animation, Version 1.0
	10/26/05
	functions below for displaying animations in the specs charts
********************************************************/
function drawSpecsFlash( swfName ){
	document.getElementById("feature_flash").style.display='block';
	document.getElementById("feature_flash").style.left='130px';
	var thisFeature = swfName;
	var fo = new FlashObject("/swf/animationShellSpecs.swf", "mymovie", "614", "254", "7", "#fff");
	fo.addParam("quality", "best");
	fo.addParam("allowScriptAccess", "sameDomain");
	fo.addParam("wmode", "transparent");
	fo.addParam("salign", "t");
	fo.addVariable("currSwf", thisFeature);
	fo.write("feature_flash");
}

function drawTransparentAsset( swfPath, imgPath, width, height, url, notTrans ) {

	if (flashEnabled) {
			document.write('	<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" height="' + height + '" width="' + width + '">' );
			document.write('		<param name="allowScriptAccess" value="sameDomain" />' );
			document.write('		<param name="movie" value="' + swfPath + '">' );
			document.write('		<param name="quality" value="high">' );
			document.write('		<param name="play" value="true">' );

			if (! notTrans) {
				document.write('		<param name="wmode" value="transparent">' );
			}			
			
			document.write('		<param name="bgcolor" value="#ffffff" />' );
			document.write('		<embed pluginspage="http://www.macromedia.com/go/getflashplayer" src="' + swfPath + '" type="application/x-shockwave-flash" height="' + height + '" width="' + width + '" play="true" quality="high" bgcolor="#ffffff" allowscriptaccess="sameDomain"' );
			if (! notTrans) {
				document.write(' wmode="transparent" ');
			}
			document.write('>' );
			document.write('	</object>' );
			
	} else { // no Flash
			
		if (!url) {
			if(imgPath == "/img/iBanner.gif"){
				document.write('<img src="' + imgPath + '" width="' + width + '" height="113" border="0" usemap="#ibanner" />' );
			} else {
				document.write('<a href="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"><img src="' + imgPath + '" width="' + width + '" height="' + height + '" border="0" /></a>' );
			}
		} else if (url=="NOURL") { // * note special case
			document.write('<img src="' + imgPath + '" width="' + width + '" height="' + height + '" border="0" />' );
		} else {
			if(imgPath == "/img/iBanner.gif"){
				document.write('<img src="' + imgPath + '" width="' + width + '" height="113" border="0" usemap="#ibanner" />' );
			} else {
				document.write('<a href="' + url + '"><img src="' + imgPath + '" width="' + width + '" height="' + height + '" border="0" /></a>' );
			}
		}
	}
}

//function drawTransparentAsset2( swfPath, imgPath, width, height, url, wmode, bgcol) {
function drawTransparentAsset2(swfPath) {

	// ADDED WMODE PARAM: legal values are "transparent", "opaque", or empty
//	if (bgcol == undefined) bgcol= "#ffffff";

//	if (flashEnabled) {
//			document.write('	<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" height="' + height + '" width="' + width + '">' );
			document.write('	<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" height="100%" width="100%">' );
//			document.write('		<param name="allowScriptAccess" value="sameDomain" />' );
			document.write('		<param name="movie" value="' + swfPath + '">' );
			document.write('		<param name="quality" value="high">' );
			document.write('		<param name="play" value="true">' );
//			document.write('		<param name="wmode" value="' + wmode + '">' );
//			document.write('		<param name="bgcolor" value="' + bgcol + '" />' );
//			document.write('		<embed pluginspage="http://www.macromedia.com/go/getflashplayer" src="' + swfPath + '" type="application/x-shockwave-flash" height="' + height + '" width="' + width + '" play="true" quality="high" bgcolor="' + bgcol + '" allowscriptaccess="sameDomain" wmode="' + wmode + '">' );
			document.write('		<embed pluginspage="http://www.macromedia.com/go/getflashplayer" src="' + swfPath + '" type="application/x-shockwave-flash" height="100%" width="100%" play="true" quality="high" wmode="opaque">' );
//			document.write('');
//			document.write('');
			document.write('	</object>' );
/*			
	} else { // no Flash
			
		if (!url) {
			if(imgPath == "/img/iBanner.gif"){
				document.write('<img src="' + imgPath + '" width="' + width + '" height="113" border="0" usemap="#ibanner" />' );
			} else {
				document.write('<a href="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"><img src="' + imgPath + '" width="' + width + '" height="' + height + '" border="0" /></a>' );
			}
		} else if (url=="NOURL") { // * note special case
			document.write('<img src="' + imgPath + '" width="' + width + '" height="' + height + '" border="0" />' );
		} else {
			if(imgPath == "/img/iBanner.gif"){
				document.write('<img src="' + imgPath + '" width="' + width + '" height="113" border="0" usemap="#ibanner" />' );
			} else {
				document.write('<a href="' + url + '"><img src="' + imgPath + '" width="' + width + '" height="' + height + '" border="0" /></a>' );
			}
		}
	}
*/
}

function drawTransparentAsset3(swfPath) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%">');
	document.write('  <param name="movie" value="' + swfPath + '">');
	document.write('  <param name="quality" value="high">');
	document.write('  <param name="play" value="true">' );
	document.write('  <embed src="' + swfPath + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="100%" play="true" wmode="opaque"></embed>');
	document.write('</object>');
}

