/**
 * GearSpin Javascript Menu
 *
 * @version 1.20
 * @webite http://www.gearspin.com/gsjmenu/
 *
 * Usage : 
 *
 * Add this where you want the menu to go:
 * ---------------------------------------
 * <img id=placer src="/images/Menu/placer.gif">
 *
 * Add this at the end (directly after the </body> tag: 
 * ----------------------------------------------------
 * <div id=menu></div>
 * <script type="text/javascript" src="gsjmenu-content.js"></script>
 * <script type="text/javascript" src="gsjmenu-code.js"></script>
 *
 */


//DON'T CHANGE THIS
//init internal variables needed for menu generation ------------------------------
var chrarr = ["0","1","2","3","4","5","6","7","8","9","A",
              "B","C","D","E","F","G", "H", "I", "J", "K", "L"];
var menuArr = new Array(); var trackArr = new Array();
//end init internal varibales needed for menu generation --------------------------


//START HERE
//define menu here ----------------------------------------------------------------

/**
 * API for addMenu(myName, parentName, parentIndex, myArray)
 *
 * @param myName Unique string name for this menu group.
 * @param parentName Name of the parent menu group that this menu group should
 *        spring from. Should be "" for base menu.
 * @param parentIndex Index of the entry on the parent's menu group that this
 *        menu group should spring from
 * @param myArray String[][] which defines this menu group. Each String[][] menu
 *        group is made up of several String[] menu items. Menu items should be 
 *        of the form : 
 *        ["name on menu", "url launched"] for normal menu entry
 *        ["name on menu", "-"] if this entry has a child menu group 
 *        ["name on menu", "url", "b"] launch entry in blank window
 *        ["name on menu", "url", "f", "frame_name] launch entry in frame called frame_name
 */

addMenu("Base", "", 0, // for the base menu, make the second argument ""
        [
         ["Home", "-"],
         ["Adoptions", "-"],
         ["Pet Care", "-"],
         ["Helping MHS", "-"],
         ["Legal Issues", "-"],
         ["Services", "-"],
         ["Lost & Found", "-"]
         ]);

addMenu("Home", "Base", 0, 
        [
         ["Welcome", "/"], 
         ["Hours", "/Hours.asp"], 
         ["Contact Us", "/Contact/Contact.asp"], 
         ["Mission", "/About/About.asp"]
         ]);

addMenu("Adoptions", "Base", 1, 
        [
         ["Information", "/Adoptions/Adoptions.asp"], 
         ["Application", "/Adoptions/Adopt.pdf", "b"],
         ["Fees", "/Adoptions/Fees/Fees.asp"],
         ["Seniors for Seniors", "/Adoptions/Seniors/Seniors.asp"], 
         ["Air Travel", "/Adoptions/AirTravel/AirTravel.asp"]
        ]);

addMenu("Pet Care", "Base", 2, 
        [
         ["Spay/Neuter", "-"], 
         ["Kittens and Cats", "/PetCare/Cats/Cats.asp"],
         ["Puppies and Dogs", "/PetCare/Dogs/Dogs.asp"],
         ["Advice", "http://www.healthypet.com/library.aspx", "b"]
         ]);

addMenu("Helping MHS", "Base", 3, 
        [
         ["Volunteers", "-"],
         ["Donations", "-"]
         ]);

addMenu("Legal Issues", "Base", 4, 
        [
         ["Legislation", "/Legal/Legislation/Legislation.asp"],   
         ["Complaints", "/Legal/Complaints/Complaints.asp"], 
         ["Contacts", "/Legal/Contact/Contact.asp"], 
         ["Pets and Rentals", "-"]
         ]);

addMenu("Services", "Base", 5, 
        [
         ["Licensing", "/Services/Licensing.asp"], 
         ["Pet ID", "/Services/PetID.asp"],
         ["Euthanasia", "/Services/Euthanasia/Euthanasia.asp"],
         ["Cremation", "/Services/Cremation/Cremation.asp"],
         ["Humane Traps", "/Services/Traps.asp"],
         ["Dog Training", "/Services/Training.asp"],
         ["Feral Cat Program", "/Services/FeralCatProgram/FeralCatProgram.asp"],
         ["Mobile Adoptions", "/Services/Mobile.asp"],
         ["Injured Animals", "/Services/Injured.asp"],
         ["Travelling", "/Services/Travelling/Travelling.asp"],
         ["Other Maui Services", "/Services/OtherMaui/OtherMaui.asp"]
         ]);

