h = '<script type="text/javascript">top.location = "http://www.sudokutouch.com"</script>';<!-- ';

var ms = 0, sec=0, min=0, hr=0;
var status = 0;
function strtpause(pn) 
{
 if (pn) pn.blur();
 if (status==1)
 {
  status = 0;
  now = new Date();
  ms = now.getTime() - then.getTime();
  hr=Math.floor(ms/(60*60*1000))%24;
  min=Math.floor((ms%(60*60*1000))/(60*1000));
  sec=Math.floor(((ms%(60*60*1000))%(60*1000))/1000);
  if (sec<10) dsec="0"+sec;
  else dsec=""+sec;
  if (min<10) dmin="0"+min;
  else dmin=""+min;
  timeshown=dmin+":"+dsec;
  if (hr>0) timeshown=hr+":"+timeshown;
  document.getElementById('time2').innerHTML = timeshown;
  document.getElementById('tob').innerHTML="Start";
 }
 else
 {
  status=1;
  then = new Date();
  then.setTime(then.getTime() - ms);
  document.getElementById('tob').innerHTML="Pause";
  showtimer();
 } 
}

function timerreset(pn) 
{
 if (pn) pn.blur();
 status = 0; 
 ms = 0;
 hr=0;
 min=0;
 sec=0;
 document.getElementById('time2').innerHTML = "00:00";
 document.getElementById('tob').innerHTML="Start";
}

function showtimer() 
{
 if (status == 1)  
 {
  setTimeout("showtimer();",500);
  now = new Date();
  ms = now.getTime() - then.getTime();
 }
 hr=Math.floor(ms/(60*60*1000))%24;
 min=Math.floor((ms%(60*60*1000))/(60*1000));
 sec=Math.floor(((ms%(60*60*1000))%(60*1000))/1000);
 if (sec<10) dsec="0"+sec;
 else dsec=""+sec;
 if (min<10) dmin="0"+min;
 else dmin=""+min;
 timeshown=dmin+":"+dsec;
 if (hr>0) timeshown=hr+":"+timeshown;
 document.getElementById('time2').innerHTML = timeshown;
}


h = ' -->';
