   function timeSince(serverTime)
   {
      this.name = name;
      this.objectsA = new Array();
      
      this.SecInDAy = 60*60*24;
      this.SecInHr  = 60*60;
      this.SecInMin = 60;

      serverTime = new Date(serverTime);
	  clientTime = new Date();
	  this.serverClientTimeAdjust = serverTime.getTime() - clientTime.getTime();

      this.addObj = function(timeSinceObject)
      {
         i = this.objectsA.length;

         this.objectsA[i] = timeSinceObject;

      }

      this.refreshAll = function()
      {

      	for( n=0; n < this.objectsA.length; n++)
      	{
      		this.refreshObj(n);
        }
      }

      this.refreshObj = function(i)
      {
        o = this.objectsA[i];

        recTime = new Date(o.dt);
		clientTime = new Date();

		//adjust cleint time				
		clientTime.setTime(clientTime.getTime() + this.serverClientTimeAdjust);
		diffTime = clientTime.getTime() - recTime.getTime();

		s = parseInt(diffTime / 1000);
		d = parseInt(s / this.SecInDAy);
		s -= (d * this.SecInDAy);
		h = parseInt(s / this.SecInHr);
		s -= (h * this.SecInHr);
		m = parseInt(s / this.SecInMin);
		s -= (m * this.SecInMin);

		if( d > 0)
		{
		    if( o.d == d && o.h == h) return;
			o.obj.innerHTML = '<font color="black">'  +d+" day"+this.s(d)   +h+" hour"+this.s(h)  +"ago</font>";
		}
		else if( h > 6)
		{
		    if( o.h == h && o.m == m) return;
			o.obj.innerHTML = '<font color="Violet">' +h+" hour"+this.s(h)  +m+" minute"+this.s(m)+"ago</font>";
		}
		else if( h > 0)
		{
		    if( o.h == h && o.m == m) return;
			o.obj.innerHTML = '<font color="Magenta">'+h+" hour"+this.s(h)  +m+" minute"+this.s(m)+"ago</font>";
		}
		else
		{
			o.obj.innerHTML = '<font color="red">'    +m+" minute"+this.s(m)+s+" second"+this.s(s)+"ago</font>";
        }

        o.d = d;
        o.h = h;
        o.m = m;
        o.s = s;
      }

      this.s = function(n)
      {
         if( n == 1)
            return " ";
         else
            return "s ";
      }

   }

   function timeSinceObject(obj, dt)
   {
      this.obj = obj;
      this.dt = dt;
      this.d;
      this.h;
      this.m;
      this.s;
   }

