// JavaScript Document
/*
------------------
Funções para ultrapassar o problema do 'Click to Activate this Control'
introduzido pela Microsoft no IE, e que obriga o utilizador a clicar em qualquer elemento 
APPLET, EMBED, ou OBJECT

+++
Users cannot directly interact with Microsoft ActiveX controls 
loaded by the APPLET, EMBED, or OBJECT elements. 
-----------
Autor: Sensoria (Rui Peixoto)
URL: www.sensoria.pt
DATA: 2006-04-20
*/

function loadSWFObject(fileName, fileParams, width, height) {
	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" ')
	document.write('width="' + width + '"')
	document.write(' height="' + height + '"')
	document.write('>')
	document.write('		<param name="movie" value="' + fileName + fileParams + '">')
	document.write('		<param name="quality" value="high">')
	document.write('		<embed src="' + fileName + fileParams + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"')
	document.write(' width="' + width + '"')
	document.write(' height="' + height + '">')
	document.write('</embed></object>')
	
}

function loadEmbedObject(fileName, fileParams, width, height) {
	strFileExtension = fileName.substr(fileName.lastIndexOf(".") + 1)
	if (strFileExtension.toUpperCase() == "SWF") {
		loadSWFObject(fileName, fileParams, width, height)
	}
}
