﻿var speed=12000
i=0
j=0
m=0

var ttitulos = new Array();
var ttextos = new Array();
var tlinks = new Array();

function regenerate(){
    window.location.reload();
}

function regenerate2(){
    if (document.layers)
        setTimeout("window.onresize=regenerate",450);
}

function alteraTexto(indice){
 titulo = document.getElementById("tituloBoxHome")
 texto = document.getElementById("textoBoxHome");
 aImg = document.getElementById("aBoxHome");
 
 ttitulo = document.createTextNode(ttitulos[indice]);
 ttexto = document.createTextNode(ttextos[indice]);
 
 atitulo = document.createElement("A");
 atexto = document.createElement("A");
 
 atitulo.setAttribute("href",tlinks[indice]);
 atexto.setAttribute("href",tlinks[indice]);
 aImg.setAttribute("href",tlinks[indice]);
 
 atitulo.appendChild(ttitulo);
 atexto.appendChild(ttexto);
 
 if(titulo.hasChildNodes()){
  titulo.removeChild(titulo.childNodes[0]);
 }
 
 if(texto.hasChildNodes()){
  while(texto.hasChildNodes()){
   texto.removeChild(texto.childNodes[0]);
  }
 }
 
 try{
    titulo.insertBefore(atitulo);
    texto.insertBefore(atexto);
 }catch(e){
   try{
    titulo.insertBefore(atitulo,titulo.childNodes[0]);
    texto.insertBefore(atexto,titulo.childNodes[0]);
   }catch(e){
     titulo.insertBefore(atitulo,titulo.childNodes[0].nextSibling);
     texto.insertBefore(atexto,titulo.childNodes[0].nextSibling);
   } 
 }

 

}

function highlightit(cur2){ 
if (cur2.filters.alpha.opacity<100) 
cur2.filters.alpha.opacity+=5 
else if (window.highlighting) 
clearInterval(highlighting) 
} 

function high(which2){ 
//theobject=which2 
//highlighting=setInterval("highlightit(theobject)",50) 
} 
function low(which2){ 
//high(which2);
//clearInterval(highlighting) 
//which2.filters.alpha.opacity=20 
//alert("o");
} 


var tnoticias = new Array();
tnoticias[2] = "imagens/home/Galeria/GaleriaHome_curso.jpg";
tnoticias[1] = "imagens/home/Galeria/GaleriaHome_ISS.jpg";
tnoticias[3] = "imagens/home/Galeria/GaleriaHome_Produtos.jpg";
tnoticias[0] = "imagens/home/Galeria/GaleriaHome_ST.jpg";

//Titulos
ttitulos[2] = "Prepare-se";
ttitulos[1] = "";
ttitulos[3] = "VP Boletins";
ttitulos[0] = "Substituição Tributária Online";
//Textos
ttextos[2] = "A necessidade de maior especialização, a constante busca de aperfeiçoamento profissional ou, ainda, o direcionamento da carreira para uma área com futuro promissor. Saiba Mais...";
ttextos[1] = "Sempre que houver a prestação de um serviço haverá a necessidade de recolhimento do ISSQN (Imposto Sobre Serviços de Qualquer Natureza)? A VerbaNet simplifica a vida de sua empresa customizando as informações sobre esse imposto nos diversos municípios brasileiros.";
ttextos[3] = "Os Boletins eletrônicos que complementam o VerbaNet Periódico tem o formato on-line e são atualizados diariamente. Tem em sua estrutura a divisão por quatro áreas. Conheça...";
ttextos[0] = "É um produto ímpar, prático, inteligente, eficaz, que reúne todas as informações legais, atualizadas diariamente, dos produtos sujeitos à substituição tributária, partindo de São Paulo para todas as Unidades da Federação. Saiba Mais...";
//Links
tlinks[2] = "http://cursos.cenofisco.com.br";
tlinks[1] = "http://www.verbanet.com.br/Links/Produtos/ISS.aspx";
tlinks[3] = "http://www.verbanet.com.br/Links/Produtos/Boletins.aspx";
tlinks[0] = "http://www.cenofisco.com.br/produtos/stonline.asp";


function update(indice){

 if(indice!=null){
  i = indice;
 }

    if (document.layers){

        document.mensagem.document.submensagem.document.write(tnoticias[i])
        document.mensagem.document.submensagem.document.close()
        
    }
    else

    low(document.getElementById("imgBoxHome"));
    document.getElementById("imgBoxHome").setAttribute("src",tnoticias[i]);
   // document.getElementById("imgBoxHome").style.Filter="alpha(opacity=10)";
    high(document.getElementById("imgBoxHome"));
    
    alteraTexto(i);
    
        if (i<tnoticias.length-1)
            i++
        else
            i=0
   if(indice==null){       
    setTimeout("update()",speed)
   }
    
}

function Inicio() {
    regenerate2();
      update();
}



