
var hmURL = "http://www.esmas.com";
var niURL = "http://www.esmas.com/ninos";
var cmURL = "http://www.esmascompras.com.mx";
var movURL = "http://www.esmasmovil.com";
var imgURL = "http://i.esmas.com/img/univ/"; 
var he = ".esmasHdr_"; 
var ff = "font-family : Verdana, Arial, Helvetica"; 
var tc = 'cellspacing="0" cellpadding="0"'; 
var isCentered = false; 
var nav = new Array( "HOME",hmURL +"", "DEPORTES",hmURL +"deportes/", "FUTBOL",hmURL +"deportes/futbol/", "ESPECTÁCULOS",hmURL +"espectaculos/", "COMPRAS",hmURL +"compras/", "NOTICIEROS",hmURL +"noticierostelevisa/", "NIÑOS",hmURL +"ninos/", "MUJER",hmURL +"mujer/", "SALUD",hmURL +"salud", "TELENOVELAS",hmURL +"telenovelas/", "EMPRENDEDOR",hmURL +"emprendedores/" ); 
var serv = new Array( "ESMAS MÓVIL",hmURL +"movil/", "PAREJAS","http://esmasclub.com/", "CLASIFICADOS",hmURL +"clasificados/", "E-MAIL",hmURL +"e-mail/", "CHAT",hmURL +"chat/", "PROMOCIONES",hmURL +"promociones/", "HORÓSCOPOS",hmURL +"horoscopos/", "EMPLEO",hmURL +"bolsadetrabajo/", "MI CUENTA",hmURL +"micuenta/" ); 
var upBnr2 = false; 


function comprasvs(forma){	
	if(forma.p.value == ""){
		alert("Por favor ingresa una palabra clave.");
		return false;
	}
	if (forma.meta[2].checked == true){
		forma.action = "http://www.esmascompras.com/pesquisa/pesquisa.asp";
		//forma.ei.value = "ISO-8859-1";
		forma.palavra.value = escape(forma.p.value);
		return true;
	}
	else {
		return true;
	}
}

