<!--
var DHTML = (document.getElementById || document.all || document.layers);
function ap_getObj(name) {
if (document.getElementById)
{ return document.getElementById(name).style; }
else if (document.all)
{ return document.all[name].style; }
else if (document.layers)
{ return document.layers[name]; }
}
function ap_showWaitMessage(div,flag) {
if (!DHTML) return;
var x = ap_getObj(div); x.visibility = (flag) ? 'visible':'hidden'
if(! document.getElementById) if(document.layers) x.left=280/2; return true; } ap_showWaitMessage('waitDiv', 3);
//-->

<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->


<!--
function cargando(carga){
	var pi=document.getElementById('ico_cargando');
	pi.style.display="block";
	
	}
//-->

 <!--
function seleccion(style){
		style.background="#98AED8";
	}

//-->
<!--
function deseleccion(style){
		style.background="#F4F4F4";
	}

//-->

<!--
function seleccionusuario(id, divid){
	var tdid=document.getElementById(id);
	
	switch(id){
		case 1:
		document.getElementById(1).style.background = "#D2DCEE";
		document.getElementById(2).style.display = "block";
		document.getElementById(3).style.background = "";
		document.getElementById(4).style.display = "none";
		document.getElementById(5).style.background = "";
		document.getElementById(6).style.display = "none";
		document.getElementById(7).style.background = "";
		document.getElementById(8).style.display = "none";
		break;
		case 3:
		document.getElementById(1).style.background = "";
		document.getElementById(2).style.display = "none";
		document.getElementById(3).style.background = "#D2DCEE";
		document.getElementById(4).style.display = "block";
		document.getElementById(5).style.background = "";
		document.getElementById(6).style.display = "none";
		document.getElementById(7).style.background = "";
		document.getElementById(8).style.disply = "none";
		break;
		case 5:
		document.getElementById(1).style.background = "";
		document.getElementById(2).style.display = "none";
		document.getElementById(3).style.background = "";
		document.getElementById(4).style.display = "none";
		document.getElementById(5).style.background = "#D2DCEE";
		document.getElementById(6).style.display = "block";
		document.getElementById(7).style.background = "";
		document.getElementById(8).style.display = "none";
		break;
		case 7:
		document.getElementById(1).style.background = "";
		document.getElementById(2).style.display = "none";
		document.getElementById(3).style.background = "";
		document.getElementById(4).style.display = "none";
		document.getElementById(5).style.background = "";
		document.getElementById(6).style.display = "none";
		document.getElementById(7).style.background = "#D2DCEE";
		document.getElementById(8).style.display = "block";
		break;
		case 9:
		document.getElementById(9).style.background = "#D2DCEE";
		document.getElementById(10).style.display = "block";
		document.getElementById(11).style.background = "";
		document.getElementById(12).style.display = "none";
		document.getElementById(13).style.background = "";
		document.getElementById(14).style.display = "none";
		document.getElementById(15).style.background = "";
		document.getElementById(16).style.display = "none";
		break;
		case 11:
		document.getElementById(9).style.background = "";
		document.getElementById(10).style.display = "none";
		document.getElementById(11).style.background = "#D2DCEE";
		document.getElementById(12).style.display = "block";
		document.getElementById(13).style.background = "";
		document.getElementById(14).style.display = "none";
		document.getElementById(15).style.background = "";
		document.getElementById(16).style.display = "none";
		break;
		case 13:
		document.getElementById(9).style.background = "";
		document.getElementById(10).style.display = "none";
		document.getElementById(11).style.background = "";
		document.getElementById(12).style.display = "none";
		document.getElementById(13).style.background = "#D2DCEE";
		document.getElementById(14).style.display = "block";
		document.getElementById(15).style.background = "";
		document.getElementById(16).style.display = "none";
		break;
		case 15:
		document.getElementById(9).style.background = "";
		document.getElementById(10).style.display = "none";
		document.getElementById(11).style.background = "";
		document.getElementById(12).style.display = "none";
		document.getElementById(13).style.background = "";
		document.getElementById(14).style.display = "none";
		document.getElementById(15).style.background = "#D2DCEE";
		document.getElementById(16).style.display = "block";
		break;
		}//Fin switch
	}

