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 AbrirInfo(){
	Shinfo=true;
	document.getElementById("DivEmergente4").style.top="50px";
	document.getElementById("InfoFrame").style.height="308px";
	document.getElementById('InfoFrame').src="sendInfo.html";
	var heightA=getDocHeight(document);
	document.getElementById("DivEmergente4").style.height=(heightA-50)+"px";
	document.getElementById("DivEmergente4").style.display="";
	document.getElementById("DivEmergenteBack").style.display="";
}

function AbrirCalculadoraTP(tipo){
	Shrecomienda=true;
	document.getElementById("DivEmergente2").style.top="50px";
	document.getElementById("CalculadoraFrame").style.height="308px";
	document.getElementById('CalculadoraFrame').src="calculadora.html?tipo="+tipo;
	var heightA=getDocHeight(document);
	document.getElementById("DivEmergente2").style.height=(heightA-50)+"px";
	document.getElementById("DivEmergente2").style.display="";
	document.getElementById("DivEmergenteBack").style.display="";
}

function cerrarVentanaInfo(){
	if(document.getElementById("InfoFrame") && document.getElementById("DivEmergente4") && document.getElementById("DivEmergenteBack")){
		document.getElementById("InfoFrame").src="blank.htm";
		document.getElementById("DivEmergente4").style.display="none";
		document.getElementById("DivEmergenteBack").style.display="none";
	}
}

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";
	}
}

