<span id="timespan2">
<script>
<?
echo "var minute2 = ".date("i").";";
echo "var secundes2 = ".date("s").";";
?>
bcin = minute2 * 60 + secundes2;
if(minute2 > 30) doin = 3600 - bcin;
else doin = -bcin;
dobc = doin + 25*60;
function changeeventtime2()
{
dobc = dobc - 1;
if(dobc < -5*60)
{
dobc = 3600 + 30*60;
dobc = dobc-1;
}
min2 = Math.floor(dobc/60);
sec2 = dobc%60;
if(min2 < 0)
{
document.getElementById("timespan2").innerHTML="<font color=green>Open";
}
else
{
if(min2 < 10) min2 = "0"+min2;
if(sec2 < 10) sec2 = "0"+sec2;
document.getElementById("timespan2").innerHTML=min2+":<font color=red>"+sec2;
}
window.setTimeout("changeeventtime2()",1000);
}
changeeventtime2();
</script></span></code>