function addEvent(obj, evType, fn, useCapture){
	if(obj.addEventListener){
		obj.addEventListener(evType, fn, useCapture);
		return true;
	} 
	else if (obj.attachEvent){
		var r = obj.attachEvent("on"+evType, fn);
		return r;
	}
}

function download(url){
	window.open(url, "_blank");
}

function aviso(){

	Shadowbox.init({ overlayOpacity: 0.9, overlayColor: '#000000', skipSetup: true, modal: false });
	
	Shadowbox.open({
				   
		player:     'iframe',
		title:      'AVISO / DISCLAIMER',
		content:    '../home/aviso.asp',
		height:     280,
		width:      640
		
	});
}

function disclaimer(){

	Shadowbox.init({ overlayOpacity: 0.9, overlayColor: '#000000', skipSetup: true, modal: false });

	Shadowbox.open({
		player:     'iframe',
		title:      'DISCLAIMER / AVISO IMPORTANTE',
		content:    '../home/disclaimer.asp',
		height:     210,
		width:      515
	});
}

function disclaimer_confirmar(){

	Shadowbox.init({ overlayOpacity: 0.9, overlayColor: '#000000', skipSetup: true, modal: false });
	
	Shadowbox.open({
		player:     'iframe',
		title:      'DISCLAIMER / AVISO IMPORTANTE',
		content:    '../home/disclaimer_confirmar.asp',
		height:     510,
		width:      700
	});
}


function abremenu()
{
	$("#div_menu").css("clip", "rect(0 400px 1300px 0)");
}
function fechamenu()
{
	$("#div_menu").css("clip", "rect(0 162px 1300px 0)");
}

function flash(movie, flashvars, width, height, retorna){
	swfid = movie.split("/");
	swfid = swfid[swfid.length-1].replace(".swf", "");

	strSWF= '<object id="' + swfid + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '">'+
			'<param name="movie" value="' + movie + '">'+
			'<param name="quality" value="high">'+
			'<param name="wmode" value="transparent">'+
			'<param name="FlashVars" value="' + flashvars + '">'+
			'<embed name="' + swfid + '" src="' + movie + '" width="' + width + '" height="' + height + '" flashvars="' + flashvars + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>'+
			'</object>';
	if(!retorna) this.document.write(strSWF);
	else return(strSWF);
}

$(document).ready(function()
{
	if(DetectFlashVer(8, 0, 0))
	{
		$(".titulo_grande").each(function()
		{
			$(this).html(flash("../../imagens/titulos_internas.swf", "titulo=" + $(this).text(), 500, 25, true));
		});
	}
});
