var sPagAtual=document.location.href.toUpperCase();

var IDCatBelezaSaude=78267;
var IDCatBrinquedos=164999;
var IDCatCineFoto=78270;
var IDCatInformatica=78277;
var IDCatLivros=78279;
var IDCatMusica=165010;
var IDCatTelefonia=78281;


function ShowCart(bShow,ItensCesta){
 oTabItensCart=document.getElementById('TabItensCart');
 if(bShow){
    oTabItensCart.className="EstTabItensCartOn";
  }
 else{
    oTabItensCart.className="EstTabItensCart";
  }
}

function GoCart(){
  document.location.href="addproduto.asp?idloja="+IDLojaNum;
}

function OpMenu(sCat,IDCat,bAtivar){
  if(bAtivar)document.getElementById(sCat).src=sPathImg+sCat+"On.png";
  else if(IDCategoriaNivel0FC!=IDCat) document.getElementById(sCat).src=sPathImg+sCat+".png";
}

function AtivaOpMenu(){
  if(IDCategoriaNivel0FC==IDCatBelezaSaude)document.getElementById("CatBelezaSaude").src=sPathImg+"CatBelezaSaudeOn.png";
  else if(IDCategoriaNivel0FC==IDCatBrinquedos)document.getElementById("CatBrinquedos").src=sPathImg+"CatBrinquedosOn.png";
  else if(IDCategoriaNivel0FC==IDCatCineFoto)document.getElementById("CatCineFoto").src=sPathImg+"CatCineFotoOn.png";
  else if(IDCategoriaNivel0FC==IDCatInformatica)document.getElementById("CatInformatica").src=sPathImg+"CatInformaticaOn.png";
  else if(IDCategoriaNivel0FC==IDCatLivros)document.getElementById("CatLivros").src=sPathImg+"CatLivrosOn.png";
  else if(IDCategoriaNivel0FC==IDCatMusica)document.getElementById("CatMusica").src=sPathImg+"CatMusicaOn.png";
  else if(IDCategoriaNivel0FC==IDCatTelefonia)document.getElementById("CatTelefonia").src=sPathImg+"CatTelefoniaOn.png";
}

function ExibeTermoBusca(){ 
  if(sPagAtual.indexOf("/PROD,")==-1){sConcat="&";sCharSep="=";} else {sConcat=",";sCharSep=",";}
  var posTexto=sPagAtual.indexOf("TEXTO"+sCharSep);
  if(posTexto!=-1){
    var sFinal=document.location.href.substr(posTexto+6);
    var posSep=sFinal.indexOf(sConcat);
    if(posSep!=-1)sTexto=sFinal.substr(0,posSep); else sTexto=sFinal;

    if(sTexto!=""){
      sTexto=unescape(sTexto.replace("+"," "));
        document.getElementById("TextoBusca").value=unescape(sTexto);
        document.getElementById("TextoBuscaRod").value=unescape(sTexto);
      }
  }
}

function AjustaFiltros(){ 
  var bTemPathQts=false;
  var oUlPathCatQt=document.getElementById("idUlPathCatQtFC");
  if(oUlPathCatQt){bTemPathQts=true;}else{document.getElementById('idListaProdCategoriasFC').style.display='none';}
  var oUlAdic1Qt=document.getElementById("idUlAdic1QtFC");
  if(oUlAdic1Qt){bTemPathQts=true;}else{document.getElementById('idListaProdAdicional1FC').style.display='none';}
  var oUlAdic2Qt=document.getElementById("idUlAdic2QtFC");
  if(oUlAdic2Qt){bTemPathQts=true;}else{document.getElementById('idListaProdAdicional2FC').style.display='none';}
  var oUlAdic3Qt=document.getElementById("idUlAdic3QtFC");
  if(oUlAdic3Qt){bTemPathQts=true;}else{document.getElementById('idListaProdAdicional3FC').style.display='none';}
  //Caso não tenha produtos em categorias/adicionais encontrados, remove div
  if(!bTemPathQts)document.getElementById("idDivPath").style.display='none';
  //Caso não tenha filtros de busca, remove div com filtros
  var oUlPathSearch=document.getElementById("idUlPathSearchFC");
  if(oUlPathSearch==null)document.getElementById("idDivSearch").style.display='none';
}

