var browser=new Object ();

browser.version = parseInt( navigator.appVersion );
browser.isNetscape = false;
browser.isMicrosoft = false;
if ( navigator.appName.indexOf ( "Netscape" ) != -1 )
  browser.isNetscape = true;
else if ( navigator.appName.indexOf ( "Microsoft" ) != -1 )    browser.isMicrosoft = true;

function cellChange(cell,value)
{
  if (value==1 || value==3)
  {
    cell.style.backgroundColor = "#007F7F";
    cell.style.color = "#FFFFFF";
    if ( browser.isNetscape )
      cell.style.cursor = 'pointer';
    else
      cell.style.cursor = 'hand';
  }
  if (value==2)
  {
    cell.style.backgroundColor = document.bgColor;
    cell.style.color = "#007f7f";
    cell.style.cursor = 'default';
  }
}

function flipbold(cell,newstate)
{
  if (newstate=="on") cell.style.fontWeight="bold";
  else cell.style.fontWeight="normal";
}

function windowClick( value )
{
  window.open( sPath + value, '_top' );
}

function windowClick1( value )
{
  window.open( sPath + value, '_top');
}

function mail (person)
{
  var userid;
  switch(person)
  {
    case "Superintendent":           userid = "president";  break;
    case "Assistant Superintendent": userid = "vicepres";   break;
    case "Stationmaster":            userid = "secretary";  break;
    case "Paymaster":                userid = "treasurer";  break;
    case "Past Superintendent":      userid = "pastpres";   break;
    case "Webmaster":                userid = "webmeister"; break;
    case "info":                     userid = "info";       break;
    case "editor":                   userid = "editor";     break;
    case "Joe Morgan":               userid = "joe.morgan"; break;
    default: document.write("Nobody"); break;
  }
  document.write("<a href=\"mailto:" + userid + "@ppngineers.org\">" + person + "</a>");
  //window.document.location="mailto:info@ppng.org";
}

