/*

CSS Menu

Created by: Boris Pophristov
Questions or Comments: pophristov.boris@gmail.com

HOW-TOs:

-----------------------------------------------------------
1. How can I add and change items in the menu?

The menu is pure CSS. The JavaScript below just puts the menu in a web page. I created this script to make 
the menu easily updatetable.

Let's have a look at the first items section in the menu:
//Menu 1:
menu += "<li><a href='http://www.mnasq.org/'>Executive Board</a>"; // Main
menu += "<ul>";
menu += "<li><a href='http://www.mnasq.org/Directors.htm'>Directors</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/OrganizationChart.htm'>Org Chart</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/ExecutiveBoardContactInfo.htm'>Contact Info</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/LRPC.htm'>LRPC</a></li>"; // Sub
menu += "</ul></li>";

The main item is the first line as it is indicated with the comment after the line. The second and the last 
lines are mandatory - they add the sub items section. The lines between them are the sub items as it is 
indicated with the comments. You can edit the items names - the text in the "a" tag - for example - 
Org Chart. You can edit the link address in the "href" attribute of the "a" tag - 
for example - http://www.mnasq.org/OrganizationChart.htm.

ALWAYS USE ABSOLUTE ADDRESSES (addresses that start with http://www.mnasq.org/). THEY WILL MAKE THE LINKS 
VALID NOMATHER WHERE YOU PLACE THE MENU.

The menu items will be displayed in the same order they are written in the script.

To add a new sub item in an existing item just copy and paste a sub item line and change the name and the 
link address. For example: You want to add a new sub item in the first menu item (Executive Board) after 
the sub item Org Chart. You want the new item to be called New Item and you want to link it to the page 
newitem.htm which is placed in the main folder of your web site. Here is how the first menu item should 
look like:
//Menu 1:
menu += "<li><a href='http://www.mnasq.org/'>Executive Board</a>"; // Main
menu += "<ul>";
menu += "<li><a href='http://www.mnasq.org/Directors.htm'>Directors</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/OrganizationChart.htm'>Org Chart</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/newitem.htm'>New Item</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/ExecutiveBoardContactInfo.htm'>Contact Info</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/LRPC.htm'>LRPC</a></li>"; // Sub
menu += "</ul></li>";

To remove a sub item just delete the corresponding line in the script. If you do not want a menu item to have
sub items delete all lines below the first line. For example: if you want to remove all sub items from the 
first menu item (Executive Board) just leave this line:
menu += "<li><a href='http://www.mnasq.org/'>Executive Board</a>"; // Main

To add a menu item (main item) copy and paste a menu item section in the place you want and edit it.
For example if you want to add a new main menu item after the last one (Archive) add this code after the 
Archive section:
//Menu 12:
menu += "<li><a href='http://www.mnasq.org/lastsection.htm'>Last Section</a>"; // Main
menu += "<ul>";
menu += "<li><a href='http://www.mnasq.org/sub1.htm'>Sub1</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/sub2.htm'>Sub2</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/sub3.htm'>Sub3</a></li>"; // Sub
menu += "</ul></li>";

Editing the sections that are not commented with "Menu" (the first and the last paragraph) may damage the menu!

-----------------------------------------------------------
1. How can I add the menu to a page?

The menu uses all files in the folder "menu". Deleting files from this folder will damage the menu!

To add the menu to a page you need to do the following things:

A. Add the following code in the "head" section of the page:
<link href="http://www.mnasq.org/menu/menu.css" rel="stylesheet" type="text/css">
<!--[if IE]>
<link href="http://www.mnasq.org/menu/menuiefix.css" rel="stylesheet" type="text/css">
<![endif]-->

B. Add the following code where you want the menu to appear:
<script src="http://www.mnasq.org/menu/menu.js"></script>

The menu is added to every active page of the ASQ web site. You can view-source a page to see how I added the codes. 
To be sure, follow my example.

*/

var menu = "";
menu += "<div id='menu'>"; // Holder
menu += "<div id='mpreloader'><img src='http://www.mnasq.org/menu/asq_button.jpg'><img src='http://www.mnasq.org/menu/asq_button_over.jpg'></div>"; // Preloader
menu += "<ul>";

//Menu 1:
menu += "<li><a href='http://www.mnasq.org/'>Executive Board</a>"; // Main
menu += "<ul>";
menu += "<li><a href='http://www.mnasq.org/Directors.htm'>Directors</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/OrganizationChart.htm'>Org Chart</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/ExecutiveBoardContactInfo.htm'>Contact Info</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/LRPC.htm'>LRPC</a></li>"; // Sub
menu += "</ul></li>";