function seguranca(){window.open(sPathHTM+'SiteSeguro.htm','SiteSeguro',"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=365,height=640");}

function ValidaEmail(sEmail) {
  var regex=/^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,4}$/;
  return regex.test(sEmail);
}

function ValidaNew(oForm) {
  if (oForm.Email.value.length==""){
    alert("Campo 'E-mail' não pode estar em branco!");
    oForm.Email.focus();
    return false;
  }
  if (!ValidaEmail(oForm.Email.value)) {
    alert("Campo 'E-mail' inválido!");
    oForm.Email.focus();
    return false;
  }
}

function MostraChatP(){
  popup=window.open("ChatLogin.asp?IDLoja="+IDLojaNum,"Chat","top=20,left=20,height=280,width=390,scrollbars=no,resizable=yes");
  popup.focus();
  return void(0);
}

function ConfirmaPedido(botao){
  MostraAviso=false;
  botao.style.backgroundImage="url(/images/shim.gif)"
  botao.style.backgroundColor="#e4e4e3";
  botao.style.borderColor="#888888";
  botao.style.color="#555555";
  botao.value='Confirmando...';
  botao.setAttribute('disabled','true');
  Valida(document.Form1);
}


function ExibeBotaoConfirmaPedido(){
  var ConteudoTopoPagConfirmar=document.getElementById("idTopoConfirmarFC"); 
  if(ConteudoTopoPagConfirmar){
    ConteudoTopoPagConfirmar.innerHTML="<br>&nbsp;<br><br><center><input type=button name=btConfirmarPedido class='BotConfPed' value='Confirmar pedido  >>' onclick='ConfirmaPedido(this);'></center>";
  }
}

 
function ExibeBotoesCesta(bExibeDuasLinhasBotoes){
  try{
    document.write("<style>.EstContinuarComprando{display:none;}</style>");
    var table=document.getElementById('TabItens');

    if(bExibeDuasLinhasBotoes){
      var row=table.insertRow(0);
      var cell=row.insertCell(-1);
      cell.colSpan=4;
      var sCel1="<table cellspacing='0' cellpadding='0' width='100%'><tr>";
            //sCel1+="<td width='33%' align='left'><a href='home.asp?IDLoja="+ IDLojaNum +"'><img src='"+ sPathImg +"BotContComprando.png' title='Continuar comprando' border='0'></a></td>";
            //sCel1+="<td width='34%' align='center'><a href='#R' onclick='document.Lista.submit()'><img src='"+ sPathImg +"BotRecalcular.png' title='Recalcular' border='0'></a></td>";
            sCel1+="<td width='100%' align='right'><a href='#C' onclick='ComprarImg()'><img src='"+ sPathImg +"BotComprar.png' title='Comprar' border='0'></a></td>";
          sCel1+="</tr></table>";
      cell.innerHTML=sCel1;
    }

    var row=table.insertRow(-1);
    var cell=row.insertCell(-1);
    cell.colSpan=4;
    var sCel2="<table cellspacing='0' cellpadding='0' width='100%'><tr>";
          sCel2+="<td width='33%' align='left'><a href='home.asp?IDLoja="+ IDLojaNum +"'><img src='"+ sPathImg +"BotContComprando.png' title='Continuar comprando' border='0'></a></td>";
          sCel2+="<td width='34%' align='center'><a href='#R' onclick='document.Lista.submit()'><img src='"+ sPathImg +"BotRecalcular.png' title='Recalcular' border='0'></a></td>";
          sCel2+="<td width='33%' align='right'><a href='#C' onclick='ComprarImg()'><img src='"+ sPathImg +"BotComprar.png' title='Comprar' border='0'></a></td>";
        sCel2+="</tr></table>";
    cell.innerHTML=sCel2;

  }catch(e){}
  try{document.getElementById("TabBotoes").style.display='none';}catch(e){}
}

function ComprarImg(){
  document.getElementsByName("Comprar")[0].click();
}