//-->


<!-- Función para Mostrar / Ocultar DIVs

function mostrar(id, boton){
	var elemento = document.getElementById(id);
	var boton = document.getElementById(boton);
	if(boton.className == "mas"){
	elemento.style.display = 'block';
	boton.className = 'menos';
	}else{
		elemento.style.display = 'none';
		boton.className = 'mas';
		}
			
	}

//-->

<!-- Función para Mostrar / Ocultar DIVs

function mostrarevento(id, boton){
	var elemento = document.getElementById(id);
	var boton = document.getElementById(boton);
	if(boton.className == "eventomas"){
	elemento.style.display = 'block';
	boton.className = 'eventomenos';
	}else{
		elemento.style.display = 'none';
		boton.className = 'eventomas';
		}
			
	}

//-->
<!-- Función para Mostrar / Ocultar lista de pistas / Videos

function mostrarbox(id){
	var cuadro = document.getElementById(id);
	var fondo = document.getElementById("fade");
	var screenWidth = document.documentElement.clientWidth;
	var screenHeight = document.body.offsetHeight+25;
	var anchoCuadro = 200;
	fondo.style.height = screenHeight+'px';
	cuadro.style.left = (screenWidth / 2) - (anchoCuadro / 2)+'px';
	fondo.style.display = "block";
	cuadro.style.display = "block";
	window.scrollTo(0,0);//Llevo la posición arriba
			
}//Fin mostrarbox

function mostrarboxvideo(id){
	var cuadro = document.getElementById(id);
	var fondo = document.getElementById("fade");
	var screenWidth = document.documentElement.clientWidth;
	var screenHeight = document.body.offsetHeight+25;
	var anchoCuadro = 372;
	fondo.style.height = screenHeight+'px';
	cuadro.style.left = (screenWidth / 2) - (anchoCuadro / 2)+'px';
	fondo.style.display = "block";
	cuadro.style.display = "block";
	window.scrollTo(0,0);//Llevo la posición arriba
			
}//Fin mostrarboxvideo

function ocultarbox(id){
	var cuadro = document.getElementById(id);
	var fondo = document.getElementById("fade");
	fondo.style.display = "none";
	cuadro.style.display = "none";
}//Fin ocultarbuscadordir

//-->

<!-- Verificaciones de búsqueda de dirección
function verificarpais(datos){
var pais = document.getElementById("pais");
var criterio1 = document.getElementById("criterio1");
var criterio2 = document.getElementById("criterio2");

	if(pais.value != 0){
	criterio1.length = 1;
	criterio1.disabled = false;
	criterio1.className = "formbuscador";
	var paises = datos.split("@");//Listo los paises
		
		if(pais.value == "Argentina"){ //IF 1
		var paissel = paises[0];//Argentina
		var pcias = paissel.split("-");
			
			for (i=0;i<pcias.length;i++){
    			
				var pciaraw = pcias[i];
				var pcia = pciaraw.split(":");
				opt = document.createElement('option');
				opt.value = pcia[1];//Cargo el valor asociado
				opt.innerHTML = pcia[0];
				criterio1.appendChild(opt);
				
				} //Fin for
			
		}else if(pais.value == "Chile"){ //IF 2
		criterio1.length = 1;
		var paissel = paises[1];//Chile
		var pcias = paissel.split("-");
			
			for (i=0;i<pcias.length;i++){
    			
				var pciaraw = pcias[i];
				var pcia = pciaraw.split(":");
				opt = document.createElement('option');
				opt.value = pcia[1];//Cargo el valor asociado
				opt.innerHTML = pcia[0];
				criterio1.appendChild(opt);
				
				} //Fin for
			
		}else if(pais.value == "Paraguay"){ //IF 3
		criterio1.length = 1;
		var paissel = paises[2];//Paraguay
		var pcias = paissel.split("-");
			
			for (i=0;i<pcias.length;i++){
    			
				var pciaraw = pcias[i];
				var pcia = pciaraw.split(":");
				opt = document.createElement('option');
				opt.value = pcia[1];//Cargo el valor asociado
				opt.innerHTML = pcia[0];
				criterio1.appendChild(opt);
				
				} //Fin for
			
		}else if(pais.value == "Uruguay"){ //IF 4
		criterio1.length = 1;
		var paissel = paises[3];//Uruguay
		var pcias = paissel.split("-");
			
			for (i=0;i<pcias.length;i++){
    			
				var pciaraw = pcias[i];
				var pcia = pciaraw.split(":");
				opt = document.createElement('option');
				opt.value = pcia[1];//Cargo el valor asociado
				opt.innerHTML = pcia[0];
				criterio1.appendChild(opt);
				
				} //Fin for
			
		}//Fin IF
		
	}else{
	criterio1.disabled = true;
	criterio1.className = "buscadordesactivado";
	criterio1.length = 1;
	criterio2.disabled = true;
	criterio2.className = "buscadordesactivado";
	}
}//Fin verificarpais

