/////////////////////////////////////////////
/*	INSTRUCTIONS  

	To add new menus, use this syntax: nameofmenu = new menu();
	To add topics, use this syntax: nameofmenu.addTopic(nameoftopic,url,idnumber)
	To add subtopics, use this syntax: nameofmenu.addSubtopic(nameofsubtopic,url,parenttopic,idnumber)
	Include this whole file in each page you need a menu displayed.
	In the html file, use this syntax to display the appropriate topic menu:
	   nameofmenu.display() 				(if menu is to be displayed without any highlighting)
	   nameofmenu.display(topicnumber) 			(if you want a specific topic highlighted)
	   nameofmenu.display(topicnumber,subtopicnumber) 	(if you want a specific subtopic highlighted)
  	   nameofmenu.oneLine(topicnumber)			(if you just want a specific topic)
	   nameofmenu.oneLine(topicnumber,subtopicnumber)	(if you just want a specific subtopic)

	Advanced Features:
	For each menu, you can specify these properties: color, hcolor, font, fontsize, subfontsize. If not specified, they will be set to default
	   Use this syntax to do so: nameofmenu.nameofproperty = "whatever" (remember to put it in quotes!) 
	
*/
/////////////////////////////////////////////
//	MODIFY CODE BELOW //////////////////
////////////////////////////////////////////
var nameofmenu;
nameofmenu=new menu();
nameofmenu.color="#494949"
nameofmenu.acolor="#039DFC"
nameofmenu.hcolor="#039DFC"

nameofmenu.addTopic('Home','/index.htm',10)
//nameofmenu.addTopic('Resume','/resume.htm',30)
//nameofmenu.addSubtopic('One Person Exhibitions','/exhibitions.htm',30,2)
//nameofmenu.addSubtopic('Selected Group Exhibitions','/group_exhibitions.htm',30,4)
//nameofmenu.addSubtopic('Conference Presentations','/conference.htm',30,6)
//nameofmenu.addSubtopic('Lectures','/lectures.htm',30,7)
//nameofmenu.addSubtopic('Reviews & Publications','/reviews.htm',30,8)
//nameofmenu.addSubtopic('Permanent Collections','/collections.htm',30,9)
//nameofmenu.addSubtopic('Cows on Parade','/resume/cows.htm',30,10)


//nameofmenu.addTopic('Resume print format (PDF)','/resume/resume.pdf',50)
//nameofmenu.addTopic('Art Portfolios','/art.htm',60)
<!--nameofmenu.addSubtopic('Art Statement','/portfolios_art/smstatem.htm',60,10)-->
//nameofmenu.addSubtopic('Amalgamation','/portfolios_art/amalgama.htm',60,20)
//nameofmenu.addSubtopic('Blind Spot','/portfolios_art/blindspot.htm',60,30)
//nameofmenu.addSubtopic('Deconstruction of Self','/portfolios_art/deconstr.htm',60,40)
//nameofmenu.addSubtopic('Drop','/portfolios_art/drop.htm',60,50)
//nameofmenu.addSubtopic('Ironing','/portfolios_art/ironing.htm',60,60)
//nameofmenu.addSubtopic('Light House','/portfolios_art/lighthouse.htm',60,70)
//nameofmenu.addSubtopic('My Back Series','/portfolios_art/myback.htm',60,80)
//nameofmenu.addSubtopic('Pillow and Cushion','/portfolios_art/pillow.htm',60,90)
//nameofmenu.addSubtopic('Protection','/portfolios_art/protection.htm',60,100)
//nameofmenu.addSubtopic('Seeing Rainbows','/portfolios_art/rainbow.htm',60,110)
//nameofmenu.addSubtopic('Souvenirs Series','/portfolios_art/souvenir.htm',60,120)
//nameofmenu.addSubtopic('Woven Portrait','/portfolios_art/portrait.htm',60,130)

//nameofmenu.addTopic('Web Design Portfolios','/web.htm',70)
//nameofmenu.addSubtopic('Site Design','/portfolios_web/lasalle.htm',70,10)
//nameofmenu.addSubtopic('Flash','/portfolios_web/flash.htm',70,20)
//nameofmenu.addSubtopic('Banner Animation','/portfolios_web/banner.htm',70,30)
//nameofmenu.addSubtopic('Graphics','/portfolios_web/graphics.htm',70,40)

//nameofmenu.addTopic('Let me know your thoughts','/contact_us.htm',150)

//////////////////////////////////////////////
//	DON'T TOUCH BELOW THIS LINE /////////
//////////////////////////////////////////////

document.write("<STYLE> \n .navlink {text-decoration: none} \n .navlink:hover {text-decoration: underline} \n </STYLE>")

function menu() {
   
   this.topics = new Array();
   this.color = 'blue';
   this.hcolor = 'purple';
   this.font = 'Verdana, Arial, sans-serif';
   this.fontsize = '1';
   this.subfontsize = '1';

   this.addTopic = addTopic;
   this.addSubtopic = addSubtopic;
   this.display = display;
   this.oneLine = oneLine;
   this.displayNavTable = displayNavTable;   
}