function writeHeader (logoIzquierda, logoDerecha, site, canal, subcanal, url1, url2) {
	nav = new Array
	(
	//titulo,URL
	"HOME", hmURL,
	"DEPORTES",hmURL + "/deportes",
	"FUTBOL",hmURL + "/deportes/futbol",
	"ESPECT&Aacute;CULOS",hmURL + "/espectaculos",
	"COMPRAS",hmURL + "/compras",
	"NOTICIEROS",hmURL + "/noticierostelevisa",
	"NI&Ntilde;OS",hmURL + "/ninos",
	//"FINANZAS PERSONALES",hmURL + "/finanzaspersonales",
	"MUJER",hmURL + "/mujer",
	"SALUD",hmURL + "/salud",
	"TELENOVELAS",hmURL + "/telenovelas",
	"ESMAS M&Oacute;VIL",movURL
	
	);
	
	servicios = new Array
	(
	//titulo,URL
	"ESMAS INTERNET",cmURL + "/internet",
	"PAREJAS","http://www.esmasclub.com",
	"CLASIFICADOS", hmURL + "/clasificados",	
	"E-MAIL",hmURL + "/e-mail",
	"FOROS",hmURL + "/foros",
	"CHAT",hmURL + "/chat",
	"PROMOCIONES",hmURL + "/promociones",
	"HOR&Oacute;SCOPOS",hmURL + "/horoscopos/",
	"EMPLEO",hmURL + "/bolsadetrabajo",
	"MI CUENTA",hmURL + "/micuenta",
	"VIAJES","http://www.qksrv.net/click-1359368-7203340?url=http%3A%2F%2Fwww%2Emx%2Edespegar%2Ecom%2Fpaginas%2Fdefault%2Fdefault%2Easp%3Fpais%3D86%26idcob%3D4790%26afiliate%3DCJ%26PID%3D1359368%26AID%3D7203340%26pag%3D%2Fhome%2Easp%26bDirCompleta%3D1%26click%3D1"
	);

var output = "";
output += ' <style type="text/css">';												          /*lll*/
output += '    .hdr_textoheader{  font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #003366; text-decoration: none; line-height: 17px}';
output += '    .hdr_textoheader:hover {  font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFFFF; text-decoration: none; line-height: 17px}';
output += '    .hdr_textomovil{  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #333333; text-decoration: none; line-height: 11px}';
output += '    .hdr_search {  font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 12px; font-weight: bold; color: #0000FF}';
output += '    .hdr_navegacionsuperior {  font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #FFFFFF; text-decoration: none; line-height: 17px}';
output += '    .hdr_navegacionsuperior:hover {  font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #FFCC00; text-decoration: none; line-height: 17px}';
output += '    .hdr_servicios {  font-family: Arial, Helvetica, sans-serif; font-size: 10px; line-height: 17px; font-weight: normal; color: #0B274D; text-decoration: none}';
output += '    .hdr_servicios:hover {  font-family: Arial, Helvetica, sans-serif; font-size: 10px; line-height: 14px; font-weight: normal; color: #0000FF; text-decoration: underline}';
output += '    .hdr_links {  font-family: Arial, Helvetica, sans-serif; font-size: 10px; line-height: 11px; font-weight: normal; color: #0000FF}';
output += '    .hdr_buttonsearch { font-style: normal; font-weight: normal; font-size: 11px; line-height: 13px; font-family: Arial, Helvetica; text-decoration: none }';
output += '    .hdr_textsearch { font-style: normal; font-weight: normal; font-size: 11px; line-height: 13px; font-family: Arial, Helvetica; text-decoration: none }';
output += '    .buscar {  font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 12px; font-weight: bold; color: #0000FF}';
output += he+'tbl{width: 750;background-color: #FFFFFF;}';
output += he+'banner{padding-top : 5px;padding-bottom : 5px;}';
output += he+'nav{background-color: #336699;}';
output += he+'nav TD{'+ff+';background-color: #336699;font-weight : bold;color:#FFFFFF;font-size:9px;}';
output += he+'nav A,'+he+'nav A:visited{color:#FFFFFF;text-decoration:none;}';
output += he+'nav A:hover{color:#BBDDFF;text-decoration:none;}';
output += he+'bus{background-color: #95C8FD;}';
output += he+'bus INPUT{font-size : 9px;}';
output += he+'bus TD{'+ff+';color : #22427B;font-size : 9px;font-weight : bold;}';
output += he+'serv{background-color : #E7E7E7;}';
output += he+'serv TD{font-size:9px;line-height:18px;'+ff+';color : #000000;background-color : #E7E7E7;}';
output += he+'serv A,'+he+'serv A:visited{color:#000000;text-decoration:none;}';
output += he+'serv A:hover{color:#336699;text-decoration:underline;}';
output += he+'reg{'+ff+';color : #22427B;font-size : 9px;text-decoration:none;}';
output += he+'reg A,'+he+'reg A:visited{color : #22427B;text-decoration:none}';
output += he+'reg A:hover{text-decoration:underline}';
output += he+'reg2,'+he+'reg2:visited{'+ff+';color : #22427B;font-size : 9px;text-decoration:none;}';
output += he+'reg2:hover{text-decoration:none}';
output += he+'bullet{'+ff+';font-size : 9px;font-weight : normal;}';
output += '</style>';
output += '	<table width="750" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">';
output += ' 	<tr>';
output += '    		<td colspan="3" height="1"><img src="http://i.esmas.com/img/spacer.gif" width="2" height="2"></td>';
output += '  	</tr>';
output += '    	<tr>'; 
output += '    		    <td  width="200" valign="middle" align="center" height="76"><a href="' + url1 + '" target="_top"><img src="' + logoIzquierda + '" width="130" height="60" border="0"></a></td>';
output += '    		    <td width="468" height="76" align="right">';
output += '     <IFRAME WIDTH="468" HEIGHT="60" MARGINWIDTH="0" MARGINHEIGHT="0" HSPACE="0" VSPACE="0" FRAMEBORDER="0" SCROLLING="no" BORDERCOLOR="#000000" SRC="http://ads.esmas.com/html.ng/site=' + site + '&canal=' + canal + '&subcanal=' + subcanal + '&adsize=468x60&tile=1">';
output += '     <SCRIPT language="JavaScript" SRC="http://ads.esmas.com/js.ng/Params.richmedia=no&site=' + site + '&canal=' + canal + '&subcanal=' + subcanal + '&adsize=468x60&tile=1"></SCRIPT>';
output += '     <NOSCRIPT><A HREF="http://ads.esmas.com/click.ng/Params.richmedia=no&site=' + site + '&canal=' + canal + '&subcanal=' + subcanal + '&adsize=468x60&tile=1" target="_top"><IMG SRC="http://ads.esmas.com/image.ng/Params.richmedia=no&site=' + site + '&canal=' + canal + '&subcanal=' + subcanal + '&adsize=468x60&tile=1" target="_blank"></A></NOSCRIPT></IFRAME></td>';
output += '    		    <td  width="82" align="center" height="76"><a href="' + url2 + '" target="_top"><img src="' + logoDerecha + '" width="70" height="63" border="0"></a></td>';
output += '    	</tr>';
output += ' 	<tr align="left">';
output += '    		<td colspan="3" height="1">';			
output += '      		<table align="center">';
for(i=0;i<servicios.length;i++){
	output += '		 	<span style="font-family:arial;font-size:14px;font-weigth:bold;color:#6699CC">&#149;</font><span class="hdr_servicios">&nbsp;</span><a href="' + servicios[i+1] + '" class="hdr_servicios" target="_top">' + servicios[i] + '</a>';
	i++;
}	
output += '      		</table></td>';
output += '  	</tr>';
output += '  	</table>';
output += '	<table  border="0" cellspacing="0" cellpadding="0" width="750">';
output += '  	<tr>';
output += '    		<td bgcolor="#062A4E" class="hdr_navegacionsuperior">';			
output += '      		<div align="center"><b>';

var seleccionado = "";
var seleccionado1 = "";
var strMenu = "";
var url = document.location.href;
var existeUrl = 0;
var k = 1;

for(i=0;i<nav.length;i++){
	strMenu = 'onMouseOver="subir(' + k + ')" onMouseOut="bajar(' + k + ')"';
	navAlt = nav[i+1] + "/";	
	if ( (!(url != nav[i+1])) || (!(url != navAlt)) ) {
		seleccionado = "<font color=\"#FFCC00\">";
		seleccionado1 = "</font>";
		strMenu = "";
	}
	else {
		existeURL = url.indexOf(nav[i+1]);
		if ((existeURL != -1)&&(nav[i+1] != hmURL)&&(nav[i+1] != hmURL + "/")) {	
			seleccionado = "<font color=\"#FFCC00\">";
			seleccionado1 = "</font>";
			strMenu = "";	
		}
	}	
	output += '		 	<font color="#6699CC">&#149; </font><a href="' + nav[i+1] + '" ' + strMenu + ' class="hdr_navegacionsuperior" target="_top">' + seleccionado + nav[i] + seleccionado1 + '</a>';
	seleccionado = "";seleccionado1 = "";
	if (nav[i]=="ESMAS M&Oacute;VIL") {
		output += '<img src="https://login.esmas.com/img/univ/nuevo1.gif" width="34" height="12" border="0">';
	}
	i++
	k ++;
}	
output += '      		</b></div></td>';
output += '  	</tr>';
output += '  	<tr>';
output += '    		<td bgcolor="#FFFFFF"><img src="http://i.esmas.com/img/spacer.gif" width="1" height="1"></td>';
output += '  	</tr>';
output += '	</table>';
//***
output += '			<table border="0" cellspacing="0" cellpadding="0" width="750" height="25" bgcolor="#CCDBEA">';
output += '				<tr bgcolor="#CCDBEA">';
output += '             <form action="http://esmas.mx.search.yahoo.net/search/esmas" onsubmit="return comprasvs(this);" name="esmas_search">';
output += '				    <td align="left" width="10">&nbsp;</td>';
output += '				    <td class="buscar" align="left" width="80">BUSCA EN</td>';
output += '				    <td align="right" width="15">';
output += '				    <input type="radio" name="meta" value="vs=esmas.com" class="hdr_links" width="85">';
output += '				    </td>';
output += '				    <td align="center" class="hdr_links" width="50">esmas.com</td>';
output += '				    <td align="right" width="15">';
output += '				    <input type="radio" name="meta" value="all=1" checked>'; 
output += '				    </td>';
output += '				    <td align="center" class="hdr_links" width="47"">la red</td>';

output += '				    <td align="right" width="15">';
output += '				    <input type="radio" name="meta" value="">'; 
output += '				    </td>';
output += '				    <td align="center" class="hdr_links" width="40">compras</td>';
output += '             	<input type="hidden" name="franq" value="156"><input type="hidden" name="palavra" value="">';

var codif = "ISO-8859-1";
(document.location.href.indexOf("yahoo")>-1) ? codif="UTF-8" : codif="ISO-8859-1";

output += '<input type="hidden" name="ei" value="' + codif + '">';
output += '				    <td align="center" width="5">&nbsp;</td>';
output += '				    <td align="center" width="185">';
output += '				    <input type="text" name="p" size="30" class="hdr_textsearch" >';
output += '				    </td>';
output += '				    <td>';
output += '				    <input type="submit" value="Buscar" class="hdr_textsearch">';
output += '				    </td>';
output += '				    <td width="8" align="left">&nbsp;</td>';
output += '				    <td width="89" align="left"><span class="hdr_links">&#149; </span><a href="http://www.esmas.com/mapadesitio" class="hdr_links">'; 
output += '				    Mapa de sitio </a><br>';
output += '				    <span class="hdr_links">&#149; </span><a href="http://www.esmas.com/registro" class="hdr_links">&iexcl;Reg&iacute;strate&#33;</a></td>';
output += '				    <td width="5" align="right">&nbsp;</td>';
output += '				    <td>  <img src="http://i.esmas.com/img/tecno_yahoo_azul.gif" width="169" height="13" style="padding-right:4px;"></td>';
output += '				</tr>';
output += '				<tr>'; 
output += '    				<td colspan="15" height="1" bgcolor="#FFFFFF"><img src="http://i.esmas.com/img/spacer.gif" width="1" height="1"></td>';
output += '  			</tr>';
output += '          	</form>';
output += '			  </table>'; 

document.write(output);
}