function MostraCestaTopo(){
//NÃO está sendo utilizada. Alterei para exibir via AJAX no BarraTopo.htm
  var PosCarrinho=document.getElementById("idMostraDadosCesta"); 
  if(PosCarrinho)PosCarrinho.innerHTML='<table class=Estilo_Div_Cesta><tr><td width=20><a href="AddProduto.asp?IDLoja='+ IDLojaNum +'"><img src='+sPathImg+'CarrinhoTop.png hspace=8 vspace=2 width=16 height=16 border=0></a></td><td><a href="AddProduto.asp?IDLoja='+ IDLojaNum +'" class=Estilo_Link_Cesta>Carrinho: (<span class=Estilo_Itens_Cesta>'+ QtdCesta +'</span>) &nbsp;  Total: <span class=Estilo_Total_Cesta>'+FormatPrice(ValorCesta,'R$')+'</span></a></td></tr></table>';
}


function ConectXMLPageHistory(){
  // para conectar
  if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
  else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  xmlhttp.open("GET","XMLPageHistory.asp?IDLoja="+IDLojaNum,false);
  xmlhttp.send();
  xmlDoc=xmlhttp.responseXML; 
  return(xmlDoc.getElementsByTagName("item"));
}

function ExibeHistoricoNaveg(x){
  try{MostrarBarra=(x[0].getElementsByTagName("title")[0].childNodes[0].nodeValue);}
  catch(e){MostrarBarra="";}
  
  if(MostrarBarra!=""){
    document.getElementById("TabHist").className="HistNaveg";
    document.write("<table width=100% cellspacing=0 cellpadding=0><tr height=30><td height=30 class=EstTabTopo nowrap>&nbsp; &nbsp; Histórico de navegação:</td></tr></table><table align=center border=0><tr>");
  }
  
  for (i=0;i<x.length;i++){
    titleProd=x[i].getElementsByTagName("title")[0].childNodes[0].nodeValue;
    linkProd=x[i].getElementsByTagName("link")[0].childNodes[0].nodeValue;
    try{imageProd=x[i].getElementsByTagName("image")[0].childNodes[0].nodeValue;}
    catch(e){imageProd="images/shim.gif";}
    try{priceProd=(x[i].getElementsByTagName("price")[0].childNodes[0].nodeValue);}
    catch(e){priceProd="";}
    titleProd=titleProd.substring(0,20);
  txt="<td width=190 align=center><table width=180 height=150 style='margin-top:10px;border-style:solid;border-width:1px;border-color:#dedede'><tr><td align=center height=25 style='background:#EFEFEF;font-size:8pt;color:#333333;font-family:tahoma,verdana;font-weight:bold'><a href='"+ linkProd +"' style='text-decoration:none;'>"+  titleProd +"</a></td></tr><tr><td height=120 align='center'><a href='"+ linkProd +"'><img src='" + imageProd + "' border=0 width=100 height=100 title='"+ titleProd +"'></a></td></tr><tr><td height=30 align='center' style='color:#285174;font-size:8pt;font-family:tahoma;font-weight:bold'>"+ priceProd +"</td></tr></table><br></td>";
  document.write(txt);
  }
  if(MostrarBarra!=""){
    document.write("</td></tr></table>");
  }
}

function ValidaForm(este) {
  sTexto=este.texto.value;
  if(sTexto=='Buscar por'){sTexto="";este.texto.value="";}
  if(sTexto.length<2 && este.IDCategoria.options[este.IDCategoria.selectedIndex].value==0){
    alert("Preencha pelo menos um dos campos de busca.");
    este.texto.focus();
    return false;
  }
  return true;
}

//### Função que valida a busca  
function VerTexto(oNome){
 if (oNome.Texto.value=='' || oNome.Texto.value.length<2){
   alert('Busca inválida.');
   oNome.Texto.focus();
   return false;}
 else{return true;}
}

