function ApplicationContext (name)
{
    this.name = name;
    /*
    // Valore Bit dei  ruoli
    this.roleBits = 
    {
        ADMIN         : 1,        // Permessi di amministrazione funzionalitą avanzate
        INTRANET_EDIT : 2,        // Permette operazioni di modifica all'interno della INTRANET
        INTRANET      : 4,        // Consultazione INTRANET
        INTERNET      : 8         // Consultazione INTERNET
    };
    this.theUser = "";
    this.theRole = this.roleBits.INTRANET;     
*/
    
    this._date  = dateToString(new Date());
    this._state = "3";
    this._stateEnabled = 1;

    this.theMapID     = "PRG";    
    
    // ID di sessione ATTUALMENTE NON USATO
    /*
    this.SSOID = "";
    this.authenticationTime = null;
    */
    
    // Coordinate di mappa predefinite
    this.startScale = 70000;
    this.startX     = 1680500;
    this.startY     = 4850000;
    
    this.startMBR   = { l: 1672000, t: 4857000, r: 1689000, b: 4843000  };  

    this.center_x  = null;
    this.center_y  = null;
    this.scale     = this.startScale  ;
}

ApplicationContext.prototype.save = function()
{                                         
   var serializer = new Serializer();         
   var strSerialized = serializer.serializeObject (this, ":", "&");
   var Cookie = new CookieObj();
   Cookie.set ("ApplicationContext", strSerialized); 
}

ApplicationContext.prototype.load = function()
{  
   var serializer = new Serializer();         

   var Cookie = new CookieObj();
   var strContext = Cookie.get ("ApplicationContext"); 

   if (strContext == "")  return;

   var Context = serializer.deserializeObject (strContext, ":", "&");             

   for (var m in Context)   
        this[m] = Context[m];    

} 
         