//Menu 2:
menu += "<li><a href='http://www.mnasq.org/Committees.htm'>Committees</a>"; // Main
menu += "<ul>";
menu += "<li><a href='http://www.mnasq.org/CommunicationsCommittee.htm'>Communication</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/ConferenceCommittee.htm'>Conference</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/EducationCommittee.htm'>Education</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/MemberServicesAndAdministrationCommittee.htm'>Member Services and Admin</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/ProgramCommittee.htm'>Program</a></li>"; // Sub
menu += "</ul></li>";

//Menu 3:
menu += "<li><a href='http://www.mnasq.org/'>Specialty Groups</a>"; // Main
menu += "<ul>";
menu += "<li><a href='http://www.biomedicalfocus.org'>Biomedical Consortium</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/StudentBranches.htm'>Student Branches</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/Subsections.htm'>Subsections</a></li>"; // Sub
menu += "</ul></li>";

//Menu 4:
menu += "<li><a href='http://www.mnasq.org/'>Conferences</a>"; // Main
menu += "<ul>";
menu += "<li><a href='mqcpub.html'>MN Quality Conference</a></li>"; // Sub
menu += "<li><a href='bmf2008thanks.html'>Biomedical Focus Conference</a></li>"; // Sub
menu += "</ul></li>";




//Menu 5:
menu += "<li><a href='http://www.mnasq.org/Classes_General_Information.htm'>Training</a>"; // Main
menu += "<ul>";
menu += "<li><a href='http://www.mnasq.org/Classes_General_Information.htm'>Refresher Information</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/spring08classes.html'>Refresher Classes</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/Classes_Seminars.htm'>Classes and Seminars</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/Classes_Workshops.htm'>Workshops</a></li>"; // Sub
menu += "</ul></li>";

//Menu 6:
menu += "<li><a href='http://www.mnasq.org/Certification_General.htm'>Certification</a>"; // Main
menu += "<ul>";
menu += "<li><a href='http://www.mnasq.org/Certification_General.htm'>General information</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/Certification_Examination.htm'>Examination Information</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/Certification_Examination_Locations.htm'>Test Locations</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/Certification_Proctors.htm'>Proctors</a></li>"; // Sub
menu += "</ul></li>";

//Menu 7:
menu += "<li><a href='http://www.mnasq.org/ReCertification_General.htm'>Recertification</a>"; // Main
menu += "<ul>";
menu += "<li><a href='http://www.mnasq.org/ReCertification_General.htm'>General information</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/ReCertification_Contact.htm'>Contact Information</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/ReCertification_Journal.htm'>Journal Submission</a></li>"; // Sub
menu += "</ul></li>";

//Menu 8:
menu += "<li><a href='http://www.mnasq.org/Advancement.htm'>Advancement</a>"; // Main
menu += "<ul>";
menu += "<li><a href='http://www.mnasq.org/Advancement.htm'>General information</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/Advancement_Contact.htm'>Contact Information</a></li>"; // Sub
menu += "</ul></li>";

//Menu 9:
menu += "<li><a href='http://www.mnasq.org/MNASQ_History.htm'>MN ASQ Section</a>"; // Main
menu += "<ul>";
menu += "<li><a href='http://www.mnasq.org/MNASQ_History.htm'>MNASQ History</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/MNASQ_Vision.htm'>MNASQ Mission/Vision</a></li>"; // Sub
menu += "</ul></li>";

//Menu 10:
menu += "<li><a href='http://www.mnasq.org/Section_Operations_Manual.htm'>Operational Info</a>"; // Main
menu += "<ul>";
menu += "<li><a href='http://www.mnasq.org/Operational_Info/Section_Operating_Agreement_2006.pdf'>Section Operating Agreement</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/Section_Operations_Manual.htm'>Section Operations Manual</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/Section_Policy_Manual.htm'>Section Policy Manual</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/SMP.htm'>SMP 2006-07 Business Plan</a></li>"; // Sub
menu += "</ul></li>";

//Menu 11:
menu += "<li><a href='http://www.mnasq.org/Past_Program_history.htm'>Archive</a>"; // Main
menu += "<ul>";
menu += "<li><a href='http://www.mnasq.org/drjuran.html'>Recognition</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/Past_Program_history.htm'>Program Summaries</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/Program_Presentation_Archive.htm'>Program Presentation</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/Benchmarq_Archive.htm'>The BenchmarQ</a></li>"; // Sub
menu += "<li><a href='http://www.mnasq.org/Member_Spotlight_Archive.htm'>Member Spotlight</a></li>"; // Sub
menu += "</ul></li>";

menu += "</ul>";
menu += "</div>";
document.write(menu);