//menubar for voyager.8m.net and cs.may.ie/~bart
//Bart Busschots

//declaring the bar
var mainNaviBar = new menuBar(4, 200);
//quote Browser
if(currentP[0]=="Home"){
  mainNaviBar.addElement(new menuButton("javascript:openQuotesBrowser()", "Browse My Quotes", ""));
}
//Home
mainNaviBar.addElement(new menuButton(toRoot + "index.html", "Home Page", "Home"));

//college stuff section
mainNaviBarCSSub = new menuSubMenu(toRoot + "CollegeStuff/index.html", "College Stuff", "CStuff");
if(onCS == true || isOffLine == true){
  mainNaviBarCSSub.addElement(new menuButton(toRoot + "CollegeStuff/PhDProject/index.html", "My PhD Project", "CSPhD"));
  mainNaviBarCSSub.addElement(new menuButton(toRoot + "CollegeStuff/CSDemonstrating/index.html", "CS Demonstrating", "CSDem"));
}
mainNaviBarCSSub.addElement(new menuButton(toRoot + "CollegeStuff/CSProject/index.html", "CS 4th Year Project", "CSProj"));
mainNaviBarCSSub.addElement(new menuButton(toRoot + "CollegeStuff/ClassPhotos/index.html", "Class Photos", "ClassPhotos"));
mainNaviBar.addElement(mainNaviBarCSSub);

//personal stuff
var mainNaviBarPrsnlSub=new menuSubMenu(toRoot + "PersonalStuff/index.html", "Personal Stuff", "Prsnl");
mainNaviBarPrsnlSub.addElement(new menuButton(toRoot + "PersonalStuff/AboutMe.html", "About Me", "AboutMe"));
mainNaviBarPrsnlSub.addElement(new menuButton(toRoot + "PersonalStuff/Friends/index.html", "Friends", "Friends"));
mainNaviBarPrsnlSub.addElement(new menuButton(toRoot + "PersonalStuff/ClubsSocs/index.html", "Clubs & Societies", "PrsnlCaS"));
var mainNaviBarPrsnlSubSUSub = new menuSubMenu(toRoot + "PersonalStuff/StudentsUnion/index.html", "Students Union", "PrsnlSU");
mainNaviBarPrsnlSubSUSub.addElement(new menuButton(toRoot + "PersonalStuff/StudentsUnion/Campaign/index.html", "VP C&D Campagin", "PrsnlSUCmpgn"));
mainNaviBarPrsnlSub.addElement(mainNaviBarPrsnlSubSUSub);
mainNaviBar.addElement(mainNaviBarPrsnlSub);

//web design section
var mainNaviBarWDSub=new menuSubMenu(toRoot + "WebDesign/index.html", "Web Design", "WDes");
mainNaviBarWDSub.addElement(new menuButton(toRoot + "WebDesign/Sites.html", "My Sites", "MySites"));
mainNaviBarWDSub.addElement(new menuButton(toRoot + "WebDesign/Scripts/index.html", "Scripts for Download", "SFDL"));
mainNaviBarWDSub.addElement(new menuButton(toRoot + "WebDesign/Courses/index.html", "Web Design Courses", "WDCs"));
mainNaviBarWDSub.addElement(new menuButton(toRoot + "WebDesign/Links.html", "Design Links", "DL"));
mainNaviBar.addElement(mainNaviBarWDSub);

