// To edit the table of contents, see TABLE OF CONTENTS section below
//
//

//----------------------------------------------------------
// ############ ARRAY EXTENSIONS
//----------------------------------------------------------
// Array Extensions  v1.0
// http://www.dithered.com/javascript/array/index.html
// code by Chris Nott (chris@dithered.com)
//----------------------------------------------------------
// Remove the last element of an array and return it
function _Array_pop() {
	var lastItem = this[this.length - 1];
	this.length--;
	return lastItem;
}
//----------------------------------------------------------
// Add an element to the end of an array
function _Array_push() {
	var currentLength = this.length;
	for (var i = 0; i < arguments.length; i++) {
		this[currentLength + i] = arguments[i];
	}
	return arguments[arguments.length - 1];
}
//----------------------------------------------------------

// For those browsers that don't define these Array methods, make functions Array instance methods
var agent = navigator.userAgent.toLowerCase(); 

if (Array && !((agent.indexOf('mozilla')!=-1) && (agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1) && (agent.indexOf('opera')==-1) && (agent.indexOf('webtv')==-1) && parseInt(navigator.appVersion) > 4)) {
	Array.prototype.pop     = _Array_pop;
	Array.prototype.push    = _Array_push;
}

//----------------------------------------------------------
// ############ END ARRAY EXTENSIONS
//----------------------------------------------------------


//----------------------------------------------------------
// ############ TABLE OF CONTENTS
//----------------------------------------------------------

// To add a new entry, add a new array of node info to the tocTab array. 
// To do this just copy a tocTab[i] = ... line and edit it as required.
// TOC array format: node number, node description, href ('' if none), [target]
// The node number is created by one of the functions downLevel, sameLevel, or upLevel
// These return an appropriate node number. They operate relative to the previous node.
// So to go down a level you use downLevel, to stay on the same level you use sameLevel, to move up a level you use upLevel.
// If you get the sequence of up, down and same wrong the whole TOC becomes confused.


var tocTab = new Array();
var menuLevels = new Array();
var i=0;
var nCols = 1;
tocTab[i] = new Array ("0", "<img src='images/homeicon.gif' width=14 height=14 border=0>  Home", "main.htm");i++;


tocTab[i] = new Array (downLevel(), "Neale", "neale/index.html");i++;
  tocTab[i] = new Array (downLevel(), "CV", "neale/cv.html","");i++;
  tocTab[i] = new Array (sameLevel(), "Brief biography", "neale/index.html","");i++;
  
  tocTab[i] = new Array (upLevel(), "Music", "music/index.html","");i++;
		tocTab[i] = new Array (downLevel(), "MIT 21M.361", "music/mit21m361/index.html","");i++;   
		tocTab[i] = new Array (sameLevel(), "Flight Path", "music/FlightPath/index.html","");i++;   

	tocTab[i] = new Array (upLevel(), "Writing", "writing/index.html","");i++;   
		tocTab[i] = new Array (downLevel(), "Writing workshop", "writing/workshop/index.html","");i++;   
			tocTab[i] = new Array (downLevel(), "Writing workshop List Info", "http://nealemorison.org/mailman/listinfo/writingworkshop_nealemorison.org","_blank");i++;   
			tocTab[i] = new Array (sameLevel(), "Archives to 8 Feb 08", "writing/workshop/writingworkshopdec2007tofeb2008.html","");i++;   
			tocTab[i] = new Array (sameLevel(), "Archives from 14 Feb 08", "http://nealemorison.org/pipermail/writingworkshop_nealemorison.org/","_blank");i++;   
		tocTab[i] = new Array (upLevel(), "Plays", "writing/playwriting/index.html","");i++;   		
		tocTab[i] = new Array (downLevel(), "Fluffy (the goldfish)", "writing/fluffy/index.html","");i++;   		
		tocTab[i] = new Array (upLevel(), "Poetry", "writing/poetry/index.html","");i++; 
	  tocTab[i] = new Array (sameLevel(), "Short Stories", "writing/shortstories/index.html","");i++;
	  tocTab[i] = new Array (sameLevel(), "Children's Stories", "writing/children/index.html","");i++;
	  tocTab[i] = new Array (sameLevel(), "Novels", "writing/novels/index.html","");i++;	  
		tocTab[i] = new Array (sameLevel(), "Other Pieces", "writing/pieces/index.html","");i++;   		
		tocTab[i] = new Array (sameLevel(), "Blogs", "writing/blogs/index.html","");i++;   
		tocTab[i] = new Array (sameLevel(), "The End", "theend/index.html","");i++;   
		  tocTab[i] = new Array (downLevel(), "Bubbles", "theend/01bubbles11may2000.htm","");i++;   
		  tocTab[i] = new Array (sameLevel(), "Where Art Thou, Web Developer?", "theend/02webdevelopers21may2000.htm","");i++;   
		  tocTab[i] = new Array (sameLevel(), "Australia fights spam", "theend/03austgovtantispam10jun2000.htm","");i++;
		  tocTab[i] = new Array (sameLevel(), "Dear Friend", "theend/04dearfriendspam21jun2000.htm","");i++;
		  tocTab[i] = new Array (sameLevel(), "Patent Pending", "theend/05patents11jul2000.htm","");i++;  
		  tocTab[i] = new Array (sameLevel(), "Toothpaste back in the tube", "theend/06toothpaste24jul2000.htm","");i++;
		  tocTab[i] = new Array (sameLevel(), "Telstra Broadband Bungles", "theend/07telstracable5aug2000.htm","");i++;
		  tocTab[i] = new Array (sameLevel(), "Internet Constitution", "theend/08constitution.htm","");i++;   
		  tocTab[i] = new Array (sameLevel(), "The Web is not an attic", "theend/09attic5sep2000.htm","");i++;
		  tocTab[i] = new Array (sameLevel(), "E-books", "theend/10ebooks25sep2000.htm","");i++;
		  tocTab[i] = new Array (sameLevel(), "Wetfish", "theend/11wetfish9oct2000.htm","");i++;
		  tocTab[i] = new Array (sameLevel(), "Killerapp", "theend/12killerapp23oct2000.htm","");i++;
		  tocTab[i] = new Array (sameLevel(), "Carnivore", "theend/13paranoidcarnivore7nov2000.htm","");i++;
		  tocTab[i] = new Array (sameLevel(), "Gentleman Brown", "theend/14gentlemanbrown.htm","");i++;


