//declaração de constantes
var cstMouseover = "mouseover"
var cstMouseout = "mouseout"
var cstClick = "click"
var cstKeyup = "keyup"
var cstNone = "none"
var cstFechar = "fechar"
var cstAbrir = "abrir"
var cstRadio = "radio"
var cstCheckbox = "checkbox"
var cstRed = "red"
var cstGreen = "green"
var cstBlue = "blue"
ie = (document.all)? true:false;
// Compatibilizando o event.type para Mozilla
function MOZEventHandlers(_eventos){var i; for (i=0; i< _eventos.length; i++){document.addEventListener(_eventos[i], function(e){window.event = e;}, true);}}
if(!document.all){MOZEventHandlers(["click","mousedown","mouseup","mouseover","mouseout","mousemove","keyup","keydown","load","focus","blur"]);}
//-->
// Trocar idioma
function abrirIdioma(){
	var objDiv = document.getElementById("div_idioma");
	if(window.event && event.type == cstMouseover){
	    if( objDiv.childNodes.length > 1 ){
		    objDiv.style.display = "";
		}
	}else if(window.event && event.type == cstMouseout){
		objDiv.style.display = "none";
	}
}
function linkIdioma(id){
	var objId = document.getElementById(id);
	if(window.event && event.type == cstMouseover){
		objId.className = "idio_linhaItem idio_linhaItem_hover";
	}else if(window.event && event.type == cstMouseout){
		objId.className = "idio_linhaItem";
	}
}
// Lista
function lista(id){
	try{
		if(document.getElementById(id+"_resposta")){
			var objResposta = document.getElementById(id+"_resposta");
			var objSeta = document.getElementById(id+"_seta");
			if(objSeta.src.lastIndexOf("fechado") > -1){
				objResposta.style.display = "block";
				objSeta.src = objSeta.src.substring(0,objSeta.src.lastIndexOf("_"))+"_aberto.gif";
			}else{
				objResposta.style.display = "none";
				objSeta.src = objSeta.src.substring(0,objSeta.src.lastIndexOf("_"))+"_fechado.gif";
			}
		}
	}catch(e){
	}
}
// Parcela de pedido
var objParcelas = null;
function abrirParcelas(id){
	var objId = document.getElementById(id);
	var objImpressao = document.getElementById(id+"_impressao");
	var objDisplay = (ie)? "block":"table-row";
	if(objId.style.display == objDisplay){
		objId.style.display = "none";
		objImpressao.src = "imagens/ico_abrir_impressao.gif";
		objImpressao.onmouseover = function(){callHint(objImpressao.getAttribute("hintAbrir"))};
	}else if(objId.style.display != objDisplay){
		if(objParcelas != null && objParcelas != id){
			var objImpressaoAnterior = document.getElementById(objParcelas);
			objImpressaoAnterior.style.display = "none";
			objImpressaoAnterior.src = "ico_abrir_impressao.gif";
			objImpressaoAnterior.onmouseover = function(){callHint(objImpressaoAnterior.getAttribute("hintAbrir"))};
		}
		objId.style.display = objDisplay;
		objImpressao.src = "imagens/ico_fechar_impressao.gif";
		objImpressao.onmouseover = function(){callHint(objImpressao.getAttribute("hintFechar"))};
		objParcelas = id;
	}	
}
//Vizualizar Produtos do Beneficiario
function abrirProdutos(id){
	var objId = document.getElementById(id);
	var objImpressao = document.getElementById(id+"_impressao");
	var objDisplay = (ie)? "block":"table-row";
	if(objId.style.display == objDisplay){
		objId.style.display = "none";
		objImpressao.src = "imagens/ico_abrir_zoom.gif";
		objImpressao.onmouseover = function(){callHint(objImpressao.getAttribute("hintAbrir"))};
	}else if(objId.style.display != objDisplay){
		objId.style.display = objDisplay;
		objImpressao.src = "imagens/ico_fechar_zoom.gif";
		objImpressao.onmouseover = function(){callHint(objImpressao.getAttribute("hintFechar"))};
	}
}
// Faq
var objFaq = null;
function faq(id){
	try{
		if(document.getElementById(id+"_resposta")){
			var objResposta = document.getElementById(id+"_resposta");
			var objSeta = document.getElementById(id+"_seta");
			if(objSeta.src.lastIndexOf("fechado") > -1){
				if(objFaq != null && objFaq != id){
					document.getElementById(objFaq+"_resposta").style.display = "none";
					document.getElementById(objFaq+"_seta").src = document.getElementById(objFaq+"_seta").src.substring(0,document.getElementById(objFaq+"_seta").src.lastIndexOf("_"))+"_fechado.gif";
				}
				objResposta.style.display = "block";
				objSeta.src = objSeta.src.substring(0,objSeta.src.lastIndexOf("_"))+"_aberto.gif";
				objFaq = id;
			}else{
				objResposta.style.display = "none";
				objSeta.src = objSeta.src.substring(0,objSeta.src.lastIndexOf("_"))+"_fechado.gif";
			}
		}
	}catch(e){
	}
}
// Menu lateral
var menuSelecionado;
var menuSelecionadoExcecao;
function menu(id){
	try{
		if(document.getElementById(id)){
			var objId = document.getElementById(id);
			if(objId.className.lastIndexOf("selected") == -1){
				if(window.event && event.type == cstMouseover){
					if(objId.className.indexOf("ms_texto") > -1){
						objId.className = "ms_texto ms_texto_hover";
					}else if(objId.className.indexOf("menu_item_destaque") > -1){
						objId.className = "menu_item menu_item_destaque_hover menu_item_hover";
					}else if(objId.className.indexOf("menu_item") > -1){
						objId.className = "menu_item menu_item_hover";
					}
				}else if(window.event && event.type == cstMouseout){
					if(objId.className.indexOf("ms_texto") > -1){
						objId.className = "ms_texto";
					}else if(objId.className.indexOf("menu_item_destaque") > -1){
						objId.className = "menu_item menu_item_destaque";
					}else if(objId.className.indexOf("menu_item") > -1){
						objId.className = "menu_item";
					}
				}else{
					// Desmarcar menu superior ou esquerdo
					if(document.getElementById(id).getAttribute("excecao") && document.getElementById(id).getAttribute("excecao") != null){
						if(document.getElementById(menuSelecionadoExcecao)){
							if(document.getElementById(menuSelecionadoExcecao).className == "ms_texto ms_texto_selected"){
								document.getElementById(menuSelecionadoExcecao).className = "ms_texto";
							}else if(document.getElementById(menuSelecionadoExcecao).className == "menu_item menu_item_destaque_selected menu_item_selected"){
								document.getElementById(menuSelecionadoExcecao).className = "menu_item menu_item_destaque";
							}else if(document.getElementById(menuSelecionadoExcecao).className == "menu_item menu_item_selected"){
								document.getElementById(menuSelecionadoExcecao).className = "menu_item";
							}
						}
						menuSelecionadoExcecao = id;
					}else{
						if(document.getElementById(menuSelecionado)){
							if(document.getElementById(menuSelecionado).className == "ms_texto ms_texto_selected"){
								document.getElementById(menuSelecionado).className = "ms_texto";
							}else{
								document.getElementById(menuSelecionado).className = "menu_item";
							}
						}
						menuSelecionado = id;
					}
					if(objId.className.indexOf("ms_texto") > -1){
						objId.className = "ms_texto ms_texto_selected";
					}else if(objId.className.indexOf("menu_item_destaque") > -1){
						objId.className = "menu_item menu_item_destaque_selected menu_item_selected";
					}else{
						objId.className = "menu_item menu_item_selected menu_item menu_item_destaque_hover menu_item_hover";
					}
				}
			}
		}else if(document.getElementById(menuSelecionado)){
			if(document.getElementById(menuSelecionado).className == "ms_texto ms_texto_selected"){
				document.getElementById(menuSelecionado).className = "ms_texto";
			}else if(document.getElementById(menuSelecionado).className == "menu_item menu_item_destaque_selected menu_item_selected"){
				document.getElementById(menuSelecionado).className = "menu_item menu_item_destaque";
			}else if(document.getElementById(menuSelecionado).className == "menu_item menu_item_selected"){
				document.getElementById(menuSelecionado).className = "menu_item";
			}
		}
	}catch(e){}
}
// Adicionar da página de detalhes
function ad(id){
	try{
		var objId = document.getElementById(id);
		var objIdRadio = document.getElementById(id+"_radio");
		var objIdDescricao = document.getElementById(id+"_descricao");
		if(event.type == cstMouseover && objId.className.lastIndexOf("selected") == -1){
			objId.className = "ad_detalhePreco_item ad_detalhePreco_item_hover";
		}else if(event.type == cstMouseout && objId.className.lastIndexOf("hover") > -1){
			objId.className = "ad_detalhePreco_item";
		}else if(event.type == cstClick && objId.className.lastIndexOf("selected") == -1){
			var y = 1;
			for(var x = 0; x < y; x++){
				if(document.getElementById("ad_opcao_"+(y + 1))){
					y++;
				}
				if(document.getElementById("ad_opcao_"+(x + 1)).className.lastIndexOf("selected") > -1){
					document.getElementById("ad_opcao_"+(x + 1)).className = "ad_detalhePreco_item";
					document.getElementById("ad_opcao_"+(x + 1)+"_descricao").style.fontWeight = "normal";
					document.getElementById("ad_opcao_"+(x + 1)+"_radio").checked = false;
				}
			}
			objId.className = "ad_detalhePreco_item ad_detalhePreco_item_selected";
			objIdDescricao.style.fontWeight = "bold";
			objIdRadio.checked = true;
		}
	}catch(e){
	}
}
// Menu Formas de Pagamento
function forChange(id){
	var objSelect = document.getElementById(id);
	for(var x=0; x < objSelect.options.length; x++){
		if(objSelect.options[x].selected == "selected" || objSelect.options[x].selected){
			forSelected(x,id);
		}
	}
}
function forSelected(selected,id){
	var objSelect = document.getElementsByTagName("select");
	for(var x=0; x < objSelect.length; x++){
		if(objSelect[x].getAttribute("identificador") != null){
			var objIndex = objSelect[x].id.substring(0,objSelect[x].id.lastIndexOf("_clickSelect")-1);
			var objSelectIndex = document.getElementById(objIndex+objSelect[x].getAttribute("identificador"));
			objSelectIndex.setAttribute("valor",selected);
			for(var y=0; y < objSelectIndex.options.length; y++){
				if(selected < objSelectIndex.options.length){
					objSelectIndex.options[selected].selected = true;
				}else if(selected >= objSelectIndex.options.length && id != (objIndex+objSelect[x].getAttribute("identificador"))){
					objSelectIndex.options[y].selected = true;
				}
			}
		}
	}
}
var objForAnterior;
function forPagamento(id,minimoParcela,maximoParcela){
	var objIndex = id.substring(0,id.lastIndexOf("_div"));
	var objId_div = document.getElementById(id);
	var objId_radio = document.getElementById(objIndex);
	var objId_parcela = document.getElementById(objIndex+"_parcela");
	var objId_texto = document.getElementById(objIndex+"_texto");
	var objId_clickSelect = document.getElementById(objIndex+"_clickSelect");
	if(window.event && event.type == cstClick){
		if(objForAnterior != null && document.getElementById(objForAnterior) && objForAnterior != id){
			document.getElementById(objForAnterior).className = "forPaga_item";
			if(document.getElementById(objForAnterior.substring(0,objForAnterior.lastIndexOf("_"))+"_parcela")){
				document.getElementById(objForAnterior.substring(0,objForAnterior.lastIndexOf("_"))+"_parcela").style.display = "none";
				document.getElementById(objForAnterior.substring(0,objForAnterior.lastIndexOf("_"))+"_texto").style.paddingBottom = "30px";
				document.getElementById(objForAnterior.substring(0,objForAnterior.lastIndexOf("_"))+"_clickSelect").disabled = true;
			}
		}
		objForAnterior = id;
		objId_div.className = "forPaga_item forPaga_item_selected";
		objId_parcela.style.display = "block";
		objId_texto.style.paddingBottom = "4px";
		objId_clickSelect.disabled = false;
		objId_radio.checked = true;
	}else if(window.event && event.type == cstMouseover && objId_div.className != "forPaga_item forPaga_item_selected"){
		objId_div.className = "forPaga_item forPaga_item_hover";
	}else if(window.event && event.type == cstMouseout && objId_div.className != "forPaga_item forPaga_item_selected"){
		objId_div.className = "forPaga_item";
	}
}
// Click select
function clickSelect(id){
	try{
		var strConjObj = id.substring(id.lastIndexOf("_"),id.length);
		var strId = id.substring(0,id.indexOf("_"));
		var objInput = document.getElementById("clickSelect_input"+strConjObj);
		var objId = document.getElementById(id);
		var objExtrair = document.getElementById("clickSelect_extrair"+strConjObj);
		var objSomar = document.getElementById("clickSelect_somar"+strConjObj);
		if(event.type == "mousedown" && objId.src.lastIndexOf("disable") == -1 && objId.src.lastIndexOf("_click.gif") == -1){
			objId.src = objId.src.substring(0,objId.src.lastIndexOf("."))+"_click.gif";
		}else if(event.type == "mouseup" && objId.src.lastIndexOf("disable") == -1 && objId.src.lastIndexOf("_click.gif") > -1){
			objId.src = objId.src.substring(0,objId.src.lastIndexOf("_"))+".gif";
		}else if(event.type == cstClick && objId.src.lastIndexOf("Somar") > -1){
			if(objExtrair.src.lastIndexOf("disable") > -1){
				objExtrair.src = objExtrair.src.substring(0,objExtrair.src.lastIndexOf("_"))+".gif";
			}
			objInput.value = parseInt(objInput.value)+1;
		}else if(event.type == cstClick && objId.src.lastIndexOf("Extrair") > -1){
			if(objSomar.src.lastIndexOf("disable") > -1){
				objSomar.src = objSomar.src.substring(0,objSomar.src.lastIndexOf("_"))+".gif";
			}
			if(objInput.value > 1){
				objInput.value = parseInt(objInput.value)-1;
				if(objInput.value == 1){
					objExtrair.src = objExtrair.src.substring(0,objExtrair.src.lastIndexOf("."))+"_disable.gif";
				}
			}
		}else if(event.type == cstKeyup){
			var arraKeyCode = new Array(48,49,50,51,52,53,54,55,56,57,96,97,98,99,100,101,102,103,104,105);
			for(var x = 0; x < arraKeyCode.length; x++){
				if(event.keyCode == arraKeyCode[x]){
					break;
				}else{
					event.returnValue = false;
					return false;
					// Pq essa porcaria não está funcionando?
				}
			}
		}
	}catch(e){
	}
}
// Voltar ao topo
function voltarTopo(){
	var objScrollT = document.getElementsByTagName("html")[0];
	objScrollT.scrollTop = 0;
}
// Desabilitar Meu Carrinho
var strMcScript;
function mcDesabilitar(bln){
	var objDivSeta = document.getElementById("div_seta");
	var strTitleAbrir = objDivSeta.getAttribute("titleAbrir");
	var strTitleFinalizado = objDivSeta.getAttribute("titleFinalizado");
	var objTitulo = document.getElementById("divTextoCarrinho");
	var objPrincipal = document.getElementById("car_principal");
	var objA = document.getElementById("car_a");
	if(bln == true && objDivSeta.style.display != cstNone){
		strMcScript = objA.getAttribute("href");
		if(objDivSeta.getAttribute("acao") == cstFechar){
			abrirMeuCarrrinho();
		}
		objDivSeta.style.display = "none";
		objTitulo.innerHTML = strTitleFinalizado;
		objA.href = "javascript:;";
		objPrincipal.onmouseover = function(){callHint(strTitleFinalizado)};
		objPrincipal.style.cursor = "default";
	}else if(bln != true){
		objDivSeta.style.display = "";
		objTitulo.innerHTML = strTitleAbrir;
		objA.setAttribute("href",strMcScript);
		objPrincipal.onmouseover = function(){callHint(strTitleAbrir)};
		objPrincipal.style.cursor = "pointer";
	}
}
// Abrir meu carrinho de compras
var numMCCar = 0;
var numMCCarAltura = 200;
var numMCCarDesce = -(numMCCarAltura+12);
var msInterval;
var booMCCar = true;
function mcCar(acao){
	try{
		var objRecebe = document.getElementById("meuCar_principal");
		var objDesce = document.getElementById("meuCar_recebe");
		var objInnerHTML = document.getElementById("divConteudoCarrinho");
		var numVelocidade = 40;
		if(numMCCar < numMCCarAltura && acao == cstAbrir){
			if(!ie){
				objInnerHTML.style.display = "none";
			}
			objRecebe.style.display = "block";
			numMCCar = numMCCar+numVelocidade;
			objRecebe.style.height = (numMCCar)+"px";
			numMCCarDesce = numMCCarDesce+numVelocidade;
			objDesce.style.top = (numMCCarDesce)+"px";
		}else if(numMCCar >= 1 && acao == cstFechar){
			if(!ie){
				objInnerHTML.style.display = "none";
			}
			numMCCar = numMCCar-numVelocidade;
			objRecebe.style.height = (numMCCar)+"px";
			numMCCarDesce = numMCCarDesce-numVelocidade;
			objDesce.style.top = (numMCCarDesce)+"px";
			if(numMCCar == 0){
				objRecebe.style.display = "none";
			}
		}else{
			clearInterval(msInterval);
			if(!ie){
				objInnerHTML.style.display = "block";
			}
			if(booMCCar == true){
				booMCCar = false;
			}else{
				booMCCar = true;
			}
		}
	}catch(e){
	}
}
function abrirMeuCarrrinho(){
	try{
		var objRecebe = document.getElementById("meuCar_principal");
		var objSeta = document.getElementById("seta_meuCar");
		var objDivSeta = document.getElementById("div_seta");
		var objSetaMC = document.getElementById("seta_meuCarMC");
		var objDivSetaMC = document.getElementById("div_setaMC");
		var strTitleAbrir = objDivSeta.getAttribute("titleAbrir");
		var strTitleFechar = objDivSeta.getAttribute("titleFechar");
		var objPrincipal = document.getElementById("car_principal");
		var objTitulo = document.getElementById("divTextoCarrinho");
		if(objDivSeta.getAttribute("acao") == cstAbrir && booMCCar == true){
			//objRecebe.style.display = "block";
			objPrincipal.onmouseover = function(){callHint(strTitleFechar)};
			objTitulo.innerHTML = strTitleFechar;
			//objDivSeta.title = strTitleFechar;
			objSeta.src = "imagens/seta_alto_branco.gif";
			objSetaMC.src = "imagens/seta_alto_branco.gif";
			msInterval = setInterval("mcCar('abrir');",1);
			objDivSeta.setAttribute("acao","fechar");
		}else if(objDivSeta.getAttribute("acao") == cstFechar && booMCCar == false){
			objPrincipal.onmouseover = function(){callHint(strTitleAbrir)};
			objTitulo.innerHTML = strTitleAbrir;
			//objDivSeta.title = strTitleAbrir;
			objSeta.src = "imagens/seta_baixo_branco.gif";
			objSetaMC.src = "imagens/seta_baixo_branco.gif";
			msInterval = setInterval("mcCar('fechar');",1);
			objDivSeta.setAttribute("acao","abrir");
		}
	}catch(e){
	}
}
// Menu tab
var objMenuTabId = null;
function menuTab(acao){
	if(document.getElementById(acao)){
		if(document.getElementById(objMenuTabId)){
			document.getElementById(objMenuTabId).style.display = "none";
		}
		objMenuTabId = acao;
		document.getElementById(acao).style.display = "block";
	}
}
// Aguarde / Carregando
function aguarde(blnMostrar,texto, adicionarTop, adicionarLeft){
	if(blnMostrar == true && ! document.getElementById("divAguarde") ){
		var objDiv = document.createElement("div");
		var objBody = document.getElementsByTagName("body")[0];
		var objHTML = document.getElementsByTagName("html")[0];
		var numScrollTop = objHTML.scrollTop;
		var numScrollLeft = objHTML.scrollLeft;
		var numHeight = 58;
		var numWidth = 165;
		var numTop = ((objHTML.clientHeight - numHeight)/2)+numScrollTop;
		var numLeft = ((objHTML.clientWidth - numWidth)/2)+numScrollLeft;
		if( adicionarTop != null && adicionarTop != "" ){
		    numTop = parseInt( numTop ) + parseInt( adicionarTop );
		}
		if( adicionarLeft != null && adicionarLeft != "" ){
		    numLeft = parseInt( numLeft ) + parseInt( adicionarLeft );
		}
		var strStyle = "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='imagens/aguarde_fundo_IE.png', sizingMethod='image');";
		if(!ie){
			strStyle = "background-image:url(imagens/aguarde_fundo_Moz.png); background-repeat:no-repeat;";
		}
		if(texto == "" || texto == null){
			texto = "Aguarde um instante...";
		}
		objDiv.setAttribute("id","divAguarde");
		objDiv.innerHTML = '<div id="divAguardePosicao" style="'+strStyle+'top:'+numTop+'px; left:'+numLeft+'px; width:'+numWidth+'px; height:'+numHeight+'px;" onselectstart="return false;">'+
		'<div class="divAguardeTexto">'+texto+'</div>'+
		'<div class="divAguardeLoad"><img src="/imagens/carregador.gif" /></div></div>';
		objBody.appendChild(objDiv);
	}else if(blnMostrar != true && document.getElementById("divAguarde")){
		document.getElementsByTagName("body")[0].removeChild(document.getElementById("divAguarde"));
	}
}
// Tirar borda dos elementos de formulário Radio e CheckBox
function frmCSSExcecoes(){
	if(document.forms.length > 0){
		var objFrm = document.forms;
		for(var x = 0; x < objFrm.length; x++){
			if(objFrm[x].elements.length > 0){
				var objElement = objFrm[x].elements;
				for(var y = 0; y < objElement.length; y++){
					if(objElement[y].type == cstRadio){
						objElement[y].style.border = "none";
					}
					if(objElement[y].type == cstCheckbox){
						objElement[y].style.border = "none";
					}
				}
			}
		}
	}
}
// Converter cor de decimal para hexadecimal (RGB pra Hexa)
function rgbParaHex(dec){
	var hex = "";
	var cores = dec.replace(" ","");
	var passo = "red"
	for(var x = 0; x < 3; x++){
		if(passo == cstRed){
			dec = cores.substring(cores.indexOf("(")+1,cores.indexOf(","));
			passo = "green";
		}else if(passo == cstGreen){
			dec = cores.substring(cores.indexOf(",")+1,cores.lastIndexOf(","));
			passo = "blue";
		}else if(passo == cstBlue){
			dec = cores.substring(cores.lastIndexOf(",")+1,cores.indexOf(")"));
		}
		var hexStr = "0123456789ABCDEF";
		var low = dec % 16;
		var high = (dec - low)/16;
		hex = hex + hexStr.charAt(high) + hexStr.charAt(low);
	}
  return "#" + hex;
}
// Mudar cor do título em Flash
function corTitulo(titulo,fontSize,largura,altura,className){
	if(titulo.indexOf("%") > -1){
		titulo = titulo.replace("%",escape("%"));
	}
	var numStyle = document.styleSheets.length;
	var cor = "#FF6600";
	if(fontSize != undefined && !checaVazio(fontSize)){
		fontSize = parseInt(fontSize*1.36);
	}
	if(altura == undefined || checaVazio(altura)){
		altura = 30;
	}
	if(largura == undefined || checaVazio(largura)){
		largura = 100;
	}
	if(className == undefined){
		className = ".titulo_cor";
	}
	if(ie){
		for(var x = 0; x < numStyle; x++){
			var numCSSRules = document.styleSheets[x].imports.length;
			for(var y = 0; y < numCSSRules; y++){
				if(document.styleSheets[x].imports[y]){
					var numImportCssRules = document.styleSheets[x].imports[y].rules.length;
					for(var z = 0; z < numImportCssRules; z++){
						if(document.styleSheets[x].imports[y].rules[z].selectorText == className){
							cor = document.styleSheets[x].imports[y].rules[z].style.color;
						}
					}
				}
			}
		}
	}else{
		for(var x = 0; x < numStyle; x++){
			var numCSSRules = document.styleSheets[x].cssRules.length;
			for(var y = 0; y < numCSSRules; y++){
				if(document.styleSheets[x].cssRules[y].styleSheet){
					var numImportCssRules = document.styleSheets[x].cssRules[y].styleSheet.cssRules.length;
					for(var z = 0; z < numImportCssRules; z++){
						if(document.styleSheets[x].cssRules[y].styleSheet.cssRules[z].selectorText == className){
							cor = rgbParaHex(document.styleSheets[x].cssRules[y].styleSheet.cssRules[z].style.color);
						}
					}
				}
			}
		}
	}
	var objFlash = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="fontEmbeded" width="'+largura+'" height="'+altura+'" align="middle">'+
	'<param name="allowScriptAccess" value="sameDomain" />'+
	'<param name="movie" value="imagens/titulos/fontEmbeded.swf" />'+
	'<param name="FlashVars" value="cor='+cor+'&texto='+titulo+'&altura='+fontSize+'" />'+
	'<param name="quality" value="high" />'+
	'<param name="bgcolor" value="#ffffff" />'+
	'<param name="wmode" value="transparent"/>'+
	'<embed src="imagens/titulos/fontEmbeded.swf" FlashVars="cor='+cor+'&texto='+titulo+'&altura='+fontSize+'" wmode="transparent" quality="high" bgcolor="#ffffff" width="'+largura+'" height="'+altura+'" swLiveConnect=true id="fontEmbeded" name="fontEmbeded" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'+
	'</object>';
	return objFlash;
}
// Handle all the FSCommand messages in a Flash movie
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
function fontEmbeded_DoFSCommand(command, args) {
	var fontEmbededObj = isInternetExplorer ? document.all.fontEmbeded : document.fontEmbeded;
}
if(navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub fontEmbeded_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call fontEmbeded_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}
//-->
// Atribui Titulo em Flash
function AtribuirTituloFlash( strDestino, Tamanho, Largura, Altura, Css ){
	var obj = document.getElementById( strDestino );
	obj.innerHTML =  corTitulo(obj.innerText, Tamanho, Largura, Altura, Css);
}
//-->

/*
Desenvolvido por Darlesson
www.darlesson.com.br
*/