/**
 * GearSpin Javascript Menu
 *
 * @version 1.10
 * @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 *
 *        Extra options (such as "b" for open in blank window) are tagged to an
 *        optional 3rd string in menu item String[].
 */

addMenu("Base", "", 0, // for the base menu, make the second argument ""
        [
		 ["GUIA SECTOR","-"],
         ["PROVEEDORES", "-"],
		 ["LEGISLACION","-"],
		 ["SERVICIOS","-"]
         ]);

addMenu("GUIA SECTOR", "Base", 0, 
        [
         ["Productores", "-"], // "b" makes it open in new window
         ["Comerciales", "/sector/comerciales/comerciales.asp"], 
		 ["Asociaciones", "/sector/asociaciones/asociaciones.asp"], 
		 ["Org.Oficiales", "-"],
		 ["Mercas", "http://www.mercasa.es", "b"]
         ]);

addMenu("PROVEEDORES", "Base", 1, 
        [
         ["Especies", "-"], // "b" makes it open in new window
         ["Alimentacion", "-"],
         ["Tecnología", "/proveedores/tecnologia/tecnologia.asp"],
         ["Servicios", "/proveedores/servicios/servicios.asp"]
         ]);
  
addMenu("LEGISLACIÓN", "Base", 2, 
        [
         ["Comercialización", "/legislacion/comercializacion.asp"], // "b" makes it open in new window
         ["Sanidad e Higiene", "/legislacion/sanidad_higiene.asp"],
         ["Sanidad de los Animales", "/legislacion/sanidad_animales.asp"],
         ["Ayudas Financieras", "/legislacion/ayudas_financieras.asp"],
         ["Ocupación Dominio Público", "/legislacion/dominio_publico.asp"],
         ["Organiz. de Productores", "/legislacion/org_productores.asp"],
         ["Producción de Moluscos", "/legislacion/produccion_moluscos.asp"],
         ["Piensos Compuestos", "/legislacion/piensos_compuestos.asp"],
         ["Medioambiente", "/legislacion/medioambiente.asp"],
         ["Seguros", "/legislacion/seguros.asp"],
         ["Comunidades Autónomas", "-"],
         ["Asuntos de Otros Países", "-"],
		 ["Otras Cuestiones", "/legislacion/otras_cuestiones.asp"]
         ]);

 addMenu("SERVICIOS", "Base", 3, 
        [
         ["Publicidad", "http://www.mispeces.com/tarifas/index.htm", "b"], // "b" makes it open in new window
         ["Suscripción boletín", "http://www.mispeces.com/boletin/boletin.asp", "b"],
		 ["Quienes somos", "http://www.mispeces.com/publicidad/quienes.asp", "b"]
		 ]);
		 
addMenu("3JO", "GUIA SECTOR", 0, 
        [
         ["Peces", "/sector/empresas/peces.asp"],
		 ["Crustáceos", "/sector/empresas/crustaceos.asp"],
		 ["Moluscos", "/sector/empresas/moluscos.asp"],
		 ["Algas", "/sector/empresas/algas.asp"]		 
         ]);

addMenu("3JO", "GUIA SECTOR", 3, 
        [
         ["Centros Oficiales", "/org_oficiales/centros_oficiales.asp"],
		 ["Centros Investigación", "/org_oficiales/centros_investigacion.asp"]		 
         ]);
		 
addMenu("3JO", "PROVEEDORES", 0, 
        [
         ["Peces", "/proveedores/especies/peces.asp"],
		 ["Crustáceos", "/proveedores/especies/crustaceos.asp"],
		 ["Moluscos", "/proveedores/especies/moluscos.asp"],
		 ["Algas", "/proveedores/especies/algas.asp"]		 
         ]);
		 
addMenu("3JO", "PROVEEDORES", 1, 
        [
         ["Pienso", "/proveedores/alimentacion/pienso.asp"],
		 ["Destete", "/proveedores/alimentacion/destete.asp"],
		 ["Artemia", "/proveedores/alimentacion/artemia.asp"],
		 ["Enriquecedores", "/proveedores/alimentacion/enriquecedores.asp"],
		 ["Microalgas", "/proveedores/alimentacion/microalgas.asp"]		 
         ]);

addMenu("3JO", "LEGISLACIÓN", 10, 
        [
         ["Andalucía", "/legislacion/comunidades_autonomas.asp#andalucia"],
         ["Aragón", "/legislacion/comunidades_autonomas.asp#aragon"],
         ["Asturias", "/legislacion/comunidades_autonomas.asp#asturias"],
         ["Baleares", "/legislacion/comunidades_autonomas.asp#baleares"],
		 ["Canarias", "/legislacion/comunidades_autonomas.asp#canarias"],
		 ["Cantabria", "/legislacion/comunidades_autonomas.asp#cantabria"],
		 ["Cataluña", "/legislacion/comunidades_autonomas.asp#catalan"],
		 ["Ceuta", "/legislacion/comunidades_autonomas.asp#ceuta"],		 
         ["Extremadura", "/legislacion/comunidades_autonomas.asp#extremadura"],
		 ["La Rioja", "/legislacion/comunidades_autonomas.asp#rioja"],
		 ["Melilla", "/legislacion/comunidades_autonomas.asp#melilla"],
		 ["Murcia", "/legislacion/comunidades_autonomas.asp#murcia"],
		 ["Navarra", "/legislacion/comunidades_autonomas.asp#navarra"],		
		 ["País Vasco", "/legislacion/comunidades_autonomas.asp#pais_vasco"],
		 ["Valencia", "/legislacion/comunidades_autonomas.asp#valencia"]		 
         ]);

addMenu("3JO", "LEGISLACIÓN", 11, 
        [
         ["Alemania", "/legislacion/otros_paises.asp#alemania"],
         ["Dinamarca", "/legislacion/otros_paises.asp#dinamarca"],
         ["Francia", "/legislacion/otros_paises.asp#francia"],
         ["Italia", "/legislacion/otros_paises.asp#italia"],
		 ["Noruega", "/legislacion/otros_paises.asp#noruega"],
		 ["Reino Unido", "/legislacion/otros_paises.asp#reino_unido"],
		 ["Terceros Países", "/legislacion/otros_paises.asp#terceros_paises"],
		 ["Tribunales Europeos", "/legislacion/otros_paises.asp#tribunales_europeos"]
         ]);
//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 = 0;
var totYOff = 0;

//CHANGE THIS IF YOU WANT
//background colors
var bgLowColor = "#4B6CA3";
var bgHiColor = "#ffffff";
//base menu items width in pixels
var baseWVal = 135;
//other menu items width in pixels
var menuWVal = 180;
//text colors
var textLowColor = "#ffffff";
var textHiColor = "#4B6CA3";
//base menu items and other menu items text settings (CSS)
var baseText = "bold 11px Arial";
var menuText = "bold 11px 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 = true;
//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 = 400;
//border colors and pattern (CSS)
var borderLow = "1px solid #ffffff";
var borderHi = "1px solid #ffffff";
//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 = "http://www.mispeces.com/arrow.gif";
//shadow options (color and offset)
var shadowColor = "#BBBBBB";
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 -------------------------------------------------------------

