//Función que pone el menú horizontal, si nos situamos
//sobre la opción se pone en otro color
function pon(valor,por,clase)
{
	divisor=texto.length;
	ancho=100-(100 % divisor);
	ancho= ancho / divisor;
	despliega=true;
	
	/*if (valor==1)
	{
		despliega=true;//Ñapa por si un día piden estructurar como en la opción 'Estructuras metálicas'
	}*/
	var newOutline="";
	newOutline="<TABLE cellpadding='1' cellspacing='1'  height='"+por+"%' width='100%'  border='0' >";
	
	
	newOutline+="<TR >";
	for (i=0;i<texto.length ; i++ )
	{
		newOutline+="<td valign='top'  width='"+ancho+"%' >";
		newOutline+="<TABLE border='0' align='center' width='50%'>";
				
				var lo=submenu[i].length;
				if (i==valor)
				{
					newOutline+="<TR>";
					newOutline+="<td valign='top' align='left' >";
						if (lo>0)
						{
							newOutline+="<b><a id='"+i+"'  href='#'  class='submenu2' ><img src='./img/menos.jpg' alt='Abrir' width='10' height='10'/>&nbsp;&nbsp;"+texto[i]+"</a></b>";
						}
						else
						{
							newOutline+="<b><a id='"+i+"'  href='#' onclick=\""+enlaces[i]+"\" class='submenu2' ><img src='./img/menos.jpg' alt='Abrir' width='10' height='10'/>&nbsp;&nbsp;"+texto[i]+"</a></b>";
						}
					newOutline+="</td>";
					newOutline+="</TR>";

				}
				else
				{
					newOutline+="<TR>";
					newOutline+="<td valign='top' align='left'   width='100%' >";
						newOutline+="<b><a id='"+i+"' onMouseOver=\"pon('"+i+"','"+por+"','"+clase+"')\"  href='#' class='submenu' ><img src='./img/mas.jpg' alt='Abrir' width='10' height='10'/>&nbsp;&nbsp;"+texto[i]+"</a></b>";
					newOutline+="</td>";
					newOutline+="</TR>";
				}
		newOutline+="</TABLE>";
		newOutline+="</td>";
	}//for
	newOutline+="</TR>";
	newOutline+="</TABLE>";

	newOutline+="<TABLE cellpadding='1' cellspacing='1'  height='"+por+"%' width='100%'  border='0' >";
	newOutline+="<TR >";
	for (i=0;i<texto.length ; i++ )
	{
		newOutline+="<td valign='top' width='"+ancho+"%' >";
		newOutline+="<TABLE border='0' align='center' width='70%' >";
			if (i==valor)
			{
				var cant=submenu[i].length;
				for (j=0;j<cant ; j++ )
				{
					newOutline+="<TR>";
					newOutline+="<td valign='top' align='center' class='menuselec'  onMouseOver=\"activaPro('s"+j+"')\" onMouseOut=\"desactivaPro2('s"+j+"','#C32D0A')\" >";
						newOutline+="<b><a id='s"+j+"' href='#' onclick='"+enlaces[i][j]+"' class='submenuPeque'>"+submenu[i][j]+"</a></b>";
					newOutline+="</td>";
					newOutline+="</TR>";
				}
			}
			else
			{
				newOutline+="<TR>";
					newOutline+="<td valign='top' align='center' >";
						newOutline+="&nbsp;";
					newOutline+="</td>";
				newOutline+="</TR>";
			}
		newOutline+="</TABLE>";
		newOutline+="</td>";
	}//for
	newOutline+="</TR>";
	newOutline+="</TABLE>";
	newOutline+="<TABLE cellpadding='1' cellspacing='1'  height='"+por+"%' width='100%'  border='0' onMouseOver=\"pon(-1,'','')\">";
	newOutline+="<TR >";
	newOutline+="<td valign='top' >&nbsp;</td>";
	newOutline+="</TR >";
	newOutline+="</TABLE>";

	//alert(newOutline);
	document.getElementById("men").innerHTML = newOutline;
}



function menuInicial()
{
	var newOutline="<TABLE cellpadding='0' cellspacing='0' width='100%'  border='0' >";
	for (i=0;i<menuInicio.length ; i++ )
	{
		newOutline+="<TR>";
			newOutline+="<TD>";
				newOutline+="<a href='"+menuInicio[i][0]+"'  id='"+menuInicio[i][1]+"' onMouseOver=\"activaPro('"+menuInicio[i][1]+"')\" onMouseOut=\"desactivaPro('"+menuInicio[i][1]+"')\"  class='menu' >"+menuInicio[i][2]+"</a>";
			newOutline+="</TD>";
		newOutline+="</TR>";
		newOutline+="<TR><td valign='top'>&nbsp;</td></TR>";
	}
	newOutline+="<TR><td valign='top'>&nbsp;</td></TR>";
	newOutline+="</TABLE>";
	document.getElementById("inicial").innerHTML = newOutline;
	//alert(newOutline);
}


var menuInicio=new Array();
//Inicio
	menuInicio[0]=new Array()
	menuInicio[0][0]="index.html";
	menuInicio[0][1]="inicio";
	menuInicio[0][2]="INICIO";

//Quienes somos
	menuInicio[1]=new Array()
	menuInicio[1][0]="qs.html";
	menuInicio[1][1]="qs";
	menuInicio[1][2]="QUIÉNES SOMOS";

//Dónde estamos
	menuInicio[2]=new Array()
	menuInicio[2][0]="dondeEstamos.html";
	menuInicio[2][1]="de";
	menuInicio[2][2]="DÓNDE ESTAMOS";

//ARTÍCULOS
	menuInicio[3]=new Array()
	menuInicio[3][0]="productos.html";
	menuInicio[3][1]="pro";
	menuInicio[3][2]="ARTÍCULOS";

//COMO COMPRAR
	menuInicio[4]=new Array()
	menuInicio[4][0]="comoComprar.html";
	menuInicio[4][1]="ped";
	menuInicio[4][2]="¿CÓMO COMPRAR?";

//REGALOS
	/*menuInicio[4]=new Array()
	menuInicio[4][0]="regalos.html";
	menuInicio[4][1]="reg";
	menuInicio[4][2]="REGALOS";*/



//FAQ
	menuInicio[5]=new Array()
	menuInicio[5][0]="faq.html";
	menuInicio[5][1]="mf";
	menuInicio[5][2]="PREGUNTAS MÁS FRECUENTES";

//BLOG
	menuInicio[6]=new Array()
	menuInicio[6][0]="fotos.html";
	menuInicio[6][1]="BL";
	menuInicio[6][2]="FOTOS MUNDO KAWATA";


//NOTICIAS COLOMBIA
	menuInicio[7]=new Array()
	menuInicio[7][0]="noticias.html";
	menuInicio[7][1]="NOT";
	menuInicio[7][2]="NOTICIAS COLOMBIA";






