function record()
{
   this.records = false;
   this.active = 0;

   this.assign = function(obj)
   {
      this.records = obj;
   }

   this.activeRecord = function()
   {
      return this.records[this.active];
   }

   this.next = function()
   {
      if(this.records != false)
      {
         if((this.active + 1) <= this.records.length-1)
         {
            this.active++;
            return this.records[this.active];
         }
         else
         {
            this.active = this.records.length-1;
            return this.records[this.active];
         }
      }else
         return false;
   }

   this.previous = function()
   {
      if(this.records != false)
      {
         if((this.active -1) > 0 && (this.active -1) <= this.records.length-1)
         {
            this.active--;
            return this.records[this.active];
         }
         else
         {
            this.active = 0;
            return this.records[this.active];
         }
      }
      else
         return false;
   }
}