(function(){var b={prefix:"",suffix:"",dynamic_labels:true,show_seconds:true,frequency:1000,};var a=function(e,c){if(typeof e=="function"){this.display=e}else{this.el=(typeof e=="string")?document.getElementById(e):e}this.options={};if(!c){c={}}for(var d in b){this.options[d]=(d in c)?c[d]:b[d]}if(!this.options.show_seconds&&!c.frequency){this.options.frequency=60000}};a.prototype={start:function(){this.resume((new Date).getTime())},resume:function(c){if(c){this.startTime=c}var e=this;var d=function(){var j=Math.floor(((new Date).getTime()-e.startTime)/1000);var f=Math.floor(j/60);j%=60;var i=Math.floor(f/60);f%=60;var k=Math.floor(i/24);i%=24;if(e.display){e.display(k,i,f,j)}if(e.el){var g="";if(e.options.dynamic_labels){if(k){g+=k+" day"+(k>1?"s":"")}if(k&&i){g+=", "}if(i){g+=i+" hour"+(i>1?"s":"")}if(i&&f){g+=", "}if(f){g+=f+" minute"+(f>1?"s":"")}if(e.options.show_seconds){if(f&&j){g+=", "}if(j){g+=j+" second"+(j>1?"s":"")}}}else{g+=k+" days "+i+" hours "+f+" minutes";g+=e.options.show_seconds?" "+j+" seconds":""}if(g.length){e.el.innerHTML=(e.options.prefix!=null?e.options.prefix:"")+g+(e.options.suffix!=null?e.options.suffix:"")}}e.timerID=setTimeout(arguments.callee,e.options.frequency)};d()},stop:function(){clearInterval(this.timerID)},};window.ElapsedTimer=a})();