//Comienza construccion headers dinamicos
cuantosSubMenus = 20;

//Configurar los menus uno por uno en el array
arMenu1 = new Array()
arMenu2 = new Array(
"56","113","1","",	//left, top
hmURL + "/clubamerica","Club Am&eacute;rica",
hmURL + "/deportes/futbolamericano","Futbol Americano",	//url, texto
hmURL + "/deportes/beisbol","Beisbol",
hmURL + "/deportes/basquetbol","Basquetbol",
//hmURL + "/deportes/tenis","Tenis",
//hmURL + "/deportes/automovilismo","Automovilismo",
//hmURL + "/deportes/automovil","Autom&oacute;vil",
hmURL + "/deportes/otrosdeportes","Otros Deportes",
hmURL + "/deportes/biografias","Deportistas", 
hmURL + "/deportes/fotogaleria","Fotogaler&iacute;a",
hmURL + "/deportes/videogaleria","Videogaler&iacute;a"
)
arMenu3 = new Array(
//"150","129","1",		//left, top
"121","113","1","",		//left, top
hmURL + "/deportes/futbol","M&eacute;xico",	//url, texto
hmURL + "/deportes/futbolinternacional","Internacional",
hmURL + "/deportes/futbol/estadisticas","Estad&iacute;sticas",
hmURL + "/clubamerica","Club Am&eacute;rica",
hmURL + "/seleccionmexicana","Selecci&oacute;n Mexicana",
hmURL + "/sanluis","Club San Luis"
)
arMenu4 = new Array(
"172","113","1","",		//left, top
hmURL + "/espectaculos/cine","Cine",	//url, texto
hmURL + "/espectaculos/farandula","Far&aacute;ndula",
hmURL + "/espectaculos/musica","M&uacute;sica",
hmURL + "/espectaculos/artistas","Biograf&iacute;as Artistas",
hmURL + "/espectaculos/programastv","Programas de TV",
hmURL + "/espectaculos/revistas","Revistas",
hmURL + "/promociones","Promociones",
hmURL + "/espectaculos/fotogaleria","Fotogaler&iacute;a",
hmURL + "/espectaculos/videogaleria","Videogaler&iacute;a"
)
arMenu5 = new Array(
"268","113","1","",		//left, top
cmURL + "/libros","Libros",	//url, texto
cmURL + "/ingram","Libros en Ingl&eacute;s",
cmURL + "/discos","CD",
cmURL + "/dvd","DVD",
cmURL + "/videojuegos","Videojuegos",
cmURL + "/juguetes","Juguetes",
cmURL + "/electronica","Electr&oacute;nica",
cmURL + "/editorial","Revistas",
cmURL + "/ebook/consultas.asp","Consultas",
cmURL + "/internet","Internet",
"http://www.e-paid.net/sites/ESMASMX/default.asp","esmas CA$H",
cmURL + "/extra/site_map.asp","Mapa de Compras"
)
arMenu6 = new Array(
"333","113","1","",		//left, top
hmURL + "/noticierostelevisa/mexico","M&eacute;xico",	//url, texto
hmURL + "/noticierostelevisa/internacionales","Internacionales",
hmURL + "/noticierostelevisa/encuestas","Encuestas",
hmURL + "/noticierostelevisa/conductores","Conductores",
hmURL + "/noticierostelevisa/losreporteros","Los reporteros",
hmURL + "/noticierostelevisa/noticieros","Especiales",
hmURL + "/noticierostelevisa/biografias","Personalidades"
)
arMenu7 = new Array(
"407","113","1","",		//left, top
niURL + "/pantalla","Pantalla",
niURL + "/juega","Juega",	//url, texto
niURL + "/locuras","Locuras",
"http://ninos.esmas.com/divertitareas","Tareas",
"http://www.esmascompras.com.mx/ninios","Tienda",
niURL + "/chat/312477.html","Chat",
niURL + "/fotos","Fotos",
niURL + "/videos","Videos",
niURL + "/personajes","Personajes",
"http://www.esmas.com/ninos/biografias/","Ni&ntilde;os Artistas"
)

