var nowtime;
var timecolor="000000";
var maxseconds;
var stopit;
var starttime;
var countdown;
var timetimer;

function startTimer(tmdelay) {
maxseconds=tmdelay;
stopit=false;
nowtime=0;
	starttime= new Date();
	starttime=starttime.getTime();
	checktime();
}
function checktime() 
{
    if (nowtime<maxseconds && stopit==false) {
		nowtime=new Date();
		nowtime=nowtime.getTime();
		nowtime=(nowtime-starttime)/1000;
		countdown=maxseconds-nowtime;
		countdown=Math.floor(countdown*100)/100;
		if (countdown<0) {countdown=0};
/*		timesign.innerHTML="<font size=1 face=Arial color="+timecolor+">"+countdown+"</font>"; */
        	timetimer=setTimeout("checktime()",100);
    		}
	else if (stopit==true) {
		clearTimeout(timetimer);
/*		timesign.innerHTML=""; */
		}
    else {
	clearTimeout(timetimer);
/*	timesign.innerHTML=""; */
	uplift();
    } 
}
function stopTimer() {
	stopit=true;
	checktime();
}
