<!--
   // timer.js
   
   var timers;

   function timer_init(timer_name, timer_func, timer_interval)
   {
      if(!timer_chk())
      {
         return false;
      }

      if(typeof(timer_name) == "undefined" || !timer_name){
         return false;
      }

      if(typeof(timer_func) == "undefined" || !timer_func){
         return false;
      }

      if(typeof(timer_interval) == "undefined" || !timer_interval){
         timer_interval = 1000;
      }

      if(typeof(document.getElementById(timer_name)) == "undefined")
      {
         return false;
      }
      
      if(typeof(timers[timer_name]) != "undefined")
      {
         return false;
      }
      
      timers[timer_name] = new Object;
      timers[timer_name] = window.setInterval(timer_func, timer_interval);
      
      return true;
   }
   
   function timer_stop(timer_name)
   {
      if(!timer_chk())
      {
         return false;
      }

      if(typeof(timer_name) == "undefined" || !timer_name){
         return false;
      }

      if(typeof(timers[timer_name]) == "undefined")
      {
         return false;
      }

      window.clearInterval(timers[timer_name]);
      
      timers[timer_name] = null;

      return true;
   }

   function timer_chk()
   {
      if(typeof(timers) != "object")
      {
         timers = new Object();
      }
      
      return true;
   }
   
-->
