/* Desarrollado para www.webares.com (marca registrada).

Este script es propiedad intelectual de www.webares.com (marca registrada).

Por cortesía del autor y del propietario, cualquier usuario de dicha web es libre de utilizarlo, difundirlo o modificarlo, de forma totalmente gratuita.
Si encuentras nuestra web útil o curiosa, agradeceremos incluyas un link en la tuya.

También agradeceremos cualquier mejora de funcionamiento que se realice sobre los scripts originales, si nos envías una copia con nuestro mismo espíritu de colaboración.
*/


/* DEFINICION DE LOS MENUS DESPLEGABLES. INSTRUCCIONES DE USO.

Se debe utilizar la funcion registrar_menu para definir un elemento de menú, con un solo parámetro de entrada en forma de cadena. Esta cadena debe ir delimitada por dobles comillas y en su interior no podrá aparecer el caracter doble-comilla sin provocar errores.
No se podrá tampoco partir la llamada a la función en varias líneas, es decir, debe escribirse en un línea solamente (si que pueden utilizarse tabuladores para facilitar la edición en editores con ajuste de línea automático).

Los errores más comunes aparecen por rupturas de línea en la codificación de las llamadas, por baile de letras al nombrar las variables, por no haber codificado el punto-y-coma detrás del valor de cada variable, por no haber registrado todos los submenús, o por no incluir la llamada a la función proceso al final.

La cadena de llamada la función puede contener las siguientes variables:
	Parámetros generales de todo el menú:
	nombre		ID del menú.
	x		Posición horizontal (en pixels) (left)
			En los submenús no se tiene en cuenta, se endenta automáticamente.
	y		Posición vertical (en pixels) (top)
			En los submenús no se tiene en cuenta, se endenta automáticamente.
	ancho		Ancho del menú (en pixels) (width)
			Solo se tiene en cuenta si amplía el ancho del menú.
	letra_tamano	Tamaño de letra (en puntos) (font-size).
	letra_familia	Tipo de letra (font-family).
	letra_over	Color de letra cuando el ratón está encima del elemento.
	letra_out	Color de letra cuando el ratón no está encima del elemento.
	fondo_over	Color de fondo cuando el ratón está encima del elemento.
	fondo_out	Color de fondo cuando el ratón no está encima del elemento.

	Definición de los elementos del menú a que se aplican los parm. generales:
	texto[n]	Texto que aparecerá en el botón enésimo.
	link[n]		URL a que se irá si se hace click en el botón enésimo.
	submenu[n]	Nombre del submenú correspondiente al botón enésimo.
	Estas variables deben empezar a definirse desde [0] e ir incrementando en cada terna.
	No hay límite en el nùmero de elementos que se pueden incluir.

Algunas de estas variables tienen un valor por defecto, que se utilizará si no se especifica otro valor particular. Corresponden a los colores estándar de Windows y son los siguientes:
	x		1 (px)
	y		1 (px)
	ancho		El del texto más largo (puede añadirse el de la flecha de expansión)
	letra_tamano	10 (pt)
	letra_familia	Arial
	letra_over	black
	letra_out	blue
	fondo_over	#00007F
	fondo_out	#BFBFBF
	Si se acepta cualquiera de estos valores, no es necesario incluir la variable en la llamada a la función.

Las siguientes son llamadas de ejemplo especificando todas las opciones posibles:
registrar_menu("nombre='menu1'; x=10; y=80; ancho=100; letra_tamano=12; letra_familia='Arial'; letra_over='black'; letra_out='black'; fondo_over='#00007F'; fondo_out='#BFBFBF'; texto[0]='Opción nº 1'; link[0]='pagina_1.htm'; texto[1]='Opción nº 2'; submenu[1]='submenu2'; texto[2]='Opción nº 3'; link[2]='pagina_3.htm'; texto[3]='Opción nº 4'; link[3]='pagina_4.htm'; ");

registrar_menu("nombre='submenu2'; ancho=75; letra_tamano=10; letra_familia='Times New Roman'; letra_over='black'; letra_out='black'; fondo_over='turquoise'; fondo_out='lightgreen'; texto[0]='Subopción nº 1'; link[0]='subpagina_1.htm'; texto[1]='Subopción nº 2'; link[1]='subpagina_2.htm'; texto[2]='Subopción nº 3'; link[2]='subpagina_3.htm'; ");



Los menús y submenús pueden definirse en cualquier orden.
También pueden definirse links independientes de un solo elemento para que tengan apariencia de botón.
En cualquier elemento de un menu pueden especificarse ambos simultáneamente, el submenu para crear un desplegable, y el link para bifurcar si se hace click.


Después de las llamadas a la función registrar_menu, es obligatorio incluir una llamada a la función proceso() (sin parámetros). Si no se incluye esta llamada, los menus no aparecerán.

Solo falta conectar los scripts con las páginas html. Para ello incluir en ellas (preferiblemente al final del body) las siguientes líneas en el mismo orden:
	<SCRIPT language=JavaScript src="desplegables.js" type=text/javascript></SCRIPT>
	<SCRIPT language=JavaScript src="mis_menus_estandar.js" type=text/javascript></SCRIPT>


------------------------------------------------------------------------------------------------
*/