arMenu8 = new Array(
"449","113","1","",		//left, top
hmURL + "/mujer/belleza","Belleza y Moda",
hmURL + "/mujer/sexoyamor","Sexo y Amor",	//url, texto
hmURL + "/mujer/saludable","Saludable",	//url, texto
hmURL + "/mujer/cocina","Cocina"
)

arMenu9 = new Array(
"495","113","1","",		//left, top
hmURL + "/salud/saludfamiliar","Salud familiar",	//url, texto
hmURL + "/salud/enfermedades","Enfermedades"
)

arMenu10 = new Array()
arMenu11 = new Array()

//navegacion
arMenu12 = new Array(
"4","219","#FFE65E","#FFF3AF","top_lay02.gif","bottom_lay02.gif",	//left, top
"int_detalle.html?id=22","Hor&oacute;scopo",
"int_detalle.html?id=24","Poemas",
"int_detalle.html?id=17","Chistes",
"int_detalle.html?id=18","N&uacute;mero de la suerte",
"int_detalle.html?id=19","Test rom&aacute;ntico",
"int_detalle.html?id=21","Compatibilidad",
"int_detalle.html?id=23","Piropos",
"int_detalle.html?id=25","Sexy test",
"int_diversion.html","m&aacute;s..."
)
arMenu13 = new Array(
"191","219","#D7E875","#EBF4BB","top_lay03.gif","bottom_lay03.gif",	//left, top
"int_hotnewsprovincia.html","Provincia",
"int_detalle.html?id=1","Futbol",
"int_detalle.html?id=2","Deportes",
"int_detalle.html?id=3","Espect&aacute;culos",
"int_detalle.html?id=5","Noticieros",
"int_detalle.html?id=4","La Oreja",
"int_detalle.html?id=6","W radio",
"int_detalle.html?id=11","Bromas",
"int_detalle.html?id=15","Dieta",
"int_detalle.html?id=8","Deja de fumar",
"int_detalle.html?id=0","Conozca M&aacute;s",
"int_hotnews.html","m&aacute;s..."
)
arMenu14 = new Array(
"378","219","#81E3FE","#C1F1FF","top_lay04.gif","bottom_lay04.gif",	//left, top
"http://www.buongiorno.com/mex/searcher/esmas/tono_ini.html","Monof&oacute;nicos",
"http://www.buongiorno.com/mex/searcher/esmas/poli_ini.html","Polif&oacute;nicos",
"http://www.buongiorno.com/mex/searcher/esmas/truetone_ini.html","Reales"
)
arMenu15 = new Array(
"566","219","#FFA6D3","#FFD3E9","top_lay05.gif","bottom_lay05.gif",	//left, top
"http://www.buongiorno.com/mex/searcher/esmas/salva_ini.html","Fondos a color",
"http://www.buongiorno.com/mex/searcher/esmas/fondos_ini.html","Fondos B/N",
"http://www.buongiorno.com/mex/searcher/esmas/logos_ini.html","Logos B/N",
"http://www.buongiorno.com/mex/searcher/esmas/nom_color_ini.html","Nombres a color"
)
arMenu16 = new Array(
"4","193","#EEC6E0","#F7E3EF","top_lay01.gif","bottom_lay01.gif",	//left, top
//"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Gasol-Allstar Basket",
"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Deep Patrol",
"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Supreme Soccer",
"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Beach Volley Live",
"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Eon",
"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Gladiador Era",
"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Mobile GP",
"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Dangerous Road",
//"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Darts",
"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Skaterboy",
//"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Mobile Tennis",
"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Yeti",
"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Olympiochallenge",
"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","30Seconds",
"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Intrepid",
//"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Samukiko",
//"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Paparazzi On Vespa",
//"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Pahtum",
"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Wireless Boxing",
"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","Collision Course",
"http://www.buongiorno.com/mex/searcher/esmas/juegos_ini.html","m&aacute;s..."
)
arMenu17 = new Array(
"128","193","#EEC6E0","#F7E3EF","top_lay01.gif","bottom_lay01.gif",	//left, top
"int_detalle.html?id=24","Poemas",
"int_detalle.html?id=21","Compatibilidad",
"int_detalle.html?id=26","Er&oacute;scopo",
"int_detalle.html?id=27","Hechizos",
"int_detalle.html?id=20","Hor&oacute;xcopo",
"int_detalle.html?id=25","Sexy Test",
"int_detalle.html?id=19","Test Rom&aacute;ntico",
"int_detalle.html?id=23","Piropos",
"int_detalle.html?id=28","Poemas Picantes"
)

