este es el codigo:
Código Javascript :
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="refresh" content="120">
<script type="text/javascript" src="http://www.dfdeportes.com.ar/lavoz/javascript.js"></script>
<script type="text/javascript" language="javascript">
function getSegundos(dato){
hh = Math.floor(dato / 10000);
mm = Math.floor((dato / 100) - hh * 100);
ss = Math.floor(dato % 100);
return 3600 * hh + 60 * mm + ss;
}
function getSegundosFecha(fecha) {
return 3600 * fecha.getHours() + 60 * fecha.getMinutes() + fecha.getSeconds();
}
function setMinutos(tiempo){
return Math.floor(tiempo / 60);
}
function setSegundos(tiempo){
return tiempo % 60;
}
var horainiciocliente = getSegundosFecha(new Date());
function actualizarTiempo(ahoraserver,horacomienzo){
var ahoracliente = getSegundosFecha(new Date());
var tiempojuego = (getSegundos(ahoraserver) - getSegundos(horacomienzo)) + (ahoracliente - horainiciocliente);
return tiempojuego;
}
var contadorminutos = null;
function escribeTiempo(tiemposerver,horainicio,eldiv) {
contadorminutos = document.getElementById(eldiv);
var transcurrido = actualizarTiempo(tiemposerver, horainicio);
if (transcurrido >= 0) {
minutos = setMinutos(transcurrido);
segundos = setSegundos(transcurrido) <= 9 ? "0" + setSegundos(transcurrido) : setSegundos(transcurrido);
if(minutos <= 55){
contadorminutos.innerHTML = minutos + ":" + segundos;
setTimeout('escribeTiempo(' + tiemposerver + ',' + horainicio + ',"' + eldiv + '")',1000);
}else{
contadorminutos.innerHTML= "-";
}
} else {
contadorminutos.innerHTML= "--:--";
}
}
function actualizarTiempoRefresh(lapso){
var ahoracliente = getSegundosFecha(new Date());
var tiempotranscurrido = lapso - (ahoracliente - horainiciocliente);
return tiempotranscurrido;
}
function refreshpagina(tiemporefresh,timer,eldiv) {
contadorminutos = document.getElementById(eldiv);
var transcurrido = actualizarTiempoRefresh(tiemporefresh);
if (timer == 'on'){
if (transcurrido >= 1) {
minutos = setMinutos(transcurrido) <= 9 ? "0" + setMinutos(transcurrido) :setMinutos(transcurrido);
segundos = setSegundos(transcurrido) <= 9 ? "0" + setSegundos(transcurrido) : setSegundos(transcurrido);
if (minutos >= 1){
contadorminutos.innerHTML = minutos + ":" + segundos;
} else {
contadorminutos.innerHTML = "00:" + segundos;
}
setTimeout('refreshpagina(' + tiemporefresh + ',"' + timer + '","' + eldiv + '")',1000);
} else {
window.location.href = window.location.pathname;
}
}
}
function refreshpaginasincontador(tiemporefresh,timer) {
var transcurrido = actualizarTiempoRefresh(tiemporefresh);
if (timer == 'on' && tiemporefresh > 0){
if (transcurrido >= 1) {
segundos = setSegundos(transcurrido) <= 9 ? "0" + setSegundos(transcurrido) : setSegundos(transcurrido);
setTimeout('refreshpaginasincontador(' + tiemporefresh + ',"' + timer + '")',1000);
} else {
window.location.href = window.location.pathname;
}
}
}
</script>
</head>
<body>
<div class="MinutoAMinuto">
<div class="topBar clearfix">
<div class="lf">
<div class="Stats"><span id="Estado">1er Tiempo. </span><span id="timer" class="txt40"></span><script type="text/javascript">refreshpagina(1000,1000,'timer'); actualizarTiempoRefresh(5);escribeTiempo(2000,2000,'timer');refreshpaginasincontador(60,60);</script>
<script type="text/javascript"></script>
</div>
</div>
<div class="rg">
<a class="Flecha" href="javascript:openWindowScrolls('fichaPopup.php ?archivo=nacionalb/ficha0027141.html',630,640);">
Ver ficha
</a>
</div>
</div>
<div class="EqBar">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="50%" valign="top">
<div class="LOCAL clearfix"><img alt="" class="Club" width="19" height="19" src="http://www-ak.lavoz.com.ar/deportes/escudos/664.gif"><span class="equipo">Indep.Mza.</span><div class="rg RES" id="LOCAL_RES">0</div>
</div>
</td>
<td width="50%" valign="top">
<div class="VISITANTE clearfix">
<div class="lf RES" id="VISITANTE_RES">0</div><img alt="" class="Club" width="19" height="19" src="http://www-ak.lavoz.com.ar/deportes/escudos/15.gif"><span class="equipo">Quilmes</span></div>
</td>
</tr>
</table>
</div>
<div class="CommBar">
<MARQUEE DIRECTION="LEFT" BEHAVIOR="SCROLL" SCROLLAMOUNT="3" SCROLLDELAY="1"> </MARQUEE>
</div>
</div>
</body>
</html> 