registrar_menu("nombre='webares'; letra_over='black'; letra_out='black'; letra_tamano=10; letra_familia='Arial'; fondo_over='orange'; fondo_out='orange'; x=1; y=12; ancho=80; texto[0]=' The Web of Bars and Restaurants '; link[0]='pinx0500.htm'; ");

registrar_menu("nombre='mainmenu'; letra_over='black'; letra_out='black'; letra_tamano=10; letra_familia='Arial'; fondo_over='orange'; fondo_out='white'; x=1; y=60; ancho=90; texto[0]='Navigate...'; submenu[0]='selector'; ");

registrar_menu("nombre='selector'; letra_over='black'; letra_out='black'; letra_tamano=10; letra_familia='Arial'; fondo_over='orange'; fondo_out='white'; texto[0]='Main'; submenu[0]='principal'; texto[1]='Alphabetical'; submenu[1]='alfabetico'; texto[2]='Quarter'; submenu[2]='barrios'; texto[3]='Speciality'; submenu[3]='especialidad'; ");

registrar_menu("nombre='principal'; letra_over='black'; letra_out='black'; letra_tamano=10; letra_familia='Arial'; fondo_over='orange'; fondo_out='white'; texto[0]='Top100'; link[0]='rest/bcn/finxcrit.htm'; texto[1]='Instructions'; link[1]='frxx1000.htm'; texto[2]='Collaborations'; link[2]='frxx1100.htm'; texto[3]='Shortcuts'; link[3]='fdrealfa.htm'; texto[4]='Log'; link[4]='frxx1200.htm'; ");

registrar_menu("nombre='especialidad'; letra_over='black'; letra_out='black'; letra_tamano=10; letra_familia='Arial'; fondo_over='orange'; fondo_out='white'; texto[0]='Meat'; link[0]='rest/bcn/finxcarn.htm'; texto[1]='Fish'; link[1]='rest/bcn/finxpeix.htm'; texto[2]='Tapas'; link[2]='rest/bcn/finxtapa.htm'; texto[3]='Pizza'; link[3]='rest/bcn/finxpizz.htm'; texto[4]='Catalan'; submenu[4]='catalfab'; texto[5]='French'; link[5]='rest/bcn/finxfran.htm'; texto[6]='Greek'; link[6]='rest/bcn/finxgrec.htm'; texto[7]='International'; link[7]='rest/bcn/finxinte.htm'; texto[8]='Italian'; link[8]='rest/bcn/finxital.htm'; ");

