Hey guys, i’m a complete idiot and have no idea how to do this but what I need is simple.
I need a script that will start at a certain time and day, and then repeat counting down in 36 hour increments.
this is what I have:
<html>
<body>
<center>
<a href=”
<sup><big><b>Guildleves Will Reset In:
<script type = “text/javascript”>
dateFuture = new Date(2010,9,5,2,47,00);
function GetCount(){
dateNow = new Date();
amount = dateFuture.getTime() – dateNow.getTime();
delete dateNow;
if(amount < 0){
document.getElementById(‘countbox’).innerHTML=”Now!”;
}
else{
days=0;hours=0;mins=0;secs=0;out=””;
amount = Math.floor(amount/1000);
days=Math.floor(amount/86400);
amount=amount%86400;
hours=Math.floor(amount/3600);
amount=amount%3600;
mins=Math.floor(amount/60);
amount=amount%60;
secs=Math.floor(amount);
if(days != 0){out += days +” day”+((days!=1)?”s”:””)+”, “;}
if(days != 0 || hours != 0){out += hours +” hour”+((hours!=1)?”s”:””)+”, “;}
if(days != 0 || hours != 0 || mins != 0){out += mins +” minute”+((mins!=1)?”s”:””)+”, “;}
out += secs +” seconds”;
document.getElementById(‘countbox’).innerHTML=out;
setTimeout(“GetCount()”, 1000);
}
}
window.onload=GetCount;
startTimer(129600);
</script>
<div id=”countbox”></div>
</sup>
</body>
</html>
essentially, what I want is the timer to display how much time is left until the next guildleve starts. Starting on a certain time/day. The leves repeat every 36 hours. All I need is for this script to start over again at 36, and count down to 0. Rinse/repeat. Starting on a day I specify.
Any help would be much appreciated.