﻿// JScript File

var noticias, eventos, cursos;
var aba_noticias, aba_eventos, aba_cursos; 

var vis, src;

function setVars()
{
      if( document.getElementById ) // this is the way the standards work
           {
           noticias = document.getElementById('agenda_noticias');
           eventos = document.getElementById('agenda_eventos');
           cursos = document.getElementById('agenda_cursos' );
           
           
           aba_noticias = document.getElementById('aba_noticias');
           aba_eventos = document.getElementById('aba_eventos');
           aba_cursos = document.getElementById('aba_cursos');
           
           }
      else if( document.all ) // this is the way old msie versions work
          {
          noticias = document.all['agenda_noticias'];
          eventos = document.all['agenda_eventos'];
          cursos = document.all['agenda_cursos'];
          
          
          aba_noticias = document.all['aba_noticias'];
          aba_eventos = document.all['aba_eventos'];
          aba_cursos = document.all['aba_cursos'];
          
          }
      else if( document.layers ) // this is the way nn4 works
          {
          noticias = document.layers['agenda_noticias'];
          eventos = document.layers['agenda_eventos'];
          cursos = document.layers['agenda_cursos'];
          
          
          aba_noticias = document.layers['aba_noticias'];
          aba_eventos = document.layers['aba_eventos'];
          aba_cursos = document.layers['aba_cursos'];
          }
          
}

function toggleNoticias()
    {
    
      setVars();
      
      vis = noticias.style;
      vis.display = 'block';
      
      vis = eventos.style;
      vis.display = 'none';
      
      vis = cursos.style;
      vis.display = 'none';
      
      aba_noticias.setAttribute('class','aba_active');
      aba_eventos.setAttribute('class','aba_disabled');
      aba_cursos.setAttribute('class','aba_disabled');
      
      aba_noticias.setAttribute('className','aba_active');
      aba_eventos.setAttribute('className','aba_disabled');
      aba_cursos.setAttribute('className','aba_disabled');
      
     
    }

function toggleEventos()
    {
      
      setVars();
      
      vis = noticias.style;
      vis.display = 'none';
      
      vis = eventos.style;
      vis.display = 'block';
      
      vis = cursos.style;
      vis.display = 'none';

      aba_noticias.setAttribute('class','aba_disabled');
      aba_eventos.setAttribute('class','aba_active');
      aba_cursos.setAttribute('class','aba_disabled');
      
      aba_noticias.setAttribute('className','aba_disabled');
      aba_eventos.setAttribute('className','aba_active');
      aba_cursos.setAttribute('className','aba_disabled');
     
    }
    
function toggleCursos()
    {
        
      setVars();
      
      vis = noticias.style;
      vis.display = 'none';
      
      vis = eventos.style;
      vis.display = 'none';
      
      vis = cursos.style;
      vis.display = 'block';
      
   
      aba_noticias.setAttribute('class','aba_disabled');
      aba_eventos.setAttribute('class','aba_disabled');
      aba_cursos.setAttribute('class','aba_active');
      
      aba_noticias.setAttribute('className','aba_disabled');
      aba_eventos.setAttribute('className','aba_disabled');
      aba_cursos.setAttribute('className','aba_active');
     
    }
