
/////////////////////////////////////////////////////////
//Flash Replacement.js (FR)
//CONSTRUTOR FLASH
function Titulo( targetEl, texto, color, size, italico, filter, width, height, linkComponente )
{
	this.targetEl = targetEl;
	this.texto = texto;
	this.color = color;
	this.size = size;
	this.italico = italico;
	this.filter = filter;
	this.width = width;
	this.height = height;
	this.linkComponente = linkComponente;
	this.id = Titulo.refs.length;
	if( targetEl != 'undefined' && targetEl != null && targetEl != ''){
		Titulo.refs.push(this);
		this.montar();
	}
}

//REFERENCIAS
Titulo.refs = [];

//EVENTOS DO FLASH
Titulo.prototype.dispatch = function (ev)
{
	this.events[ ev.type ]( ev );	
}

//CRIA FLASH NO HTML
Titulo.prototype.montar = function ()
{
	with(this)
	{
		var so = new SWFObject("/brnetwork/export/sites/default/bn/global/swf/titulo.swf", "objTit_" + id, width, height, "8", "#FFFFFF");
		so.addVariable("flashId", id);
		so.addVariable("c", color);
		so.addVariable("s", size);
		so.addVariable("t", texto);
		so.addVariable("i", italico);
		so.addVariable("f", filter);
		so.addVariable("l", linkComponente);
		so.addParam("wmode", "transparent");
		so.addParam("scale", "noscale");
		so.addParam("menu", "false");
		so.doCache = false;
		targetEl.innerHTML = so.getSWFHTML();

		so.setAttribute("redirectUrl", "/bn-site-des2/opencms/bn/semFlash.html");

	}
}
//PILHA DE EVENTOS
Titulo.prototype.events = new Object();

//ADICIONA EVENTOS NA PILHA
Titulo.prototype.addListener = function ( type, listener )
{
	this.events[ type ] = listener;	
}

$( function()
{
	if ( parseInt( deconcept.SWFObjectUtil.getPlayerVersion().major ) < 7 )
		window.location.href = "/brnetwork/opencms/bn/semFlash.html";
})