var useRedirect = false; 			// "true" loads new flash or non-flash page into browser
					// "false" embeds movie or alternate html code into current page
var flashInstalled = false;		// boolean. true if flash * is installed
var hasRightVersion = false;		// boolean. true if it's safe to embed the flash movie in the page

var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;		// true if we're on ie
var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false; // true if we're on windows


// write vbscript detection if we're not on mac.
if(isIE && isWin){ // don't write vbscript tags on anything but ie win
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('flashInstalled = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
	document.write('</SCR' + 'IPT\> \n'); // break up end tag so it doesn't end our script
}
// -->

// next comes the standard javascript detection that uses the navigator.plugins array
// we pack the detector into a function so it loads before we run it

function detectFlash(){	

	if (navigator.plugins){								// does navigator.plugins exist?
		if ( flashInstalled ||navigator.plugins["Shockwave Flash 2.0"] 	// yes>> then is Flash 2 
		|| navigator.plugins["Shockwave Flash"]){		// or flash 3+ installed?
			hasRightVersion = true;						// ATENCAO : soó verifica se tem flash,nao está a verificar a versao!!!!

		}
	}
	

}

detectFlash();	// call our detector now that it's safely loaded.	
	