function addTopic(tname,url,index) {
   if (arguments.length != 3) { alert("Because of bad syntax, " + arguments[0] + " was not added."); return false }
   if (this.topics[index]) {alert("You overwrote " + this.topics[index][0].toUpperCase() + " with " + tname.toUpperCase()); }
   if (index) {this.topics[index] = new Array(tname, url); }
   else { alert("Please specify an index for " + tname); } 
}

function addSubtopic(sname,url,tindex,sindex) {
   if (arguments.length != 4) {alert('Your subtopic syntax for ' + arguments[0] + ' is wrong');return}
   if (!this.topics[tindex]["subtopics"]) { 
	this.topics[tindex]["subtopics"] = new Array();  
   }
   this.topics[tindex]["subtopics"][sindex] = new Array(sname,url);   
}

function oneLine(topic,stopic) {
   if (arguments.length == 2) { document.write(this.topics[topic]["subtopics"][stopic][0]) }
   else if (arguments.length == 1) { document.write(this.topics[topic][0]) }
   else {alert("Wrong number of arguments in oneLine");return}
}

function oneLineLink(topic,stopic) {
   if (arguments.length == 2) { document.write("<A HREF='" + this.topics[topic]["subtopics"][stopic][1] + "'>" + this.topics[topic]["subtopics"][stopic][0]+"</A>") }
   else if (arguments.length == 1) { document.write("<A HREF='" + this.topics[topic][1] + "'>" + this.topics[topic][0]+"</A>") }
   else {alert("Wrong number of arguments in oneLine");return}
}

function display(htopic,hsubtopic) {
   for (i=0;i<this.topics.length;i++) { 		// until highest topic index
     if (this.topics[i]) { 				// if topic index has a value
	document.write("<FONT SIZE=1><BR></FONT>"); 			// add break between topics
	if (i == htopic && !hsubtopic) { document.write("<A HREF='" + this.topics[i][1] + "' CLASS='navlink'><FONT FACE='" + this.font + "' COLOR=" + this.hcolor + " SIZE = " + this.fontsize +">" + this.topics[i][0] + "</A></FONT><BR>") }   //{ document.write("<FONT FACE='" + this.font + "' COLOR=" + this.hcolor + " SIZE = " + this.fontsize + ">" + this.topics[i][0] + "</FONT><BR>") }  // if this is the topic to be highlighted, and there is no subtopic to be highlighted 	   
	else if (this.topics[i][1] == null) { document.write("<FONT FACE='" + this.font + "' COLOR=" + this.color + " SIZE = " + this.fontsize +">" + this.topics[i][0] + "</FONT><BR>") }
	else { document.write("<A HREF='" + this.topics[i][1] + "' CLASS='navlink'><FONT FACE='" + this.font + "' COLOR=" + this.color + " SIZE = " + this.fontsize +">" + this.topics[i][0] + "</A></FONT><BR>") }
	if (i == htopic  && this.topics[i]["subtopics"]) {		// if that topic has subtopics
	   for (j=0;j<this.topics[i]["subtopics"].length;j++) {	// until highest subtopic index
		if (this.topics[i]["subtopics"][j]) {		// if that subtopic has a value
	      	   if (j == hsubtopic) {document.write("<FONT FACE='" + this.font + "' COLOR=" + this.color + " SIZE = " + this.subfontsize + ">&nbsp;&nbsp;&nbsp;-</FONT><A HREF='" + this.topics[i]["subtopics"][j][1] + "' CLASS='navlink'><FONT FACE='" + this.font + "' COLOR=" + this.hcolor + " SIZE = " + this.subfontsize + ">" + this.topics[i]["subtopics"][j][0] + "</A></FONT><BR>")}   // {document.write("<FONT FACE='" + this.font + "' COLOR=" + this.hcolor + " SIZE = " + this.subfontsize + ">&nbsp;&nbsp;&nbsp;-" + this.topics[i]["subtopics"][j][0] + "</FONT><BR>")}
		   else {document.write("<FONT FACE='" + this.font + "' COLOR=" + this.color + " SIZE = " + this.subfontsize + ">&nbsp;&nbsp;&nbsp;-</FONT><A HREF='" + this.topics[i]["subtopics"][j][1] + "' CLASS='navlink'><FONT FACE='" + this.font + "' COLOR=" + this.color + " SIZE = " + this.subfontsize + ">" + this.topics[i]["subtopics"][j][0] + "</A></FONT><BR>")}
		}	
	   }
	}
     }
   }
} 



function displayNavTable() {
   for (i=0;i<this.topics.length;i++) { 		// until highest topic index
     if (this.topics[i]) { 				// if topic index has a value
	document.write("<NOBR><FONT COLOR=BLUE><B>" +this.topics[i][0] + "</B></FONT> has index of " + i + " and URL of <B>" + this.topics[i][1] + "</B></NOBR><BR>")
        if (this.topics[i]["subtopics"]) {		// if that topic has subtopics
	   for (j=0;j<this.topics[i]["subtopics"].length;j++) {	// until highest subtopic index
		if (this.topics[i]["subtopics"][j]) {		// if that subtopic has a value
	      	   document.write("<NOBR>&nbsp;&nbsp;&nbsp;<FONT COLOR=RED><B>" + this.topics[i]["subtopics"][j][0] + "</B></FONT> has subindex of " + j + " and URL of <B>" + this.topics[i]["subtopics"][j][1] + "</B></NOBR><BR>")
		}
     	   }
	}
     }
   } 
}

   