var cont = 4; function h1(){ document.getElementById('headerscambiantes').className = 'classh1'; cambio_boton("1"); document.enlaceheader.action="./linux/"; } function h2(){ document.getElementById('headerscambiantes').className = 'classh2'; cambio_boton("2"); document.enlaceheader.action="./e-mail_marketing/"; } function h3(){ document.getElementById('headerscambiantes').className = 'classh3'; cambio_boton("3"); document.enlaceheader.action="./sms_marketing/"; } function h4(){ document.getElementById('headerscambiantes').className = 'classh4'; cambio_boton("4"); document.enlaceheader.action="./web_site_marketing/"; } function h5(){ document.getElementById('headerscambiantes').className = 'classh5'; cambio_boton("5"); document.enlaceheader.action="./bluetooth_marketing/"; } function h6(){ document.getElementById('headerscambiantes').className = 'classh6'; cambio_boton("6"); document.enlaceheader.action="./e-call_marketing/"; } function h7(){ document.getElementById('headerscambiantes').className = 'classh7'; cambio_boton("7"); document.enlaceheader.action="./capacitacion/"; } function h8(){ document.getElementById('headerscambiantes').className = 'classh8'; cambio_boton("8"); document.enlaceheader.action="./registro_eventos/"; } function cambio_boton(numero){ var boton=""; document.getElementById('btnh1').className = 'btn_header_blanco'; document.getElementById('btnh2').className = 'btn_header_blanco'; document.getElementById('btnh3').className = 'btn_header_blanco'; document.getElementById('btnh4').className = 'btn_header_blanco'; document.getElementById('btnh5').className = 'btn_header_blanco'; document.getElementById('btnh6').className = 'btn_header_blanco'; document.getElementById('btnh7').className = 'btn_header_blanco'; document.getElementById('btnh8').className = 'btn_header_blanco'; boton="btnh"+numero; document.getElementById(boton).className = 'btn_header_rojo'; } function headers(){ setInterval('contador()',15000); } function contador(){ var contador = document.getElementById("contador"); contador.value = cont; cont++; if(cont==9){ contador.value = 1; cont=1; } if(cont==1){h1();} if(cont==2){h2();} if(cont==3){h3();} if(cont==4){h4();} if(cont==5){h5();} if(cont==6){h6();} if(cont==7){h7();} if(cont==8){h8();} }