//### Função que valida a busca da barra da esquerda
function VerTextoBE(oForm){
 var GeneroChecado=false;
 for (i=0;i<2;i++) if(oForm.Adicional2[i].checked) GeneroChecado=true;
 if (oForm.Texto.value.length<2 && oForm.IDCategoria.options[oForm.IDCategoria.selectedIndex].value==0 && !GeneroChecado){
   alert('Busca inválida.');
   oForm.Texto.focus();
   return false;}
 else{return true;}
}

function MostraMaxParcela(PrecoProd,MaxParcelas){
  var ComSem;
  if(PrecoProd==0||MaxParcelas==1||Juros.length==0)return;
  if(MaxParcelas==0||MaxParcelas>Juros.length)MaxParcelas=Juros.length;
  if(Juros[MaxParcelas-1]>0)ComSem=""; else ComSem="<font color=#DD0000>&nbsp;sem&nbsp;juros</font>";
  document.write("ou&nbsp;"+MaxParcelas+"x de&nbsp;<span class=EstPrecoPOR>"+FormatPrecoReais(CalculaParcelaJurosCompostos(PrecoProd,MaxParcelas))+"</span>");
}

function MontaMaxParcelaCart(Valor){
  return("Em até 10x de "+FormatPrecoReais(CalculaParcelaJurosCompostos(Valor,10)));
}


//Funções para mostrar valor economizado pelo cliente em uma promoção
function MostraEconomia(PrecoProd,PrecoOri){
  if(PrecoProd!=PrecoOri)document.write("<br><span class=smtext><font color=#6f9e45>Economize&nbsp;<b>"+FormatPrice(PrecoOri-PrecoProd,'R$')+"</b> ("+FormatNum(((PrecoOri-PrecoProd)/PrecoOri)*100)+"%)</font></span><br>");
}

function FormatNum(num){
  num=num.toString().replace(/\$|\,/g,'');
  if(isNaN(num))num="0";
  sign=(num==(num=Math.abs(num)));
  num=Math.floor(num*100+0.50000000001);
  num=Math.floor(num/100).toString();
  for(var i=0;i<Math.floor((num.length-(1+i))/3);i++)num=num.substring(0,num.length-(4*i+3))+'.'+num.substring(num.length-(4*i+3));
  return ((sign)?'':'-')+num;
}



// Funções para exibir parcelamento com cartões de crédito no PagSeguro
var FatorPagSeguro=new Array(1,0.51495,0.34670,0.26255,0.21210,0.17847,0.15446,0.13645,0.12246,0.11127,0.10212,0.09450,0.08806,0.08254,0.07777,0.07359,0.06991,0.06664);

// Função para definir o número máximo de parcelas (parcela mínima de 5 reais)
function DefineMaxParcelas(PrecoProd,MaxParcelas){
  if(MaxParcelas==0){
    if(PrecoProd>=106)return(12);
    else if(PrecoProd>=98)return(11);
    else if(PrecoProd>=90)return(10);
    else if(PrecoProd>=82)return(9);
    else if(PrecoProd>=74)return(8);
    else if(PrecoProd>=65)return(7);
    else if(PrecoProd>=57)return(6);
    else if(PrecoProd>=48)return(5);
    else if(PrecoProd>=39)return(4);
    else if(PrecoProd>=29)return(3);
    else if(PrecoProd>=20)return(2);
    else if(PrecoProd>=1)return(1);
  }
  return(MaxParcelas);
}


//Função para exibir o parcelamento na lista de produtos
function MostraParcelaPagSeguro(PrecoProd,MaxParcelas){
  var ComSem;
  MaxParcelas=DefineMaxParcelas(PrecoProd,MaxParcelas);
  if(PrecoProd==0||MaxParcelas==1||FatorPagSeguro.length==0)return;
  if(MaxParcelas==0||MaxParcelas>FatorPagSeguro.length)MaxParcelas=FatorPagSeguro.length;
  if(FatorPagSeguro[MaxParcelas-1]!=0)ComSem=""; else ComSem="<font color=#e13300>&nbsp;sem&nbsp;juros</font>";
  document.write("ou&nbsp;<b>"+MaxParcelas+"x</b>"+ComSem+" de&nbsp;<b>"+FormatPrecoReais(PrecoProd*FatorPagSeguro[MaxParcelas-1])+"</b><br>");
}

