Hey I just quickly wrote this up, it still needs some editing but hopefully it can get you started ..
/* Minutes to count down from */
var minutes = 10;
/* Total seconds of countdown */
var totalSeconds = 60 * minutes;
/* The div that will display the clock */
var clockDiv;
/* Intialize clock */
function initClock() {
clockDiv = document.getElementById('clock'); // grab the clock div;
setInterval('decreaseSecond()', 1000); // Start an interval every 1 second(1000 milliseconds)
}
/* Decrease the second, re-display clock */
function decreaseSecond() {
totalSeconds--; // decrease seconds
displayClock(); // show clock
}
/* Format total seconds to minutes and seconds */
function displayClock() {
var min = Math.floor(totalSeconds / 60); // Find minutes
var sec = (totalSeconds % 60); // Find seconds
clockDiv.innerHTML = min+':'+ (sec < 10 ? '0'+sec : sec); // Display Countdown
}