/**
 * 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="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 ""
        [
         ["Startsida", "/main.htm"],
         ["Om festivalen", "/omfestivalen/omfestivalen.htm"],
         ["Artister", "-"],
         ["Aktiviteter", "-"],
         ["Var & när", "-"],
         ["Historik", "-"],
         ["Kontakter", "-"],
         ["Länkar", "/lankar/lankar.htm"],
         ["Press", "/press/press.htm"],
         ["English", "/english/english.htm"]
         ]);

addMenu("CH1", "Base", 2, 
        [
         ["Artister 2012", "/artister/vem_vilka/vem_vilka.htm"]
//       ["Önska din artist", "/artister/onskaartist/onskaartist.htm"]
         ]);

addMenu("CH2", "Base", 3, 
        [
         ["Knallar", "/aktiviteter/knallar/knallar.htm"],
         ["Övriga aktiviteter", "/aktiviteter/ovriga/ovriga.htm"]
         ]);
addMenu("CH3", "Base", 4, 
        [
         ["Biljetter", "/var_nar/biljetter/biljetter.htm"],
         ["Bussar", "/var_nar/bussar/bussar.htm"],
         ["Karta", "/var_nar/karta/karta.htm"],
         ["Service", "/var_nar/service/service.htm"],
         ["Ydre", "/var_nar/ydre/ydre.htm"],
         ["Övernattning/Camping", "/var_nar/overnatt/overnatt.htm"]
         ]);

addMenu("CH4", "Base", 5, 
        [
         ["Artister 2004", "/historik/artister2004/artister2004.htm"],
         ["Artister 2005", "/historik/artister2005/artister2005.htm"],
         ["Bilder 2005", "/historik/foton2005/foton2005.htm"],
         ["Film 2005", "/historik/film2005/film2005.htm"],
         ["Artister 2006", "/historik/artister2006/artister2006.htm"],
         ["Bilder 2006", "/historik/foton2006/foton2006.htm"],
	 ["Artister 2007", "/historik/artister2007/artister2007.htm"],
         ["Bilder 2007", "/historik/foton2007/foton2007.htm"],
	 ["Film 2007", "/historik/film2007/film2007.htm"],
         ["Artister 2008", "/historik/artister2008/artister2008.htm"],
         ["Bilder 2008", "/historik/foton2008/foton2008.htm"],
         ["Artister 2009", "/historik/artister2009/artister2009.htm"],
         ["Bilder 2009", "http://privatdatagruppen.se/ycf2009fotoalbumflash/foton2009.htm","b"],
         ["Artister 2010", "/historik/artister2010/artister2010.htm"],
         ["Artister 2011", "/historik/artister2011/artister2011.htm"]
         ]);

addMenu("CH5", "Base", 6, 
        [
         ["Organisationen", "/kontakt/org_info/org_info.htm"],
         ["Våra föreningar", "/kontakt/foreningar/foreningar.htm"]
         ]);



//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 = 50;
var totYOff = 0;

//CHANGE THIS IF YOU WANT
//background colors
var bgLowColor = "#5F0D0A";
var bgHiColor = "#A81104";
//base menu items width in pixels
var baseWVal = 90;
//other menu items width in pixels
var menuWVal = 125;
//text colors
var textLowColor = "#F0EBC7";
var textHiColor = "#F0EBC7";
//base menu items and other menu items text settings (CSS)
var baseText = "11px Arial";
var menuText = "10px Arial";
//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 = 88;

//STUFF YOU MIGHT NOT WANT TO MESS AROUND WITH
//delay value in milliseconds before the menu disappears
var delayVal = 400;
//border colors and pattern (CSS)
var borderLow = "1px solid #FFFF00";
var borderHi = "1px solid #FFFF00";
//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 = "/arrow.gif";
//shadow options (color and offset)
var shadowColor = "#6A8B18";
var shadowOff = 3;
//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 -------------------------------------------------------------