function MostraDesconto(PrecoProd,PrecoOri){
  if(PrecoProd==0)return;
  document.write("<br>à vista <b>"+FormatPrecoReais(PrecoProd*0.95)+"</b>");
  MostraEconomia(PrecoProd*0.95,PrecoOri);
}

function AtivaLinkMenuTop(){ 
  var sActive="";
  if(sPagAtual.indexOf('HOME.ASP')>=0 || sPagAtual=="HTTP://WWW.PERFUMES.COM.BR/" || sPagAtual=="HTTP://PERFUMES.COM.BR/")sActive="LinkHome";
  else if(sPagAtual.indexOf('CATEGORIAS.ASP')>=0)sActive="LinkCat";
  else if(sPagAtual.indexOf('ADDPRODUTO.ASP')>=0)sActive="LinkCesta";
  else if(sPagAtual.indexOf('TRACK.ASP')>=0)sActive="LinkPed";
  else if(sPagAtual.indexOf('FALECONOSCO.ASP')>=0)sActive="LinkContato";
  else if(sPagAtual.indexOf('AJUDA.ASP')>=0)sActive="LinkAjuda";
  if(sActive!="")document.getElementById(sActive).className="MenuTop_On";
}

function AtivaLinkMenuBarra(){ 
  var sActive="";
  if(sPagAtual.indexOf('PERFUMES_PARA_ELE.HTM')>=0)sActive="LinkParaEle";
  else if(sPagAtual.indexOf('PERFUMES_PARA_ELA.HTM')>=0)sActive="LinkParaEla";
  else if(sPagAtual.indexOf('CORPO_E_BANHO.HTM')>=0)sActive="LinkCorpoBanho";
  else if(sPagAtual.indexOf('PRESENTES.HTM')>=0)sActive="LinkPresentes";
  else if(sPagAtual.indexOf('LANCAMENTO')>=0)sActive="LinkLanc";
  else if(sPagAtual.indexOf('PROMOCAO')>=0)sActive="LinkProm";
  if(sActive!="")document.getElementById(sActive).className="MenuBarra_On";
}

function AtivaLinkMenuRodape(){ 
  var sActive="";
  if(sPagAtual.indexOf('PERFUMES_PARA_ELE.HTM')>=0)sActive="LinkRodParaEle";
  else if(sPagAtual.indexOf('PERFUMES_PARA_ELA.HTM')>=0)sActive="LinkRodParaEla";
  else if(sPagAtual.indexOf('CORPO_E_BANHO.HTM')>=0)sActive="LinkRodCorpoBanho";
  else if(sPagAtual.indexOf('LANCAMENTO')>=0)sActive="LinkRodLanc";
  else if(sPagAtual.indexOf('PROMOCAO')>=0)sActive="LinkRodProm";
  else if(sPagAtual.indexOf('AJUDA.ASP')>=0)sActive="LinkRodAjuda";
  else if(sPagAtual.indexOf('HOME.ASP')>=0)sActive="LinkRodHome";
  else if(sPagAtual.indexOf('FALECONOSCO.ASP')>=0)sActive="LinkRodContato";
  else if(sPagAtual.indexOf('CATEGORIAS.ASP')>=0)sActive="LinkRodGriffes";
  else if(sPagAtual.indexOf('ADDPRODUTO.ASP')>=0)sActive="LinkRodCart";
  else if(sPagAtual.indexOf('TRACK.ASP')>=0)sActive="LinkRodOrders";
  if(sActive!="")document.getElementById(sActive).className="RodapeMenu_On";
}


function MostraPreco(PrecoProd,PrecoOri,Cod){
if(PrecoProd==0 && PrecoOri==0){document.write("<span class=EstPrecoPOR><a href=FaleConosco.asp?IDLoja="+IDLojaNum+"&Assunto=Consulta%20sobre%20produto%20(Código%20"+Cod+")>Consulte-nos</a></span>");return void(0);}
if(PrecoProd!=PrecoOri){
    document.write("<span class=EstPrecoDE>de "+FormatPrice(PrecoOri,'R$')+"</span> <span class=EstPrecoPOR>por "+FormatPrice(PrecoProd,'R$')+"</span>");
  }
  else{
    document.write("<span class=EstPrecoPOR>por "+FormatPrice(PrecoProd,'R$')+"</span>");
  }
}