function verificarpcia(){
	var criterio1 = document.getElementById("criterio1");
	var criterio2 = document.getElementById("criterio2");
	var seleccion = criterio1.value;
	
	if(seleccion != 0){
	criterio2.length = 1;
	criterio2.className = "formbuscador";
	criterio2.disabled = false;
	return seleccion;
	}else{
	criterio2.disabled = true;
	criterio2.className = "buscadordesactivado";
	criterio2.length = 1;
	}

}//Fin verificarpcia

function verificarcampos(){
var formu = document.getElementById("busqueda");
var pais = document.getElementById("pais");
var criterio1 = document.getElementById("criterio1");
var criterio2 = document.getElementById("criterio2");
var palabraclave = document.getElementById("palabraclave");
	
	if(palabraclave.value != ""){
	formu.submit();
	}else{
		if(pais.value != 0){
			
			if(criterio1.value != 0){
				
				if(criterio2.value != 0){
				formu.submit();
				}else{
				alert('Paso 3 incompleto / Step 3 incomplete');
				return false;
				}
			
			}else{
			alert('Paso 2 incompleto / Step 2 incomplete');
			return false;
			}
		
		}else{
		alert("Debe indicar un criterio de b"+'\u00fa'+"squeda / You must select a search criteria");
		return false;
		}
	}

}//Fin verificarcampos

//Verificar campos (Palabra del Mes)
function verificarpal(){
var formu = document.getElementById("buscador");
var keyword = document.getElementById("palabraclave");

	if(keyword.value != ""){
		formu.submit();
	}else{
	alert("Debe indicar un criterio de b"+'\u00fa'+"squeda");
	return false;
	}
}//Fin

//-->

//Cuadros texfield de usuario y contraseña
function usuario(){
	var usuario = document.getElementById("username");
	usuario.value = "";
}//Fin usuario
function contrasena(){
	var pass = document.getElementById("pass");
	pass.value = "";
	pass.type = "password";
}//Fin usuario




<!-- Verificaciones de búsqueda de preguntas y respuestas (Coordinación Docente)
function verificarnivel(){
var nivel = document.getElementById("nivel");
var rubro = document.getElementById("rubro");
	
	if(nivel.value != 0){
	rubro.disabled = false;
	rubro.className = "formbuscador";
	}else{
	rubro.selectedIndex = 0;
	rubro.disabled = true;
	rubro.className = "buscadordesactivado";
	}

}//Fin verificarnivel