upLevel();
tocTab[i] = new Array (upLevel(), "Family", "","");i++;
//  tocTab[i] = new Array (downLevel(), "Phoebe", "phoebe/index.html","");i++;   
//  tocTab[i] = new Array (sameLevel(), "Elizabeth", "elizabeth/index.html","");i++;   
//  tocTab[i] = new Array (sameLevel(), "Stella", "stella/index.html","");i++;   
  tocTab[i] = new Array (downLevel(), "William Loutit Morison", "wlmorison/index.html","");i++; 
    tocTab[i] = new Array (downLevel(), "Eulogy, Jeremy Webber", "wlmorison/webber.htm","");i++; 
    tocTab[i] = new Array (sameLevel(), "Eulogy, Colin Phegan", "wlmorison/colinphegan.htm","");i++; 
    tocTab[i] = new Array (sameLevel(), "Eulogy, Carolyn Sappideen", "wlmorison/sappideen.htm","");i++; 
    tocTab[i] = new Array (sameLevel(), "Eulogy, Neale Morison", "wlmorison/neale_eulogy.htm","");i++; 
    tocTab[i] = new Array (sameLevel(), "Eulogy, Alethea Morison", "wlmorison/alethea.htm","");i++; 
    tocTab[i] = new Array (sameLevel(), "Obituary, Julie Robotham", "wlmorison/obituary.htm","");i++; 
    tocTab[i] = new Array (sameLevel(), "Curriculum Vitae", "wlmorison/cv.htm","");i++; 
    tocTab[i] = new Array (sameLevel(), "79th Birthday Poem", "wlmorison/birthday79.htm","");i++; 
    tocTab[i] = new Array (sameLevel(), "Links", "wlmorison/links.htm","");i++; 
    tocTab[i] = new Array (sameLevel(), "Thoughts and memories", "wlmorison/contributions.htm","");i++; 

upLevel();
tocTab[i] = new Array (upLevel(), "Wordface", "wordface/index.html","_top");i++;

tocTab[i] = new Array (sameLevel(), "Melaleuca", "melaleuca/index.html","_blank");i++;


tocTab[i] = new Array (sameLevel(), "Site map", "sitemap.htm","");i++;
tocTab[i] = new Array (sameLevel(), "Mail Neale Morison", "mailto:neale@nealemorison.com","");i++;
        
  


//----------------------------------------------------------
function downLevel(){
menuLevels.push(0);
nCols++;
return sameLevel();
}
//----------------------------------------------------------
function upLevel(argLevCount){
	
	menuLevels.pop();
	return sameLevel();
}
//----------------------------------------------------------
function sameLevel() {
  menuLevels[menuLevels.length - 1]++;
  var positionID = '';
  //var i;
  for (var i=0;i<menuLevels.length;i++){
    positionID += menuLevels[i] + '.';
  }
  positionID = positionID.substring(0,positionID.length-1);  
  //alert("sameLevel: "+positionID);
  return positionID;
}
