

// Static Ozone class
var Ozone = new function()
{
  var iTimeDiff = 0;

  this.BASE_LINK      = "http://www.grow.nl/index.php?module=";
  this.DEFAULT_MODULE = "Main";
  this.LOGIN_MODULE   = "Login";

  function getMyTime()
  {
    // Return in seconds
    return Math.round((new Date()).getTime() / 1000);
  }

  function setServerTime(iTime)
  {
    // Calculate the difference between server time and local time
    iTimeDiff = getMyTime() - iTime;
  }

  function getServerTime()
  {
    return getMyTime() - iTimeDiff;
  }

  // Initially set up server time
  setServerTime(1283771654);

  // Attach public functions
  this.setServerTime = setServerTime;
  this.getServerTime = getServerTime;
}
