state = 0;
ms 	= 0;

function startstop()	{
	if (state == 0)	{
		state = 1;
		then = new Date();
		then.setTime(then.getTime() - ms);
	}
	else	{
		state = 0;
		now = new Date();
		ms = now.getTime() - then.getTime();
		document.stopwa.time.value = (Math.floor(ms/10)) / 100;
   }
}

function swreset()	{
	state = 0;
	ms = 0;
 	document.stopwa.time.value = ms;
}

function display()	{
	setTimeout("display();", 100);
	if (state == 1)	{
		now = new Date();
		ms = now.getTime() - then.getTime();
		ms = (Math.floor(ms/10)) / 100;
		document.stopwa.time.value = ms;
   }
}

