function menu(idioma,ruta) 
{
	
/*** 
This is the menu creation code - place it right after you body tag
Feel free to add this to a stand-alone js file and link it to your page.
**/


//Menu object creation
oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname

oCMenu.frames = 0

//Menu properties   
oCMenu.pxBetween=10
oCMenu.fromLeft=8 
oCMenu.fromTop=112  
oCMenu.rows=1 
oCMenu.menuPlacement="left"
                                                             
oCMenu.offlineRoot="" 
oCMenu.onlineRoot="" 
oCMenu.resizeCheck=1 
oCMenu.wait=500 
oCMenu.fillImg="cm_fill.gif"
oCMenu.zIndex=0

//Background bar properties
oCMenu.useBar=1
oCMenu.barWidth=800
oCMenu.barHeight="menu" 
oCMenu.barClass="clBar"
oCMenu.barX=oCMenu.fromLeft
oCMenu.barY=oCMenu.fromTop
oCMenu.barBorderX=0
oCMenu.barBorderY=0
oCMenu.barBorderClass=""

//Level properties - ALL properties have to be spesified in level 0
oCMenu.level[0]=new cm_makeLevel() //Add this for each new level
oCMenu.level[0].width=125
oCMenu.level[0].height=25 
oCMenu.level[0].regClass="clLevel0"
oCMenu.level[0].overClass="clLevel0over"
oCMenu.level[0].borderX=1
oCMenu.level[0].borderY=1
oCMenu.level[0].borderClass="clLevel0border"
oCMenu.level[0].offsetX=0
oCMenu.level[0].offsetY=0
oCMenu.level[0].rows=0
oCMenu.level[0].arrow=0
oCMenu.level[0].arrowWidth=0
oCMenu.level[0].arrowHeight=0
oCMenu.level[0].align="bottom"

//EXAMPLE SUB LEVEL[1] PROPERTIES - You have to specify the properties you want different from LEVEL[0] - If you want all items to look the same just remove this
oCMenu.level[1]=new cm_makeLevel()
oCMenu.level[1].width=305
oCMenu.level[1].height=22
oCMenu.level[1].regClass="clLevel1"
oCMenu.level[1].overClass="clLevel1over"
oCMenu.level[1].borderX=1
oCMenu.level[1].borderY=1
oCMenu.level[1].align="right" 
oCMenu.level[1].offsetX=0
oCMenu.level[1].offsetY=0
oCMenu.level[1].borderClass="clLevel1border"
oCMenu.level[1].arrow='http://www.frav.es/scripts/menu_arrow.gif'
oCMenu.level[1].arrowWidth=10
oCMenu.level[1].arrowHeight=10


//EXAMPLE SUB LEVEL[2] PROPERTIES - You have to spesify the properties you want different from LEVEL[1] OR LEVEL[0] - If you want all items to look the same just remove this
oCMenu.level[2]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu.level[2].width=235
oCMenu.level[2].height=20
oCMenu.level[2].offsetX=0
oCMenu.level[2].offsetY=0
oCMenu.level[2].regClass="clLevel2"
oCMenu.level[2].overClass="clLevel2over"
oCMenu.level[2].borderClass="clLevel2border"

//EXAMPLE SUB LEVEL[3] PROPERTIES - You have to spesify the properties you want different from LEVEL[1] OR LEVEL[0] - If you want all items to look the same just remove this
oCMenu.level[3]=new cm_makeLevel() //Add this for each new level (adding one to the number)
oCMenu.level[3].width=175
oCMenu.level[3].height=20
oCMenu.level[3].offsetX=0
oCMenu.level[3].offsetY=0
oCMenu.level[3].regClass="clLevel2"
oCMenu.level[3].overClass="clLevel2over"
oCMenu.level[3].borderClass="clLevel2border"

/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/

if (idioma=='Español')
{
  oCMenu.makeMenu('top1','',"&nbsp;Principal",ruta+'principal.html')

  oCMenu.makeMenu('top2','',"&nbsp;Personal",ruta+'personal/index.html')
  	oCMenu.makeMenu('sub21','top2',"Profesores",ruta+'personal/profesores.html')    
  	  oCMenu.makeMenu('sub211','sub21',"Dr. Enrique Cabello Pardos",ruta+'ecabello/index.html')    
  	  oCMenu.makeMenu('sub212','sub21',"Dr.ª Cristina Conde Vilda",ruta+'cconde/index.html')    
  	  oCMenu.makeMenu('sub213','sub21',"Dr. Isaac Martín de Diego",ruta+'imartin/index.html')      	  
  	  oCMenu.makeMenu('sub214','sub21',"Dr. Ángel Serrano Sánchez de León",'http://www.aserrano.es/')    
  	oCMenu.makeMenu('sub22','top2',"Investigadores",ruta+'personal/investigadores.html')    
  	      
  	  oCMenu.makeMenu('sub222','sub22',"M.C. Andrea Magadán Salazar",ruta+'amagadan/index.html')    	     	  
  	  oCMenu.makeMenu('sub223','sub22',"M.C. Daniela Moctezuma Ochoa",ruta+'dmoctezuma/index.html')   
  	  oCMenu.makeMenu('sub224','sub22',"M.C. Eduardo Orbe Trujillo",ruta+'eorbe/index.html')    	  
  	  
  	  oCMenu.makeMenu('sub226','sub22',"M.C. María del Pilar Romay Rodríguez",ruta+'promay/index.html')    	   
  	  oCMenu.makeMenu('sub227','sub22',"M.C. Óscar S. Siordia",ruta+'osiordia/index.html')    
  	oCMenu.makeMenu('sub23','top2',"Colaboradores",ruta+'personal/colaboradores.html')    
  	  oCMenu.makeMenu('sub231','sub23',"Dr. Gerardo Reyes Salgado",'http://www.cenidet.edu.mx/subaca/web-dcc/Staff/sbc/reyes.html')     	  
  	  oCMenu.makeMenu('sub232','sub23',"Dr. Raúl Pinto Elías",'http://www.cenidet.edu.mx/subaca/web-dcc/Staff/sbc/rpinto.html')    
  	  oCMenu.makeMenu('sub233','sub23',"M.C. Ricardo Fuentes Covarrubias",'http://www.geocities.com/fuentesr_99/index.html')     	  
  	  oCMenu.makeMenu('sub234','sub23',"M.C. Andrés Gerardo Fuentes Covarrubias",'http://www.ucol.mx/docencia/facultades/fime/')     	  
  	  oCMenu.makeMenu('sub235','sub23',"D. Rafael Alcantar Juárez",ruta+'ralcantar/index.html')    
  	  oCMenu.makeMenu('sub236','sub23',"D.ª Gabriela de León Hernández",ruta+'gdeleon/index.html')    
  	  oCMenu.makeMenu('sub237','sub23',"D. José Carlos Méndez de la Torre",ruta+'jcmendez/index.html')    
  	  oCMenu.makeMenu('sub238','sub23',"D. Miguel Ángel Zúñiga García",ruta+'mazuniga/index.html')    
  	oCMenu.makeMenu('sub24','top2',"Antiguos miembros de FRAV",ruta+'personal/antiguosmiembros.html')    
  	
  	
  oCMenu.makeMenu('top3','','&nbsp;Investigación',ruta+'investigacion/index.html')
  	oCMenu.makeMenu('sub31','top3',"Reconocimiento facial",ruta+'investigacion/reconocimientofacial/index.html')
  	  oCMenu.makeMenu('sub311','sub31',"Proyectos",ruta+'investigacion/reconocimientofacial/proyectos/index.html')
  	  oCMenu.makeMenu('sub312','sub31',"Publicaciones",ruta+'investigacion/reconocimientofacial/publicaciones/index.html')
  	  //oCMenu.makeMenu('sub313','sub31',"Bases de Datos Faciales",ruta+'bbdd/index.html')
  	  //  oCMenu.makeMenu('sub3131','sub313',"FRAV2D",ruta+'bbdd/FRAV2D/index.html')
  	  //  oCMenu.makeMenu('sub3132','sub313',"FRAV3D",ruta+'bbdd/FRAV3D/index.html')
  	oCMenu.makeMenu('sub32','top3',"Visión artificial para Tráfico y Seguridad Vial",ruta+'investigacion/seguridadvial/index.html')
  	  oCMenu.makeMenu('sub321','sub32',"Proyectos",ruta+'investigacion/seguridadvial/proyectos/index.html')
  	  oCMenu.makeMenu('sub322','sub32',"Publicaciones",ruta+'investigacion/seguridadvial/publicaciones/index.html')  	
  	oCMenu.makeMenu('sub33','top3',"Visión artificial para Seguridad Aeroportuaria",ruta+'investigacion/seguridad/index.html')
  	  oCMenu.makeMenu('sub331','sub33',"Proyectos",ruta+'investigacion/seguridad/proyectos/index.html')
  	  oCMenu.makeMenu('sub332','sub33',"Publicaciones",ruta+'investigacion/seguridad/publicaciones/index.html')  	  	  
  	oCMenu.makeMenu('sub34','top3',"Otros temas",ruta+'investigacion/otrostemas/index.html')
  	  oCMenu.makeMenu('sub341','sub34',"Proyectos",ruta+'investigacion/otrostemas/proyectos/index.html')
  	  oCMenu.makeMenu('sub342','sub34',"Publicaciones",ruta+'investigacion/otrostemas/publicaciones/index.html')  	  	    	  
  	oCMenu.makeMenu('sub35','top3',"Laboratorio de Biometría y Visión Artificial",ruta+'investigacion/laboratorio/index.html')
	
  oCMenu.makeMenu('top5','','&nbsp;PFC y PFM',ruta+'pfc/index.html')
        oCMenu.makeMenu('sub51','top5','Proyectos Fin de Carrera y Fin de Máster leídos',ruta+'pfc/leidos/index.html')    	
  	oCMenu.makeMenu('sub52','top5',"Oferta de proyectos",ruta+'pfc/ofertas/index.html')

  oCMenu.makeMenu('top6','',"&nbsp;Notas de prensa",ruta+'notasdeprensa/index.html')
    	                	  
  //oCMenu.makeMenu('top7','','&nbsp;Vídeos y Fotos',ruta+'videosyfotos/index.html')
 	  
  oCMenu.makeMenu('top8','','&nbsp;Contacto',ruta+'contacto/index.html')
}
else if (idioma=='English')
{
  oCMenu.makeMenu('top1','',"&nbsp;Main",ruta+'main.html')
     
  oCMenu.makeMenu('top2','',"&nbsp;People",ruta+'people/index.html')
  	oCMenu.makeMenu('sub21','top2',"Lecturers",ruta+'people/lecturers.html')    
  	  oCMenu.makeMenu('sub211','sub21',"Dr Enrique Cabello Pardos",ruta+'ecabello/index_eng.html')    
  	  oCMenu.makeMenu('sub213','sub21',"Dr Cristina Conde Vilda",ruta+'cconde/index_eng.html')    
  	  oCMenu.makeMenu('sub212','sub21',"Dr Isaac Martín de Diego",ruta+'imartin/index_eng.html')      	  
  	  oCMenu.makeMenu('sub214','sub21',"Dr Ángel Serrano Sánchez de León",'http://www.aserrano.es/index_english.htm')    
  	oCMenu.makeMenu('sub22','top2',"Researchers",ruta+'people/researchers.html')        
  	  
  	  oCMenu.makeMenu('sub222','sub22',"Andrea Magadán Salazar MSc",ruta+'amagadan/index_eng.html')    
  	  oCMenu.makeMenu('sub223','sub22',"Daniela Moctezuma Ochoa MSc",ruta+'dmoctezuma/index_eng.html')      	  
  	  oCMenu.makeMenu('sub224','sub22',"Eduardo Orbe Trujillo MSc",ruta+'eorbe/index_eng.html')    
  	  
  	  oCMenu.makeMenu('sub226','sub22',"María del Pilar Romay Rodríguez MSc",ruta+'promay/index_eng.html')      	    	  
  	  oCMenu.makeMenu('sub227','sub22',"Óscar S. Siordia MSc",ruta+'osiordia/index_eng.html')      	  
  	oCMenu.makeMenu('sub23','top2',"Collaborators",ruta+'people/collaborators.html')    
  	  oCMenu.makeMenu('sub231','sub23',"Dr Gerardo Reyes Salgado",'http://www.cenidet.edu.mx/subaca/web-dcc/Staff/sbc/reyes.html')     	  
  	  oCMenu.makeMenu('sub232','sub23',"Dr Raúl Pinto Elías",'http://www.cenidet.edu.mx/subaca/web-dcc/Staff/sbc/rpinto.html')    
  	  oCMenu.makeMenu('sub233','sub23',"Ricardo Fuentes Covarrubias MSc",'http://www.geocities.com/fuentesr_99/index.html')     	  
  	  oCMenu.makeMenu('sub234','sub23',"Andrés Gerardo Fuentes Covarrubias MSc",'http://www.ucol.mx/docencia/facultades/fime/')     	  
  	  oCMenu.makeMenu('sub235','sub23',"Mr Rafael Alcantar Juárez",ruta+'ralcantar/index_eng.html')   	  
  	  oCMenu.makeMenu('sub236','sub23',"Ms Gabriela de León Hernández",ruta+'gdeleon/index_eng.html')   	  
  	  oCMenu.makeMenu('sub237','sub23',"Mr José Carlos Méndez de la Torre",ruta+'jcmendez/index_eng.html')    
  	  oCMenu.makeMenu('sub238','sub23',"Mr Miguel Ángel Zúñiga García",ruta+'mazuniga/index_eng.html')   	  
  	oCMenu.makeMenu('sub24','top2',"Old FRAV members",ruta+'people/oldmembers.html')    
  	
  	
  oCMenu.makeMenu('top3','','&nbsp;Research',ruta+'research/index.html')
  	oCMenu.makeMenu('sub31','top3',"Face recognition",ruta+'research/facerecognition/index.html')
  	  oCMenu.makeMenu('sub311','sub31',"Projects",ruta+'research/facerecognition/projects/index.html')
  	  oCMenu.makeMenu('sub312','sub31',"Publications",ruta+'research/facerecognition/publications/index.html')
  	  //oCMenu.makeMenu('sub313','sub31',"Facial Databases",ruta+'databases/index.html')
  	  //  oCMenu.makeMenu('sub3131','sub313',"FRAV2D",ruta+'databases/FRAV2d/index.html')
  	  //  oCMenu.makeMenu('sub3132','sub313',"FRAV3D",ruta+'databases/FRAV3d/index.html')
  	oCMenu.makeMenu('sub32','top3',"Computer Vision for Traffic and Road Safety",ruta+'research/roadsafety/index.html')
  	  oCMenu.makeMenu('sub321','sub32',"Projects",ruta+'research/roadsafety/projects/index.html')
  	  oCMenu.makeMenu('sub322','sub32',"Publications",ruta+'research/roadsafety/publications/index.html')  	
  	oCMenu.makeMenu('sub33','top3',"Computer Vision for Airport Security",ruta+'research/security/index.html')
  	  oCMenu.makeMenu('sub331','sub33',"Projects",ruta+'research/security/projects/index.html')
  	  oCMenu.makeMenu('sub332','sub33',"Publications",ruta+'research/security/publications/index.html')  	 	  
  	oCMenu.makeMenu('sub34','top3',"Other topics",ruta+'research/othertopics/index.html')
  	  oCMenu.makeMenu('sub341','sub34',"Projects",ruta+'research/othertopics/projects/index.html')
  	  oCMenu.makeMenu('sub342','sub34',"Publications",ruta+'research/othertopics/publications/index.html')   	  
  	oCMenu.makeMenu('sub35','top3',"Biometrics and Computer Vision Laboratory",ruta+'research/laboratory/index.html')
    	
  oCMenu.makeMenu('top5','',"Bach.&MSc Projects",ruta+'bachelorsprojects/index.html')
        oCMenu.makeMenu('sub51','top5','Past projects',ruta+'bachelorsprojects/pastprojects/index.html')    	
  	oCMenu.makeMenu('sub52','top5',"New projects opportunities",ruta+'bachelorsprojects/offers/index.html')

  oCMenu.makeMenu('top6','',"&nbsp;Press releases",ruta+'pressreleases/index.html')
    	                	  
  //oCMenu.makeMenu('top7','','&nbsp;Videos & Pictures',ruta+'videosandpictures/index.html')
 	  
  oCMenu.makeMenu('top8','','&nbsp;Contact us',ruta+'contactus/index.html')
}
else if (idioma=='Deutsch')
{
	// OBSOLETO
oCMenu.makeMenu('top1','',"&nbsp;Startseite",ruta+'startseite.html')
     
  oCMenu.makeMenu('top2','',"&nbsp;Mitarbeiter",ruta+'mitarbeiter/index.html')
  	oCMenu.makeMenu('sub21','top2',"Dozenten",ruta+'mitarbeiter/dozenten.html')    
  	  oCMenu.makeMenu('sub211','sub21',"Dr. Phil. Enrique Cabello Pardos",ruta+'ecabello/index_deu.html')    
  	  oCMenu.makeMenu('sub212','sub21',"Dr. Phil. Isaac Martín de Diego",ruta+'imartin/index_deu.html')    
  	  oCMenu.makeMenu('sub213','sub21',"Dr. Phil. Cristina Conde Vilda",ruta+'cconde/index_deu.html')    
  	  oCMenu.makeMenu('sub214','sub21',"Ángel Serrano Sánchez de León",ruta+'aserranos/index_deu.html')    
  	oCMenu.makeMenu('sub22','top2',"Forscher und Forscherinnen",ruta+'mitarbeiter/forscher.html')      
  	  oCMenu.makeMenu('sub221','sub22',"M.Sc. Eduardo Orbe Trujillo",ruta+'eorbe/index_deu.html')    
  	  oCMenu.makeMenu('sub222','sub22',"Raúl Crespo Soto",ruta+'rcrespo/index_deu.html')    
  	oCMenu.makeMenu('sub23','top2',"Kollegen und Kolleginnen",ruta+'mitarbeiter/kollegen.html')    
  	  oCMenu.makeMenu('sub231','sub23',"Dr. Phil. Gerardo Reyes Salgado",'http://www.cenidet.edu.mx/subaca/web-dcc/Staff/sbc/reyes.html')     	  
  	  oCMenu.makeMenu('sub232','sub23',"M.Sc. Ricardo Fuentes Covarrubias",'http://www.geocities.com/fuentesr_99/index.html')     	  
  	  oCMenu.makeMenu('sub233','sub23',"M.Sc. Andrés Gerardo Fuentes Covarrubias",'http://www.ucol.mx/docencia/facultades/fime/')     	  
  	  oCMenu.makeMenu('sub234','sub23',"Óscar S. Siordia",ruta+'osiordia/index.html')      	    	  
  	oCMenu.makeMenu('sub24','top2',"Älte Mitarbeiter FRAV",ruta+'mitarbeiter/aeltemitarbeiter.html')    
  	
  	
  oCMenu.makeMenu('top3','','&nbsp;Forschung',ruta+'forschung/index.html')
  	oCMenu.makeMenu('sub31','top3',"Gesichtserkennung",ruta+'forschung/gesichtserkennung/index.html')
  	  oCMenu.makeMenu('sub311','sub31',"Projekte",ruta+'forschung/gesichtserkennung/projekte/index.html')
  	  oCMenu.makeMenu('sub312','sub31',"Publikationen",ruta+'forschung/gesichtserkennung/publikationen/index.html')
  	  oCMenu.makeMenu('sub313','sub31',"Gesichtsdatenbanken",ruta+'datenbanken/index.html')
  	    oCMenu.makeMenu('sub3131','sub313',"FRAV2D",ruta+'datenbanken/FRAV2d/index.html')
  	    oCMenu.makeMenu('sub3132','sub313',"FRAV3D",ruta+'datenbanken/FRAV3d/index.html')
  	oCMenu.makeMenu('sub32','top3',"Computersehen für Verkehrssicherheit",ruta+'forschung/verkehrssicherheit/index.html')
  	  oCMenu.makeMenu('sub321','sub32',"Projekte",ruta+'forschung/verkehrssicherheit/projekte/index.html')
  	  oCMenu.makeMenu('sub322','sub32',"Publikationen",ruta+'forschung/verkehrssicherheit/publikationen/index.html')  	
  	oCMenu.makeMenu('sub33','top3',"Computersehen für Flughafensicherheit",ruta+'forschung/sicherheit/index.html')
  	  oCMenu.makeMenu('sub331','sub33',"Projekte",ruta+'forschung/sicherheit/projekte/index.html')
  	  oCMenu.makeMenu('sub332','sub33',"Publikationen",ruta+'forschung/sicherheit/publikationen/index.html')  	 	  
  	oCMenu.makeMenu('sub34','top3',"Andere Themen",ruta+'forschung/anderethemen/index.html')
  	  oCMenu.makeMenu('sub341','sub34',"Projekte",ruta+'forschung/anderethemen/projekte/index.html')
  	  oCMenu.makeMenu('sub342','sub34',"Publikationen",ruta+'forschung/anderethemen/publikationen/index.html')
  	oCMenu.makeMenu('sub35','top3',"Labor Biometrie und Computersehen",ruta+'forschung/labor/index.html')
  	
  oCMenu.makeMenu('top4','','&nbsp;Abschlussprojekte',ruta+'abschlussprojekte/index.html')
        oCMenu.makeMenu('sub41','top4','Vergangene Projekte',ruta+'abschlussprojekte/vergangeneprojekte/index.html')    	
  	oCMenu.makeMenu('sub42','top4',"Projektangebote",ruta+'abschlussprojekte/angebote/index.html')

  oCMenu.makeMenu('top5','',"&nbsp;Pressemitteilungen",ruta+'pressemitteilungen/index.html')
    	                	  
  oCMenu.makeMenu('top6','','&nbsp;Videos und Fotos',ruta+'videosundfotos/index.html') 	  
  
  oCMenu.makeMenu('top7','','&nbsp;Kontakt',ruta+'kontakt/index.html')
}
else
{
  alert("ERROR: Idioma " + idioma + " no soportado en el menú");
}	
  

//Leave this line - it constructs the menu
oCMenu.construct()		
}

