// sesscook.js
// Copyright 1998-2002 by the Regents of New Mexico State University.

var SessionData = new Cookie
  (
   document,
   "SessionData",
   null,          // no expiration date makes this a temporary cookie, gone at end of session
   "/",
   ".ppd.nmsu.edu"
  )
;

function StoreSessionData(SessionKey, SessionValue)
{
   SessionData[SessionKey] = SessionValue;
   SessionData.store();
}

SessionData.load(); // gets old cookie data if present

if (SessionData.ProductionDatabase == null)
{
   StoreSessionData('ProductionDatabase',  49); 
   StoreSessionData('DatabaseNumber'    ,  49); 
}
//***************************************************************
//
// This defines the default database number, which must be the
// current production database.
//
// It appears that a browser session may need to be shut down and
// restarted to avoid confusion when production database is changed.
//
//***************************************************************

// Original code by Tom Puckett, November 1998.
// THP  5/12/2001 Added production database definition.
// THP  6/02/2001 Changed production database from 0 to 27.
// THP  1/12/2002 Changed production database from 27 to 30.
// NMP 05/01/2004 Changed production database from 30 to 47.
// NMP 08/15/2004 Changed production database from 47 to 49.
