/*************************************************************\
* *
* FUNCTIONALITY *
* *
* THIS SCRIPT IS MESSY!!! But it works, it breaks down the *
* list and builds a nice dynamic menu for it. Note if JS is *
* is disabled CSS should handle it quite gracefully. *
* *
* creator: Daniel Pupius *
* date: April 2004 *
* version: 1.0 *
* rights: copyright(c)2004 Dan Pupius www.pupius.co.uk *
* *
\*************************************************************/
var Site = {
menuitems: new Array(),
tracer: null,
active: -1,
selected: -1,
tracerAnim: null,
timer: null,
setup: function() {
if(!document.getElementsByTagName || !document.createElement || !document.appendChild) return false;
//grab list, hide it and create a list object from it
var navbar = document.getElementById("nav");
var list = navbar.getElementsByTagName("ul")[0];
list.style.display = "none";
var menu = new ListObject(list);
//create the tracer element which will show the current menu item
this.tracer = document.createElement("div");
this.tracer.className = "menutracer";
navbar.appendChild(this.tracer);
this.menuitems[-1] = null;
//process first level menu items
for(var i=0;i