function GenerarPie(es_principal)
{
	document.write("<td height='90' align='center' valign='top' bgcolor='#FFE6CC'><p><font size='2'>");

	var path_principal="";
	if(typeof(es_principal)=="boolean")
	{
		if(es_principal==false) path_principal="../";
	}
	else
	{
		var i;
		for(i=0;i<es_principal;i++)
			path_principal+="../";
	}

	var links=new Array("Inicio#"+path_principal+"principal.html",
			"Las Bodegas#"+path_principal+"Bodegas/lasbodegas800x600.htm",
			"Vinos Selección Compras#"+path_principal+"Seleccion/SeleccionVinos800x600.htm",
			"Club de Vinos#"+path_principal+"clubdelvino/clubdelvino800x600.htm",
			"Informaciones#"+path_principal+"Informaciones/Informaciones800x600.htm",
			"Zonas Vitivinícolas#"+path_principal+"zonasvitivinicolas/Zonasvitivin800x600.htm",
			"Galería De Personajes#"+path_principal+"galeriadepersonajes/galeriapersonajes800x600.htm",
			"Saber De Vinos#"+path_principal+"SaberDeVinos/Saberdevinos800x600.htm",
			"Artículos Vitivinícolas#"+path_principal+"Articulosvitivinicolas/Articulosvitivinicolas800.htm",
			"Preguntas#"+path_principal+"Preguntas/Preguntas800x600.htm",
			"Concursos#"+path_principal+"Concurso/concursoselectornd800.htm",
			"Glosario Vitivinícola#"+path_principal+"Gastronomia/glosario.php",
//"Glosario Vitivinícola#"+path_principal+"Gastronomia/glosario.php",
			"Mis Recetas#"+path_principal+"Gastronomia/Misrecetas800x600.htm",
			"Los Productos#"+path_principal+"Gastronomia/losproductos800x600.htm",
			"Los Trucos#"+path_principal+"Gastronomia/lostrucos/lostrucosindice800x600.htm",
			"Datos Gastronómicos#"+path_principal+"Gastronomia/datosgastronomicos800x600.htm",
			"Actualidades#"+path_principal+"Gastronomia/actualidades800x600.htm",
			"Galería Del Sumiller#"+path_principal+"Sumiller/sumiller800x600.htm",
			"Hostelería#"+path_principal+"Hosteleria/hosteleria800x600.htm",
			"Consultas#"+path_principal+"Gastronomia/consultas800x600.htm",
			"Glosario Gastronómico#"+path_principal+"Gastronomia/glosariogas.php",
			"Los Libros#"+path_principal+"Construccion/construccion800x600.htm",
			"Te Publicamos#"+path_principal+"Construccion/construccion800x600.htm",
			"Publicidad#"+path_principal+"Publicidad/publicidad800x600.htm",
			"Anuncios#"+path_principal+"Anuncios/Anuncios800x600.htm",
			"Enlaces#"+path_principal+"Enlaces/Enlaces800x600.htm");

	GenerarLinks(links);
	document.write("</p></td>");
}

function GenerarLinks(items)
{
	var i;
	var cadenas;
	for(i=0;i<items.length;i++)
	{
		cadenas=items[i].split("#");

		document.write("<a href="+cadenas[1]+">");
		document.write(cadenas[0]+"</a> | ");
	}
}

