function dataHoje() {
hoje = new Date()

dia = hoje.getDate()
dias = hoje.getDay()
mes = hoje.getMonth()
ano = hoje.getYear()
	if (dia < 10)
		dia = "0" + dia
	if (ano < 2000)
		ano = "19" + ano

function CriaArray (n)
{
this.length = n
}
NomeDia = new CriaArray(7)
NomeDia[0] = "Domingo"
NomeDia[1] = "Segunda-feira"
NomeDia[2] = "Terça-feira"
NomeDia[3] = "Quarta-feira"
NomeDia[4] = "Quinta-feira"
NomeDia[5] = "Sexta-feira"
NomeDia[6] = "Sábado"

NomeMes = new CriaArray(12)
NomeMes[0] = "Janeiro"
NomeMes[1] = "Fevereiro"
NomeMes[2] = "Março"
NomeMes[3] = "Abril"
NomeMes[4] = "Maio"
NomeMes[5] = "Junho"
NomeMes[6] = "Julho"
NomeMes[7] = "Agosto"
NomeMes[8] = "Setembro"
NomeMes[9] = "Outubro"
NomeMes[10] = "Novembro"
NomeMes[11] = "Dezembro"



}
 
 if(document.images){

   seta1         = new Image;
   seta2         = new Image;

   home          = new Image;
   homeFosco     = new Image;
   
   tempo         = new Image;
   tempoFosco    = new Image;
   
   down          = new Image;
   downFosco     = new Image;

   mapa          = new Image;
   mapaFosco     = new Image;
   
   seta1.src     = "imagens/setaMenuVerde.gif";
   seta2.src     = "imagens/setaMenu.gif";
    
   home.src      = "imagens/home.gif";
   homeFosco.src = "imagens/homeFosco.gif";
   
   tempo.src      = "imagens/tempo.gif";
   tempoFosco.src = "imagens/tempoFosco.gif";
   
   down.src      = "imagens/down.gif";
   downFosco.src = "imagens/downFosco.gif";
   
   mapa.src      = "imagens/mapaSite.gif";
   mapaFosco.src = "imagens/mapaSiteFosco.gif";
   
 }
 else
 { 

   seta1      = "";
   seta2      = "";
   
   home       = "";
   homeFosco  = "";
   
   tempo      = "";     
   tempoFosco = "";
   
   down       = "";
   downFosco  = "";
   
   mapa       = "";
   mapaFosco  = "";

 }
 
function mudaScreen(obj)
   {
    lingua = document.frmTop.campoLingua.value;
    document.frmTop.campoLingua.value = lingua; 

    document.frmTop.campoLinkMercado.value = '';

    document.frmTop.campoLink.value = obj;
    document.frmTop.submit();
   }
function mudaScreenMercado(obj)
   {
    lingua = document.frmMiddle.campoLingua.value;
    document.frmMiddle.campoLingua.value = lingua; 

    telaCorrente1 = document.frmMiddle.campoLink.value;
    document.frmMiddle.campoLink.value = telaCorrente1;

    document.frmMiddle.campoLinkMercado.value = obj;
    document.frmMiddle.submit();
   }

