function ActivarTab(quien){
	var valor="";
	if(quien=="Angelitos"){
		valor+="<tr valign=\"top\">";
			valor+="<td class=\"tabs\" style=\"height:33px\">";
				valor+="<table style=\"height: 33px\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" border=\"0\">";
				valor+="<tr>";
				 valor+=" <td class=\"lefton\" style=\"width:90px\"><div align=\"center\"> <a class=\"title\" href=\"index.html\">Angelitos</a></div></td>";
				 valor+=" <td class=\"middleoffonleft\" style=\"width:52px\"><div align=\"right\"><a class=\"title\" href=\"javascript:ActivarTab('Productos');\">Productos</a></div></td>";
				  valor+="<td class=\"rightoff\" style=\"width:15px\">&nbsp;</td>";
				  valor+="<td class=\"navspacer\" style=\"width:22px\">&nbsp;&nbsp; | &nbsp;</td>";
				  valor+="<td class=\"tools\" style=\"width:33px\"><a id=\"ayuda1\" class=\"title\" href=\"FAQ.html\" onmouseout=\"oculta_retarda('VentanaAyuda');\"  onmouseover=\"muestra_coloca('VentanaAyuda');\" >Ayuda</a></td>";
				 valor+=" <td class=\"tools\" style=\"width:58px\"></td>";
				valor+="</tr>";
			 valor+=" </table>";
			valor+="</td>";
		 valor+="</tr>";
		 valor+=" <tr>";
			valor+="<td class=\"secondary\" style=\"height:44px\">";
				valor+="<table cellspacing=\"0\" cellpadding=\"0\" align=\"center\">";
				valor+="<tr>";
				 valor+=" <td align=\"center\" style=\"height:28px\"><a class=\"title\" href=\"productos.php\" onmouseover=\"return escape('Busquedas<br><br>')\">B&uacute;squedas</a></td>";
				 valor+=" <td class=\"navspacer\">&nbsp; | &nbsp;</td>";
				 valor+=" <td align=\"center\" style=\"height:28px\"><a class=\"title\" href=\"productos.php\" onmouseover=\"return escape('Accesa tu fiesta<br><br>')\">Login</a></td>";
				 valor+=" <td class=\"navspacer\">&nbsp; | &nbsp;</td>";
				 valor+=" <td align=\"center\" style=\"height:28px\"><a class=\"title\" href=\"pagina2.htm\" onmouseover=\"return escape('<a style=\'padding: 5 0 0 0\'>Gana</span> &nbsp;<img src=\'images/img/money-1.png\' width=\'10\' height=\'10	\' /><br><br>')\">Afiliados</a></td>";
				  valor+="<td class=\"navspacer\">&nbsp; | &nbsp;</td>";
				 valor+=" <td align=\"center\" style=\"height:28px\"><a class=\"title\" href=\"pagina3.htm\" onmouseover=\"return escape('Editorial<br><br>')\">WeBlog</a></td>";
				valor+="</tr>";
			 valor+=" </table>";
			valor+="</td>";
		 valor+=" </tr>";
	}
	if(quien=="Productos"){
		valor+="<tr valign=\"top\">";
			valor+="<td class=\"tabs\" style=\"height:33px\">";
				valor+="<table style=\"height: 33px\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" border=\"0\">";
				valor+="<tr>";
				 valor+=" <td class=\"leftoff\" style=\"width:90px\"><div align=\"center\"> <a class=\"title\" href=\"index.html\">Angelitos</a></div></td>";
				 valor+=" <td class=\"middleoff\" style=\"width:52px\"><div align=\"right\"><a class=\"title\" href=\"javascript:ActivarTab('Productos');\">Productos</a></div></td>";
				  valor+="<td class=\"righton\" style=\"width:15px\">&nbsp;</td>";
				  valor+="<td class=\"navspacer\" style=\"width:22px\">&nbsp;&nbsp; | &nbsp;</td>";
				  valor+="<td class=\"tools\" style=\"width:33px\"><a id=\"ayuda1\" class=\"title\" href=\"FAQ.html\" onmouseout=\"oculta_retarda('VentanaAyuda');\"  onmouseover=\"muestra_coloca('VentanaAyuda');\" >Ayuda</a></td>";
				 valor+=" <td class=\"tools\" style=\"width:58px\"></td>";
				valor+="</tr>";
			 valor+=" </table>";
			valor+="</td>";
		 valor+="</tr>";
		 valor+=" <tr>";
			valor+="<td class=\"secondary\" style=\"height:44px\">";
				valor+="<table cellspacing=\"0\" cellpadding=\"0\" align=\"center\">";
				valor+="<tr>";
				 valor+=" <td align=\"center\" style=\"height:28px\"><a class=\"title\" href=\"productos.php\" onmouseover=\"return escape('Busquedas<br><br>')\">B&uacute;squedas</a></td>";
				 valor+=" <td class=\"navspacer\">&nbsp; | &nbsp;</td>";
				 valor+=" <td align=\"center\" style=\"height:28px\"><a class=\"title\" href=\"productos.php\" onmouseover=\"return escape('Accesa tu fiesta<br><br>')\">Login</a></td>";
				 valor+=" <td class=\"navspacer\">&nbsp; | &nbsp;</td>";
				 valor+=" <td align=\"center\" style=\"height:28px\"><a class=\"title\" href=\"pagina2.htm\" onmouseover=\"return escape('<a style=\'padding: 5 0 0 0\'>Gana</span> &nbsp;<img src=\'images/img/money-1.png\' width=\'10\' height=\'10	\' /><br><br>')\">Afiliados</a></td>";
				  valor+="<td class=\"navspacer\">&nbsp; | &nbsp;</td>";
				 valor+=" <td align=\"center\" style=\"height:28px\"><a class=\"title\" href=\"pagina3.htm\" onmouseover=\"return escape('Editorial<br><br>')\">WeBlog</a></td>";
				valor+="</tr>";
			 valor+=" </table>";
			valor+="</td>";
		 valor+=" </tr>";
	}
			  
}


