//------------------------------------------------------------------
// Animation of Satellite SST data
//
// Note: 
//
//   The number of frames is 31, plots are numbered -00 ->  -30.
//
// History:
//
//   First version                       JW/JLH DMI/COI   2004.04.30
//   Modulised                           jw               2005.08.25
//   NATL included                       pnn              2006.08.01
//   Cleanup, use common javascript      pnn              2008.08.28
//   routines, implement key bindings
//
//------------------------------------------------------------------

//------------------------------------------------------------------
// Initialisation
//------------------------------------------------------------------

var nplots 	= 31;
var prefix	= "";

cookiename 	= "settings"
cookieexpire 	= new Date();
cookieexpire.setTime(cookieexpire.getTime() + 365*86400*1000);
settings 	= getCookie(cookiename)
if (settings == null) {
  /* Default settings */
  settings		= new Object();
  settings.par		= "satsst.";
  settings.dom		= "nsb.";
  settings.timestep	= 30;
  settings.delay	= 400;
}

//------------------------------------------------------------------
// specific for this application
//------------------------------------------------------------------

function SetPar()
{
 settings.par = document.input.param.value;

}

// set figure number: Take care of leading string "d-" and the fact 
// that time and figure numbers are opposite directed
function SetNumber(i)
{
  tmp = nplots-i-1;
  if (tmp<10) {figno="d-0" + tmp;}
  else {figno = figno="d-" + tmp;}
}

// info function
function info()
{
 open("info.html", "displayWindow", "width=700,height=840,status=no,toolbar=no,menubar=no,scrollbars=yes");
}

// info function
function info_uk()
{
 open("info.uk.html", "displayWindow", "width=700,height=840,status=no,toolbar=no,menubar=no,scrollbars=yes");
}