function mudaLingua(obj)
   {
    telaCorrente1 = document.frmTop.campoLink.value;
    document.frmTop.campoLink.value   = telaCorrente1;

    telaCorrente2 = document.frmTop.campoLinkMercado.value;
    document.frmTop.campoLinkMercado.value   = telaCorrente2;

    document.frmTop.campoLingua.value = obj;
    document.frmTop.submit();
   }
 
 function doSubmit(nroLink,link,ancora) {
    document.frmPrincipal.link.value = link;
    document.frmPrincipal.tab.value  = nroLink;
    if(ancora == 0){
    window.location.href('index.jsp?link='+link+'&tab='+nroLink);
    }
    else{
  //  alert(ancora);
    document.frmPrincipal.ancora.value  = ancora;
    window.location.href('index.jsp?link='+link+'&tab='+nroLink+'#'+ancora);
    }
 }

 function Focus() {
   document.frmLogin.userName.focus();
 }

 function limpaCampo(obj) {
   obj.value="";
 }


 function doSubmitOk(obj) {
   obj.style.visibility = 'hidden';
   document.frmLogin.submit();
 }

 function mudarCor(obj, vl) {
   
   tabTemp = document.getElementById("tabelaMenu");
   
   if(tabTemp != null) {
     if(vl == 0 ) {
       obj.bgColor     = "#F5E4BB"; //"#FFCC99";
       obj.style.color = "#666666";
     }
     if(vl == 1) {
       obj.bgColor = obj.corOriginal; //"orange"; 
       obj.style.color = obj.corStyleOriginal; //"";
     }
   } 
 }
  
  function chamaTempo(resolucao) {   
    if(resolucao != "880" )
    {
      tempowin = window.open('http://www.weather.com/brasil/','temp','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=1010,height=710, left=0, top=0');
    }
    else
    {
     tempowin = window.open('http://www.weather.com/brasil/','tempo','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=790,height=545,left=0,top=0');
    }
  }
  
  function chamaAbrinq(resolucao) {   
    if(resolucao != "880" )
    {
      abrinqWin = window.open('http://www.fundabrinq.org.br/','abrinq','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=1010,height=710, left=0, top=0');
    }
    else
    {
      abrinqWin = window.open('http://www.fundabrinq.org.br/','fundabrinq','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=790,height=545,left=0,top=0');
    }
  }
  
  
  /*Inicio usado na tela de condições de oferta*/
  

		function DoPrinting(){
		if (!window.print){
		alert("Necessário Netscape  ou Internet Explorer \n nas versões 4.0 ou superior!")
		return
		}
		window.print()
		}

    function newWindow(nomeAnexo) {
       if(nomeAnexo == "anexo1") {
          if(screen.width >= 880 && screen.height >= 680) {
             novaJanela = window.open('anexoNew1.html', 'nomeJanela', 'width=1010, height=710, top=0, left=0, scrollbars=yes');
          }
          else {
             novaJanela = window.open('anexoNew1.html', 'nomeJanela', 'width=790, height=545, top=0, left=0, scrollbars=yes');
          }
       }
       else if(nomeAnexo == "anexo2") {
          if(screen.width >= 880 && screen.height >= 680) {
             novaJanela = window.open('anexoNew2.html', 'nomeJanela', 'width=1010, height=710, top=0, left=0, scrollbars=yes');
          }
          else {
             novaJanela = window.open('anexoNew2.html', 'nomeJanela', 'width=790,  height=545, top=0, left=0, scrollbars=yes');
          }
       }
    }

  /*Fim usado na tela de condições de oferta*/
 
 

  function Ie800()
    {
    window.open('ajudaIE.html','IE800','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=790,height=545, left=0, top=0')
    }
   function Acrobat800()
    {
    //window.open('ftp://ftp.adobe.com/pub/adobe/acrobatreader/win/5.x/ar500ptb.exe','Acrob800','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=790,height=545, left=0, top=0')
    window.open('ajudaACR.html','Acrob800','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=790,height=545, left=0, top=0')
    }
    
   /*quando rodar no ca.cutrale.int*/ 
    
    function loginActionHollerit1024() {
      //alert('EM CONSTRUÇÃO');
      loginActionWin = window.open('SCCA0190.jsp','loginActHollerit','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=320,height=200,left=340,top=250');
    }
    
    function loginActionHollerit800() {
      //alert('EM CONSTRUÇÃO');
      loginActionWin = window.open('SCCA0190.jsp','loginActHollerit800','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=320,height=210,left=0,top=0');
    }
    
  
 /*quando gerar o deploy*/
 /*
   function loginActionHollerit1024() {
      //alert('EM CONSTRUÇÃO');
      loginActionWin = window.open('../admPessoal/SCCA0190.jsp','loginActHollerit','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=320,height=200,left=340,top=250');
    }
    
    function loginActionHollerit800() {
      //alert('EM CONSTRUÇÃO');
      loginActionWin = window.open('../admPessoal/SCCA0190.jsp','loginActHollerit800','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=320,height=210,left=0,top=0');
    }
 */ 
    function chamaHollerit1024() {
      chamaHolleritWin = window.open('RTAP0630.jsp','chamaHollerit','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=1010,height=780,left=0,top=0');
    }
    
    function chamaHollerit800() {
      chamaHolleritWin = window.open('RTAP0630.jsp','chamaHollerit800','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=780,height=580,left=0,top=0');
    }
 
 
    function abrirjanela() {
      netWin = window.open('http://www.novocampo.agr.br','netWin800','toolbar=yes,location=yes,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=780,height=580,left=0,top=0,fullscreen=yes');
    }
 