// Begin JavaScript
// -----------------------------------------------------------------


// =================================================================
// PRELOAD GRAPHICS
// =================================================================

  {  

    // Slash 
    nav_slash		= new Image(10,10);
    nav_slash.src		= 'images/nav_slash.gif';

    // Spacer
    spacer			= new Image(1,1);
    spacer.src		= 'images/spacer.gif';

    // Dotted Lines
    line_dotted		= new Image(700,1);
    line_dotted.src	= 'images/line_dotted.gif';
    line_dotted_h		= new Image(720,2);
    line_dotted_h.src	= 'images/line_dotted_h.gif';
    line_dotted_v		= new Image(720,2);
    line_dotted_v.src	= 'images/line_dotted_v.gif';		

    // Home (Perspectives in Humanities)
    nav_pih			= new Image(216,10);
    nav_pih.src		= 'images/nav_pih.gif';
    nav_pih_on		= new Image(216,10);
    nav_pih_on.src	= 'images/nav_pih_on.gif';

    // About
    nav_about		= new Image(56,10);
    nav_about.src		= 'images/nav_about.gif';
    nav_about_on		= new Image(56,10);
    nav_about_on.src	= 'images/nav_about_on.gif';

    // Events
    nav_events		= new Image(58,10);
    nav_events.src	= 'images/nav_events.gif';
    nav_events_on		= new Image(58,10);
    nav_events_on.src	= 'images/nav_events_on.gif';

    // Opportunities
    nav_opportunities		= new Image(118,10);
    nav_opportunities.src	= 'images/nav_opportunities.gif';
    nav_opportunities_on	= new Image(118,10);
    nav_opportunities_on.src	= 'images/nav_opportunities_on.gif';

    // Showcase
    nav_showcase			= new Image(88,10);
    nav_showcase.src		= 'images/nav_showcase.gif';
    nav_showcase_on		= new Image(88,10);
    nav_showcase_on.src		= 'images/nav_showcase_on.gif';

    // Newsletter
    nav_newsletter		= new Image(93,10);
    nav_newsletter.src		= 'images/nav_newsletter.gif';
    nav_newsletter_on		= new Image(93,10);
    nav_newsletter_on.src	= 'images/nav_newsletter_on.gif'; 

  }

// =================================================================
// BROWSER FUNCTIONS
// ================================================================= 

  // ---------------------------------------------------------------
  // Redirects user to browser-appropriate page
  // ---------------------------------------------------------------

  function handleBrowser(url, alt) {
    if (document.all) {  // IE4+
      window.location.replace(url);
    }
    else if (document.getElementById) {  // NN6 (and IE5+)
      window.location.replace(url);
    }
    else {  // NN4 and all other browsers
      window.location.replace(alt);
    }
  }

// =================================================================
// NAVIGATION FUNCTIONS
// =================================================================

  // ---------------------------------------------------------------
  // Turns the image to its 'on' state	
  // ---------------------------------------------------------------
  function imgOn(imgName) {
    document.images[imgName].src = eval(imgName + "_on.src");
  }  
  
  // ---------------------------------------------------------------
  // Turns the image to its 'off' state if it hasn't been clicked	
  // ---------------------------------------------------------------
  function imgOff(imgName) {
    document.images[imgName].src = eval(imgName + ".src");	// turn it 'off'
  }


// -----------------------------------------------------------------
// End JavaScript