function setIframeHeight(iframeName,alto) {
  var iframeWin = window.frames[iframeName];
  var iframeEl = document.getElementById? document.getElementById(iframeName): document.all? document.all[iframeName]: null;
  if ( iframeEl && iframeWin ) {
	/*iframeEl.style.height = "auto";*/
	var docHt = getDocHeight(iframeWin.document);
	var suma;
	if(alto==0){
		suma=parseInt(docHt)+60;
	}
	else{
		suma=parseInt(alto)+130+parseInt(docHt);
	}
	
	iframeEl.style.height = suma + "px";
  }
}
function getDocHeight(doc) {
  var docHt = 0, sh, oh;
  if (doc.height) docHt = doc.height;
  else if (doc.body) {
	if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight;
	if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight;
	if (sh && oh) docHt = Math.max(sh, oh);
  }
  return docHt;
}

function MostrarRecomienda(){
	Shrecomienda=true;
	document.getElementById("DivEmergente").style.top="50px";
	document.getElementById("RecomiendaFrame").style.height="308px";
	document.getElementById('RecomiendaFrame').src="recomienda.htm";
	var heightA=getDocHeight(document);
	document.getElementById("DivEmergente").style.height=(heightA-50)+"px";
	document.getElementById("DivEmergente").style.display="";
	document.getElementById("DivEmergenteBack").style.display="";
}


function cerrarVentanaRecomienda(){
	if(document.getElementById("RecomiendaFrame") && document.getElementById("DivEmergente") && document.getElementById("DivEmergenteBack")){
		document.getElementById("RecomiendaFrame").src="blank.htm";
		document.getElementById("DivEmergente").style.display="none";
		document.getElementById("DivEmergenteBack").style.display="none";
	}
}

function AbrirCalculadora(){
	Shrecomienda=true;
	document.getElementById("DivEmergente2").style.top="50px";
	document.getElementById("CalculadoraFrame").style.height="308px";
	document.getElementById('CalculadoraFrame').src="calculadora.html";
	var heightA=getDocHeight(document);
	document.getElementById("DivEmergente2").style.height=(heightA-50)+"px";
	document.getElementById("DivEmergente2").style.display="";
	document.getElementById("DivEmergenteBack").style.display="";
}


function cerrarCalculadora(){
	if(document.getElementById("CalculadoraFrame") && document.getElementById("DivEmergente2") && document.getElementById("DivEmergenteBack")){
		document.getElementById("CalculadoraFrame").src="blank.htm";
		document.getElementById("DivEmergente2").style.display="none";
		document.getElementById("DivEmergenteBack").style.display="none";
	}
}