arMenu18 = new Array(
"252","193","#EEC6E0","#F7E3EF","top_lay01.gif","bottom_lay01.gif",	//left, top
"http://www.esmas.com/apuestaporunamor/movil/","Apuesta por un Amor",
"http://www.esmas.com/lamadrastra/movil/425825.html","La Madrastra",
"http://www.esmas.com/misionsos/movil/384860.html","Misi&oacute;n S.O.S.",
"http://www.esmas.com/mujerdemadera/movil/362902.html","Mujer de madera",
"http://www.esmas.com/rebelde/movil/","Rebelde",
"http://www.esmas.com/rubi/movil/368647.html","Rub&iacute;",
"http://www.esmas.com/suenosycaramelos/movil/","Sue&ntilde;os y Caramelos"
)

arMenu19 = new Array(
"376","193","#EEC6E0","#F7E3EF","top_lay01.gif","bottom_lay01.gif",	//left, top
"int_detalle.html?id=30","Cabello Precioso",
"int_detalle.html?id=29","Tu Imagen",
"int_detalle.html?id=31","Depilaci&oacute;n Perfecta",
"int_detalle.html?id=32","Maquillaje"
)
arMenu20 = new Array(
"630","170","#EEC6E0","#F7E3EF","top_lay01.gif","bottom_lay01.gif",	//left, top
"int_tonos_sanvalentin.html","Tonos San Valent&iacute;n",
"http://www.buongiorno.com/mex/searcher/searcherV2.html?CustomerID=esmas&firstRecord=0&XSLfile=salva.xsl&nextPage=salva.html&Attribute=CR_PRW_CATEGORY&Category=10&sizePage=20&Country=mex&Value=san_valentin","Imagenes San Valent&iacute;n",
"int_hotnews_sanvalentin.html","Hot News",
"int_diversion_sanvalentin.html","Diversi&oacute;n",
"http://www.esmas.com/movilpromociones/sanvalentin/","Promoci&oacute;n"

)
//Determino el browser
var ie=(document.all)
var ns=(document.layers)
var ns6=(document.getElementById&&!document.all)
var imagen = "";	

