//
// resumeFunctions.js: generic javascript functions used by resume
// ---------------------------------------------------------------
//
// =======================================
// Code that may be useful for other pages
// =======================================
//
// Used to identify node types - from p. 316 of Javascript book
// Needed by IE which doesn't define these
//
if ( !window.Node )
{
   var Node = {
      ELEMENT_NODE: 1,
      ATTRIBUTE_NODE: 2,
      TEXT_NODE: 3,
      COMMENT_NODE: 8,
      DOCUMENT_NODE: 9,
      DOCUMENT_FRAGMENT_NODE: 11
   };
}
/**
 * Interface to getElementById saves typing
 * Inspired by example on p. 321 of Javascript book
 */
function getById( identifier )
{
   if ( typeof identifier == "string" )
   {
      return document.getElementById( identifier );
   }
   else
   {
      return identifier;
   }
}
/**
 * Identify null objects as such (instead of as objects)
 */
function myTypeOf( identifier )
{
   var returnType;

   if ( identifier )
   {
      returnType = typeof identifier;
   }  
   else if ( identifier === null )
   {
      returnType = "null";
   }
   else if ( identifier === undefined )
   {
      returnType = "undefined";
   }
   else
   {
      returnType = "WTF, not defined, null, or undefined?!?";
   }

   return returnType;
}

//
// ====================================================
// Functions to set status field (at bottom of browser)
// ====================================================
// The status and defaultstatus fields are a bit flakey on the
// various browsers.  Actually, in general, handling the onMouseOut
// event seems to work best.
//
var iAmGreatStatus='This guy is good, hire him immediately!!!';
window.defaultStatus=iAmGreatStatus;

function setStatusToDefault()
{
   window.status = iAmGreatStatus;
}

function linkStatus()
{
   window.status = "Opens link in separate window";
}

function emailStatus()
{
   window.status = "Send me an email!";
}

function companyStatus()
{
   window.status = "Opens link in separate window";
}

function moreStatus()
{
   window.status = "Displays more information";
}

function lessStatus()
{
   window.status = "Hides details";
}

