function countdown(hh, mm, ss) {
	function getInt(str) {
		if (str.indexOf('0') == 0) {
			str = str.substring(1);
		}
		return parseInt(str)
	}

	var objHour = document.getElementById(hh);
	var objMinute = document.getElementById(mm);
	var objSecond = document.getElementById(ss);
	var i;
	try {
		if (getInt(objSecond.innerHTML) > 0) {
			i = getInt(objSecond.innerHTML) - 1;
			objSecond.innerHTML = (i<10 ? '0' : '') + i;
		} else {
			objSecond.innerHTML = '59';
			if (getInt(objMinute.innerHTML) > 0) {
				i = getInt(objMinute.innerHTML) - 1;
				objMinute.innerHTML = (i<10 ? '0' : '') + i;
			} else {
				objMinute.innerHTML = '59';
				if (getInt(objHour.innerHTML) > 0) {
					i = getInt(objHour.innerHTML) - 1;
					objHour.innerHTML = (i<10 ? '0' : '') + i;
					
				} else {
					document.location.reload();
				}
			}
		}
		//Warning
		if ((getInt(objHour.innerHTML) == 0) && (getInt(objMinute.innerHTML) < 15)) {
			var FlashBack = false;
			if (getInt(objMinute.innerHTML) < 5) FlashBack = true;
			if ((getInt(objSecond.innerHTML)/2) == (parseInt(getInt(objSecond.innerHTML)/2))) {
				objHour.style.color = '#A31515';
				objMinute.style.color = '#A31515';
				objSecond.style.color = '#A31515';
				if (FlashBack) objHour.parentNode.parentNode.style.backgroundColor = '';
			} else {
				objHour.style.color = '';
				objMinute.style.color = '';
				objSecond.style.color = '';
				if (FlashBack) objHour.parentNode.parentNode.style.backgroundColor = '#FFDFD7';
			}
		}
	} catch(e) {}
}