// Autor:
// Copyright (c) 1999 Thomas Brattli 


// Making a menu object
// Creamos nuestro Objeto Menú

oMenu=new menuObj('oMenu')// Place a name for the menu in there. Must be uniqe for each menu
                          // Aquí le otorgamos un nombre en este caso es:'oMenu',(Aclaración:                              // el nombre que designemos para este deber ser único para el resto
                          // de los menú, lo ideal para no hacerse muchos lío, y después tener
                          // que andar modificando líneas a lo loco, es dejarlo tal cúal está. 

// Setting menu object variables
// Configuramos las variables de nuestro menú

// Style variables NOTE: The stylesheet have been removed. 
// Use this instead! (some styles are there by default, like position:absolute ++)


oMenu.clMain='padding:2px; font-family:Arial; font-size:11px; font-weight:bold' 
// The style for the main menus
// Aca definimos el estilo, que adoptará nuestro el menú principal


oMenu.clSub='padding:4px; font-family:Arial; font-size:11px; border-bottom: 1px solid gray; border-right: 1px solid #c0c0c0' 
//The style for the submenus
// Aca definimos el estilo, que adoptará el Submenú 


oMenu.clSubSub='padding:2px; font-family:Arial; font-size:11px; border-bottom: 1px solid gray' 
//The style for the subsubmenus
// Aca definimos el estilo, que adoptará el Sub-Submenú 


oMenu.clAMain='text-decoration:none; color:White'   // The style for the main links
// Definimos el estilo que adoptarán los enlaces del menú principal

oMenu.clASub='text-decoration:none; color:White'    //The style for the sub links
// Definimos el estilo que adoptarán los enlaces del Submenú 

oMenu.clASubSub='text-decoration:none; color:White' //The style for the subsub links
// En este caso se hace lo mismo, pero para el Sub-Submenú (Nota: En caso que alla)

// Background bar properties
// Propiedades del fondo de la barra del menú

oMenu.backgroundbar=0 //Set to 0 if no backgroundbar
// Se le asigna 0, si no queremos tener la barra de fondo. Nota: En mi sitio no utilizo
// la barra de fondo, simplemente posiciono el menú dentro de una tabla.
// Simplemente por una cuestión de gusto, nada más. ;-) 

oMenu.backgroundbarfromleft=0 //The left placement of the backgroundbar in pixel or %
// Definimos la colocación desde la izquierda, de la barra de fondo en pixel o en %
// Es decir a cuantos pixel de la izquierda de nuestro navegador queremos que esté
// la misma. 

oMenu.backgroundbarfromtop=0 //The top placement of the backgroundbar  in pixel or %
// Definimos la colocación desde la parte superior, de la barra de fondo en pixel o en %

oMenu.backgroundbarsize="250" //The size of the bar in pixel or %
// Definimos el tamaño de la barra en pixel o en %

oMenu.backgroundbarcolor="NAVY" //The backgroundcolor of the bar
// Definimos el color de fondo de barra.

oMenu.mainheight=18 //The height of the main menuitems in pixel or %
// Definimos el alto de los los items del menú principal

oMenu.mainwidth=120 //The width of the main menuitems  in pixel or %
// Definimos el ancho de los los items del menú principal

/*These are new variables. In this example they are set like the previous version*/
oMenu.subwidth=oMenu.mainwidth // ** NEW ** The width of the submenus

oMenu.subheight=19 //The height if the subitems in pixel or %
// ACa definimos el alto de los SubItems
 

oMenu.subsubwidth=oMenu.mainwidth // ** NEW ** The width of the subsubmenus in pixel or % 
oMenu.subsubheight=oMenu.subheight //** NEW ** The height if the subsubitems in pixel or % 


//Writing out the style for the menu (leave this line!)
oMenu.makeStyle()

oMenu.subplacement=oMenu.mainheight //** NEW ** Relative to the main item
oMenu.subsubXplacement=oMenu.subwidth/1.4 //** NEW ** The X placement of the subsubmenus, relative to the sub item
oMenu.subsubYplacement=10 //** NEW ** The Y placement of the subsubmenus, relative to the sub item
             // Posicionamiento desde la izquierda de los submenues, relativo a  los subitems

oMenu.mainbgcoloroff='#0000ff'// The backgroundcolor of the main menuitems 666666
                              // Color de fondo del menú principal

oMenu.mainbgcoloron='#666666' // The backgroundcolor on mouseover of the main menuitems FF9900
                              // Color de fondo, cuando se posiciona el mouse encima de los 
                              // items (elementos) del menú principal.

oMenu.subbgcoloroff='#333333' // The backgroundcolor of the sub menuitems
                              // Color de fondo de los sub-items 

oMenu.subbgcoloron='#808080'  // The backgroundcolor on mouseover of the sub menuitems
                              // Color de fondo, cuando se posiciona el mouse encima de los
                              // subitems  
                             
oMenu.subsubbgcoloroff='#333333' // The backgroundcolor of the subsub menuitems
                                 // Color de fondo, de los sub-submenu items  