//Genero los divs para los submenus
for (a=1; a<11; a++)
{
	//Saco el objeto del array que me interesa
	contenidoMenu=eval("arMenu"+a);
	d=0;
		
	//Genero el contenido del submenu
	c='<table border="0" cellpadding="0" cellspacing="1" width="105" bgcolor="#FFFFFF">';
	for(b=4;b<contenidoMenu.length;b++){
		c+='<tr><td align="left" bgcolor="#C1CDD9" height="17" width="100" onMouseOut="mOut2(this,\'#C1CDD9\');" onMouseOver="mOvr2(this,\'#708DAB\');" onClick="mClk2(this);"><a href="'+contenidoMenu[b]+'" class="hdr_textoheader" target="_top">&nbsp;'+contenidoMenu[b+1]+'</a></td></tr>';
		b++;																																																	
		d=1;
	}
	c+='</table>';
	
	//Escribimos el contenido de los submenus
	if (ie||ns6){
		if (d==1)	//Checamos si hay contenido del submenu
			document.write('<div id="menu_ie'+a+'" style="position:absolute;left:'+contenidoMenu[0]+'px;top:'+contenidoMenu[1]+'px;visibility:hidden" onMouseOver="entroAlLayer()" onMouseOut="salioDelLayer()">'+c+'</div>');
		else
			document.write('<div id="menu_ie'+a+'" style="position:absolute;left:1px;top:1px;visibility:hidden" onMouseOver="entroAlLayer()" onMouseOut="salioDelLayer()">'+''+'</div>');
	}
	if(ns){
		if (d==1)	//Checamos si hay contenido del submenu
			document.write('<layer left="'+contenidoMenu[0]+'" top="'+contenidoMenu[1]+'" visibility="hide" onMouseOver="entroAlLayer()" onMouseOut="salioDelLayer()" id="menu_ns'+a+'">'+c+'</layer>');
		else
			document.write('<layer left="1" top="1" visibility="hide" onMouseOver="entroAlLayer()" onMouseOut="salioDelLayer()" id="menu_ns'+a+'">'+''+'</layer>');
	}
}

