//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 Circuit Symbols Home Page", "<a href="+relPos+"home.htm>GW4ALG's Circuit Symbols 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, "Templates", "<a href="+relPos+"templates.htm>Templates</a>")
newItem(2, "Lines", "<a href="+relPos+"alg_lines.htm>Lines</a>")
newItem(2, "Logic", "<a href="+relPos+"alg_logic.htm>Logic</a>")
newItem(2, "Misc", "<a href="+relPos+"alg_misc.htm>Misc</a>")
newItem(2, "Passives", "<a href="+relPos+"alg_passives.htm>Passives</a>")
newItem(2, "Semiconductors", "<a href="+relPos+"alg_semis.htm>Semiconductors</a>")
newItem(2, "Switches", "<a href="+relPos+"alg_switches.htm>Switches</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=""
}
