// JavaScript Document

startList = function() {
  if (document.all&&document.getElementById) {
    for (j=1; j<8; j++) {
	  createEvents( "nav" + j, " behind" );
    }
	createEvents( "listing", " around" );
  }
}

createEvents = function( ulname, classAdd ) {
  navRoot = document.getElementById(ulname);
  for (i=0; i<navRoot.childNodes.length; i++) {
    node = navRoot.childNodes[i];
    if (node.nodeName=="LI") {
      node.onmouseover=function() {
        this.className+=classAdd;
      }
      node.onmouseout=function() {
        this.className=this.className.replace(classAdd, "");
      }
    }
  }
}

window.onload=startList;