//Photography
var mainNaviBarPhSub = new menuSubMenu(toRoot + "Photography/index.html", "Photography", "Photography");
 var mainNaviBarPhSubIrlSub = new menuSubMenu(toRoot + "Photography/Ireland/index.html", "Ireland", "IrlPh");
  mainNaviBarPhSubIrlSub.addElement(new menuButton(toRoot + "Photography/Ireland/0104/index.html", "Maynooth, April 2001", "Irl0104"));
  mainNaviBarPhSubIrlSub.addElement(new menuButton(toRoot + "Photography/Ireland/0112/index.html", "Maynooth, December 2001", "Irl0112"));
  mainNaviBarPhSubIrlSub.addElement(new menuButton(toRoot + "Photography/Ireland/0206/index.html", "The Burren, June 2002", "Irl0206"));
  mainNaviBarPhSubIrlSub.addElement(new menuButton(toRoot + "Photography/Ireland/0210Birr/index.html", "Birr, October 2002", "Irl0210"));
 mainNaviBarPhSub.addElement(mainNaviBarPhSubIrlSub);

 var mainNaviBarPhSubSpain = new menuSubMenu(toRoot + "Photography/Spain/index.html", "Spain", "SpnPh");
  mainNaviBarPhSubSpain.addElement(new menuButton(toRoot + "Photography/Spain/0109/index.html", "September 2001", "Spn0109"));
  mainNaviBarPhSubSpain.addElement(new menuButton(toRoot + "Photography/Spain/0209/index.html", "September 2002", "Spn0209"));
 mainNaviBarPhSub.addElement(mainNaviBarPhSubSpain);

 var mainNaviBarPhSubBel = new menuSubMenu(toRoot + "Photography/Belgium/index.html", "Belgium", "BelPh");
  mainNaviBarPhSubBel.addElement(new menuButton(toRoot + "Photography/Belgium/0112/index.html", "December 2001", "Bel0112"));
  mainNaviBarPhSubBel.addElement(new menuButton(toRoot + "Photography/Belgium/0201/index.html", "January 2002", "Bel0201"));
 mainNaviBarPhSub.addElement(mainNaviBarPhSubBel);

 var mainNaviBarPhSubUSA = new menuSubMenu(toRoot + "Photography/America/index.html", "America", "USAPh");
  mainNaviBarPhSubUSA.addElement(new menuButton(toRoot + "Photography/America/0204/index.html", "California, April 2002", "USA0204"));
  mainNaviBarPhSubUSA.addElement(new menuButton(toRoot + "Photography/America/0206/index.html", "Maryland, June 2002", "USA0206"));
  mainNaviBarPhSubUSA.addElement(new menuButton(toRoot + "Photography/America/0210Halloween/index.html", "Halloween in Maryland", "USA0210"));
  mainNaviBarPhSubUSA.addElement(new menuButton(toRoot + "Photography/America/0211Nashville/index.html", "Nashville, November 2002", "USA0211"));
 mainNaviBarPhSub.addElement(mainNaviBarPhSubUSA);

mainNaviBarPhSub.addElement(new menuButton(toRoot + "Photography/Personal/index.html", "Me & My Friends", "me"));
mainNaviBarPhSub.addElement(new menuButton(toRoot + "Photography/TheFlood/index.html", "The Flood", "Flood"));
mainNaviBar.addElement(mainNaviBarPhSub);

//Links
mainNaviBar.addElement(new menuButton(toRoot + "Links.html", "Links", "Links"));
//CS Home
if(onCS == true){
  mainNaviBar.addElement(new menuButton("http://www.cs.may.ie", "CS Home Page", ""));

}
//MiNDS> Home
if(onMinds == true){
  mainNaviBar.addElement(new menuButton("http://minds.may.ie", "MiNDS> Home Page", ""));
}
//mail me
if(onCS == true){
  mainNaviBar.addElement(new menuButton("mailto:bart@cs.may.ie?subject=from home page", "Mail Me", ""));
}else{
  mainNaviBar.addElement(new menuButton("mailto:bart.busschots@physics.org?subject=from home page", "Mail Me", ""));
}

function openQuotesBrowser(){
 //creating the new window
 var propertiesString="";
 propertiesString+="toolbar=no,status=no,scrollbars=yes";
 QuotesViewer=window.open("Quotes/QuoteBrowser.html", "QuotesBrowser", propertiesString);
 QuotesViewer.resizeTo(600, 400);
 QuotesViewer.moveTo(20, 20);
 refreshImages();
}


