Hi, I need help from us
I have this JS file:


var a, b, xtime, clock, minute, second = 0;
var xlocation, m = "";


function initTimer(time, location)
{
m = document.getElementById("d2");
i = 125;
xlocation = location;
xtime = time;
clock = time;
//document.getElementById("d1").innerHTML="";
m.style.width=0;

clearTimeout(a);
clearTimeout(b);

startCount();
startProgressBar();

}

function startProgressBar()
{
if (i >= 0)
{
if (clock < 10)
{
m.style.background="red";
}
else
{
m.style.background="blue";
}

m.style.width=i+"px";
a = setTimeout("startProgressBar();", xtime/125*1000);
}
i--;
}

function startCount()
{

if (clock != 0)
{
minute = Math.floor(clock/60);
second = (clock-minute*60);
b = setTimeout('startCount();', 1000);
}
else
{
window.location.href = xlocation;
}
clock --;
showClock();
}

function showClock()
{
minute = minute.toString();
second = second.toString();

if (minute.length < 2)
{
minute = "0" + minute;
}
if (second.length < 2)
{
second = "0" + second;
}
document.getElementById("clock").innerHTML = minute + ":" + second;
}



Basicly, I need execute initTimer(time, location) function everytime If I refresh my browser, but I canīt use onload method...for example...
<body onload="initTimer(180, 'http://www.example.com');">

Is here somebody, who can solve that ?

Thanks a lot ...