// 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. 
// The first entry is always downLevel
// 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;
tocTab[i] = new Array ("0", "<img src='../images/homeicon.gif' width=14 height=14 border=0>  WORDface Home", "main.htm");i++;
var nCols = 1;


tocTab[i] = new Array (downLevel(), "Technical writing", "main.htm#technical_writing","");i++;
tocTab[i] = new Array (sameLevel(), "Content management", "main.htm#content_management","");i++;
tocTab[i] = new Array (sameLevel(), "Content creation", "main.htm#content_creation","");i++;
tocTab[i] = new Array (sameLevel(), "Internet consulting", "main.htm#internet_consulting","");i++;
tocTab[i] = new Array (sameLevel(), "Software development", "main.htm#software_development","");i++;
tocTab[i] = new Array (sameLevel(), "Contacts", "main.htm#contacts","");i++;
tocTab[i] = new Array (sameLevel(), "Adramp ad rotation", "../adramp/index.html","");i++;
  tocTab[i] = new Array (downLevel(), "Frequently asked questions", "../adramp/faq.html","");i++;
  tocTab[i] = new Array (sameLevel(), "Licensing", "../adramp/licence.html","");i++;
  tocTab[i] = new Array (sameLevel(), "Contacts", "../adramp/contacts.html","");i++;
tocTab[i] = new Array (upLevel(), "Melaleuca holiday cabin", "../melaleuca/melaleuca.htm","_blank");i++;
tocTab[i] = new Array (sameLevel(), "Site map", "sitemap.htm","");i++;
tocTab[i] = new Array (sameLevel(), "Neale Morison", "../index.html","_top");i++;
        
  


//----------------------------------------------------------
function downLevel(){
menuLevels.push(0);
nCols++;
return sameLevel();
}
//----------------------------------------------------------
function upLevel(){
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;
}