if(ext == 1){
	homeURL = "http://www.esmas.com/movil/";
}
else {
	homeURL = "";	
}
for (a=11; a<cuantosSubMenus+1; a++)
{
	//Saco el objeto del array que me interesa
	contenidoMenu=eval("arMenu"+a);
	d=0;
		
	//Genero el contenido del submenu
	c='<table border="0" cellpadding="0" cellspacing="0" width="140">';
	c+='<tr><td><img src="' + homeURL + 'images/' + contenidoMenu[4] + '" width="140" height="3"></td></tr>'
	for(b=6;b<contenidoMenu.length;b++){
		if(contenidoMenu[b].indexOf("http://",0) != -1){
			target = "";
			if(contenidoMenu[b].indexOf("www.esmas.com",0) != -1){
				target = 'target="_blank"';
			}
			c+='<tr><td nowrap bgcolor="' + contenidoMenu[2] + '" align="left" height="15" onMouseOut="mOut3(this,\'' + contenidoMenu[2] + '\');" onMouseOver="mOvr3(this,\'' + contenidoMenu[3] + '\');" onClick="mClk2(this);"><a href="' + contenidoMenu[b] + '" class="hdr_textomovil"' + target + '>&nbsp;'+contenidoMenu[b+1]+'</a></td></tr>';
		}
		else {
			c+='<tr><td nowrap bgcolor="' + contenidoMenu[2] + '" align="left" height="15" onMouseOut="mOut3(this,\'' + contenidoMenu[2] + '\');" onMouseOver="mOvr3(this,\'' + contenidoMenu[3] + '\');" onClick="mClk2(this);"><a href="' + homeURL + contenidoMenu[b] + '" class="hdr_textomovil" target="_top">&nbsp;'+contenidoMenu[b+1]+'</a></td></tr>';
		}	
		b++;	
		d=1;																																																
	}
	c+='<tr><td><img src="' + homeURL + 'images/' + contenidoMenu[5] + '" width="140" height="3"></td></tr>'
	c+='</table>';
	
	//Escribimos el contenido de los submenus
	if (ie||ns6){
		if (d==1)	//Checamos si hay contenido del submenu
			document.write('<div id="menu_ie'+a+'" style="position:absolute;left:'+contenidoMenu[0]+'px;top:'+contenidoMenu[1]+'px;visibility:hidden" onMouseOver="entroAlLayer()" onMouseOut="salioDelLayer()">'+c+'</div>');
		else
			document.write('<div id="menu_ie'+a+'" style="position:absolute;left:1px;top:1px;visibility:hidden" onMouseOver="entroAlLayer()" onMouseOut="salioDelLayer()">'+''+'</div>');
	}
	if(ns){
		if (d==1)	//Checamos si hay contenido del submenu
			document.write('<layer left="'+contenidoMenu[0]+'" top="'+contenidoMenu[1]+'" visibility="hide" onMouseOver="entroAlLayer()" onMouseOut="salioDelLayer()" id="menu_ns'+a+'">'+c+'</layer>');
		else
			document.write('<layer left="1" top="1" visibility="hide" onMouseOver="entroAlLayer()" onMouseOut="salioDelLayer()" id="menu_ns'+a+'">'+''+'</layer>');
	}
}		

