function changeBG(){  
   if (document.body){  
      document.bgColor = "#002D88";  
   }  
} 
/*------------------------------------------------------------------------*/
function abrirNoticia(id)
{
	var w=800
	var h=600
	winX=(screen.width - w) / 2
	winY=(screen.height - h) / 2 
	var url="noticia.php?id="+id
	window.open(url, "",'width=' + w + ',height=' + h + ',left=' + winX + ',top=' + winY + ', resizable, scrollbars')
}
/*------------------------------------------------------------------------*/
function abrirTorneo(id)
{
	var w=800
	var h=650
	winX=(screen.width - w) / 2
	winY=(screen.height - h) / 2 
	var url="torneo.php?id="+id
	window.open(url, "",'width=' + w + ',height=' + h + ',left=' + winX + ',top=' + winY + ', resizable, scrollbars')
}
/*------------------------------------------------------------------------*/
function registro()
{
	var w=600
	var h=400
	winX=(screen.width - w) / 2
	winY=(screen.height - h) / 2 
	var url="registro.php"
	window.open(url, "",'width=' + w + ',height=' + h + ',left=' + winX + ',top=' + winY + ', resizable, scrollbars')
}
/*------------------------------------------------------------------------*/
function validaRegistro(f)
{
	ok=true
	var mensaje="Proporciona la siguiente información:\n"

	if(f.torneo.value=="")
	{	mensaje+='  - Torneo\n'
		ok=false}
	if(f.nombres.value=="")
	{	mensaje+='  - Nombre\n'
		ok=false}
	if(f.apellidos.value=="")
	{	mensaje+='  - Apellidos\n'
		ok=false}
	if(f.edad.value=="")
	{	mensaje+='  - Edad\n'
		ok=false}
	e=document.getElementsByName('sexo')
	if(!e[0].checked && !e[1].checked)
	{	mensaje+='  - Sexo\n'
		ok=false}
	if(f.email.value=="")
	{	mensaje+='  - Correo electrónico\n'
		ok=false}
	else
		if(f.email.value.indexOf('@')==-1 || f.email.value.indexOf('.')==-1)
		{	mensaje+='  - Correo electrónico no válido\n'
			ok=false}
	if(ok==true) 
		return true
	else
	{	alert(mensaje)
		return false}
}
/*------------------------------------------------------------------------*/
function abrirConvocatoria(id)
{
	var w=800
	var h=600
	winX=(screen.width - w) / 2
	winY=(screen.height - h) / 2 
	var url="convocatoria.php?id="+id
	window.open(url, "",'width=' + w + ',height=' + h + ',left=' + winX + ',top=' + winY + ', resizable, scrollbars')
}
/*------------------------------------------------------------------------*/
function abrirEquipo(id)
{
	var w=800
	var h=600
	winX=(screen.width - w) / 2
	winY=(screen.height - h) / 2 
	var url="equipo.php?id="+id
	window.open(url, "",'width=' + w + ',height=' + h + ',left=' + winX + ',top=' + winY + ', resizable, scrollbars')
}
/*------------------------------------------------------------------------*/
function mayusculas(campo){
	 campo.value = campo.value.toUpperCase()  
};