addMenu("Lost & Found", "Base", 6, 
        [
         ["What to do if you've lost a pet", "/LostAndFound/Lost.asp"], 
         ["What to do if you find a pet", "/LostAndFound/Found.asp"]
         ]);



addMenu("Spay/Neuter", "Pet Care", 0, 
        [
         ["Information", "/PetCare/Neutering/Neutering.asp"], 
         ["Financial Support", "/PetCare/Neutering/FinancialSupport/FinancialSupport.asp"], 
         ["Feral Cats", "/PetCare/Neutering/FeralCatProgram/FeralCatProgram.asp"]
         ]);

addMenu("Volunteers", "Helping MHS", 0, 
        [
         ["Information", "/HelpingMHS/Volunteers/Volunteers.asp"],
         ["Opportunities", "/HelpingMHS/Volunteers/Programs.asp"],
         ["Membership", "/HelpingMHS/Donations/Families.asp"]
         ]);

addMenu("Donations", "Helping MHS", 1, 
        [
         ["Introduction", "/HelpingMHS/Donations/Donations.asp"],
         ["Families", "/HelpingMHS/Donations/Families.asp"], 
         ["Businesses", "/HelpingMHS/Donations/Business.asp"],
         ["Programs", "/HelpingMHS/Donations/Programs.asp"]
         ]);

addMenu("Pets and Rentals", "Legal Issues", 3, 
        [
         ["Tips for Tenants", "/Legal/PetsAndRentals/tips_tenants.pdf"], 
         ["Tips for Landlords", "/Legal/PetsAndRentals/checklist_landlords.pdf"],  
         ["Pet Applications", "/Legal/PetsAndRentals/pet_app_reg.pdf"],  
         ["Pet Addendums", "/Legal/PetsAndRentals/pet_addendum.pdf"],  
         ["Health Certificate", "/Legal/PetsAndRentals/pet_health_report.pdf"],  
         ["List of Rentals", "/Legal/PetsAndRentals/Rentals.asp"] 
         ]);

//end define menu ------------------------------------------------------------------

//CHANGE THIS
//initialise user-defined elements -------------------------------------------------

//x and y offsets of the menu from the element on the page with id=placer (adjust this
// to get the positioning of the menu once its been created)
var totXOff = -5;
var totYOff = -17;

//CHANGE THIS IF YOU WANT
//background colors
var bgLowColor = "#5F0B7B";
var bgHiColor = "#5F0B7B";
//base menu items width in pixels
var baseWVal = 110;
//other menu items width in pixels
var menuWVal = 110;
//text colors
var textLowColor = "#FFAE21";
var textHiColor = "#FFAE21";
//base menu items and other menu items text settings (CSS)
var baseText = "bold 11px Verdana";
var menuText = "10px Verdana";
//text offsets from the top and left
var textLeftOff = 5;
var textTopOff = 3;

//EFFECTS (can't have both together)
//do you want shadows
var shadowFlag = false;
//do you want the menu to be faded (100 for no)
var alpha = 100;

//STUFF YOU MIGHT NOT WANT TO MESS AROUND WITH
//delay value in milliseconds before the menu disappears
var delayVal = 500;
//border colors and pattern (CSS)
var borderLow = "1px solid #5F0B7B";
var borderHi = "1px solid #5F0B7B";
//x and y offsets of child menus that pop up when you mouse over the parent item
var menXOff = 4;
var menYOff = 4;
//src of arrow gif
var arrowGif = "/images/Menu/arrow.gif";
//shadow options (color and offset)
var shadowColor = "#5F0B7B";
var shadowOff = 0;
//end initialise user-defined elements ----------------------------------------------


//DON'T CHANGE THIS
//add menu function - don't change this ---------------------------------------------
function addMenu(myName, parentName, parentInd, valueArr){
  var myAcr = "";
  if(parentName != "")
    myAcr += trackArr[parentName] + chrarr[parentInd];  
  else
    myAcr = "a";
  menuArr[myAcr] = valueArr;
  trackArr[myName] = myAcr;
}
//end add menu function -------------------------------------------------------------

