//file containing customisation of menu.js for each list
var border="border=1"

//Part 1: adding elements to list
//        using fuction: newItem(Indent, Name, Html)  (name is optional)
//Note: at the moment menu.js (v3) only setup for three levels of items
newItem(1, "GW4ALG's Drake TR7 Home Page", "<a href="+relPos+"home.htm>GW4ALG's TR7 Home Page</a>")
newItem(1, "Articles", "<a href="+relPos+"articles.htm>Articles</a>")
newItem(1, "Introduction", "<a href="+relPos+"intro.htm>Introduction</a>")
newItem(1, "Links", "<a href="+relPos+"links.htm>Links</a>")
newItem(1, "Modifications", "<a href="+relPos+"mods.htm>Modifications</a>")
newItem(2, "Figure 2-37A", "<a href="+relPos+"fig2_37a.htm>Figure 2-37A</a>")
newItem(1, "Publications", "<a href="+relPos+"pubs.htm>Publications</a>")


//Part 2(a): customisation of the appearance of menu
//
function menustyle() {
if (isNav4){ 
	container = new Layer(250)
	container.top = 7;
        container.left = 7;
	container.visibility = "hide";
	container.document.bgColor = "#05E4B3"
	}else{
	myDiv.style.backgroundColor = "#05E4B3"
	myDiv.style.visibility = "hidden";
	myDiv.style.pixelTop = 5;
	myDiv.style.pixelLeft = 7;
	myDiv.style.width = 250;
	}

}

//Part 2(b):
//
function redraw(index) {
  if (menu_load == false) return
  self.status = "writing list...";
   str = " <table NOWRAP width=\"270\"><tr><td><font  face=\"Arial\" color=\"#FF3399\"><big><center>Pop-up Contents</center></big></font></td></tr><tr align=\"right\"><td><a TARGET=\"_self\" href=\"javascript:menu();\">Hide Contents</a><br></td></tr>";
  //add the cells row by row
  for( i = 1; i < Items; i++) {
     if (visable[i]) { 	
	onclick = " onclick=\"itemClicked("+i+")\" "
 	if (indent[i +1] > indent[i]) {
		image = " <A TARGET='_self' HREF=\"javascript:expand2("+i+");\"><IMG SRC=\""+relPos+"closed.gif\" BORDER=0></A> "
		if (visable[i+1] == true) image =" <A TARGET='_self' HREF=\"javascript:expand2("+i+");\"><IMG SRC=\""+relPos+"open.gif\" BORDER=0></A> "
	}else{
		image = " <IMG BORDER=0 SRC=\""+relPos+"page.gif\"> "}
	if (indent[i] ==1) {
		str += "<tr><TD "+onclick+" ><b> &nbsp;&nbsp;&nbsp;&nbsp; "+text2[i]+image+text[i]+" </b></TD></tr> ";
	}else{  
		str += "<tr><TD "+onclick+" > &nbsp;&nbsp;&nbsp;&nbsp; "+text2[i]+image+text[i]+" </TD></tr> "; 
	}     
     }
  }
  str += "<tr><td>Click on a book to expand/collapse sub-headings<br></td></tr></table>";
  if(isNav4) {
	container.document.open();
	container.document.write(str);
	container.document.close();
	} else { myDiv.innerHTML = str }
  self.status=""
}
