  function ftime()
{
  var date=new Date();
  d=date.getDate();
  var m=date.getMonth();
  var y=date.getYear();
  if(m<12)
  m=m+1;
  var sysdate=d+"-"+m+"-"+y;
  var h=date.getHours();
  var mi=date.getMinutes();
  var s=date.getSeconds();
  mi=checktime(mi);
  s=checktime(s);
  var time=h+":"+mi+":"+s;
  document.getElementById("f1").t2.value=sysdate;
  document.getElementById("f1").t3.value=time;
  document.getElementById("f2").t2.value=sysdate;
  document.getElementById("f2").t3.value=time;
  setTimeout('ftime()',500)
  }
  
function checktime(i)
  {
    if(i<10)
  {
  i='0'+i;
  }
  return i;
}