function MostraGenero(adic){
  if(adic.indexOf("asculina")>0){
    document.write('<img src="'+sPathImg+'IcGenMasc.gif" title="Fragrância Masculina">');
    }
  else if(adic.indexOf("eminina")>0){
    document.write('<img src="'+sPathImg+'IcGenFem.gif" title="Fragrância Feminina">');
    }
  else if(adic.indexOf("nisse")>0){
    document.write('<img src="'+sPathImg+'IcGenUnissex.gif" title="Fragrância Unissex">');
  }
}

function MostraBotIndique(IDProduto){
  document.write("<center><span class=smText><a href='javascript:MostraIndiqueCaptcha(IDLojaNum,"+IDProduto+")' style='text-decoration:none;' class=RodapeMenu><img src="+sPathImg+"IcRecomende.gif border=0 vspace=2><br>Recomende<br>este produto</a></span></center>");
}

function MostraBotAval(IDProduto){
  document.write("<center><span class=smText><a href='Opiniao.asp?IDLoja="+IDLojaNum+"&IDProduto="+IDProduto+"' style='text-decoration:none;' class=RodapeMenu><img src="+sPathImg+"IcAvalie.png border=0 vspace=2><br>Avalie este<br>produto</a></span></center>");
}

function AlteraImgsFormaPagto(){
  IcPagtoBB=document.getElementById("idImgPagto1FC"); //Boleto bancário
  if(IcPagtoBB){
    IcPagtoBB.src=sPathImg+'IcPagtoBB.png';
    IcPagtoBB.style.width='65';
    IcPagtoBB.style.height='41';
    IcPagtoBB.style.cursor='pointer';
  }

  IcPagtoDB=document.getElementById("idImgPagto4FC"); //Depósito bancário
  if(IcPagtoDB){
    IcPagtoDB.src=sPathImg+'IcPagtoDB.png';
    IcPagtoDB.style.width='65';
    IcPagtoDB.style.height='41';
    IcPagtoDB.style.cursor='pointer';
  }

  IcPagtoIS=document.getElementById("idImgPagto5FC"); //ItaúShopLine
  if(IcPagtoIS){
    IcPagtoIS.src=sPathImg+'IcPagtoIS.png';
    IcPagtoIS.style.width='65';
    IcPagtoIS.style.height='41';
    IcPagtoIS.style.cursor='pointer';
  }

  PagtoPayPalEC=document.getElementById("idImgPagto15FC"); //PayPal Express Checkout
  if(PagtoPayPalEC){
    PagtoPayPalEC.src=sPathImg+'IcPagtoPP.png';
    PagtoPayPalEC.style.width='65';
    PagtoPayPalEC.style.height='41';
    PagtoPayPalEC.style.cursor='pointer';
  }

  PagtoVE=document.getElementById("idImgPagto16FC"); //Visa Electron
  if(PagtoVE){
    PagtoVE.src=sPathImg+'IcPagtoVE.png';
    PagtoVE.style.width='65';
    PagtoVE.style.height='41';
    PagtoVE.style.cursor='pointer';
  }

  CCAmex=document.getElementById("idImgPagto3_1FC"); //AMEX
  if(CCAmex){
    CCAmex.src=sPathImg+'IcPagtoAE.png';
    CCAmex.style.width='65';
    CCAmex.style.height='41';
    CCAmex.style.cursor='pointer';
  }

  CCDine=document.getElementById("idImgPagto3_2FC"); //Diners
  if(CCDine){
    CCDine.src=sPathImg+'IcPagtoDC.png';
    CCDine.style.width='65';
    CCDine.style.height='41';
    CCDine.style.cursor='pointer';
  }

  CCMast=document.getElementById("idImgPagto3_3FC"); //MasterCard
  if(CCMast){
    CCMast.src=sPathImg+'IcPagtoMC.png';
    CCMast.style.width='65';
    CCMast.style.height='41';
    CCMast.style.cursor='pointer';
  }

  CCVisa=document.getElementById("idImgPagto3_4FC"); //VISA
  if(CCVisa){
    CCVisa.src=sPathImg+'IcPagtoVS.png';
    CCVisa.style.width='65';
    CCVisa.style.height='41';
    CCVisa.style.cursor='pointer';
  }

  CCElo=document.getElementById("idImgPagto3_7FC"); //Elo
  if(CCElo){
    CCElo.src=sPathImg+'IcPagtoEL.png';
    CCElo.style.width='65';
    CCElo.style.height='41';
    CCElo.style.cursor='pointer';
  }


  IcPagtoPS=document.getElementById("idImgPagto18FC"); //PagSeguro
  if(IcPagtoPS){
    IcPagtoPS.src=sPathImg+'IcPagtoPS.png';
    IcPagtoPS.style.width='65';
    IcPagtoPS.style.height='41';
    IcPagtoPS.style.cursor='pointer';
    TxtPagtoPS=document.getElementById("idTxtPagto18FC");
    if(TxtPagtoPS){TxtPagtoPS.innerHTML="&nbsp;<label for=Pagto18>&nbsp;<span style='color:#333333;font-size:11pt;'>PagSeguro</span> (parcelamento em até <b>18x</b> no cartão)&nbsp;<br><span style='font-size=8pt'>&nbsp;&nbsp;&nbsp;VISA, MasterCard, Diners, Amex, Hipercard, Aura, transferência bancária e boleto.</span></label>";}
  }
}