function verificarcampos2(){
var formu = document.getElementById("busqueda");
var pais = document.getElementById("nivel");
var criterio1 = document.getElementById("rubro");
var palabraclave = document.getElementById("palabraclave");
	
	if(palabraclave.value != ""){
	formu.submit();
	}else{
		if(pais.value != 0){
			
			if(criterio1.value != 0){
				
				formu.submit();
							
			}else{
			alert('Debe indicar un RUBRO');
			return false;
			}
		
		}else{
		alert("Debe seleccionar un NIVEL");
		return false;
		}
	}

}//Fin verificarcampos
//--> FIN Verificaciones de búsqueda de preguntas y respuestas (Coordinación Docente)

function verificarjuvestina(){
	var pi=document.getElementById('ico_cargando');
	var nombre=document.getElementById('nombre');
	var email=document.getElementById('email');
	var iglesia=document.getElementById('iglesia');
	var formu=document.getElementById('formu');
	
	if(nombre.value != ""){
		
		if(email.value != ""){
			
			var cadena = email.value;
			var arroba = cadena.split("@");
				
				if(arroba.length != 1){
					var cadena2 = arroba[1];
					var punto = cadena2.split(".");
						
						if(punto.length != 1){
							
														
							if(iglesia.value != ""){
								
								pi.style.display="block";
								formu.submit();
							
							}else{
							alert('Debe indicar a que Iglesia o Comunidad concurre.');
							return false;
							}
						
						}else{
						alert('Su direccion de E-Mail no es valida.');
						return false;
						}
				
				}else{
				alert('Su direccion de E-Mail no es valida.');
				return false;
				}
		
		}else{
		alert('Debe indicar su E-Mail');
		return false;
		}
	
	}else{
	alert('Debe indicar su Nombre y Apellido');
	return false;
	}
}

<!-- Verificaciones de envío de mensaje (Mensajes de los jóvenes)
function verificarmnsjoven(){
var pi=document.getElementById('ico_cargando');
var formu=document.getElementById('enviarmns');
var nombre=document.getElementById('nombre');
var apellido=document.getElementById('apellido');
var pais=document.getElementById('pais');
var pcia=document.getElementById('pcia');
var capilla=document.getElementById('capilla');
var email=document.getElementById('email');
var mensaje=document.getElementById('mensaje');
	
	if(nombre.value != "" && apellido.value!= ""){
		
		if(pais.value != 0){
			
			if(pcia.value != ""){
				
				if(email.value != ""){
			
			var cadena = email.value;
			var arroba = cadena.split("@");
				
				if(arroba.length != 1){
					var cadena2 = arroba[1];
					var punto = cadena2.split(".");
						
						if(punto.length != 1){
							
														
							if(capilla.value != ""){
								
								if(mensaje.value != ""){
								pi.style.display="block";
								formu.submit();
								}else{
								alert('Debe detallar algun MENSAJE.');
								return false;
								}
								
							
							}else{
							alert('Debe indicar a que Iglesia o Comunidad concurre.');
							return false;
							}
						
						}else{
						alert('Su direccion de E-Mail no es valida.');
						return false;
						}
				
				}else{
				alert('Su direccion de E-Mail no es valida.');
				return false;
				}
		
		}else{
		alert('Debe indicar su E-Mail');
		return false;
		}
			
			}else{
			alert('Debe indicar su PROVINCIA o DEPARTAMENTO');
			return false;
			}
		
		}else{
		alert('Debe indicar su PAIS');
		return false;
		}
	
	}else{
	alert('Debe indicar su NOMBRE y APELLIDO');
	return false;
	}
	
}
//--> FIN Verificaciones de envío de mensaje (Mensajes de los jóvenes)

<!-- Función para restringir cantidad de caracteres en TEXTO

function ValidarCaracteres_txt(textareaControl,maxlength){
             
        if (textareaControl.value.length > maxlength){
            textareaControl.value = textareaControl.value.substring(0,maxlength);
            alert("Puede ingresar hasta un máximo de "+maxlength+" caracteres");
        }
    } 
  
//-->


