var filename = document.URL.substring(document.URL.replace(/\//g,"\\").lastIndexOf("\\")+1);

function NAV_ELEM(t, h) {
	this.title = t;
	this.href = h;
}


var bar1 = new Array(
	//new NAV_ELEM("banner-test", "banner.shtml"),
	new NAV_ELEM("home", "index.html"),
 	new NAV_ELEM("private instruction", "lessons.html"),
	new NAV_ELEM("oria booking", "booking.html"),
	new NAV_ELEM("QoLyrics", "music.html"),
        new NAV_ELEM("links", "links.html"),
	new NAV_ELEM("about", "about.html"),
	new NAV_ELEM("contact", "contact.html"),
	new NAV_ELEM("the center for creativity", "thecenterforcreativity.html"),
        new NAV_ELEM("transcript for oria uu service 08", "uusummerservice08.html"),
        new NAV_ELEM("poesie", "icestorm.html"),
        new NAV_ELEM("Vivaldi quartet dmoll", "lyriclinks25.html"),
        new NAV_ELEM("einekleinequartetpractice", "lyriclinks23.html"));

function subelem(mainhref, title, href) {
	var submenu = subbars[mainhref];
	if (submenu==null) subbars[mainhref] = submenu = new Array();
	submenu[submenu.length] = new NAV_ELEM(title, href);
	subbars[href] = submenu;
	masterelem[href] = mainhref;
}

var subbars = new Object();
var masterelem = new Object(); // translates submenu elems to master elems

subelem("lessons.html", "General Information About Lessons", "lessoninfo.html");
subelem("lessons.html", "Questions & Answers", "qa.html");
subelem("lessons.html", "Curriculum Vitae", "resume.html");
subelem("about.html", "Upcoming Events", "reviews.html");
subelem("about.html", "Photos", "photos.html");
subelem("music.html", "Integrity", "lyriclinks1.html");
subelem("music.html", "Synchronicity", "lyriclinks2.html");
subelem("music.html", "Lumina", "lyriclinks3.html");
subelem("music.html", "Turn It Round", "lyriclinks4.html");
subelem("music.html", "Hope Less", "lyriclinks5.html");
subelem("music.html", "graces", "lyriclinks6.html");
subelem("music.html", "When You Make a Wish", "lyriclinks8.html");
subelem("music.html", "Enter the Dance", "lyriclinks9.html");
subelem("music.html", "I Recall", "lyriclinks10.html");
subelem("music.html", "Into the Sky", "lyriclinks11.html");
subelem("music.html", "Skewl", "lyriclinks12.html");
subelem("music.html", "WIN", "lyriclinks13.html");
subelem("music.html", "40 Odd Years", "lyriclinks14.html");
subelem("music.html", "nirvana in a vacuum", "lyriclinks15.html");
subelem("music.html", "Sicut", "lyriclinks16.html");
subelem("music.html", "World Without End", "lyriclinks17.html");


subelem("thecenterforcreativity.html", "Creative Mission", "creativemission.html");
subelem("thecenterforcreativity.html", "On Creative Pursuit", "oncreativepursuit.html");
subelem("thecenterforcreativity.html", "The Learning Arena", "teacherweb.html");
subelem("thecenterforcreativity.html", "Music Theory Lesson", "theorylesson.html");
subelem("thecenterforcreativity.html", "Visit Teacherweb Learning Center", "http://www.myteacherpages.com/webpages/oriablue");

function genbar1() {
	for (var j=0; j<bar1.length; ++j) {
		if (j!=0) document.write(" &nbsp;&#149;&nbsp; ");
		document.write("<a href='"+bar1[j].href+"' class="
			+(filename==bar1[j].href||masterelem[filename]==bar1[j].href?"hnav":"nav")
			+">"+bar1[j].title+"</a>");
	}
}

function genbar2() {
	if (subbars[filename]==null) return;
	document.write("<br>");
	var bar1 = subbars[filename];
	for (var j=0; j<bar1.length; ++j) {
		if (j!=0) document.write(" &nbsp;&#149;&nbsp; ");
		document.write("<a href='"+bar1[j].href+"' class="+(filename==bar1[j].href?"hsnav":"snav")+">"+bar1[j].title+"</a>");
	}
}