oMenu.subsubbgcoloron='#808080' // The backgroundcolor on mouseover of the subsub menuitems
                                // Color de fondo, cuando se posiciona el mouse encima de los                                    // sub-sub menu items.

oMenu.stayoncolor=1 // Do you want the menus to stay on the mouseovered color when clicked?
                    // Si queremos que el menú cuando es clickeado, se quede con el color
                    // del mouseover ( cuando posicionamos el mouse encima de él).

oMenu.menuspeed=15 // The speed of the clipping in px
                   // La velocidad de recorte en px (Valor por default 15)
                   
oMenu.menusubspeed=15 // The speed of the submenus clipping in px
                      // La velocidad de recorte en los submenúes en px 
  
oMenu.menurows=1 // Set to 0 if you want rows and to 1 if you want columns
                 // Le asignamos 0 a esta variable, si queremos filas y 1 si queremos columnas.

oMenu.menueventon="mouse" 
// Set this to "mouse" if you want the menus to appear onmouseover, set it to "click" if you want // it to appear onclick
// Le asignamos "mouse" si queremos que el menú aparezca cuando posicionamos el mouse encima
// de él, y le asignamos "click" si queremos que nuestro menú aparezca al hacer click.

oMenu.menueventoff="mouse" 
// Set this to "mouse" if you them to disappear onmouseout, if not set it to "click"
// Le asignamos a esta "mouse" si queremos que menú desplegable desaparezca cuando el mouse 
// sale fuera del mismo, y "click" si queremos que nuestro menú desaparezca al hacer click

// Placement of the menuitems
// Posicionamiento de los elementos del menú

// Example in %:
// oMenu.menuplacement=new Array("20%","40%","60%","50%","65%") 
// Remember to make the arrays contain as many values as you have main menuitems
// Recordá, al crear el vector, hacelo con las cantidad de elementos que tenga tu menú.

// Example in px: (remember to use the ' ' around the numbers)
// Ejemplo en px: (Recordá usar las ' ' alrededor de los numeros)
// oMenu.menuplacement=new Array(10,200,300,400,500)

// Example right beside each other (only adding the px between variable)
// Ejemplo correcto, posiciona uno al lado del otro ( solamente agrega el px entre la variable)
oMenu.menuplacement=0

// If you use the "right beside eachother" you cant how many pixel there should be between each here
oMenu.pxbetween=0 //in pixel or %

// And you can set where it should start from the left here
// Aca vos podés definir, donde este deberá comenzar a partir de la izquierda.


var displacement

if (bw.ns4){
	displacement = 173;
	if (window.innerWidth <= 1200)
		oMenu.fromleft= displacement 
	else
		oMenu.fromleft= displacement + (window.innerWidth - 760)/2//in pixel or %
	}
else {
	displacement = 173;
	if (document.body.clientWidth <= 1200)
		oMenu.fromleft= displacement
	else
		oMenu.fromleft= displacement + (document.body.clientWidth - 760)/2 //in pixel or %
	}
// This is how much from the top the menu should be.
// Esta es, para saber a partir de donde (desde arriba) deberá estar el menú.

oMenu.fromtop=104 //in pixel or % 82 original
//MAIN 0

// llegamos a la parte de el armado de nuestro futuro menú ...
// ahora sí, a prestar mucha atención. ;-)


//Main items:
// makeMain(MAIN_NUM,'TEXT','LINK','FRAME_TARGET') (set link to 0 if you want submenus of this menu item)

// -----------------------
//  Elementos Principales
// -----------------------
// La sintaxis a seguir es la siguiente:
//          
// makeMain(MAIN_NUM,'TEXT','LINK','FRAME_TARGET') 
// ( Debes asignarle 0 al link, si querés un submenú de este. )
// 
// Parámetros: MAIN_NUM = Es el numero que usaremos para identificar el menú.
//             TEXT = Texto que aparecerá en el menú.
//             LINK = Nuestro enlace.
//             FRAME_TARGET = El target del enlace, Ej: si queremos que se visualize en la misma
//                            ventana del navegador, en otra, etc.       

// #################
// Menú Principal 0
// #################