function GenerarSelector(es_principal)
{
	var path_principal="";

	if(typeof(es_principal)=="boolean")
	{
		if(es_principal==false) path_principal="../";
	}
	else
	{
		var i;
		for(i=0;i<es_principal;i++)
			path_principal+="../";
	}
	
	var vitivinicultura=new Array("INICIO#"+path_principal+"principal.html",
				"LAS BODEGAS#"+path_principal+"Bodegas/lasbodegas800x600.htm",
				"VINOS SELECCIÓN COMPRAS#"+path_principal+"Seleccion/SeleccionVinos800x600.htm",
				"CLUB DE VINOS#"+path_principal+"clubdelvino/clubdelvino800x600.htm",
				"INFORMACIONES#"+path_principal+"Informaciones/Informaciones800x600.htm",
				"ZONAS VITIVINÍCOLAS#"+path_principal+"zonasvitivinicolas/Zonasvitivin800x600.htm",
				"GALERÍA DE PERSONAJES#"+path_principal+"galeriadepersonajes/galeriapersonajes800x600.htm",
				"SABER DE VINOS#"+path_principal+"SaberDeVinos/Saberdevinos800x600.htm",
				"ARTÍCULOS VITIVINÍCOLAS#"+path_principal+"Articulosvitivinicolas/Articulosvitivinicolas800.htm",
				"PREGUNTAS#"+path_principal+"Preguntas/Preguntas800x600.htm",
				"CONCURSOS#"+path_principal+"Concurso/concursoselectornd800.htm",
				"GLOSARIO VITIVINÍCOLA#"+path_principal+"Gastronomia/glosario.php");

	var gastronomia=new Array("MIS RECETAS#"+path_principal+"Gastronomia/Misrecetas800x600.htm",
	            "LOS PRODUCTOS#"+path_principal+"Gastronomia/losproductos800x600.htm",
				"LOS TRUCOS#"+path_principal+"Gastronomia/lostrucos/lostrucosindice800x600.htm",
				"DATOS GASTRONÓMICOS#"+path_principal+"Gastronomia/datosgastronomicos800x600.htm",
				"ACTUALIDADES#"+path_principal+"Gastronomia/actualidades800x600.htm",
				"GALERÍA DEL SUMILLER#"+path_principal+"Sumiller/sumiller800x600.htm",
				"HOSTELERÍA#"+path_principal+"Hosteleria/hosteleria800x600.htm",
				"CONSULTAS#"+path_principal+"Gastronomia/consultas800x600.htm",
                "GLOSARIO GASTRONÓMICO#"+path_principal+"Gastronomia/glosariogas.php");
				
	var publicaciones=new Array("LOS LIBROS#"+path_principal+"Construccion/construccion800x600.htm",
				"TE PUBLICAMOS#"+path_principal+"Construccion/construccion800x600.htm");

	var varias_secciones=new Array("PUBLICIDAD#"+path_principal+"Publicidad/publicidad800x600.htm",
				"ANUNCIOS#"+path_principal+"Anuncios/Anuncios800x600.htm",
				"ENLACES#"+path_principal+"Enlaces/Enlaces800x600.htm");

	/* var pepe=new Array("JUAN#"+path_principal+"juan.html",
				"PEDRO#"+path_principal+"Pedro/pedro.html",
				"PABLO#"+path_principal+"Pablo/pablo.html");
	*/

	document.write('<table width="163" border="0" cellspacing="3" cellpadding="0" align="center">');
	document.write('<tr><td bgcolor="#FFCC99" colspan="2"> <div align="center"><font face="Arial, Helvetica, sans-serif"><b><font color="#990000">SECCIONES</font></b></font></div></td></tr>');

	GenerarSecciones("VITIVINICULTURA",vitivinicultura);
	GenerarSecciones("GASTRONOMIA",gastronomia);
	GenerarSecciones("PUBLICACIONES",publicaciones);
	GenerarSecciones("VARIAS SECCIONES",varias_secciones);
	//GenerarSecciones("PEPE",pepe);

	document.write("<tr>");
    document.write("<td colspan='2'>&nbsp;</td>");
    document.write("</tr>");
    document.write("<tr>");
    document.write("<td colspan='2'>&nbsp;</td>");
    document.write("</tr>");
    document.write("<tr>");

	var link_favoritos='"http://www.misvinos.com"';
	var titulo_favoritos='"Los Grandes Vinos de Castilla y León"';

	
	document.write("<tr>");
	document.write("<td colspan='2' height='1'  bordercolor='#FF3300' bgcolor='#FFCC99');'> </td>");
	document.write("</tr>");
	
	document.write("<tr>");
	document.write("<td colspan='2' class='estilo' bgcolor ='#5E0002' bordercolor='#FF3300'  onclick=\"this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.misvinos.com');\"><a href='javascript:' class ='selector'>Haznos tu página de inicio</a></td>");
	document.write("</tr>");


	document.write("<tr>");
	document.write("<td colspan='2' height='1'  bordercolor='#FF3300' bgcolor='#FFCC99');'> </td>");
	document.write("</tr>");
	
	document.write("<tr>");
    document.write("<td colspan='2' class='estilo' bgcolor ='#5E0002' bordercolor='#FF3300' ><a href='javascript:window.external.AddFavorite("+link_favoritos+","+titulo_favoritos+");' class='selector'>Agregar a Favoritos</a></td>");
    document.write("</tr>");

	document.write("<tr>");
	document.write("<td colspan='2' height='2'  bordercolor='#FF3300' bgcolor='#FFCC99');'> </td>");
	document.write("</tr>");

    document.write("<tr>");
	document.write("<td colspan='2' bgcolor ='#5E0002' bordercolor='#FF3300' ><a href='"+path_principal+"principal.html' class='selector'>Ir a la página principal</a></td>");
    document.write("</tr>");
    
	document.write("<tr>");
	document.write("<td colspan='2' height='1' bordercolor='#FF3300' bgcolor='#FFCC99');'> </td>");
	document.write("</tr>");

	document.write("<tr>");
	document.write("<td colspan='2' class='selector' bgcolor ='#5E0002' bordercolor='#FF3300'  onClick='window.open(\"" + path_principal + "Recomiendaweb/Recomiendaweb.htm\",\"\",\"width=320,height=225\");'>Recomienda esta web</td>");
	document.write("</tr>");
	
	document.write("<tr>");
	document.write("<td colspan='2' height='1'  bordercolor='#FF3300' bgcolor='#FFCC99');'> </td>");
	document.write("</tr>");

    document.write("<tr>");
    document.write("<td height='2' colspan='2' class='selector' bgcolor ='#5E0002' bordercolor='#FF3300' ><a href='mailto:sugerencias@misvinos.com' class='selector'>Sugerencias</a></td>");
    document.write("</tr>");


	document.write("<tr>");
	document.write("<td colspan='2' height='1'  bordercolor='#FF3300' bgcolor='#FFCC99');'> </td>");
	document.write("</tr>");

	

	document.write("</table>");

}

function GenerarSecciones(seccion,items)
{
	//generar secciones
        document.write('<tr align="center" valign="baseline" bordercolor="#FFCC99" bgcolor="#990000">');
        document.write('<th height="38" colspan="2"> <div align="center"> <font size="-1" color="#FFCC99"><b><font face="Arial, Helvetica, sans-serif"><br>');
        document.write(seccion + '</font></b></font><br></div></th></tr>');

	var i;
	var cadenas;
	for(i=0;i<items.length;i++)
	{
		cadenas=items[i].split("#");

		document.write('<tr class="celdas">');
		document.write('<td width="3" bgcolor="#FFCC99"> <div align="right"><font size="-3" color="#FFCC99"><b></b></font></div></td>');
		document.write('<td width="152" class="unnamed1" bgcolor="#990000"><font size="-3" color="#FFCC99"><b><font face="Arial, Helvetica, sans-serif"><a href='+cadenas[1]+' class="unnamed1">');
		document.write(cadenas[0]+"</a></font></b></font></td></tr>");
	}
}


