<!--
// Title:       	JavaScript-enabled Table of Contents
// Date:        	1-13-96
// Author:      	Robert W. Husted (husted@netscape.com)
// Modified By: 	Jeannice Angela
// Date:		4-OCT-01

// SET BASE HREF
// base url (http://jeanniceangela.com/)
var href = "http://jeanniceangela.com/";
with (this.location) {baseURL = href.substring (0,href.lastIndexOf ("/") + 1)}

// VARIABLES
var totalNavButton = 0;	       	// total number of navButton(s) created 
var navButtonElem = new Array();   	// array of image objects

var frameTarget = "content";	// target frame for button href 

var selected = 0;         		// selected button initial value
var highlighted = 0;    		// highlighted button initial value

var imagePath = "images/";	// path to image file
var imagePrefix = "b_";
var offSuffix = "_off.gif";			// suffixes to image name
var onSuffix  = "_on.gif";			// ...
var overSuffix = "_over.gif";		// ...

// FUNCTIONS
// navButton object
function navButton (width, height, name, statusText, link)
{
  // dimensions
  this.height   = height;
  this.width    = width;

  // navButton name
  this.name     = name;

  // navButton href
  this.link     = link;

  // navButton 'OFF'
  this.off      = new Image (width, height);
  this.off.src  = imagePath + imagePrefix + name + offSuffix;
  this.offname  = imagePath + imagePrefix + name + offSuffix;

  // mouseover if navButton has a link
  	if (link != "") {
    	// highlighted navButton 'OVER'
    	this.over       = new Image (width, height);
    	this.over.src   = imagePath + imagePrefix + name + overSuffix;

    	// selected navButton 'ON'
    	this.on       	= new Image (width, height);
    	this.on.src   	= imagePath + imagePrefix + name + onSuffix;

    	// status text during mouseover
    	this.statusText = statusText;
  	}
}


// build array of navButton objects (OFF, OVER, ON)
function createNavButton (width, height, name, statusText, link) 
{
	// create new navButton array and assign properties
  	navButtonElem[totalNavButton] = new navButton(width, height, name, statusText, link);

  	// total number of navButton array objects
  	totalNavButton++;
}

// change navButtonElem to 'SELECTED' state onClick and turns off previous
function doClick(num) {

  document.images[navButtonElem[num].name].src = navButtonElem[num].on.src;

  if (num != selected) {
    document.images[navButtonElem[selected].name].src = navButtonElem[selected].off.src;
  }
  selected = num;
  
  // statusText
  parent.status = navButtonElem[selected].statusText;
}


// if navButtonElem is not in 'SELECTED' state, change with 'OVER' version of button onMouseOver
// change statusText to coincide
function doMouseOver(num) {
  
  if (num != selected) {
    // replace document image with 'OVER' version
    document.images[navButtonElem[num].name].src = navButtonElem[num].over.src;
  }

  // if it's in a 'SELECTED' or 'HIGHLIGHTED' state it's left alone
  if (highlighted != selected && highlighted != num) {
    document.images[navButtonElem[highlighted].name].src = navButtonElem[highlighted].off.src;
  }
  highlighted = num;

  // change statusText
  parent.status = navButtonElem[num].statusText;
}

// onMouseOut action
function doMouseOut(num) {

  // if it's in a 'SELECTED' or 'OVER' state it's left alone
  if (highlighted != selected) {
    document.images[navButtonElem[highlighted].name].src = navButtonElem[highlighted].off.src;
  }
  // change statusText to the one 'SELECTED'
  parent.status = navButtonElem[selected].statusText;
}

//  display correct 'SELECTED' image on (re)load
function doOnLoad(num) {

  // get page url in content frame
  var currentPage =  top.frames[frameTarget].location.href;

  // find navButton corresponding to current page, if found, make 'SELECTED'
  for (i = 0; i < totalNavButton; i++) {
    if (currentPage.indexOf(navButtonElem[i].name) > 0) {
      // set button to 'ON'
      doClick(i);
      return(1);
    }
  }
  // if not found, set to default
  if (i >= totalNavButton) {
    doClick(num);
  }
  return(-1);
}

// INITIALIZE
// create navButtons
createNavButton(87, 18, "home", "~ Home Sweet Home ~", "index.php");
createNavButton(87, 18, "web", "| Web portfolio |", "web.shtml");
createNavButton(91, 18, "illustration", "| Illustrations |", "illustration.shtml");
createNavButton(87, 18, "print", "| Print projects |", "print.shtml");
createNavButton(87, 18, "flash", "| Flash experiments |", "flash.shtml");
createNavButton(87, 18, "photo", "| Photo phun |", "photo.shtml");
createNavButton(87, 18, "video", "| Video ventures |", "video.shtml");
createNavButton(87, 18, "about", "- About this site -", "about.shtml");
/*
createNavButton(77, 12, "home", "~ Home Sweet Home ~", "home.html");
createNavButton(76, 12, "web", "| Web portfolio |", "web.html");
createNavButton(76, 12, "flash", "| Flash experiments |", "flash.html");
createNavButton(76, 12, "video", "| Video ventures |", "video.html");
createNavButton(76, 12, "photo", "| Photo phun |", "photo.html");
createNavButton(76, 12, "print", "| Print projects |", "print.html");
createNavButton(82, 12, "illustration", "| Illustrations |", "illustration.html");
createNavButton(76, 12, "about", "- About this site -", "about.html");
*/
//createNavButton(77, 12, "resume", "- My Resume (currently unavailable) -", "");
//jeanniceAngela_resume2002.pdf
// HTML TO WRITE OUT
var space = '<td bgcolor="#EEEEEE"><img src="images/shim.gif" width="1" height="1"></td>';

//-->