function AbrirReservar(){
	Shrecomienda=true;
	document.getElementById("DivEmergente3").style.top="50px";
	document.getElementById("ReservarFrame").style.height="308px";
	document.getElementById('ReservarFrame').src="reservar.php";
	var heightA=getDocHeight(document);
	document.getElementById("DivEmergente3").style.height=(heightA-50)+"px";
	document.getElementById("DivEmergente3").style.display="";
	document.getElementById("DivEmergenteBack").style.display="";
}
function cerrarVentanaReservar(){
	if(document.getElementById("ReservarFrame") && document.getElementById("DivEmergente3") && document.getElementById("DivEmergenteBack")){
		document.getElementById("ReservarFrame").src="blank.htm";
		document.getElementById("DivEmergente3").style.display="none";
		document.getElementById("DivEmergenteBack").style.display="none";
	}
}
var lista=new Array("babyshower","despedidaSoltera","teoficina","cumpleanos","fiestaalegria","graduacion","dianino","diamadre","diapadre","fiesta15dias","familiar","empresa","primeracomunion","bautizo","boda","quinceanos","aniversario");
var imagenActiva=0;
function CambiarImagenHome(){
		imagenActiva++;
		if(imagenActiva==lista.length){
			imagenActiva=0;
		}
	switch(lista[imagenActiva]){
		case "babyshower":
			window.document.getElementById('r2').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('babyshower');imagenActiva=0;Mostrar('mismo','images/Babyshower.jpg');window.document.getElementById('rdLay4Opcion0').checked=true;CargarHoras('babyshower');CambiarTexto('Celebra tu Baby Shower en un Lugar Único y Especial','textoMinicuadro');
			window.document.getElementById("Imagen").title="Baby Shower";
			break;
		case "despedidaSoltera":
			window.document.getElementById('r2').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('babyshower');imagenActiva=1;Mostrar('mismo','images/Bodas2.jpg');window.document.getElementById('rdLay4Opcion1').checked=true;CargarHoras('despedidaSoltera');CambiarTexto('Despídete de la Soltería con Elegancia','textoMinicuadro');
			window.document.getElementById("Imagen").title="Despedida Soltera";
			break;
		case "teoficina":
			window.document.getElementById('r2').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('babyshower');imagenActiva=2;Mostrar('mismo','images/teoficina.jpg');window.document.getElementById('rdLay4Opcion2').checked=true;CargarHoras('teoficina');CambiarTexto('Celebra con tu Equipo de Trabajo ese día Especial','textoMinicuadro');
			window.document.getElementById("Imagen").title="Te Oficina";
			break;
		case "cumpleanos":
			window.document.getElementById('r1').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('cumpleanos');imagenActiva=3;Mostrar('mismo','images/cumpleanos.jpg');CargarHoras('cumpleanos');
			window.document.getElementById("Imagen").title="Cumpleaños";
			break;
		case "fiestaalegria":
			window.document.getElementById('r3').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('kinder');imagenActiva=4;Mostrar('mismo','images/fiesta-alegria.jpg');window.document.getElementById('rdLay3Opcion0').checked=true;CargarHoras('fiestaalegria');
			window.document.getElementById("Imagen").title="Fiesta Alegría";
			break;
		case "graduacion":
			window.document.getElementById('r3').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('kinder');imagenActiva=5;Mostrar('mismo','images/graduacionFinal.jpg');window.document.getElementById('rdLay3Opcion1').checked=true;CargarHoras('graduacion');
			window.document.getElementById("Imagen").title="Graduación";
			break;
		case "dianino":
			window.document.getElementById('r3').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('kinder');imagenActiva=6;Mostrar('mismo','images/Dianino.jpg');window.document.getElementById('rdLay3Opcion2').checked=true;CargarHoras('dianino');
			window.document.getElementById("Imagen").title="Dia Niño";
			break;
		case "diamadre":
			window.document.getElementById('r3').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('kinder');imagenActiva=7;Mostrar('mismo','images/Diamadre.jpg');window.document.getElementById('rdLay3Opcion3').checked=true;CargarHoras('diamadre');
			window.document.getElementById("Imagen").title="Dia Madre";
			break;
		case "diapadre":
			window.document.getElementById('r3').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('kinder');imagenActiva=8;Mostrar('mismo','images/dia-del-padre2.jpg');window.document.getElementById('rdLay3Opcion4').checked=true;CargarHoras('diapadre');
			window.document.getElementById("Imagen").title="Dia Padre";
			break;
		case "fiesta15dias":
			window.document.getElementById('r3').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('kinder');imagenActiva=9;Mostrar('mismo','images/fiesta-alegria.jpg');window.document.getElementById('rdLay3Opcion5').checked=true;CargarHoras('fiesta15dias');
			window.document.getElementById("Imagen").title="Fiesta 15 Días";
			break;
		case "familiar":
			window.document.getElementById('r4').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('navidad');imagenActiva=10;Mostrar('mismo','images/navida-familiar.jpg');window.document.getElementById('rdLay4Opcion0').checked=true;CargarHoras('familiar');CambiarTexto('Reúne a toda tu familia para celebrar con regocijo y alegría estos días de luz, calor y amor','textoMinicuadro');
			window.document.getElementById("Imagen").title="Familiar";
			break;
		case "empresa":
			window.document.getElementById('r4').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('navidad');imagenActiva=11;Mostrar('mismo','images/navidad-empresa.jpg');window.document.getElementById('rdLay4Opcion1').checked=true;CargarHoras('empresa');CambiarTexto('Disfruta con los hijos de tu equipo un día maravilloso con todo incluido','textoMinicuadro');
			window.document.getElementById("Imagen").title="Empresa";
			break;
		case "primeracomunion":
			window.document.getElementById('r5').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('sacramentos');imagenActiva=12;Mostrar('mismo','images/PrimeraComunion.jpg');window.document.getElementById('rdLay5Opcion0').checked=true;CargarHoras('primeracomunion');CambiarTexto('El primer encuentro íntimo con el Señor es un día para celebrar y dar gracias','textoMinicuadro');
			window.document.getElementById("Imagen").title="Primera Comunión";
			break;
		case "bautizo":
			window.document.getElementById('r5').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('sacramentos');imagenActiva=13;Mostrar('mismo','images/bautizo.jpg');window.document.getElementById('rdLay5Opcion1').checked=true;CargarHoras('bautizo');CambiarTexto('El nacimiento a la vida en Cristo es un dia para celebrar, compartir y llenarse de regocijo','textoMinicuadro');
			window.document.getElementById("Imagen").title="Bautizo";
			break;
		case "boda":
			window.document.getElementById('r6').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('boda');imagenActiva=14;Mostrar('mismo','images/Bodas.jpg');window.document.getElementById('rdLay5Opcion0').checked=true;CargarHoras('boda');CambiarTexto('Buen gusto, distinción y belleza se fusionan para celebrar un día que recordarás toda tu vida','textoMinicuadro');
			window.document.getElementById("Imagen").title="Boda";
			break;
		case "quinceanos":
			window.document.getElementById('r6').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('boda');imagenActiva=15;Mostrar('mismo','images/Bodas2.jpg');window.document.getElementById('rdLay5Opcion1').checked=true;CargarHoras('quinceanos');CambiarTexto('Celebra este día maravilloso con elegancia, emoción, buen ritmo y sabor','textoMinicuadro');
			window.document.getElementById("Imagen").title="Quinceaños";
			break;
		case "aniversario":
			window.document.getElementById('r6').checked=true;document.getElementById('Recuadro').innerHTML=LoadHTML('boda');imagenActiva=16;Mostrar('mismo','images/aniversario.jpg');window.document.getElementById('rdLay5Opcion2').checked=true;CargarHoras('aniversario');CambiarTexto('Celebra con alegría el camino de la vida','textoMinicuadro');
			window.document.getElementById("Imagen").title="Aniversario";
			break;
		}
	Custom.init();
	
}

window.onload = init;
 
function init() {
  disableDraggingFor(document.getElementById("Imagen"));
}
 
function disableDraggingFor(element) {
  // this works for FireFox and WebKit in future according to http://help.dottoro.com/lhqsqbtn.php
  element.draggable = false;
  // this works for older web layout engines
  element.onmousedown = function(event) {
                event.preventDefault();
                return false;
              };
}
