can anyone see what is wrong with the following code. it's supposed to display a count down from 30 and afterwards it refreshes the page with jquery's ajax `load()` function.

it works fine for the first or second count down but then the timer starts too count down to fastand sometimes goes to the negative numbers and does not stop at all

what am i doing wrong?

```
function refreshPage(){
    stopRefresh();
    $('div.yui-content').load('rdPage.aspx div.yui-content', doCalculation);
}

function stopRefresh(){
    clearTimeout(timer);
    clearTimeout(interval);
}

var count, timer, interval;

function startTimer(){
    count = 30;
    timer = setTimeout(refreshPage,count * 1000);
    interval= setInterval(updateTimer,1000);
}
function updateTimer(){
    count --;
    $('#timerSpan').text("Refreshing in " + count + "s");
}

function doCalculation(){
    negativeNumberRed();
    startTimer();

}

```

edit: added `doCalculations()`