// Mira detenidamente aquí abajo, como verás podremos agregar una imagen a nuestro 
// menú principal. 
oMenu.makeMain(0,'<img src=/flecha.gif border=0 align="middle">  Empresas',0)

	// Sub items:
	// makeSub(MAIN_NUM,SUB_NUM,'TEXT','LINK',TOTAL,'FRAME_TARGET') (set link to 0 if you want submenus of this menu item)

        // Sub Elementos

        // La sintaxis es la siguiente:
        // makeSub(MAIN_NUM,SUB_NUM,'TEXT','LINK',TOTAL,'FRAME_TARGET')
        // ( Debes asignarle 0 al link, si querés un submenú de este. ), si mirás
        // abajo, yo uso el # que es exactamente lo mismo. 
        // 
        // Parámetros: MAIN_NUM = Es el número del menú principal de este (el padre)
        //                        en este caso es el 0.
        //             SUB_NUM  = Número que identifica al submenú.
        //             TEXT     = Texto que aparecerá en el submenú.
        //             LINK     = Nuestro enlace.
        //             TOTAL    = Tendrá la cantidad de elementos de nuestro submenu
        //                        (Si mirás bien, en el ejemplo de abajo ... el submenú tiene
        //                        tres elementos, por ende el parámetro que se le pasa es 3. 
        //             FRAME_TARGET = El target del enlace, Ej: si queremos que se visualize en          //                            la misma ventana del navegador, en otra, etc. 

	oMenu.makeSub(0,0,'Empresas Excelentes','#',4)
	oMenu.makeSub(0,1,'Ranking Empresarial','#',4)
	oMenu.makeSub(0,2,'Directorio Empresarial','/index.htm',4)	
	oMenu.makeSub(0,3,'Organismos Peruanos','/index.htm',4)

//SubSub items:
// makeSubSub(MAIN_NUM,SUB_NUM,SUBSUB_NUM,'TEXT','LINK',TOTAL,'FRAME_TARGET')

// La declaración de un sub-sub-menú es similar a las anteriores
// simplemente se agrega un nuevo parámetro que es el SUBSUB_NUM
// este tomará el valor que identifique a nuestro sub-sub-menú.
// Nota: el parámtro SUB_NUM, deberá tener el número del sub-menú
// del cúal proviene.

	oMenu.makeSubSub(0,0,0,'Peruanas','/index.htm',2)
	oMenu.makeSubSub(0,0,1,'Internacionales','/index.htm',2)
	
        oMenu.makeSubSub(0,1,0,'A nivel Perú','/index.htm',3)
	oMenu.makeSubSub(0,1,1,'A nivel del Mundo','/index.htm',3)
	oMenu.makeSubSub(0,1,2,'Empresas admiradas','/index.htm',3)

// #################
// Menú Principal 1
// #################

//MAIN 1		
oMenu.makeMain(1,'<img src=/flecha.gif border=0 align="middle"> Finanzas',0)
	oMenu.makeSub(1,0,'Opción 1','/index.htm',5)
	oMenu.makeSub(1,1,'Opción 2','/index.htm',5)
	oMenu.makeSub(1,2,'Opción 3','/index.htm',5)
	oMenu.makeSub(1,3,'Opción 4','/index.htm',5)
	oMenu.makeSub(1,4,'Opción 5','/index.htm',5)

//MAIN 2		
oMenu.makeMain(2,'<img src=/flecha.gif border=0 align="middle"> Conocimiento',0)
	oMenu.makeSub(2,0,'Autoestima','/conoauto.htm',19)
	oMenu.makeSub(2,1,'Aprendizaje','/conoapren.htm',19)
        oMenu.makeSub(2,2,'Calidad','/conocali.htm',19)
        oMenu.makeSub(2,3,'Cambio','/conocambio.htm',19)
        oMenu.makeSub(2,4,'Excelencia','/conoexcel.htm',19)
        oMenu.makeSub(2,5,'Historias','/conohisto.htm',19)
        oMenu.makeSub(2,6,'Humor laboral','/conohumlab.htm',19)
        oMenu.makeSub(2,7,'Ideas','/conoideas.htm',19)
        oMenu.makeSub(2,8,'I. Emocional','/conoiemo.htm',19)
        oMenu.makeSub(2,9,'Liderazgo','/conolider.htm',19)
        oMenu.makeSub(2,10,'Logística','/conologis.htm',19)
        oMenu.makeSub(2,11,'Pensamientos','/conopensa.htm',19)
        oMenu.makeSub(2,12,'Productividad','/conoproduc.htm',19)
        oMenu.makeSub(2,13,'Management','/conomanag.htm',19)
        oMenu.makeSub(2,14,'Marketing','/conomarket/conomarket.htm',19)
        oMenu.makeSub(2,15,'Recursos Humanos','/conorechum.htm',19)
        oMenu.makeSub(2,16,'Relaciones Humanas','/conorelhum.htm',19)
        oMenu.makeSub(2,17,'Valores','/conovalores/conovalores.htm',19)
        oMenu.makeSub(2,18,'Ventas','/conoventas.htm',19)

//MAIN 3		
oMenu.makeMain(3,'<img src=/flecha.gif border=0 align="middle"> Educación',0)
	oMenu.makeSub(3,0,'Cursos','/cursos.htm',5)
	oMenu.makeSub(3,1,'Universidades','/universidad1.htm',5)
        oMenu.makeSub(3,2,'Institutos','/index.htm',5)
        oMenu.makeSub(3,3,'Venta de libros','/index.htm',5)
        oMenu.makeSub(3,4,'Colegios','/col.htm',5)




// Generamos nuestro menú
	oMenu.construct();
	

// #############################
// Traducción a cargo de:
// Gabriel M. Rodríguez
// ############################# 

