<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
</head>
<body>
<form name="myform" >
<input name="" />
</form>
<script type="text/javascript">
/*<![CDATA[*/
function zxcResetTimer(o){
var frm=document.forms[o.FormName],s=o.Delay;
if (frm){
o.frm=frm;
o.s=(typeof(s)=='number'&&s>0?s:60)*1000
this.addevt(document,'click','Reset',o);
this.addevt(document,'mousemove','Reset',o);
}
}
zxcResetTimer.prototype={
Reset:function(o){
clearTimeout(o.to);
o.to=setTimeout(function(){ o.frm.reset(); },o.s);
},
addevt:function(o,t,f,p,p1){
var oop=this;
o.addEventListener?o.addEventListener(t,function(e){ return oop[f](p,p1);},false):o.attachEvent?o.attachEvent('on'+t,function(e){ return oop[f](p,p1); }):null;
}
}
new zxcResetTimer({
FormName:'myform',
Delay:3 // seconds
});
/*]]>*/
</script></body>
</html>