<!-- Verificaciones de envío de EVENTOS)
function verificarevento(){
// var pi=document.getElementById('ico_cargando');
var formu=document.getElementById('form_evento');
var organiza=document.getElementById('organiza');
var obispado=document.getElementById('obispado');
var distrito=document.getElementById('distrito');
var pcia=document.getElementById('provincia');
var localidad=document.getElementById('localidad');
var lugar=document.getElementById('lugar');
var titulo=document.getElementById('titulo');
var bajada=document.getElementById('resumen');
var email=document.getElementById('email');
var nombre=document.getElementById('nombre');
var preloader=document.getElementById('cargador');
	
				
if(email.value != ""){
	var cadena = email.value;
	var arroba = cadena.split("@");
			if(arroba.length != 1){
				var cadena2 = arroba[1];
				var punto = cadena2.split(".");
						if(punto.length != 1){
							if(nombre.value != ""){
								if(obispado.value != ""){
									if(distrito.value != ""){
										if(pcia.value != ""){
											if(localidad.value != ""){
												if(lugar.value != ""){
													if(titulo.value != ""){
														if(bajada.value != ""){
															if(organiza.value != ""){
															preloader.style.display = 'block';
															formu.submit();	
															}else{
															alert('Debe indicar quien organiza el evento');
															return false;
															}	
														}else{
														alert('Ingrese un Breve comentario sobre el evento');
														return false;
														}	
													}else{
													alert('Ingrese el Titulo del Evento');
													return false;
													}	
												}else{
												alert('Debe Indicar el Lugar Físico / Dirección');
												return false;
												}												
											}else{
											alert('Debe Indicar la Localidad');
											return false;
											}
										}else{
										alert('Debe Indicar la Provincia o Departamento');
										return false;
										}	
									}else{
									alert('Debe Indicar Numero de Distrito');
									return false;
									}	
								}else{
								alert('Debe Indicar Numero de Obispado');
								return false;
								}	
							}else{
							alert('Debe Completar su Nombre y Apellido');
							return false;
							}
						}else{
						alert('Su direccion de E-Mail no es valida.');
						return false;
						}
			}else{
			alert('Su direccion de E-Mail no es valida.');
			return false;
			}
}else{
alert('Debe indicar su E-Mail');
return false;
}
}
//--> FIN Verificaciones de envío de mensaje (Mensajes de los jóvenes)


<!-- Generador de campos FILE

function generarcampos(){

var cantidad = document.getElementById('cantidad').value;
var cantidadActual = document.getElementById('cantidad_actual');
var lugar = document.getElementById('campos');
	
	if(cantidadActual.value == 0){//IF 1
		
		for(i = 0; i < cantidad; i++){
		var campo = document.createElement('input');
		campo.type = "file";
		campo.className = "select";
		campo.name = "archivo"+i;
		campo.id = "archivo"+i;
		lugar.appendChild(campo);
		}//Fin for
		cantidadActual.value = cantidad;//Guardo la cantidad actual
	}else if(cantidad != 0){//Fin IF 1 (Borro elementos y escribo nuevos)
	
		for(i = 0; i < cantidadActual.value; i++){
		lugar.removeChild(document.getElementById("archivo"+i));
		}//Fin for
		
		for(i = 0; i < cantidad; i++){
		var campo = document.createElement('input');
		campo.type = "file";
		campo.className = "select";
		campo.name = "archivo"+i;
		campo.id = "archivo"+i;
		lugar.appendChild(campo);
		}//Fin for
		cantidadActual.value = cantidad;//Guardo la nueva cantidad actual
		
	}else{
		for(i = 0; i < cantidadActual.value; i++){
		lugar.removeChild(document.getElementById("archivo"+i));
		}//Fin for
		cantidadActual.value = 0;//Reseteo cantidad actual
	}//Fin else de If 1
	
	//Fin else de If 1
											
}//Fin generar campos
//-->

<!-- Eliminar imagenes
function eliminarimagen(numero, indice, id){
if (confirm('¿Desea ELIMINAR la imagen Nº: '+numero+'?')){
	window.location = 'borrarimg.php?id='+id+'&indice='+indice;
	}
}
//-->