registrar_menu("nombre='barrios'; letra_over='black'; letra_out='black'; letra_tamano=10; letra_familia='Arial'; fondo_over='orange'; fondo_out='white'; texto[0]='Les Corts'; link[0]='rest/bcn/finxcors.htm'; texto[1]='Sarrià'; link[1]='rest/bcn/finxsarr.htm'; texto[2]='Gràcia'; link[2]='rest/bcn/finxgrac.htm'; texto[3]='Horta'; link[3]='rest/bcn/finxhort.htm'; texto[4]='Nou Barris'; link[4]='rest/bcn/finxnoub.htm'; texto[5]='Sant Andreu'; link[5]='rest/bcn/finxandr.htm'; texto[6]='Sants'; link[6]='rest/bcn/finxsans.htm'; texto[7]='Eixample'; submenu[7]='eixalfab'; texto[8]='Ciutat Vella'; link[8]='rest/bcn/finxvell.htm'; texto[9]='Sant Martí'; link[9]='rest/bcn/finxmart.htm'; ");

registrar_menu("nombre='alfabetico'; letra_over='black'; letra_out='black'; letra_tamano=8; letra_familia='Arial'; fondo_over='orange'; fondo_out='white'; texto[0]='A'; link[0]='rest/bcn/fin3500a.htm'; texto[1]='B'; link[1]='rest/bcn/fin3500b.htm'; texto[2]='C'; link[2]='rest/bcn/fin3500c.htm'; texto[3]='D'; link[3]='rest/bcn/fin3500d.htm'; texto[4]='E'; link[4]='rest/bcn/fin3500e.htm'; texto[5]='F'; link[5]='rest/bcn/fin3500f.htm'; texto[6]='G'; link[6]='rest/bcn/fin3500g.htm'; texto[7]='H'; link[7]='rest/bcn/fin3500h.htm'; texto[8]='I'; link[8]='rest/bcn/fin3500i.htm'; texto[9]='J'; link[9]='rest/bcn/fin3500j.htm'; texto[10]='K'; link[10]='rest/bcn/fin3500k.htm'; texto[11]='L'; link[11]='rest/bcn/fin3500l.htm'; texto[12]='M'; link[12]='rest/bcn/fin3500m.htm'; texto[13]='N'; link[13]='rest/bcn/fin3500n.htm'; texto[14]='Ñ'; link[14]='rest/bcn/fin3500ñ.htm'; texto[15]='O'; link[15]='rest/bcn/fin3500o.htm'; texto[16]='P'; link[16]='rest/bcn/fin3500p.htm'; texto[17]='Q'; link[17]='rest/bcn/fin3500q.htm'; texto[18]='R'; link[18]='rest/bcn/fin3500r.htm'; texto[19]='S'; link[19]='rest/bcn/fin3500s.htm'; texto[20]='T'; link[20]='rest/bcn/fin3500t.htm'; texto[21]='U'; link[21]='rest/bcn/fin3500u.htm'; texto[22]='V'; link[22]='rest/bcn/fin3500v.htm'; texto[23]='W'; link[23]='rest/bcn/fin3500w.htm'; texto[24]='X'; link[24]='rest/bcn/fin3500x.htm'; texto[25]='Y'; link[25]='rest/bcn/fin3500y.htm'; texto[26]='Z'; link[26]='rest/bcn/fin3500z.htm'; ");