//Iniciamos variables
estaSobreSubMenu = 0;
menuArriba = 1;
timeID1 = setTimeout("bajarSubMenus()", 1);
timeID2 = setTimeout("bajarSubMenus()", 1);

function entroAlLayer(){
	estaSobreSubMenu = 1;
	clearTimeout(timeID1);
	clearTimeout(timeID2);
}

function salioDelLayer(){
	estaSobreSubMenu = 0;
	timeID1 = setTimeout("bajarSubMenus()", 100);
}

function bajarSubMenus(rollover){
	//Bajar todos los submenus
	for (a=1;a<cuantosSubMenus+1;a++)
	{
		if (ie){
			menu = eval('document.all.menu_ie'+a);
			menu.style.visibility='hidden';
		}
		if(ns){
			menu = eval('document.menu_ns'+a);
			menu.visibility='hide';
		}
		if (ns6){
			menu = eval(document.getElementById('menu_ie'+a));
			menu.style.visibility='hidden';
		}
	}
}

function subir(queMenu){
	clearTimeout(timeID2);
	bajarSubMenus();	//Quito los submenus que esten visibles
	
	//Hago visible el submenu que me piden	
	if (ie){
		menu = eval('document.all.menu_ie'+queMenu);
		menu.style.visibility='visible';
	}
	if(ns){
		menu = eval('document.menu_ns'+queMenu);
		menu.visibility='show';
	}
	if(ns6){
		menu = eval(document.getElementById('menu_ie'+queMenu));
		contenidoMenu=eval("arMenu"+queMenu);
		menu.style.left=contenidoMenu[0];
		menu.style.visibility="visible";
	}
}

function bajar(queMenu){
	timeID2 = setTimeout("bajarSubMenus()", 100);
	menuArriba = queMenu;
}

function mOvr2(src,clrOver) {
if (!src.contains(event.fromElement)) {
		src.style.cursor = 'hand';
		src.bgColor = clrOver;
		src.children.tags('A')[0].style.color = "#FFFFFF";
		
	}
}
function mOvr3(src,clrOver) {
if (!src.contains(event.fromElement)) {
		src.style.cursor = 'hand';
		src.bgColor = clrOver;
		
	}
}
function mOut2(src,clrIn) {
if (!src.contains(event.toElement)) {
		src.style.cursor = 'default';
		src.bgColor = clrIn;
		src.children.tags('A')[0].style.color = "#003366";		
	}
}
function mOut3(src,clrIn) {
if (!src.contains(event.toElement)) {
		src.style.cursor = 'default';
		src.bgColor = clrIn;	
	}
}
function mClk2(src)
{
	src.children.tags('A')[0].click();
}

function openTutorial(){
	window.open(homeURL + 'tutorial.html','_tut','width=600,height=420');	
}


