function letras(id){
letra=document.getElementById("letter").value;
xajax_santos(letra,id);
}
function santos(fecha,mes,id){
xajax_buscarpordia(fecha,mes,id);
}
function nameSearch(id){
nombre=document.getElementById("nome").value;
xajax_santosname(nombre,id);
}
function meses(){
month=document.getElementById("mes").value;
xajax_santosmes(month);
}
function ventana (URL){ 
window.open(URL,"ventana2","width=600, height=250, scrollbars=yes, menubar=no, location=no, resizable=yes") 
}
function ventana3 (URL){ 
window.open(URL,"ventana3","width=370, height=212, scrollbars=yes, menubar=no, location=no, resizable=yes") 
}
function ventanaSecundaria (URL){ 
window.open(URL,"ventana1","width=600, height=400, scrollbars=yes, menubar=no, location=no, resizable=yes") 
}

function ventanaEncuesta(URL){ 

//sendFriendvar numero=<?php echo $_GET["nada"];?>
alert(numero);
//window.open(URL,"ventana1","width=600, height=400, scrollbars=yes, menubar=no, location=no, resizable=yes") 
}



function nuevoPoll(URL,i){ 
var j=0;
while(j<=i) {
	var variable="radiosap" + j;
	if(document.getElementById(variable).checked==true){
   var haber="&answer="+j;
  var labuena= URL + haber;
  window.open(labuena,"ventana5","width=600, height=400, scrollbars=yes, menubar=yes, location=no, resizable=yes") 
		}
	j++;
		}
  }
  
function removeMail(){

var subscriptionform1002 = window.open(
 "http://catholic.net/lists/index.php?action=form&type=html&id=1002",
 "subscription_form_popup",
 "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=350,height=200,left=0,top=0"
);


}  
  
function ventanaEventos (URL){ 
window.open(URL,"ventana5","width=600, height=400, scrollbars=yes, menubar=no, location=no, resizable=yes") 
}

function ventanaAlianzas(URL){ 
window.open(URL,"ventana5","width=600, height=500, scrollbars=yes, menubar=no, location=no, resizable=yes") 
}

function sendFriend(id){
 nombre=document.getElementById("name").value;
msj=document.getElementById("mensaje").value;
correo=document.getElementById("email").value;
friendname=document.getElementById("fn").value;
amigo=document.getElementById("friend").value;
xajax_sendEmail(nombre,correo,amigo,msj,id,friendname);
nombre=document.getElementById("name").value="";
msj=document.getElementById("mensaje").value="";
correo=document.getElementById("email").value="";
friendname=document.getElementById("fn").value="";
amigo=document.getElementById("friend").value="";
}


function nowrite(){
alert("You are not allowed to write here");
document.getElementById("name").focus();
	}
function muestracapadigo(){
		oBloqueo.show();	
		PosicionaY("c1");
		document.getElementById("c1").style.display = "block";  
	//	xajax_getcontenidocapa();
	//	return false;     	
	}
	
function panelMore(){
	alert("qui");
	
	}	
	



function validarNews(form){
if (form.mail.value == "")
{ alert("Please insert your mail"); form.mail.focus(); return; }
if (form.name.value == "")
{ alert("Please insert your name"); form.name.focus(); return; }


 contador=0; 
     
    for(i = 0; i < form.elements.length; i++) 
        if(form.elements[i].type == "checkbox") 
            if(form.elements[i].checked) 
                contador++ 
    if(contador==0) {
        alert("Please insert at least one mailing list");  
return;
}


if (form.country.options.selectedIndex == 0)
{ alert("Select your country"); 
    form.country.focus(); return; }
    form.submit();
}

function contactForm(){

	var nombre=document.getElementById("name").value;
	var email=document.getElementById("mail").value;
	var dos=document.getElementById("maildos").value;

	if(dos == email){
}else{
alert ("The mail does not match");
}
	var anos=document.getElementById("age").value;
	var msg=document.getElementById("mesage").value;
	var pais=document.getElementById("Country").value;
	xajax_contacto(nombre,email,anos,msg,pais);
	setInterval("enviaContacto()",1000);
	}
	
function enviaContacto(){
	    var envia=document.getElementById("formita").submit();
	}	
	
function enviaComents(id){
nombre=document.getElementById("nome").value;
mail=document.getElementById("correo").value;
message=document.getElementById("msg").value;
xajax_comentario(id,nombre,mail,message);
nombre=document.getElementById("nome").value="";
mail=document.getElementById("correo").value="";
message=document.getElementById("msg").value="";

////document.getElementById("bloque").style.display ="none";
}
var ventanaCalendario=false
function muestraCalendario(raiz,formulario_destino,campo_destino,mes_destino,ano_destino){
	if (typeof ventanaCalendario.document == "object") {
		ventanaCalendario.close()
	}
	ventanaCalendario = window.open("calendario/index.php?formulario=" + formulario_destino + "&nomcampo=" + campo_destino,"calendario","width=300,height=300,left=100,top=100,scrollbars=no,menubars=no,statusbar=NO,status=NO,resizable=YES,location=NO")
} 

function copiatodo(na)
{
var sape=document.getElementById(na);
sape.focus();
sape.select();
CopiedTxt = document.selection.createRange();
  CopiedTxt.execCommand("Copy");
}

function verAlianzaCo(){
	var combo=document.getElementById('search').value;
	window.location.href="index.php?option=alliancesearch&word=" + combo; 
		}
		
function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}