registrar_menu("nombre='catalfab'; letra_over='black'; letra_out='black'; letra_tamano=8; letra_familia='Arial'; fondo_over='orange'; fondo_out='white'; texto[0]='A'; link[0]='rest/bcn/fincataa.htm'; texto[1]='B'; link[1]='rest/bcn/fincatab.htm'; texto[2]='C'; link[2]='rest/bcn/fincatac.htm'; texto[3]='D'; link[3]='rest/bcn/fincatad.htm'; texto[4]='E'; link[4]='rest/bcn/fincatae.htm'; texto[5]='F'; link[5]='rest/bcn/fincataf.htm'; texto[6]='G'; link[6]='rest/bcn/fincatag.htm'; texto[7]='H'; link[7]='rest/bcn/fincatah.htm'; texto[8]='I'; link[8]='rest/bcn/fincatai.htm'; texto[9]='J'; link[9]='rest/bcn/fincataj.htm'; texto[10]='K'; link[10]='rest/bcn/fincatak.htm'; texto[11]='L'; link[11]='rest/bcn/fincatal.htm'; texto[12]='M'; link[12]='rest/bcn/fincatam.htm'; texto[13]='N'; link[13]='rest/bcn/fincatan.htm'; texto[14]='Ñ'; link[14]='rest/bcn/fincatañ.htm'; texto[15]='O'; link[15]='rest/bcn/fincatao.htm'; texto[16]='P'; link[16]='rest/bcn/fincatap.htm'; texto[17]='Q'; link[17]='rest/bcn/fincataq.htm'; texto[18]='R'; link[18]='rest/bcn/fincatar.htm'; texto[19]='S'; link[19]='rest/bcn/fincatas.htm'; texto[20]='T'; link[20]='rest/bcn/fincatat.htm'; texto[21]='U'; link[21]='rest/bcn/fincatau.htm'; texto[22]='V'; link[22]='rest/bcn/fincatav.htm'; texto[23]='W'; link[23]='rest/bcn/fincataw.htm'; texto[24]='X'; link[24]='rest/bcn/fincatax.htm'; texto[25]='Y'; link[25]='rest/bcn/fincatay.htm'; texto[26]='Z'; link[26]='rest/bcn/fincataz.htm'; ");

registrar_menu("nombre='eixalfab'; letra_over='black'; letra_out='black'; letra_tamano=8; letra_familia='Arial'; fondo_over='orange'; fondo_out='white'; texto[0]='A'; link[0]='rest/bcn/fineixaa.htm'; texto[1]='B'; link[1]='rest/bcn/fineixab.htm'; texto[2]='C'; link[2]='rest/bcn/fineixac.htm'; texto[3]='D'; link[3]='rest/bcn/fineixad.htm'; texto[4]='E'; link[4]='rest/bcn/fineixae.htm'; texto[5]='F'; link[5]='rest/bcn/fineixaf.htm'; texto[6]='G'; link[6]='rest/bcn/fineixag.htm'; texto[7]='H'; link[7]='rest/bcn/fineixah.htm'; texto[8]='I'; link[8]='rest/bcn/fineixai.htm'; texto[9]='J'; link[9]='rest/bcn/fineixaj.htm'; texto[10]='K'; link[10]='rest/bcn/fineixak.htm'; texto[11]='L'; link[11]='rest/bcn/fineixal.htm'; texto[12]='M'; link[12]='rest/bcn/fineixam.htm'; texto[13]='N'; link[13]='rest/bcn/fineixan.htm'; texto[14]='Ñ'; link[14]='rest/bcn/fineixañ.htm'; texto[15]='O'; link[15]='rest/bcn/fineixao.htm'; texto[16]='P'; link[16]='rest/bcn/fineixap.htm'; texto[17]='Q'; link[17]='rest/bcn/fineixaq.htm'; texto[18]='R'; link[18]='rest/bcn/fineixar.htm'; texto[19]='S'; link[19]='rest/bcn/fineixas.htm'; texto[20]='T'; link[20]='rest/bcn/fineixat.htm'; texto[21]='U'; link[21]='rest/bcn/fineixau.htm'; texto[22]='V'; link[22]='rest/bcn/fineixav.htm'; texto[23]='W'; link[23]='rest/bcn/fineixaw.htm'; texto[24]='X'; link[24]='rest/bcn/fineixax.htm'; texto[25]='Y'; link[25]='rest/bcn/fineixay.htm'; texto[26]='Z'; link[26]='rest/bcn/fineixaz.htm'; ");

proceso();