function AlteraPassosCompra(){

  var passo1=document.getElementById("idPasso1FC"); 
  var passo2=document.getElementById("idPasso2FC"); 
  var passo3=document.getElementById("idPasso3FC"); 
  var passo4=document.getElementById("idPasso4FC"); 
  var passo5=document.getElementById("idPasso5FC"); 
 
  if(passo1.className=='EstPassoCompraAtual')
  passo1.innerHTML="<img src="+sPathImg+"Passo1Atual.gif width=139 height=51>";
  else if(passo1.className=='EstPassoCompraPre')
  passo1.innerHTML="<img src="+sPathImg+"Passo1Pre.gif width=139 height=51>";
 
  if(passo2.className=='EstPassoCompraAtual')
  passo2.innerHTML="<img src="+sPathImg+"Passo2Atual.gif width=133 height=51>";
  else if(passo2.className=='EstPassoCompraPre')
  passo2.innerHTML="<img src="+sPathImg+"Passo2Pre.gif width=133 height=51>";
  else if(passo2.className=='EstPassoCompraPos')
  passo2.innerHTML="<img src="+sPathImg+"Passo2Pos.gif width=133 height=51>";
 
  if(passo3.className=='EstPassoCompraAtual')
  passo3.innerHTML="<img src="+sPathImg+"Passo3Atual.gif width=133 height=51>";
  else if(passo3.className=='EstPassoCompraPre')
  passo3.innerHTML="<img src="+sPathImg+"Passo3Pre.gif width=133 height=51>";
  else if(passo3.className=='EstPassoCompraPos')
  passo3.innerHTML="<img src="+sPathImg+"Passo3Pos.gif width=133 height=51>";
 
  if(passo4.className=='EstPassoCompraAtual')
  passo4.innerHTML="<img src="+sPathImg+"Passo4Atual.gif width=133 height=51>";
  else if(passo4.className=='EstPassoCompraPre')
  passo4.innerHTML="<img src="+sPathImg+"Passo4Pre.gif width=133 height=51>";
  else if(passo4.className=='EstPassoCompraPos')
  passo4.innerHTML="<img src="+sPathImg+"Passo4Pos.gif width=133 height=51>";
 
  if(passo5.className=='EstPassoCompraAtual')
  passo5.innerHTML="<img src="+sPathImg+"Passo5Atual.gif width=141 height=51>";
  else if(passo5.className=='EstPassoCompraPos')
  passo5.innerHTML="<img src="+sPathImg+"Passo5Pos.gif width=141 height=51>";

}  


