Olá pessoal.
O script abaixo funciona redondinho até a penultima linha de cada dia da semana.
A última não vai nem por decreto.
Se alguém puder ajudar, agradeço.
<script>
function rodarImagens(){
var now = new Date();
var agora = now.getDay();
var hora = now.getHours();
switch (agora){
case 0: //domingo
if(hora >= 0 && hora < 6){ document.write('<iframe src="0 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 6 && hora < 23){ document.write('<iframe src="6 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 23 && hora < 0){ document.write('<iframe src="6 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
break
case 1: //segunda
if(hora >= 0 && hora < 6){ document.write('<iframe src="0 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 6 && hora < 9){ document.write('<iframe src="6 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 9 && hora < 18){ document.write('<iframe src="7 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 18 && hora < 23){ document.write('<iframe src="6 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 23 && hora < 0){ document.write('<iframe src="0 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
break
case 2: //terça
if(hora >= 0 && hora < 6){ document.write('<iframe src="0 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 6 && hora < 9){ document.write('<iframe src="6 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 9 && hora < 18){ document.write('<iframe src="7 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 18 && hora < 23){ document.write('<iframe src="6 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 23 && hora < 0){ document.write('<iframe src="0 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
break
case 3: //quarta
if(hora >= 0 && hora < 6){ document.write('<iframe src="0 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 6 && hora < 9){ document.write('<iframe src="6 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 9 && hora < 18){ document.write('<iframe src="7 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 18 && hora < 23){ document.write('<iframe src="6 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 23 && hora < 0){ document.write('<iframe src="0 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
break
case 4: //quinta
if(hora >= 0 && hora < 6){ document.write('<iframe src="0 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 6 && hora < 9){ document.write('<iframe src="6 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 9 && hora < 18){ document.write('<iframe src="7 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 18 && hora < 23){ document.write('<iframe src="6 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 23 && hora < 0){ document.write('<iframe src="0 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
break
case 5: //sexta
if(hora >= 0 && hora < 6){ document.write('<iframe src="0 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 6 && hora < 9){ document.write('<iframe src="6 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 9 && hora < 18){ document.write('<iframe src="7 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 18 && hora < 23){ document.write('<iframe src="6 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 23 && hora < 0){ document.write('<iframe src="0 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
break
case 6: //sábado
if(hora >= 0 && hora < 6){ document.write('<iframe src="0 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 6 && hora < 9){ document.write('<iframe src="6 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 9 && hora < 13){ document.write('<iframe src="7 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 13 && hora < 23){ document.write('<iframe src="6 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
if(hora >= 23 && hora < 0){ document.write('<iframe src="6 hs.html" style="position:absolute; left:0px; top:0px; z-index:14" frameBorder=0 width=120 height=70 allowTransparency>');}
break
}
}
</script>
</body>
<p><script>rodarImagens();</script></p>