var campo = "";
var botonCerrar  = "<input type=button value='X' onclick=hidePopWin() class=boton_cerrar_ventana> ";//<input type=button value='Mover'  onmousedown=MoverVentana() onmouseout=setMouseUp()  class=boton_cerrar_ventana2>";
var botonMaxMin  = "<input type=image src='http://www.xavao.com/imgs/escalarVentana.gif' onmousedown=mouseOver(event) onmouseout=setMouseUp2()  class=boton_cerrar_ventana3>";


function sobre() {
if (navigator.appName=="Netscape") {
        document.body.style.cursor = 'pointer';
    } else {
        document.body.style.cursor = 'hand';
    } 

}

function fuera() {
   document.body.style.cursor = 'default';
}

function sobrelinea(celda){ 
	//alert("sobre");
   celda.style.backgroundColor="#66ff33";
} 
function fueralinea(celda,colorFuera){ 
   celda.style.backgroundColor=colorFuera; 
} 



function externalLinks() 
{ 
 	if (!document.getElementsByTagName) return; 
 	var anchors = document.getElementsByTagName("a"); 
 	for (var i=0; i<anchors.length; i++) 
	{ 
  		var anchor = anchors[i]; 
   		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank"; 
 	} 
} 
window.onload = externalLinks;



function google_ad_request_done(google_ads) 
{  
	if (google_ads.length > 0) 
	{
 		ads = new Array();
		for(var i = 0; i < google_ads.length; ++i) 
		{
			ads[i]='<span class="tt"><a href="' + google_ads[i].url + '">' + google_ads[i].line1 + '</a></span><br /><span class="small">' + google_ads[i].line2 + ' ' + google_ads[i].line3 + '</span>';
			if (document.getElementById("unit" + i)) 
			{
				document.getElementById("unit" + i).innerHTML = ads[i];
				document.getElementById("unit" + i).className = 'on';
			}
		}
	}

}


google_ad_client = 'pub-8588716038745388';
google_ad_output = 'js';
google_max_num_ads = '8';
google_safe = 'high';
google_feedback = "on";
google_ad_type  = "text";
google_kw_type = "broad";
google_kw = "royalty free royalty-free stock photo photography photos";




function ampliarConocenos(nombrePantalla,contextPath2,titulo)
{ 
         url_pagina   = "/pantallas/" + nombrePantalla +".php";
         anchoDetalle = 620;
         altoDetalle  = 450;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
        
                  
}




function ampliarAyuda(numeroNoticia,nombrePantalla,contextPath2)
{ 
         url_pagina   = "/pantallas/" + nombrePantalla +".php?numNoticia="+ numeroNoticia
         titulo       = "Ayuda";

         anchoDetalle = 620;
         altoDetalle  = 450;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
                  
}

function ampliarEventos(modotipoEvento,nombrePantalla,contextPath2)
{ 
         url_pagina   = "/pantallas/" + nombrePantalla +".php?modotipoEvento="+ modotipoEvento
         titulo       = "Listado de Tipo de Eventos";

         anchoDetalle = 620;
         altoDetalle  = 400;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
                  
}


function ampliarAyudaEspe(numeroNoticia,nombrePantalla,contextPath2, objeto, valorancho, valoralto)
{ 
         url_pagina   = "/pantallas/" + nombrePantalla +".php?numNoticia="+ numeroNoticia
         titulo       = "Ayuda";

         anchoDetalle = valorancho;
         altoDetalle  = valoralto;
         posicionx  = objeto.offsetLeft;         
         posiciony  = objeto.offsetTop;
         
         showPopWinPosicion(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,posicionx,posiciony,'N','N',botonMaxMin);
                  
}

function ampliarAyudaEspeVentana(numeroNoticia,nombrePantalla,contextPath2, objeto, valorancho, valoralto)
{ 
         url_pagina   = "/pantallas/" + nombrePantalla +".php?numNoticia="+ numeroNoticia
         titulo       = "Ayuda";

         anchoDetalle = valorancho;
         altoDetalle  = valoralto;
         posicionx  = objeto.offsetLeft;         
         posiciony  = objeto.offsetTop;
         
         showPopWinPosicion(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,posicionx,posiciony,'N','N',botonMaxMin);
                  
}

function ejecutarInscripcion(ruta,nombrePantalla,a,codu)
{ 
         url_pagina   = ruta+"/" + nombrePantalla +".php?a="+ a+"&codu="+codu;
         window.open(url_pagina,'_parent');         
}


function ampliarNoticia(numeroNoticia,nombrePantalla,contextPath2)
{ 
         url_pagina   = "/pantallas/" + nombrePantalla +".php?numNoticia="+ numeroNoticia
         titulo       = "Noticia Ampliada";

         anchoDetalle = 780;
         altoDetalle  = 600;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
                  
}


function controlAccesoApli(numeroApli,link,nombrePantalla,contextPath2)
{ 
         url_pagina   = "/pantallas/" + link +".php?numeroApli="+ numeroApli
         titulo       = nombrePantalla;

         anchoDetalle = 380;
         altoDetalle  = 80;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
         
                  
}



function visitarAreaDeportiva(numeroEventoDeportivo,numDepor,nombrePantalla,contextPath2,categoria)
{ 
          if (numeroEventoDeportivo==0) numeroEventoDeportivo="";
          if (categoria==0) categoria="";
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          location.href=contextPath2+"/deportes/?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor+ "&id_categoria=" + categoria;
//          top.opener.document.location.reload(contextPath2+"/deportes/?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor+ "&id_categoria=" + categoria);
}


function visitarAreaDeportiva2(numeroEventoDeportivo,numDepor,nombrePantalla,contextPath2,categoria)
{ 
          if (numeroEventoDeportivo==0) numeroEventoDeportivo="";
          if (categoria==0) categoria="";
          //window.top.hidePopWin() ;
          //showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          window.open(contextPath2+"/deportes/?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor+ "&id_categoria=" + categoria ,'_parent');
}

function visitarAreaDeportiva3(numeroEventoDeportivo,numDepor,nombrePantalla,contextPath2,categoria)
{ 
          if (numeroEventoDeportivo==0) numeroEventoDeportivo="";
          if (categoria==0) categoria="";
          //window.top.hidePopWin() ;
          //showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          window.open(contextPath2+"/negocio/?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor+ "&id_categoria=" + categoria ,'_parent');
}

function visitarAreaNegocio(numeroAplicacion,nombrePantalla,contextPath2,categoria)
{ 
          if (numeroAplicacion==0) numeroAplicacion="";
         
         url_pagina   = "/aplicacion/?numeroAplicacion="+ numeroAplicacion ;
         titulo       = nombrePantalla;
         anchoDetalle = 880;
         altoDetalle  = 600;
         showPopWinMaximizado(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, "","");
         document.getElementById("lauding").innerHTML = '';
          
} 

function visitarMenuDeportivo(numeroEventoDeportivo,numDepor,opcionMenuDepor,nombrePantalla,contextPath2,id_categoria)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          if (opcionMenuDepor == 8){
             location.href=contextPath2+"/inscripcionEquipo.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor +"&id_categoria="+id_categoria;
          }
          else
          {
             location.href=contextPath2+"/deportes/?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionMenuDepor=" +opcionMenuDepor+"&id_categoria="+id_categoria;          

          }
}
function visitarNoticias(numeroEventoDeportivo,numDepor,opcionMenuDepor,nombrePantalla,contextPath2,id_categoria,id_noticia,tipoevento)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          if(tipoevento=="OCIO")
          {
             location.href=contextPath2+"/ocio/?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionMenuDepor=" +opcionMenuDepor+"&id_categoria="+id_categoria+"&id_noticia="+id_noticia;          
          }
          if(tipoevento=="DEPORTE")
          {
             location.href=contextPath2+"/deportes/?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionMenuDepor=" +opcionMenuDepor+"&id_categoria="+id_categoria+"&numNoticia="+id_noticia;                     
          }

}


function visitarArbitrosDeportivo(numeroEventoDeportivo,numDepor,opcionArbitroDepor,nombrePantalla,contextPath2)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjaxCapa (contextPath2+"/deportes/arbitros.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&numArbitro=" +opcionArbitroDepor,"popupFrame",false,true);
}

function visitarEquipoDeportivo(numeroEventoDeportivo,numDepor,opcionEquipoDepor,nombrePantalla,contextPath2)
{ 
         url_pagina   = "/deportes/equipo.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionEquipoDepor=" +opcionEquipoDepor
         titulo       = "Detalle del Equipo";

         anchoDetalle = 620;
         altoDetalle  = 420;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);

          
}

function visitarMasDetalleEquipoDeportivo(numeroEventoDeportivo,numDepor,opcionEquipoDepor,nombrePantalla,contextPath2,id_calendario)
{ 
         url_pagina   = "/deportes/masDetalleEquipo.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionEquipoDepor=" +opcionEquipoDepor+"&id_calendario="+id_calendario;
         
         titulo       = "Gestión Más Detalle del Equipo";

         anchoDetalle = 620;
         altoDetalle  = 420;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);

          
}

function visitarFichaPartido(numeroEventoDeportivo,numDepor,opcionFichaDepor,nombrePantalla,contextPath2,pagina,id_categoria,jornada)
{ 
         //url_pagina   = "/deportes/ficha_partido.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionFichaDepor=" +opcionFichaDepor+"&jornada="+jornada;
         titulo       = "Detalle de la Ficha";

         anchoDetalle = 660;
         altoDetalle  = 420;
//         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
         window.open(contextPath2 +"/deportes/?pB="+ pagina + "&numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionFichaDepor=" +opcionFichaDepor+ "&id_categoria=" + id_categoria+"&jornada="+jornada ,'_parent');

          
}

function visitarFichaPartidoMant(numeroEventoDeportivo,numDepor,opcionFichaDepor,nombrePantalla,contextPath2,pagina,id_categoria,jornada)
{ 
         url_pagina   = "/deportes/ficha_partido.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionFichaDepor=" +opcionFichaDepor+"&jornada="+jornada;
         titulo       = "Detalle de la Ficha";

         anchoDetalle = 660;
         altoDetalle  = 420;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
//         window.open(contextPath2 +"/?pB="+ pagina + "&numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionFichaDepor=" +opcionFichaDepor+ "&id_categoria=" + id_categoria+"&jornada="+jornada ,'_parent');

          
}

function visitarComentarioPartido(numeroEventoDeportivo,numDepor,opcionFichaDepor,nombrePantalla,contextPath2)
{ 
         url_pagina   = "/deportes/comentario_partido.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionFichaDepor=" +opcionFichaDepor
         titulo       = "Comentario del Partido";

         anchoDetalle = 700;
         altoDetalle  = 440;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
          
}

function visitarComentarioNoticia(numeroEventoDeportivo,numDepor,opcionFichaDepor,nombrePantalla,contextPath2,id_categoria)
{ 
         url_pagina   = "/comentario_noticia.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor+ "&id_categoria=" + id_categoria + "&opcionFichaDepor=" +opcionFichaDepor
         titulo       = nombrePantalla;

         anchoDetalle = 750;
         altoDetalle  = 640;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
          
}

function visitarFechaPartido(numeroEventoDeportivo,numDepor,opcionFichaDepor,nombrePantalla,contextPath2,id_categoria)
{ 
         url_pagina   = "/deportes/fecha_partido.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionFichaDepor=" +opcionFichaDepor+"&id_categoria="+id_categoria
         titulo       = "Fecha Partido";

         anchoDetalle = 520;
         altoDetalle  = 220;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);

}

function visitarFechaPartidoMasivo(numeroEventoDeportivo,numDepor,opcionFichaDepor,nombrePantalla,contextPath2,id_categoria)
{ 
         url_pagina   = "/deportes/fecha_partidoMasivo.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionFichaDepor=" +opcionFichaDepor+"&id_categoria="+id_categoria
         titulo       = "Fecha Partido para toda la Jornada";

         anchoDetalle = 520;
         altoDetalle  = 220;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);

}
function visitarAplazarFechaPartido(numeroEventoDeportivo,numDepor,opcionFichaDepor,nombrePantalla,contextPath2,id_categoria)
{ 
         url_pagina   = "/deportes/aplazar_fecha_partido.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionFichaDepor=" +opcionFichaDepor+"&id_categoria="+id_categoria
         titulo       = "Aplazar Fecha Partido";

         anchoDetalle = 650;
         altoDetalle  = 220;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);

}
function visitarLugarPartido(numeroEventoDeportivo,numDepor,opcionFichaDepor,id_lugar,nombrePantalla,contextPath2,id_categoria)
{ 

         url_pagina   = "/deportes/lugar_partido.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_futbolcal=" +opcionFichaDepor+"&id_lugar="+id_lugar+"&id_categoria="+id_categoria
         titulo       = "Lugar del Partido";

         anchoDetalle = 720;
         altoDetalle  = 250;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
                   
}
function visitarLugarPartidoMasivo(numeroEventoDeportivo,numDepor,id_jornada,id_lugar,nombrePantalla,contextPath2,id_categoria)
{ 

         url_pagina   = "/deportes/lugar_partidoMasivo.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_futbolcal=" +id_jornada+"&id_lugar="+id_lugar+"&id_categoria="+id_categoria
         titulo       = "Lugar del Partido para toda la Jornada";

         anchoDetalle = 720;
         altoDetalle  = 250;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
                   
}

function visitarArbitrosPartido(numeroEventoDeportivo,numDepor,opcionFichaDepor,id_arbitro,nombrePantalla,contextPath2,id_categoria)
{ 

         url_pagina   = "/deportes/arbitros_partido.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_futbolcal=" +opcionFichaDepor+"&id_Arbitros="+id_arbitro+"&id_categoria="+id_categoria
         titulo       = "Arbitros del Partido";

         anchoDetalle = 720;
         altoDetalle  = 250;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
                   
}

function visitarArbitrosPartidoMasivo(numeroEventoDeportivo,numDepor,opcionFichaDepor,id_arbitro,nombrePantalla,contextPath2,id_categoria)
{ 

         url_pagina   = "/deportes/arbitros_partidoMasivo.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_futbolcal=" +opcionFichaDepor+"&id_Arbitros="+id_arbitro+"&id_categoria="+id_categoria
         titulo       = "Arbitros del Partido para toda ésta Jornada";

         anchoDetalle = 720;
         altoDetalle  = 250;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
                   
}

function visitarArbitrosPartidoAplazado(numeroEventoDeportivo,numDepor,opcionFichaDepor,id_arbitro,nombrePantalla,contextPath2,opcionFichaDeporApl)
{ 

         url_pagina   = "/deportes/arbitros_partido_aplazado.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_futbolcal=" +opcionFichaDepor+"&id_Arbitros="+id_arbitro+ "&id_futbolcalApl=" +opcionFichaDeporApl
         titulo       = "Arbitros del Partido Aplazado";

         anchoDetalle = 720;
         altoDetalle  = 400;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
                   
}

 function visitarCambiosPartido(numeroEventoDeportivo,numDepor,opcionFichaDepor,id_arbitro,nombrePantalla,contextPath2,id_categoria)
{ 
         url_pagina   = "/deportes/cambios_partido.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_futbolcal=" +opcionFichaDepor+"&id_Arbitros="+id_arbitro+"&id_categoria="+id_categoria
         titulo       = "Cambios en Partido";
         anchoDetalle = 706;
         altoDetalle  = 397;
         window.top.showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
}



function visitarCambiosJugPartido(numeroEventoDeportivo,numDepor,opcionFichaDepor,nombrePantalla,contextPath2,localVisitante,id_categoria)
{ 
          url_pagina   = "/deportes/cambiosJugpartido.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_futbolcal=" +opcionFichaDepor+"&localVisitante="+localVisitante+"&id_categoria="+id_categoria
          titulo       = "Cambios de Jugador";
          anchoDetalle = 520;
          altoDetalle  = 320;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
}


/*********************************/
function grabarCambiosPartido(numEventoDeportivo,numDepor,id_calendario,jugador1,jugador2,nombrePantalla,contextPath2,id_equipo,id_categoria)
{
         showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
         FAjax(contextPath2+"/grabarCambiosPartido.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+"&jugador1="+jugador1+"&jugador2="+jugador2+"&id_categoria="+id_categoria+"&id_equipo="+id_equipo,"popupFrame");
             
}
function cargarCambiosPartido(numEventoDeportivo,numDepor,id_calendario, nombrePantalla,formulario,contextPath2, id_equipo,id_categoria)
{ 
            jugador1 = formulario.elements['jugador1'].value;
            jugador2 = formulario.elements['jugador2'].value;  
	  if (jugador1 == "0")
	  {
	    alert("Por favor, elige un jugador.");
	    return (false);
	  }
	  else
	    if (jugador2 == "0")
	  {
	    alert("Por favor, elige un jugador.");
	    return (false);
	  }
	  else
	  {
            showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
            FAjax (contextPath2+"/cargaCambiosPartido.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+"&jugador1="+jugador1+"&jugador2="+jugador2+"&id_categoria="+id_categoria+"&id_equipo="+id_equipo,"popupFrame");
          }  

}

function eliminarCambios(numEventoDeportivo,numDepor,id_calendario,accion,nombrePantalla,contextPath2,id_equipo,id_categoria,id_numcambio)
{
          if(confirm("Esta seguro que desea Eliminar este Cambios?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarCambios.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + id_equipo+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&id_categoria="+id_categoria+"&id_calendario="+id_calendario+"&numcambio="+id_numcambio,"popupFrame");
           } 
          else
          {
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }      
}
     

function accionMantCambios(numEventoDeportivo,numDepor,id_calendario,accion ,nombrePantalla,contextPath2,id_equipo,id_categoria, id_numcambio)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimCambios.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + id_equipo+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&id_categoria="+id_categoria+"&id_calendario="+id_calendario+"&id_numcambio="+id_numcambio,"popupFrame");
          

      
}
/*********************************/


function visitarEstadio(numeroEventoDeportivo,numDepor,opcionEstadioDepor,nombrePantalla,contextPath2)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);          
          FAjaxCapa (contextPath2+"/deportes/estadio.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&numEstadio=" +opcionEstadioDepor,"popupFrame",false,true);
}


function visitarDetalleCla(numeroEventoDeportivo,numDepor,opcionEquipoDepor,nombrePantalla,contextPath2,opcionDetalleCla)
{ 
//          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
//          FAjaxCapa (contextPath2+"/deportes/detalleClasi.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionEquipoDepor=" +opcionEquipoDepor+ "&opcionDetalleCla=" +opcionDetalleCla,"popupFrame",false,true);
     
          url_pagina   = "/deportes/detalleClasi.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionEquipoDepor=" +opcionEquipoDepor+ "&opcionDetalleCla=" +opcionDetalleCla
          titulo       = "Detalle Clasificacion";
          anchoDetalle = 620;
          altoDetalle  = 420;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
}

function visitarJugadorDeportivo(numeroEventoDeportivo,numDepor,opcionJugadorDepor,nombrePantalla,contextPath2, opcionEquipoDepor,modoCampos,subirpantalla)
{ 
          //showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          //FAjaxCapa (contextPath2+"/deportes/jugador.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionJugadorDepor=" +opcionJugadorDepor+ "&opcionEquipoDepor=" +opcionEquipoDepor,"AreaJugador",false,true);
          if(modoCampos==null){
              modoCampos="X";
          }
          url_pagina   = "/deportes/jugador.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionJugadorDepor=" +opcionJugadorDepor+ "&opcionEquipoDepor=" +opcionEquipoDepor+"&modoCampos="+modoCampos;
          //alert(url_pagina);
          titulo       = "Jugador";
          anchoDetalle = 500;
          altoDetalle  = 350;
         
          //showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin,subirpantalla);
          
         anchoDetalle = anchoDetalle;
         altoDetalle  = altoDetalle;
        
         showPopWinPosicion(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,0,0,'N','N',botonMaxMin);

}

function gestionarMasDetalleJugadorDeportivo(numeroEventoDeportivo,numDepor,opcionJugadorDepor,nombrePantalla,contextPath2, opcionEquipoDepor)
{ 
          //showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          //FAjaxCapa (contextPath2+"/deportes/jugador.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionJugadorDepor=" +opcionJugadorDepor+ "&opcionEquipoDepor=" +opcionEquipoDepor,"AreaJugador",false,true);
          
          url_pagina   = "/deportes/gestionarMasDetallejugadorCalendario.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&opcionJugadorDepor=" +opcionJugadorDepor+ "&opcionEquipoDepor=" +opcionEquipoDepor
          titulo       = "Gestionar Detalle Jugador Calendario";
          anchoDetalle = 500;
          altoDetalle  = 350;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
}


function AgregarFotos(numEventoDeportivo,numDepor,numNoticia,accion ,nombrePantalla,contextPath2,id_pagina)
{ 
  
          url_pagina   = "/deportes/insFotos.php?numNoticia="+ numNoticia+"&numEventoDeportivo="+ numEventoDeportivo + "&numDepor=" + numDepor+"&pagina="+id_pagina;
          titulo       = "Fotografia";
          anchoDetalle = 470;
          altoDetalle  = 150;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);


}

function AgregarGaleria(numEventoDeportivo,numDepor,numNoticia,accion ,nombrePantalla,contextPath2,id_pagina)
{ 
  

          if (accion == "GV") 
          {
	          url_pagina   = "/deportes/insGaleriasVideos.php?numNoticia="+ numNoticia+"&numEventoDeportivo="+ numEventoDeportivo + "&numDepor=" + numDepor+"&pagina="+id_pagina;
	          titulo       = "Galería Videos";
          }
          else
          {  
              if (accion == "GVL") 
              {
	          url_pagina   = "/deportes/insGaleriasVideosLocales.php?numNoticia="+ numNoticia+"&numEventoDeportivo="+ numEventoDeportivo + "&numDepor=" + numDepor+"&pagina="+id_pagina;
	          titulo       = "Galería Videos Locales";
	      }
	      else
	      {
	          if (accion == "GFI") 
	          {
		          url_pagina   = "/deportes/insGaleriasFicheros.php?numNoticia="+ numNoticia+"&numEventoDeportivo="+ numEventoDeportivo + "&numDepor=" + numDepor+"&pagina="+id_pagina;
		          titulo       = "Galería Ficheros";
	          }          
	          else
	          {
		          url_pagina   = "/deportes/insGalerias.php?numNoticia="+ numNoticia+"&numEventoDeportivo="+ numEventoDeportivo + "&numDepor=" + numDepor+"&pagina="+id_pagina;
		          titulo       = "Galería Fotos";
	          }
	      }    
	  }        
          anchoDetalle = 650;
          altoDetalle  = 250;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);


}


function ManteUsuariosIns(numEventoDeportivo,numDepor,numNoticia,accion ,nombrePantalla,contextPath2,id_pagina,id_categoria,id_clasificacion)
{ 

	  url_pagina   = "/ini0021.php?id_clasificacion="+id_clasificacion+"&id_usuario_participa="+ numNoticia+"&numEventoDeportivo="+ numEventoDeportivo + "&numDepor=" + numDepor+"&pBlocal="+id_pagina+"&id_categoria="+id_categoria;
	  titulo       = "Mantenimiento Datos Usuarios Inscritos";   
          anchoDetalle = 650;
          altoDetalle  = 450;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);


}


function AgregarFotosVarias(numEventoDeportivo,numDepor,numNoticia,accion ,nombrePantalla,contextPath2)
{ 
  
          url_pagina   = "/deportes/insFotosSuelto.php?numNoticia="+ numNoticia+"&numEventoDeportivo="+ numEventoDeportivo + "&numDepor=" + numDepor;
          titulo       = "Fotografia";
          anchoDetalle = 470;
          altoDetalle  = 150;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);


}

function AgregarFotosGeneral(numEventoDeportivo,numDepor,numNoticia,accion ,nombrePantalla,contextPath2)
{ 
  
          url_pagina   = "/deportes/insFotosGeneral.php?numNoticia="+ numNoticia+"&numEventoDeportivo="+ numEventoDeportivo + "&numDepor=" + numDepor;
          titulo       = "Fotografia";
          anchoDetalle = 470;
          altoDetalle  = 150;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);


}

function MostrarFotos(numEventoDeportivo,numDepor,numNoticia,accion ,nombrePantalla,contextPath2)
{ 
  
          url_pagina   = "/deportes/mostrarFotos.php?numNoticia="+ numNoticia+"&numEventoDeportivo="+ numEventoDeportivo + "&numDepor=" + numDepor;
          titulo       = "Eliminar Fotografia";
          anchoDetalle = 570;
          altoDetalle  = 550;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);


}

function MostrarImagenCabecera(numEventoDeportivo,numDepor,accion ,nombrePantalla,contextPath2)
{ 
  
          url_pagina   = "/deportes/mostrarImagenCabecera.php?numEventoDeportivo="+ numEventoDeportivo + "&numDepor=" + numDepor;
          titulo       = "Eliminar Imágen Cabecera";
          anchoDetalle = 570;
          altoDetalle  = 550;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);


}

function MostrarGaleria(numEventoDeportivo,numDepor,numNoticia,accion ,nombrePantalla,contextPath2,id_pagina)
{ 
  
          url_pagina   = "/deportes/mostrarGaleria.php?numNoticia="+ numNoticia+"&numEventoDeportivo="+ numEventoDeportivo + "&numDepor=" + numDepor+"&pagina="+id_pagina;
          titulo       = "Galería";
          anchoDetalle = 700;
          altoDetalle  = 500;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);


}
function MostrarFicheros(numEventoDeportivo,numDepor,numNoticia,accion ,nombrePantalla,contextPath2,id_pagina)
{ 
  
          url_pagina   = "/deportes/mostrarFicheros.php?numNoticia="+ numNoticia+"&numEventoDeportivo="+ numEventoDeportivo + "&numDepor=" + numDepor+"&pagina="+id_pagina;
          titulo       = "Ficheros";
          anchoDetalle = 700;
          altoDetalle  = 300;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);


}


function MostrarGaleriaFotosVideos(numEventoDeportivo,numDepor,numNoticia,accion ,nombrePantalla,contextPath2,id_pagina)
{ 
  
          url_pagina   = "/deportes/mostrarGaleriaFotosVideos.php?numNoticia="+ numNoticia+"&numEventoDeportivo="+ numEventoDeportivo + "&numDepor=" + numDepor+"&pagina="+id_pagina;
          titulo       = "Galería_Fotos_Videos";
          anchoDetalle = 750;
          altoDetalle  = 490;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
          //showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
//          FAjax(url_pagina,"popupFrame");


}

function verVideos(numEventoDeportivo,numDepor,numNoticia,accion ,nombrePantalla,contextPath2,id_noticiaVideo)
{ 
  
          url_pagina   = "/ultimasGalerias/verVideos.php?numNoticia="+ numNoticia+"&numEventoDeportivo="+ numEventoDeportivo + "&numDepor=" + numDepor+"&numNoticiaVideo="+id_noticiaVideo;
          titulo       = "Videos";
          anchoDetalle = 500;
          altoDetalle  = 400;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
          //showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
//          FAjax(url_pagina,"popupFrame");


}


function MostrarFotoGaleria(numGaleriaNoticia,numNoticia,accion ,nombrePantalla,contextPath2)
{ 
  
          //url_pagina   = "/deportes/mostrarFotoGaleria.php?numNoticia="+ numNoticia+"&id_noticia_galeria="+ numGaleriaNoticia+"&accion="+accion;
          url_pagina   = "/deportes/mostrarFotoGaleria.php?id_noticia_galeria="+numGaleriaNoticia;
          //url_pagina   = "/deportes/mostrarFotoGaleria.php";
          
         
         
          titulo       = "Foto";
          anchoDetalle = 500;
          altoDetalle  = 450;
          showPopWinSinBarra(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
}

function MostrarVideoGaleria(numGaleriaNoticia,numNoticia,accion ,nombrePantalla,contextPath2)
{ 
  
          url_pagina   = "/deportes/mostrarVideoGaleria.php?id_noticia_galeria="+numGaleriaNoticia;
         
          titulo       = "Video";
          anchoDetalle = 580;
          altoDetalle  = 450;
          showPopWinSinBarra(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
          //showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
          //FAjaxCapa(url_pagina,"popupFrame");
          
          //showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
          //FAjaxCapa (url_pagina,"popupFrame",false,true);


          
}

function MostrarVideoGaleriaLocal(numGaleriaNoticia,numNoticia,accion ,nombrePantalla,contextPath2)
{ 
  
          url_pagina   = "/deportes/mostrarVideoGaleriaLocal.php?id_noticia_galeria="+numGaleriaNoticia;
//            url_pagina   = "/deportes/visor_video.php?id_noticia_galeria="+numGaleriaNoticia;

         
          titulo       = "Video";
          anchoDetalle = 458;
          altoDetalle  = 330;
          showPopWinSinBarra(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
//          window.open(contextPath2+"/"+url_pagina, "video", "directories=no, menubar =no,status=no,toolbar=no,location=no,scrollbars=no,fullscreen=no,height=400,width=400").focus();
          

}

function MostrarFotosGeneral(numEventoDeportivo,numDepor,numNoticia,accion ,nombrePantalla,contextPath2)
{ 
  
          url_pagina   = "/deportes/mostrarFotosGeneral.php?numNoticia="+ numNoticia+"&numEventoDeportivo="+ numEventoDeportivo + "&numDepor=" + numDepor;
          titulo       = "Eliminar Fotografia";
          anchoDetalle = 570;
          altoDetalle  = 550;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);


}

function AgregarFotoJugador(numEventoDeportivo,numDepor,id_jugador,accion ,nombrePantalla,contextPath2,id_categoria,id_equipo)
{ 
  
          url_pagina   = "/deportes/insFotoJugador.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + id_equipo+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+"&id_jugador="+id_jugador;
          titulo       = "Fotografia";
          anchoDetalle = 470;
          altoDetalle  = 150;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);


}


function VerFotoJugador(numEventoDeportivo,numDepor,id_jugador,accion ,nombrePantalla,contextPath2,id_categoria,id_equipo)
{ 
  
          url_pagina   = "/deportes/verFotoJugador.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&opcionEquipoDepor=" + id_equipo+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+"&opcionJugadorDepor="+id_jugador;
          titulo       = "Ver Fotografia";
          anchoDetalle = 290;
          altoDetalle  = 370;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);


}
function VerFotoJugadorBorrar(numEventoDeportivo,numDepor,id_jugador,accion ,nombrePantalla,contextPath2,id_categoria,id_equipo)
{ 
  
          url_pagina   = "/deportes/mostrarFotoJugador.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&opcionEquipoDepor=" + id_equipo+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+"&opcionJugadorDepor="+id_jugador;
          titulo       = "Eliminar Fotografia";
          anchoDetalle = 290;
          altoDetalle  = 340;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);


}  
function ValidarAcceso(Formulario) {

 
  if (Formulario.login.value == "")
  {
    alert("Por favor, elige un nombre de usuario.");
    Formulario.login.focus();
    return (false);
  }

  if (Formulario.login.value.length < 3)
  {
    alert("El nombre de usuario debe contener al menos 3 caracteres.");
    Formulario.login.focus();
    return (false);
  }

  if (Formulario.login.value.length > 20)
  {
    alert("El nombre de usuario no debe contener mï¿½s de 20 caracteres.");
    Formulario.login.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½0123456789._-"
  var checkStr = Formulario.login.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("El nombre de usuario debe contener solamente letras y/o nï¿½meros.");
    Formulario.login.focus();
    return (false);
  }

   if (Formulario.pass.value == "")
  {
    alert("Por favor, elige una clave.");
    Formulario.pass.focus();
    return (false);
  }

  if (Formulario.pass.value.length < 3)
  {
    alert("La clave debe contener al menos 3 caracteres.");
    Formulario.pass.focus();
    return (false);
  }

  if (Formulario.pass.value.length > 20)
  {
    alert("La clave no debe contener mï¿½s de 20 caracteres.");
    Formulario.pass.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½0123456789._-";
  var checkStr = Formulario.pass.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("La clave contiene caracteres no vï¿½lidos.");
    Formulario.pass.focus();

    return (false);
  }

  return (true);
}

function eliminarEventoDeportivo(numEventoDeportivo,numDepor,opcionEventoDepor,accion,nombrePantalla,contextPath2)
{
          if(confirm("Esta seguro que desea Eliminar este Evento.?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarEvento.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&opcionEventoDepor=" + opcionEventoDepor+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2,"popupFrame");
          } else
          {
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }  
}


function accionMantDeportivo(numEventoDeportivo,numDepor,opcionEventoDepor,accion ,nombrePantalla,contextPath2,opcionMenu)
{ 
                    
      if (accion!='M'&&accion!='I')
      {
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
          
          FAjax (contextPath2+"/cargaModifElimEvento.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&opcionEventoDepor=" + opcionEventoDepor+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2,"popupFrame");

      }
      else
      {
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
          window.open(contextPath2+"/?opcionMenu="+opcionMenu+"&numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&opcionEventoDepor=" + opcionEventoDepor+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2 ,"_parent");
          
          
      }
}



function recupEvento(numEventoDeportivo,numDepor,accion ,descripcion,contextPath2)
{ 

  //window.setTimeout("setPopTitle();", 600);
   // alert("llenado datos"+descripcion);
     //showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
          //ALERT(213213);
    document.getElementById("tx_descripcion").value =  descripcion;
    document.getElementById("id_evento").value = numEventoDeportivo;
    document.getElementById("id_tipoevento").value = numDepor ;
    document.getElementById("accionForm").value = accion;
    
     
      
}

/**********************************************/


function eliminarEquipoEvento(numEventoDeportivo,numDepor,opcionEventoDepor,accion,nombrePantalla,contextPath2,id_categoria)
{
          if(confirm("Esta seguro que desea Eliminar este Equipo del Evento.?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarEquipo.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + opcionEventoDepor+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria,"popupFrame");
           } 
          else
          {
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }      
}


function eliminarEquipoEventoPre(numEventoDeportivo,numDepor,opcionEventoDepor,accion,nombrePantalla,contextPath2,id_categoria)
{
          if(confirm("Esta seguro que desea Eliminar este Equipo del Evento.?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarEquipoPre.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + opcionEventoDepor+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria,"popupFrame");
           } 
          else
          {
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }      
}


function eliminarParticipanteEventoPre(numEventoDeportivo,numDepor,opcionEventoDepor,accion,nombrePantalla,contextPath2,id_categoria)
{
          if(confirm("Esta seguro que desea Eliminar y no Confirmar este Equipo del Evento.?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarParticipanteSoloPre.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + opcionEventoDepor+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria,"popupFrame");
           } 
          else
          {
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }      
}

function visitarMantJugadores(numeroEventoDeportivo,numDepor,opcionMenuDepor,nombrePantalla,contextPath2,id_categoria,pB)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor eSpere...', contextPath, 90, 20);
          location.href=contextPath2+"/?pB="+ pB +"&numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_equipo=" +opcionMenuDepor+"&id_categoria="+id_categoria;
}
function accionMantEquipo(numEventoDeportivo,numDepor,opcionEventoDepor,accion ,nombrePantalla,contextPath2,id_categoria,pB)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimEquipo.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + opcionEventoDepor+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+"&pB="+pB,"popupFrame");

		  
}

function accionMantEquipo_flot(numEventoDeportivo,numDepor,opcionEventoDepor,accion ,nombrePantalla,contextPath2,id_categoria,pB)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimEquipo.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + opcionEventoDepor+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+"&pB="+pB,"popupFrame");
          //alert('acciones mantenimiento equipo');  	
          //url_pagina   = "/?pB="+ pB +"&numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_equipo=" +opcionMenuDepor+"&id_categoria="+id_categoria;
          //alert(url_pagina);		  
          //alert(url_pagina);
		  //location.href=contextPath2+"/?pB="+ pB +"&numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_equipo=" +opcionMenuDepor+"&id_categoria="+id_categoria;

          //titulo       = "Mantenimiento de Participantes";
          //anchoDetalle = 700;
          //altoDetalle  = 500;
          //showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
}

function accionMantEquipoPre(numEventoDeportivo,numDepor,opcionEventoDepor,accion ,nombrePantalla,contextPath2,id_categoria)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimEquipoPre.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + opcionEventoDepor+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria,"popupFrame");

      
}

function accionMantParticipante(numEventoDeportivo,numDepor,opcionEventoDepor,accion ,nombrePantalla,contextPath2,id_categoria)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimParticipante.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + opcionEventoDepor+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria,"popupFrame");

      
}

function accionMantUsuario(numEventoDeportivo,numDepor,opcionEventoDepor,accion ,nombrePantalla,contextPath2,id_categoria)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimUsuario.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_usuario=" + opcionEventoDepor+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria,"popupFrame");

      
}

function accionMantUsuarioIns(numEventoDeportivo,numDepor,opcionEventoDepor,accion ,nombrePantalla,contextPath2,id_categoria,pB,clasificacion)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimUsuarioIns.php?id_clasificacion="+clasificacion+"&pBlocal="+pB+"&numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_usuario=" + opcionEventoDepor+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria,"popupFrame");

      
}

function eliminarUsuarioEvento(numEventoDeptrtivo,numDepor,id_usuario,accion,nombrePantalla,contextPath2,id_categoria,id_jugador)
{
          if(confirm("Esta seguro que desea Eliminar este Usuario del Evento.?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarUsuario.php?numEventoDeportivo="+ numEventoDeptrtivo+ "&numDepor=" + numDepor + "&id_usuario=" + id_usuario+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+ "&id_jugador="+id_jugador,"popupFrame");
           } 
          else
          {
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }      
}

function eliminarUsuarioInsEvento(numEventoDeptrtivo,numDepor,id_usuario,accion,nombrePantalla,contextPath2,id_categoria,id_jugador,pB,clasificacion)
{
          if(confirm("Esta seguro que desea Eliminar este Usuario gestor de la inscripción.?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);

                     FAjax(contextPath2+"/eliminarUsuarioIns.php?id_clasificacion="+clasificacion+"&pBlocal="+pB+"&numEventoDeportivo="+ numEventoDeptrtivo+ "&numDepor=" + numDepor + "&id_usuario=" + id_usuario+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+ "&id_jugador="+id_jugador,"popupFrame");
           } 
          else
          {
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }      
}

function recupUsuarioEvento(accion,tx_apellido,tx_nombre,id_usuario,tx_fecha,tx_telefono,tx_ciudad,tx_email
,tx_usuario,tx_p,tx_p2,tx_pais,tx_tipo_usuario,txt_otroPais,formulario)
{ 
    document.getElementById("_APELLIDO").value =  tx_apellido;
    document.getElementById("_NOMBRE").value =  tx_nombre;
    document.getElementById("_FECHANATAL").value =  tx_fecha;    
    document.getElementById("id_usuario").value = id_usuario;    
    document.getElementById("_TELEFONO").value = tx_telefono;    
    document.getElementById("_CIUDAD").value = tx_ciudad;        
    document.getElementById("_EMAIL").value = tx_email;
    
    document.getElementById("_USUARIO").value = tx_usuario;    
    document.getElementById("_PASSWORD").value = tx_p;        
    document.getElementById("_PASSWORD2").value = tx_p2;            
    
    num_paises = document.getElementById("_PAIS").length;
    for(i=0;i<num_paises;i++){
      if (document.getElementById("_PAIS").options[i].value==tx_pais) {
	       document.getElementById("_PAIS").options[i].selected = true ;
      }
	
    }  
    document.getElementById("_OTROPAIS").value = txt_otroPais;  
    
    num_perfil = document.getElementById("tx_tipo_usuario").length;
    for(i=0;i<num_perfil;i++){
    
      if (document.getElementById("tx_tipo_usuario").options[i].value==tx_tipo_usuario) {

	       document.getElementById("tx_tipo_usuario").options[i].selected = true ;
      }
	
    }  
    
	document.getElementById("accionForm").value = 7;
    
    document.forms[formulario].submit(); 
    
      
}  

function recupUsuarioInsEvento(accion,tx_apellido,tx_nombre,id_usuario,tx_fecha,tx_telefono,tx_ciudad,tx_email,tx_usuario,tx_p,tx_p2,tx_pais,tx_tipo_usuario,txt_otroPais,id_clasificacion)
{ 
    document.getElementById("_APELLIDO").value =  tx_apellido;
    document.getElementById("_NOMBRE").value =  tx_nombre;
    document.getElementById("_FECHANATAL").value =  tx_fecha;    
    document.getElementById("id_usuario_participa").value = id_usuario;    
    document.getElementById("_TELEFONO").value = tx_telefono;    
    document.getElementById("_CIUDAD").value = tx_ciudad;        
    document.getElementById("_EMAIL").value = tx_email;
    
    document.getElementById("_USUARIO").value = tx_usuario;    
    document.getElementById("_PASSWORD").value = tx_p;        
    document.getElementById("_PASSWORD2").value = tx_p2;            
    document.getElementById("id_clasificacion").value = id_clasificacion;
    num_paises = document.getElementById("_PAIS").length;
    for(i=0;i<num_paises;i++){
      if (document.getElementById("_PAIS").options[i].value==tx_pais) {
	       document.getElementById("_PAIS").options[i].selected = true ;
      }
	
    }  
    document.getElementById("_OTROPAIS").value = txt_otroPais;  
    
    document.getElementById("accionForm").value = accion;    
    
      
}  

function accionMantParticipanteSolo(numEventoDeportivo,numDepor,opcionEventoDepor,accion ,nombrePantalla,contextPath2,id_categoria)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimParticipanteSolo.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + opcionEventoDepor+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria,"popupFrame");

      
}

             
function recupEquipoEvento(numEventoDeportivo,numDepor,accion ,tx_descripcion,tx_alias,id_equipo)
{ 
    document.getElementById("tx_descripcion").value =  tx_descripcion;
    document.getElementById("tx_alias").value =  tx_alias;
    document.getElementById("id_equipo").value = id_equipo;
    document.getElementById("id_evento").value = numEventoDeportivo;
    document.getElementById("id_tipoevento").value = numDepor ;
    document.getElementById("accionForm").value = accion;
	animatedcollapse.toggle('jason');
      
}

function recupParticipanteEvento(numEventoDeportivo,numDepor,accion ,tx_apellido,tx_nombre,id_jugador,tx_alias,tx_edad,tx_email,id_tipo_jugador,id_equipo)
{ 

    document.getElementById("id_equipo").value =  0;
    document.getElementById("tx_apellido").value =  tx_apellido;
    document.getElementById("tx_nombre").value =  tx_nombre;
    document.getElementById("id_jugador").value = id_jugador;
    document.getElementById("tx_alias").value = tx_alias;
    num_edad = document.getElementById("tx_edad").length;
    for(i=0;i<num_edad;i++){

          if (document.getElementById("tx_edad").options[i].value==tx_edad) {
               document.getElementById("tx_edad").options[i].selected = true ;
          }

       }     
    document.getElementById("tx_email").value = tx_email;
    document.getElementById("id_tipo_jugador").value = id_tipo_jugador;    
    document.getElementById("id_clasi_pre").value = id_equipo;    
    
    document.getElementById("accionForm").value = accion;   
      
}

function eliminarJugadorEvento(numEventoDeptrtivo,numDepor,id_equipo,accion,nombrePantalla,contextPath2,id_categoria,id_jugador)
{
          if(confirm("Esta seguro que desea Eliminar este Jugador del Evento.?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarJugadores.php?numEventoDeportivo="+ numEventoDeptrtivo+ "&numDepor=" + numDepor + "&id_equipo=" + id_equipo+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+ "&id_jugador="+id_jugador,"popupFrame");
           } 
          else
          {
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }      
}
     
function eliminarJugadorEventoParti(numEventoDeptrtivo,numDepor,id_equipo,accion,nombrePantalla,contextPath2,id_categoria,id_jugador)
{
          if(confirm("Esta seguro que desea Eliminar este Participante del Evento.?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarJugadoresParti.php?numEventoDeportivo="+ numEventoDeptrtivo+ "&numDepor=" + numDepor + "&id_equipo=" + id_equipo+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+ "&id_jugador="+id_jugador,"popupFrame");
           } 
          else
          {
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }      
}
   
function accionMantJugador(numEventoDeportivo,numDepor,id_jugador,accion ,nombrePantalla,contextPath2,id_categoria,id_equipo)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimJugadores.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + id_equipo+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+"&id_jugador="+id_jugador,"popupFrame");
          

      
}

function accionMantJugadorParti(numEventoDeportivo,numDepor,id_jugador,accion ,nombrePantalla,contextPath2,id_categoria,id_equipo)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimJugadoresParti.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + id_equipo+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+"&id_jugador="+id_jugador,"popupFrame");
          

      
}

function recupJugadorEvento(accion,tx_apellido,tx_nombre,id_jugador,tx_alias,tx_edad,tx_email,id_tipo_jugador)
{ 
    document.getElementById("tx_apellido").value =  tx_apellido;
    document.getElementById("tx_nombre").value =  tx_nombre;
    document.getElementById("id_jugador").value = id_jugador;
    document.getElementById("tx_alias").value = tx_alias;
    num_edad = document.getElementById("tx_edad").length;
    for(i=0;i<num_edad;i++){

          if (document.getElementById("tx_edad").options[i].value==tx_edad) {
               document.getElementById("tx_edad").options[i].selected = true ;
          }

       }     
    document.getElementById("tx_email").value = tx_email;
    document.getElementById("id_tipo_jugador").value = id_tipo_jugador;    
    document.getElementById("accionForm").value = accion;    
    
      
}

function recupJugadorEventoParti(accion,tx_apellido,tx_nombre,id_jugador,tx_alias,tx_edad,tx_email,id_tipo_jugador,id_equipo)
{ 
    document.getElementById("id_equipo").value =  id_equipo;
    document.getElementById("tx_apellido").value =  tx_apellido;
    document.getElementById("tx_nombre").value =  tx_nombre;
    document.getElementById("id_jugador").value = id_jugador;
    document.getElementById("tx_alias").value = tx_alias;
    num_edad = document.getElementById("tx_edad").length;
    for(i=0;i<num_edad;i++){

          if (document.getElementById("tx_edad").options[i].value==tx_edad) {
               document.getElementById("tx_edad").options[i].selected = true ;
          }

       }     
    document.getElementById("tx_email").value = tx_email;
    document.getElementById("id_tipo_jugador").value = id_tipo_jugador;    
    document.getElementById("accionForm").value = accion;    
    
      
}
/****************************************************************/
function eliminarLugarEvento(numEventoDeportivo,numDepor,id_equipo,accion,nombrePantalla,contextPath2,id_categoria,id_arbitro)
{
          if(confirm("Esta seguro que desea Eliminar este Lugar del Evento.?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarLugares.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + id_equipo+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+ "&id_lugar="+id_arbitro,"popupFrame");
           } 
          else
          {
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }      
}
     

function accionMantLugar(numEventoDeportivo,numDepor,id_arbitro,accion ,nombrePantalla,contextPath2,id_categoria,id_equipo)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimLugares.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + id_equipo+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+"&id_lugar="+id_arbitro,"popupFrame");
          

      
}

function recupLugarEvento(accion,tx_nombre,tx_direccion,tx_provincia,tx_ciudad,tx_telefono,tx_email,tx_lugar)
{ 
    document.getElementById("tx_nombre").value =  tx_nombre;
    document.getElementById("tx_direccion").value =  tx_direccion;
    document.getElementById("tx_provincia").value = tx_provincia;
    document.getElementById("tx_ciudad").value = tx_ciudad;
    document.getElementById("tx_telefono").value = tx_telefono ;
    document.getElementById("tx_email").value = tx_email;  
    document.getElementById("id_lugar").value = tx_lugar;  
    document.getElementById("accionForm").value = accion;    
    
	animatedcollapse.toggle('jason');
      
}


/************************************************/
/**********************************************/


function eliminarNoticiasEvento(numEventoDeportivo,numDepor,opcionEventoDepor,accion,nombrePantalla,contextPath2,id_pagina)
{
          if(confirm("Esta seguro que desea Eliminar esta Noticia del Evento.?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarNoticia.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_noticia=" + opcionEventoDepor+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+"&pagina="+id_pagina,"popupFrame");
          } 
          else
          {             
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
          }    
}


function eliminarNoticiasEventoGeneral(numEventoDeportivo,numDepor,opcionEventoDepor,accion,nombrePantalla,contextPath2)
{
          if(confirm("Esta seguro que desea Eliminar esta Noticia del Evento.?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarNoticiaGeneral.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_noticia=" + opcionEventoDepor+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2,"popupFrame");
          } 
          else
          {             
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
          }    
}

function accionMantNoticias(numEventoDeportivo,numDepor,opcionEventoDepor,accion ,nombrePantalla,contextPath2,id_pagina)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimNoticia.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_noticia=" + opcionEventoDepor+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+"&pagina="+id_pagina,"popupFrame");
//            alert('accion manten notici');        

      
}

function SeleccionarAccionNoticia (numEventoDeportivo,numDepor,opcionEventoDepor,contextPath2,objeto,id_pagina,opcionMenu)
{
   valorSelect = objeto.value;
   if (valorSelect != -1){
          cargando(contextPath2);   
   }
   if (valorSelect==1 || valorSelect==2) {
      accionHacer = 'M';
      tituloAccion = 'Modificación';      
      if (valorSelect==1 ) {
          accionHacer = 'M';
          tituloAccion = 'Modificación';      
      }
      if (valorSelect==2 ) {
          accionHacer = 'E';
          tituloAccion = 'Eliminar';      
      } 

       accionMantNoticias(numEventoDeportivo,numDepor,opcionEventoDepor, accionHacer,tituloAccion,contextPath2,id_pagina);
   
   }
   else 
   { 
	   if (valorSelect==3 ) 
	   {
	      if (valorSelect==3 ) {
	          accionHacer = 'F';
	          tituloAccion = 'Fotografía';      
	      }
	
	      AgregarFotos(numEventoDeportivo,numDepor,opcionEventoDepor, accionHacer,tituloAccion,contextPath2,id_pagina);  
	   }
	   else
	   {
	       if (valorSelect==4 || valorSelect==5) 
		   {
		      if (valorSelect==4 ) {
		          accionHacer = 'GF';
		          tituloAccion = 'Galería_Fotos';      
		      }
		      if (valorSelect==5 ) {
		          accionHacer = 'GV';
		          tituloAccion = 'Galería_Videos';      
		      }
		      
		      
		      AgregarGaleria(numEventoDeportivo,numDepor,opcionEventoDepor, accionHacer,tituloAccion,contextPath2,id_pagina);  
		   
		   }
		if (valorSelect==6 || valorSelect==7) 
		   {
		      if (valorSelect==6 ) {
		          accionHacer = 'GVL';
		          tituloAccion = 'Galería_Videos_Locales';      
		      }
		      if (valorSelect==7 ) {
		          accionHacer = 'GFI';
		          tituloAccion = 'Galería_Ficheros';      
		      }
		      
		      AgregarGaleria(numEventoDeportivo,numDepor,opcionEventoDepor, accionHacer,tituloAccion,contextPath2,id_pagina);  
		   
		   }   
	   }
   }
   objeto.value = -1;

}

function accionMantNoticiasGeneral(numEventoDeportivo,numDepor,opcionEventoDepor,accion ,nombrePantalla,contextPath2)
{ 
          

          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimNoticiaGeneral.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_noticia=" + opcionEventoDepor+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2,"popupFrame");

      
}

function recupNoticiasEvento(numEventoDeportivo,numDepor,accion ,tx_titular,tx_contenido_corto,tx_contenido,id_noticia,formulario,id_pagina,id_categoria)
{ 
    document.getElementById("tx_titular").value =  tx_titular;
    document.getElementById("tx_contenido_corto").value =  tx_contenido_corto;
    document.getElementById("tx_contenido").value =  tx_contenido;
    document.getElementById("id_noticia").value = id_noticia;
    document.getElementById("id_evento").value = numEventoDeportivo;
    document.getElementById("id_tipoevento").value = numDepor ;
    document.getElementById("accionForm").value = accion;
    document.getElementById("pagina").value = id_pagina;
    document.getElementById("id_categoria").value = id_categoria;    
    
    
            num_CATEGORIA = document.getElementById("id_categoria").length;
		    for(i=0;i<num_CATEGORIA;i++){
		        if (document.getElementById("id_categoria").options[i].value==id_categoria) {
		               document.getElementById("id_categoria").options[i].selected = true ;
		      }
			
		    }  
    

    document.getElementById("accionForm").value = 6;
    
    document.forms[formulario].submit();
        
    //addArea2();
    //addArea1(); 

      
}

function recupNoticiasEventoGeneral(numEventoDeportivo,numDepor,accion ,tx_titular,id_noticia,tx_tipo,formulario)
{ 
//    document.getElementById("tx_titular").value =  tx_titular;
//    document.getElementById("tx_contenido_corto").value =  tx_contenido_corto;
//    document.getElementById("tx_contenido").value =  tx_contenido;
    document.getElementById("id_noticia").value = id_noticia;
    document.getElementById("tx_tipo").value = tx_tipo;    
    document.getElementById("accionForm").value = 6;
    
    this.document.forms[formulario].submit();
    addArea2();
    addArea1(); 
      
}

/************************************************/
function actualizaPantalla(numDepor,pagina,contextPath2,numEventoDeportivo,id_categoria,id_equipo,id_pagina)
{ 
          if (numEventoDeportivo== undefined) numEventoDeportivo = "";
          if (numDepor== undefined) numDepor = "";
          if (id_categoria== undefined) id_categoria = "";
          if (id_pagina== undefined) id_pagina = "1";          
          
           window.open(contextPath2 +'/?pB='+ pagina + '&numDepor=' +numDepor + "&numEventoDeportivo="+numEventoDeportivo+"&id_categoria="+id_categoria+"&id_equipo="+id_equipo+"&pagina="+id_pagina ,'_parent');

}

function zonaConfig(numeroEventoDeportivo,numDepor,pagina,nombrePantalla,contextPath2)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          location.href=contextPath2+"/?pB=" + pagina +"&numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor;
}



function gestionEvento(numeroEventoDeportivo,numDepor,contextPath2,opcionMenu)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          window.open(contextPath2+"/?opcionMenu="+ opcionMenu + "&numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor,"_parent");
}

function gestionListadoEvento(numeroEventoDeportivo,numDepor,contextPath2,opcionMenu)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          window.open(contextPath2,"_parent");
}
function areaEvento(numeroEventoDeportivo,numDepor,contextPath2)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          location.href=contextPath2+"/ini0004.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor;
}






// Enables Section Menu in Shop Header functionality 

function changeSection(section_id) 
{
	if (section_id == 'home' || section_id == '**') {
		location.href = '/';
	} else if (section_id == 'brand') {
		location.href = '/channels/features.php?story=vendors';
	} else {
		location.href = '/IWCatSectionView.process?IWAction=Load&Merchant_Id=1&Section_Id=' + section_id + '&Sort=Product_Name';
	}
}



// Name: Cookie
// Language: JavaScript
// Author: Travis Beckham | squidfingers.com
// Description: Remove anchor outlines from all links in the document
// --------------------------------------------------

function blurAnchors(){
  if(document.getElementsByTagName){
    var a = document.getElementsByTagName("a");
    for(var i = 0; i < a.length; i++){
      a[i].onfocus = function(){this.blur()};
    }
  }
}
window.onload = blurAnchors;

// clamshell menu

/***********************************************
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

// initializes display by hiding submenus

function resetMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("menu").getElementsByTagName("ol"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") { //DynamicDrive.com change
					ar[i].style.display = "none";
				}
			}
			el.style.display = "block";
		} else {
			el.style.display = "none";
		}
	}
}

function enConstruccion(contextPath)
{ 
          showPopWinDiv('En Construccion...', 'Cargando zona, por favor espere...', contextPath, 290, 80);
          FAjaxCapa (contextPath+"/enContruccion.php","popupFrame",false,true);
}

function cargando(contextPath)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 290, 80);
}

function verGenCalendarioDeportivo(numeroEventoDeportivo,numDepor,categoria, nombrePantalla,contextPath2)
{ 
         //showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
         //FAjaxCapa (contextPath2+"/deportes/gencalendario.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_categoria="+categoria,"popupFrame",false,true);
          
         url_pagina   = "/deportes/gencalendario.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_categoria="+categoria
         titulo       = "Previo Calendario de Enfrentamiento";
         anchoDetalle = 706;
         altoDetalle  = 650;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
}

function visitarCalendarioDeportivo(numEventoDeportivo,numDepor,categoria, nombrePantalla,contextPath2)
{ 
            showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
            FAjax (contextPath2+"/controlCalendarioEvento.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_categoria=" + categoria+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2,"popupFrame");
}

function verGenCalendarioDeportivoManual(numeroEventoDeportivo,numDepor,categoria, nombrePantalla,contextPath2)
{ 
         //showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
         //FAjaxCapa (contextPath2+"/deportes/gencalendarioManual.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_categoria="+categoria,"popupFrame",false,true);
          
         url_pagina   = "/deportes/gencalendarioManual.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_categoria="+categoria
         titulo       = "Previo Calendario Modo Manual de Enfrentamiento";
         anchoDetalle = 706;
         altoDetalle  = 450;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
}
function visitarCalendarioDeportivoManual(numEventoDeportivo,numDepor,categoria, nombrePantalla,contextPath2)
{ 
            showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
            FAjax (contextPath2+"/controlCalendarioEventoManual.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_categoria=" + categoria+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2,"zonaPrivadaManteEventos");

}
/**********************************************/


function grabarCalendarioEvento(numEventoDeportivo,numDepor,categoria,accion,nombrePantalla,contextPath2)
{
         showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
         FAjax(contextPath2+"/grabarCalendarioEvento.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_categoria=" + categoria+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2,"popupFrame");
             
}


function calendarioMantEquipo(numEventoDeportivo,numDepor,categoria,accion ,nombrePantalla,contextPath2)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
          FAjax (contextPath2+"/cargaCalendarioEvento.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_categoria=" + categoria+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2,"popupFrame");

      
}


function grabarCalendarioEventoManual(numEventoDeportivo,numDepor,categoria,accion,nombrePantalla,contextPath2)
{
         showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
         FAjax(contextPath2+"/grabarCalendarioEventoManual.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_categoria=" + categoria+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2,"popupFrame");
             
}


function calendarioMantEquipoManual(numEventoDeportivo,numDepor,categoria,accion ,nombrePantalla,contextPath2)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
          FAjax (contextPath2+"/cargaCalendarioEventoManual.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_categoria=" + categoria+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2,"popupFrame");

      
}
function grabarjornadaManualPartido(numEventoDeportivo,numDepor,nugrupo,id_categoria, nombrePantalla,formulario,contextPath2)
{ 
            Selectfaltantes="N";
	    for (var i=0; i<formulario.elements.length; i++)
	    { 
	    	if (formulario.elements[i].type=="select-one")
         	{
		          if (formulario.elements[i].value=="-1")
	                  {
		            Selectfaltantes="S";
		          }  
	        }
	    }
		
            if(Selectfaltantes=="N") { 
	            showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
	            formulario.submit();
            }
            else
            {
                    alert("Faltas Equipos que enfrentar");
            }
   
}

function visitarCalendarioManualPartido(numeroEventoDeportivo,numDepor,nugrupo,id_categoria,nombrePantalla,contextPath2)
{ 

         url_pagina   = "/deportes/jornadaManual.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&nu_grupo=" +nugrupo+"&id_categoria="+id_categoria
         titulo       = "Enfrentamientos de la "+nombrePantalla;
         anchoDetalle = 720;
         altoDetalle  = 400;
         showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
                   
}
                  
/************************************************/


/**********************************************/


function eliminarCategoriaEvento(numEventoDeportivo,numDepor,opcionEventoDepor,accion,nombrePantalla,contextPath2)
{
          if(confirm("Esta seguro que desea Eliminar esta Categora del Evento.?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarCategoria.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_categoria=" + opcionEventoDepor+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2,"popupFrame");
           } 
          else
          {
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }      
}


function accionMantCategoria(numEventoDeportivo,numDepor,opcionEventoDepor,accion ,nombrePantalla,contextPath2)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimCategoria.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_categoria=" + opcionEventoDepor+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2,"popupFrame");

      
}
                  
function recupCategoriaEvento(numEventoDeportivo,numDepor,accion ,tx_descripcion,id_categoria,formulario)
{ 
    document.getElementById("tx_descripcion").value =  tx_descripcion;
    document.getElementById("id_categoria").value = id_categoria;
    document.getElementById("id_evento").value = numEventoDeportivo;
    document.getElementById("id_tipoevento").value = numDepor ;
    document.getElementById("accionForm").value = accion;
	
	document.getElementById("accionForm").value = 6;
    
    document.forms[formulario].submit();
      
}

/************************************************/

function ejecutarBuscador(contextPath2)
{ 
          
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          txt_datobuscado = document.getElementById("txt").value;
          txt_accion = document.getElementById("f").value;
          numDepor = document.getElementById("numDepor").value;          
          FAjax (contextPath2+"/browse.php?txt="+ txt_datobuscado+ "&f=" + txt_accion+"&numDepor="+numDepor+ "&contextPath2=" + contextPath2,"popupFrame");

      
}

function verResultadoBusqueda(txt,contextPath2,numDepor)
{ 
		   showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
           location.href=contextPath2+"/index.php?txt="+ txt + "&f=search"+ "&numDepor=" + numDepor ;

      
}
function inscripcion(numeroEventoDeportivo,numDepor,nombrePantalla,contextPath2,id_categoria)
{
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          location.href=contextPath2+"/inscripcionEquipo.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor +"&id_categoria="+id_categoria;
}

/*********************************/
function grabarFechaPartido(numEventoDeportivo,numDepor,id_calendario,fecha,hora,nombrePantalla,contextPath2,id_categoria)
{
         showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
         FAjax(contextPath2+"/grabarFechaPartido.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+"&CalendarioPartido="+fecha+"&HoraPartido="+hora+"&id_categoria="+id_categoria,"popupFrame");         
             
}

function cargarFechaPartido(numEventoDeportivo,numDepor,id_calendario, nombrePantalla,formulario,contextPath2,id_categoria)
{ 
            showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
            fecha = document.getElementById('CalendarioPartido').value;            
            fecha = fecha.replace("/","%2F");
            fecha = fecha.replace("/","%2F");            
            hora = document.getElementById('HoraPartido').value;                        
            hora = hora.replace(":","%2E");  
            FAjax (contextPath2+"/cargaFechaPartido.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+"&CalendarioPartido="+fecha+"&HoraPartido="+hora+"&id_categoria="+id_categoria,"popupFrame");            

}
function grabarFechaPartidoMasivo(numEventoDeportivo,numDepor,id_jornada,fecha,hora,nombrePantalla,contextPath2,id_categoria)
{
         showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
         FAjax(contextPath2+"/grabarFechaPartidoMasivo.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_jornada+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+"&CalendarioPartido="+fecha+"&HoraPartido="+hora+"&id_categoria="+id_categoria,"popupFrame");         
             
}

function cargarFechaPartidoMasivo(numEventoDeportivo,numDepor,id_jornada, nombrePantalla,formulario,contextPath2,id_categoria)
{ 
            showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
            fecha = document.getElementById('CalendarioPartido').value;            
            fecha = fecha.replace("/","%2F");
            fecha = fecha.replace("/","%2F");            
            hora = document.getElementById('HoraPartido').value;                        
            hora = hora.replace(":","%2E");  
            FAjax (contextPath2+"/cargaFechaPartidoMasivo.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_jornada+ "&nombrePantalla=" + nombrePantalla+"&CalendarioPartido="+fecha+"&HoraPartido="+hora+"&id_categoria="+id_categoria,"popupFrame");            

} 

/*********************************/


/*********************************/
function grabarFechaLugarAplazaPartido(numEventoDeportivo,numDepor,id_calendario,fecha,hora,nombrePantalla,contextPath2,id_lugar,id_categoria)
{
         showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
         
         
         FAjax(contextPath2+"/grabarFechaLugarAplazaPartido.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+"&CalendarioPartido="+fecha+"&HoraPartido="+hora+"&id_lugar="+id_lugar+"&id_categoria="+id_categoria,"popupFrame");         
             
}

function cargarFechaLugarAplazaPartido(numEventoDeportivo,numDepor,id_calendario, nombrePantalla,formulario,contextPath2,id_categoria)
{ 
            showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
            fecha = document.getElementById('CalendarioPartido').value;            
            fecha = fecha.replace("/","%2F");
            fecha = fecha.replace("/","%2F");            
            hora = document.getElementById('HoraPartido').value;                        
            hora = hora.replace(":","%2E");  
            id_lugar = formulario.elements['id_lugar'].value;
            FAjax (contextPath2+"/cargaFechaLugarAplazaPartido.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+"&CalendarioPartido="+fecha+"&HoraPartido="+hora+"&id_lugar="+id_lugar+"&id_categoria="+id_categoria,"popupFrame");            

}
/*********************************/


/*********************************/
function grabarLugarPartido(numEventoDeportivo,numDepor,id_calendario,id_lugar,nombrePantalla,contextPath2,id_categoria)
{
         //showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
         FAjax(contextPath2+"/grabarLugarPartido.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+"&id_lugar="+id_lugar+"&id_categoria="+id_categoria,"popupFrame");
             
}
function cargarLugarPartido(numEventoDeportivo,numDepor,id_calendario, nombrePantalla,formulario,contextPath2,id_categoria)
{ 
            showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
            id_lugar = formulario.elements['id_lugar'].value;
            FAjax (contextPath2+"/cargaLugarPartido.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+"&id_lugar="+id_lugar+"&id_categoria="+id_categoria,"popupFrame");

}

function grabarLugarPartidoMasivo(numEventoDeportivo,numDepor,id_calendario,id_lugar,nombrePantalla,contextPath2,id_categoria)
{
         //showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
         FAjax(contextPath2+"/grabarLugarPartidoMasivo.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+"&id_lugar="+id_lugar+"&id_categoria="+id_categoria,"popupFrame");
             
}
function cargarLugarPartidoMasivo(numEventoDeportivo,numDepor,id_calendario, nombrePantalla,formulario,contextPath2,id_categoria)
{ 
            showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
            id_lugar = formulario.elements['id_lugar'].value;
            FAjax (contextPath2+"/cargaLugarPartidoMasivo.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+"&id_lugar="+id_lugar+"&id_categoria="+id_categoria,"popupFrame");

}
/*********************************/


/*********************************/
function grabarArbitrosPartido(numEventoDeportivo,numDepor,id_calendario,id_Arbitros,nombrePantalla,contextPath2,id_categoria)
{
         showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
         FAjax(contextPath2+"/grabarArbitrosPartido.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+"&id_Arbitros="+id_Arbitros+"&id_categoria="+id_categoria,"popupFrame");
             
}
function cargarArbitrosPartido(numEventoDeportivo,numDepor,id_calendario, nombrePantalla,formulario,contextPath2,id_categoria)
{ 
            showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
            id_Arbitros= formulario.elements['id_Arbitros'].value;
            FAjax (contextPath2+"/cargaArbitrosPartido.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+"&id_Arbitros="+id_Arbitros+"&id_categoria="+id_categoria,"popupFrame");

}
function grabarArbitrosPartidoMasivo(numEventoDeportivo,numDepor,id_calendario,id_Arbitros,nombrePantalla,contextPath2,id_categoria)
{
         showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
         FAjax(contextPath2+"/grabarArbitrosPartidoMasivo.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+"&id_Arbitros="+id_Arbitros+"&id_categoria="+id_categoria,"popupFrame");
             
}
function cargarArbitrosPartidoMasivo(numEventoDeportivo,numDepor,id_calendario, nombrePantalla,formulario,contextPath2,id_categoria)
{ 
            showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
            id_Arbitros= formulario.elements['id_Arbitros'].value;
            FAjax (contextPath2+"/cargaArbitrosPartidoMasivo.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+"&id_Arbitros="+id_Arbitros+"&id_categoria="+id_categoria,"popupFrame");

}

/*********************************/

/*********************************/
function grabarArbitrosPartidoAplazado(numEventoDeportivo,numDepor,id_calendario,id_Arbitros,nombrePantalla,contextPath2,id_calendarioApl,id_categoria)
{
         showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
         FAjax(contextPath2+"/grabarArbitrosPartidoAplazado.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+"&id_Arbitros="+id_Arbitros+ "&id_futbolcalApl=" + id_calendarioApl+"&id_categoria="+id_categoria,"popupFrame");
             
}
function cargarArbitrosPartidoAplazado(numEventoDeportivo,numDepor,id_calendario, nombrePantalla,formulario,contextPath2,id_calendarioApl,id_categoria)
{ 
            showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
            id_Arbitros= formulario.elements['id_Arbitros'].value;
            FAjax (contextPath2+"/cargaArbitrosPartidoAplazado.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&id_futbolcalApl=" + id_calendarioApl+ "&nombrePantalla=" + nombrePantalla+"&id_Arbitros="+id_Arbitros+"&id_categoria="+id_categoria,"popupFrame");

}
/*********************************/

/**********************************************/

function eliminarArbitroPartido(numEventoDeportivo,numDepor,id_arbitro,accion,nombrePantalla,contextPath2,id_categoria,id_calendario)
{
          if(confirm("Esta seguro que desea Eliminar este Arbitro del Partido.?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarArbitroPartido.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_arbitro=" + id_arbitro+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+"&id_futbolcal="+id_calendario,"popupFrame");
           } 
          else
          {
                hidePopWin() ;
//              showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
//              visitarArbitrosPartido(numEventoDeportivo,numDepor,id_calendario,id_arbitro,'Arbitro',contextPath2);
//                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }      
}


function accionMantArbitro(numEventoDeportivo,numDepor,id_arbitro,accion ,nombrePantalla,contextPath2,id_categoria,id_calendario)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimArbitro.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_Arbitros=" + id_arbitro+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+"&id_futbolcal="+id_calendario,"popupFrame");

      
}

function eliminarArbitroPartidoAplazado(numEventoDeportivo,numDepor,id_arbitro,accion,nombrePantalla,contextPath2,id_categoria,id_calendario,id_calendarioApl)
{
          if(confirm("Esta seguro que desea Eliminar este Arbitro del Partido.?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarArbitroAplazado.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_Arbitros=" + id_arbitro+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+"&id_futbolcal="+id_calendario+"&id_futbolcalApl="+id_calendarioApl,"popupFrame");
           } 
          else
          {
                hidePopWin() ;
//              showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
//              visitarArbitrosPartido(numEventoDeportivo,numDepor,id_calendario,id_arbitro,'Arbitro',contextPath2,);
//                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }      
}


function accionMantArbitroAplazado(numEventoDeportivo,numDepor,id_arbitro,accion ,nombrePantalla,contextPath2,id_categoria,id_calendario,id_calendarioApl)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimArbitroAplazado.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_Arbitros=" + id_arbitro+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+"&id_futbolcal="+id_calendario+"&id_futbolcalApl="+id_calendarioApl,"popupFrame");

      
}
    
    

function eliminarFechaPartidoAplazado(numEventoDeportivo,numDepor,id_arbitro,accion,nombrePantalla,contextPath2,id_categoria,id_calendario,id_calendarioApl)
{
          if(confirm("Esta seguro que desea Eliminar esta Fecha del Partido aplazado.?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarFechaAplazado.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_Arbitros=" + id_arbitro+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+"&id_futbolcal="+id_calendario+"&id_futbolcalApl="+id_calendarioApl,"popupFrame");
           } 
          else
          {
                hidePopWin() ;
//              showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
//              visitarArbitrosPartido(numEventoDeportivo,numDepor,id_calendario,id_arbitro,'Arbitro',contextPath2,);
//                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }      
}

function accionMantFechaAplazado(numEventoDeportivo,numDepor,id_arbitro,accion ,nombrePantalla,contextPath2,id_categoria,id_calendario,id_calendarioApl)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimFechaAplazado.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_Arbitros=" + id_arbitro+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+ "&id_categoria="+id_categoria+"&id_futbolcal="+id_calendario+"&id_futbolcalApl="+id_calendarioApl,"popupFrame");

      
}



    
             
function recupArbitroPartido(numEventoDeportivo,numDepor,accion,asasa,id_calendario,id_Arbitro)
{ 
    document.getElementById("id_Arbitros").value = id_Arbitro;
      
}

function recupArbitroEvento(accion,tx_apellido,tx_nombre,id_arbitro,tx_alias,tx_edad,tx_email)
{ 
    document.getElementById("tx_apellido").value =  tx_apellido;
    document.getElementById("tx_nombre").value =  tx_nombre;
    document.getElementById("id_arbitro").value = id_arbitro;
    document.getElementById("tx_alias").value = tx_alias;
    num_edad = document.getElementById("tx_edad").length;
    for(i=0;i<num_edad;i++){

          if (document.getElementById("tx_edad").options[i].value==tx_edad) {
               document.getElementById("tx_edad").options[i].selected = true ;
          }

       } 
    document.getElementById("tx_email").value = tx_email;
    document.getElementById("accionForm").value = accion;  
	
		animatedcollapse.toggle('jason');
      
}

function marcaHora(fecha,hora)
{
	if (fecha=="" && hora==""){hora="-1";}
			num_hora = document.getElementById("HoraPartido").length;
	for(i=0;i<num_hora;i++){
	
		if (document.getElementById("HoraPartido").options[i].value==hora) {
			document.getElementById("HoraPartido").options[i].selected = true ;
		}
	
	} 
}
/**************************************************/
function visitarAnotacionesPartido(numeroEventoDeportivo,numDepor,opcionFichaDepor,id_arbitro,nombrePantalla,contextPath2,id_categoria)
{ 
         url_pagina   = "/deportes/anotaciones_partido.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_futbolcal=" +opcionFichaDepor+"&id_Arbitros="+id_arbitro+"&id_categoria="+id_categoria
         titulo       = "Anotaciones en Partido";
         anchoDetalle = 706;
         altoDetalle  = 1397;
         //window.parent.showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);

         var posicionx  = document.getElementById("Raton").RatonX.value;         
         var posiciony  = document.getElementById("Raton").RatonY.value;
         
         showPopWinPosicion(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,posicionx,posiciony,'N','S',botonMaxMin);

         
}



function visitarAnotacionesJugPartido(numeroEventoDeportivo,numDepor,opcionFichaDepor,nombrePantalla,contextPath2,localVisitante,id_categoria)
{ 
          url_pagina   = "/deportes/anotacionesJugpartido.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_futbolcal=" +opcionFichaDepor+"&localVisitante="+localVisitante+"&id_categoria="+id_categoria
          titulo       = "Anotaciones de Jugador";
          anchoDetalle = 520;
          altoDetalle  = 320;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
}


/*********************************/
function grabarAnotacionesPartido(numEventoDeportivo,numDepor,id_calendario,jugador1,jugador2,nombrePantalla,contextPath2,id_equipo,id_categoria,id_medida)
{
         showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20); 
         FAjax(contextPath2+"/grabarAnotacionesPartido.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+"&jugador1="+jugador1+"&jugador2="+jugador2+"&id_categoria="+id_categoria+"&id_equipo="+id_equipo+"&medida="+id_medida,"popupFrame");
             
}


function cargarAnotacionesPartido(numEventoDeportivo,numDepor,id_calendario, nombrePantalla,formulario,contextPath2, id_equipo,id_categoria)
{ 
            jugador1 = formulario.elements['jugador1'].value;
            jugador2 = formulario.elements['numAnotacion'].value;  
            medida = formulario.elements['medida'].value;  
	  if (jugador1 == "-1")
	  {
	    alert("Por favor, elige un jugador.");
	    return (false);
	  }
	  else
	    if (jugador2 == "0")
	  {
	    alert("Por favor, elige un jugador.");
	    return (false);
	  }
	  else
	  {
            showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
            FAjax (contextPath2+"/cargaAnotacionesPartido.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+"&jugador1="+jugador1+"&jugador2="+jugador2+"&id_categoria="+id_categoria+"&id_equipo="+id_equipo+"&medida="+medida,"popupFrame");
          }  

}

function eliminarAnotaciones(numEventoDeportivo,numDepor,id_calendario,accion,nombrePantalla,contextPath2,id_equipo,id_categoria,id_numAnotacion)
{
          if(confirm("Esta seguro que desea Eliminar este Anotaciones?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarAnotaciones.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + id_equipo+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&id_categoria="+id_categoria+"&id_calendario="+id_calendario+"&numAnotacion="+id_numAnotacion,"popupFrame");
           } 
          else
          {
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }      
}
     

function accionMantAnotaciones(numEventoDeportivo,numDepor,id_calendario,accion ,nombrePantalla,contextPath2,id_equipo,id_categoria, id_numAnotacion)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimAnotaciones.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + id_equipo+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&id_categoria="+id_categoria+"&id_calendario="+id_calendario+"&id_numAnotacion="+id_numAnotacion,"popupFrame");
          

      
}

function procesarAnotaciones(numEventoDeportivo,numDepor,id_calendario,accion,nombrePantalla,contextPath2,id_equipo,id_equipo2,id_categoria,id_numAnotacion,sePresenta_equipo,sePresenta_equipo2)
{
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/procesaAnotaciones.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + id_equipo+ "&id_equipo2=" + id_equipo2+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&id_categoria="+id_categoria+"&id_calendario="+id_calendario+"&numAnotacion="+id_numAnotacion+"&sePresentaEquipo1="+sePresentaEquipo1+"&sePresentaEquipo2="+sePresentaEquipo2,"popupFrame");
           
}
     

function accionProcesarAnotaciones(numEventoDeportivo,numDepor,id_calendario,accion ,nombrePantalla,contextPath2,id_equipo,id_categoria, id_numAnotacion,id_equipo,id_equipo2)
{ 
          sePresentaEquipo1= document.getElementById("equipoSepresenta1").value;
          sePresentaEquipo2= document.getElementById("equipoSepresenta2").value;        
          
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaProcesarAnotaciones.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + id_equipo+ "&id_equipo2=" + id_equipo2+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&id_categoria="+id_categoria+"&id_calendario="+id_calendario+"&id_numAnotacion="+id_numAnotacion+"&sePresentaEquipo1="+sePresentaEquipo1+"&sePresentaEquipo2="+sePresentaEquipo2,"popupFrame");
          

      
}
/*********************************/
/**************************************************/
function visitarSancionesPartido(numeroEventoDeportivo,numDepor,opcionFichaDepor,id_arbitro,nombrePantalla,contextPath2,id_categoria)
{ 
         url_pagina   = "/deportes/sanciones_partido.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_futbolcal=" +opcionFichaDepor+"&id_Arbitros="+id_arbitro+"&id_categoria="+id_categoria
         titulo       = "Sanciones en Partido";
         anchoDetalle = 706;
         altoDetalle  = 397;
         window.top.showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
}



function visitarSancionesJugPartido(numeroEventoDeportivo,numDepor,opcionFichaDepor,nombrePantalla,contextPath2,localVisitante,id_categoria)
{ 
          url_pagina   = "/deportes/sancionesJugpartido.php?numEventoDeportivo="+ numeroEventoDeportivo + "&numDepor=" + numDepor + "&id_futbolcal=" +opcionFichaDepor+"&localVisitante="+localVisitante+"&id_categoria="+id_categoria
          titulo       = "Sanciones de Jugador";
          anchoDetalle = 520;
          altoDetalle  = 320;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
}


/*********************************/
function grabarSancionesPartido(numEventoDeportivo,numDepor,id_calendario,jugador1,jugador2,nombrePantalla,contextPath2,id_equipo,id_categoria,tipoSancion)
{
         showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
         FAjax(contextPath2+"/grabarSancionesPartido.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2+"&jugador1="+jugador1+"&jugador2="+jugador2+"&id_categoria="+id_categoria+"&id_equipo="+id_equipo+"&tipoSancion="+tipoSancion,"popupFrame");
             
}
function cargarSancionesPartido(numEventoDeportivo,numDepor,id_calendario, nombrePantalla,formulario,contextPath2, id_equipo,id_categoria)
{ 
            jugador1 = formulario.elements['jugador1'].value;
            jugador2 = formulario.elements['numSancion'].value; 
            tipoSancion = formulario.elements['tipoSancion'].value; 
	  if (jugador1 == "0")
	  {
	    alert("Por favor, elige un jugador.");
	    return (false);
	  }
	  else
	    if (jugador2 == "0")
	  {
	    alert("Por favor, elige un jugador.");
	    return (false);
	  }
	  else
	    if (tipoSancion == "")
	  {
	    alert("Por favor, elige un tipo de sanción.");
	    return (false);
	  }
	  else
	  {
            showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
            FAjax (contextPath2+"/cargaSancionesPartido.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_futbolcal=" + id_calendario+ "&nombrePantalla=" + nombrePantalla+"&jugador1="+jugador1+"&jugador2="+jugador2+"&id_categoria="+id_categoria+"&id_equipo="+id_equipo+"&tipoSancion="+tipoSancion,"popupFrame");
          }  

}

function eliminarSanciones(numEventoDeportivo,numDepor,id_calendario,accion,nombrePantalla,contextPath2,id_equipo,id_categoria,id_numSancion)
{
          if(confirm("Esta seguro que desea Eliminar este Sanciones?")) { 
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/eliminarSanciones.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + id_equipo+ "&Modoaccion=E&nombrePantalla=" + nombrePantalla+ "&id_categoria="+id_categoria+"&id_calendario="+id_calendario+"&numSancion="+id_numSancion,"popupFrame");
           } 
          else
          {
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }      
}
     

function accionMantSanciones(numEventoDeportivo,numDepor,id_calendario,accion ,nombrePantalla,contextPath2,id_equipo,id_categoria, id_numSancion)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
          FAjax (contextPath2+"/cargaModifElimSanciones.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&id_equipo=" + id_equipo+ "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&id_categoria="+id_categoria+"&id_calendario="+id_calendario+"&id_numSancion="+id_numSancion,"popupFrame");
          

      
}
/*********************************/

function ejecutarsubida(f)
{
   showPopWinDiv('loading', 'Cargando fichero, por favor espere...', contextPath, 90, 20);
   f.submit();
}

function ejecutarBorrado(f,contextPath2) 
{

           if(confirm("Esta seguro que desea Eliminar esta Foto?")) { 
          
                    showPopWinDiv('loading', 'Cargando fichero, por favor espere...', contextPath, 90, 20);
                    f.submit();
           } 
          else
          {
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }  

}


function ejecutarBorradoGaleria(f,contextPath2) 
{

           if(confirm("Esta seguro que desea Eliminar este fichero?")) { 
          
                    showPopWinDiv('loading', 'Cargando fichero, por favor espere...', contextPath, 90, 20);
                    f.submit();
           } 
          else
          {
                     showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath, 90, 20);
                     FAjax(contextPath2+"/cerrarAccion.php","popupFrame");
           }  

}


function irPagina(pagina,contextPath2)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
          location.href=contextPath2+"/"+pagina;      
}

function irPaginaRuta(pagina,contextPath2)
{ 
          showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
          location.href=pagina;      
}

function irPaginaNueva(pagina)
{ 
          window.open(pagina,'_blank');
}

function visitarPaginaAjena(url_pagina,contextPath2,nombre_pagina)
{ 
         titulo       = nombre_pagina;
         anchoDetalle = 1000;
         altoDetalle  = 500;
         showPopWinSinBarra(url_pagina, anchoDetalle, altoDetalle, '', titulo, botonCerrar,botonMaxMin);
          
}




function accionMasDetalleJugadores(numEventoDeportivo,numDepor,accion ,nombrePantalla,contextPath2,id_equipo,id_jugador,modotipoCampo,idcalendario)
{ 

              
          url_pagina   = "/deportes/masDetalleJugpartido.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor+"&contextPath2="+contextPath2 + "&id_equipo=" + id_equipo+ "&Modoaccion=" + accion+"&modoTipoCampo="+modotipoCampo+"&idcalendario="+idcalendario+"&id_jugador="+id_jugador+ "&nombrePantalla=" + nombrePantalla;
          titulo       = "Mas Detalles del Jugador";
          anchoDetalle = 660;
          altoDetalle  = 520;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
          

      
}

function accionMasGesDetalleJugadores(numEventoDeportivo,numDepor,accion ,nombrePantalla,contextPath2,id_equipo,id_jugador,modotipoCampo,idcalendario)
{ 

              
          url_pagina   = "/deportes/gestionarMasDetallejugadorCalendario.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor+"&contextPath2="+contextPath2 + "&id_equipo=" + id_equipo+ "&Modoaccion=" + accion+"&modoTipoCampo="+modotipoCampo+"&id_calendario="+idcalendario+"&id_jugador="+id_jugador+ "&nombrePantalla=" + nombrePantalla;
          titulo       = "Mas Detalles del Jugador";
          anchoDetalle = 460;
          altoDetalle  = 320;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
          

      
}

function numbersonly(myfield, e, dec)
{
var key;
var keychar;
if (window.event)
key = window.event.keyCode;
else if (e)
key = e.which;
else
return true;
keychar = String.fromCharCode(key);

// control keys
if ((key==null) || (key==0) || (key==8) || 
(key==9) || (key==13) || (key==27) )
return true;

// numbers
else if ((("0123456789").indexOf(keychar) > -1))
return true;

// decimal point jump
else if (dec && (keychar == "."))
{
myfield.form.elements[dec].focus();
return false;
}
else
return false;
}



function eliminarGrabarMasDetalle(naccion,numEventoDeportivo,numDepor,id_calendario, nombrePantalla,formulario,contextPath2, id_jugador,id_equipo)
{ 

	   formulario.accionForm.value= naccion;
	   //showPopWinDiv('loading', 'Cargando zona, por favor espere...', contextPath2, 90, 20);
	   formulario.submit();   
}


function alertaWeb(mensaje)
{
	    alert(mensaje);
}

function imprimir(){

	var capa = document.getElementById("impresora");
	capa.style.visibility='hidden'
	javascript:window.print();
	javascript:location.reload();
	
}
function verPagImprimir(rutaPagina,contextPath2)
{ 
          url_pagina   = rutaPagina;
          titulo       = "Imprimir";
          anchoDetalle = 720;
          altoDetalle  = 420;
          //showPopWin("/"+url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);
          
          window.open(contextPath2+"/"+url_pagina, "Imprimir", "directories=no, menubar =no,status=no,toolbar=no,location=no,scrollbars=no,fullscreen=no,height=400,width=400").focus();
}

function AgregarImagenCabecera(numEventoDeportivo,numDepor,accion ,nombrePantalla,contextPath2)
{ 
  
          url_pagina   = "/deportes/insFotoEvento.php?numEventoDeportivo="+ numEventoDeportivo+ "&numDepor=" + numDepor + "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2;
          titulo       = "Imágen Cabecera del Evento";
          anchoDetalle = 470;
          altoDetalle  = 150;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);


}

function VerImagenCabecera(numEventoDeportivo,accion ,nombrePantalla,contextPath2)
{ 
  
          url_pagina   = "/deportes/verImagenCabecera.php?numEventoDeportivo="+ numEventoDeportivo + "&Modoaccion=" + accion+ "&nombrePantalla=" + nombrePantalla+ "&contextPath2=" + contextPath2;
          titulo       = "Ver Imagen Cabecera del evento";
          anchoDetalle = 700;
          altoDetalle  = 500;
          showPopWin(url_pagina, anchoDetalle, altoDetalle, contextPath2, titulo, botonCerrar,botonMaxMin);


}

function ejecutarProcesoComentario(naccion,numero,procedimiento,textoproceso,formulario,numEventoDeportivo,numDepor,contextPath2)
{


   globalformulario = formulario;
   globaltextoproceso = textoproceso;

   formulario.tx_contenidoinsert.value =    formulario.tx_contenido.value;
   
	if (naccion!=5)
	{
	    globalformulario.accionForm.value= naccion;
	   document.getElementById("accionForm").value = naccion;
	   showPopWinDiv('loading', globaltextoproceso+ ', por favor espere ....', contextPath, 300, 25);
	
	   globalformulario.submit();
	}
	else
	if (naccion==5)
	{
	
	    globalformulario.accionForm.value= naccion;
	   document.getElementById("accionForm").value = naccion;
	   showPopWinDiv('loading', globaltextoproceso+ ', por favor espere ....', contextPath, 300, 25);
	
	   globalformulario.submit();
	
	 }

  
}

function cambiar_color_over(celda){
   celda.style.border="0px solid #FF6600";
}
function cambiar_color_out(celda){
   celda.style.border="0px solid #000";
} 



// JavaScript Document

function preCarga(){
  var args = preCarga.arguments;
  document.imageArray = new Array(args.length);
  for(var i=0; i<args.length; i++)
  {
    document.imageArray[i] = new Image;
    document.imageArray[i].src = args[i];
  }
}
function swapImage(idVellaImg,urlNovaImg)
{
	img = document.getElementById(idVellaImg);
	img.src = urlNovaImg;
}
function CanviClass(elem,accio,estil)
{
		if (accio == "On")
			{
				classNew = estil+accio;
				classOld = estil;
			}
		else
			{
				classNew = estil;
				classOld = estil + "On";
			}
		if (elem.className == classOld)
			{
			elem.className = classNew;
			}
		else
			{
			div1=elem.parentNode;
			for (f=0;f<div1.childNodes.length;f++)
				{
					if(div1.childNodes[f].tagName=="DIV")
						{
						div1.childNodes[f].firstChild.className = classNew;
						}
				}
			}
}
function show_menuCompra(id)
{
	var Divs = document.body.getElementsByTagName("DIV");
	for (x=0; x < Divs.length; x++)
		{
		if (Divs[x].id.indexOf("menu_compra") > -1)
			{
			if (Divs[x].id != id)
				{
				Divs[x].className = "menucompra";
				}
			else{
				elemento = document.getElementById(id);
				if (Divs[x].id.indexOf("menu_compraG") > -1)
					elemento.className = elemento.className == "menuguardar_On" ? "menucompra" : "menuguardar_On";
				else
					elemento.className = elemento.className == "menucompra_On" ? "menucompra" : "menucompra_On";
				}
			}
		}
			
}
function show_menuCompra2(id)
{
	var Divs = document.body.getElementsByTagName("DIV");
	for (x=0; x < Divs.length; x++)
		{
		if (Divs[x].id.indexOf("menu_compra") !=-1)
			{
			if (Divs[x].id != id)
				{
				Divs[x].className = "menucompra";
				}
			else{
				elemento = document.getElementById(id);
				elemento.className = elemento.className == "menucompra2_On" ? "menucompra" : "menucompra2_On";
				}
			}
		}
}

function show_win(id)
{
	elemento = document.getElementById(id);
	elemento.className = elemento.className == "seen" ? "hidden" : "seen";		
}

function hide_div(id)
{
	elemento = document.getElementById(id);
	elemento.className = elemento.className == "hidden" ? "seen" : "hidden";		
}
function show_LogWin(id,pattern,posX,posY)
{
	var Divs = document.body.getElementsByTagName("DIV");
	for (x=0; x < Divs.length; x++)
		{
		if (Divs[x].id.indexOf(pattern) !=-1)
			{
			if (Divs[x].id != id)
				{
				Divs[x].className = "hidden";
				}
			else{
				elemento = document.getElementById(id);
				elemento.className = elemento.className == "seen" ? "hidden" : "seen";
				}
			}
		}
			
}

function basketLists(form,lista,Uds,valor)
{
f = document.forms[form];
if (Uds==1)
	{
	ElInput = document.getElementById(lista);
	if ((ElInput.value > 1) || ((ElInput.value == 1) && (valor == 1)))
		{
		ElInput.value = parseInt(ElInput.value) + parseInt(valor);
		}
	}
else
	{
	ElSelect = document.getElementById(lista+"D");
	ValorActual = ElSelect.options[0].value;
	ArrayFormatos = f.elements[lista].value.split("|");
	for (i=0;i<ArrayFormatos.length;i++)
		{
		ArrayFormatos[i] = ArrayFormatos[i].split("&");
		if (ArrayFormatos[i][0] == ValorActual)
			{
			posArrayFormats = i;
			}
		}
	if (((posArrayFormats>0)&&(posArrayFormats+1<ArrayFormatos.length))||((posArrayFormats==0)&&(valor==1))||((posArrayFormats+1 == ArrayFormatos.length)&&(valor==-1)))
		{
		ElSelect.length = 0;
		ElSelect[0] = new Option(ArrayFormatos[posArrayFormats+valor][1],ArrayFormatos[posArrayFormats+valor][0])
		}
		//Añadido por URKO ALFONSO, para q ciclen los formatos
	else if ((posArrayFormats==0)&&(valor==-1)) { //estamos en el primer "formato" y se ha hecho click en la flecha abajo
		ElSelect.length = 0;
		ElSelect[0] = new Option(ArrayFormatos[ArrayFormatos.length-1][1],ArrayFormatos[ArrayFormatos.length-1][0])
	}
	else if (((posArrayFormats+1)==ArrayFormatos.length)&&(valor==1)) { //estamos en el ultimo "formato" y se ha hecho click en la flecha arriba
	  ElSelect.length = 0;
		ElSelect[0] = new Option(ArrayFormatos[0][1],ArrayFormatos[0][0])
	}	
		//FIN DE Añadido por URKO ALFONSO, para q ciclen los formatos
		
	}
}

function EsNumero(ElemenT)
{
if (isNaN(ElemenT.value))
	{
	alert("El valor del campo Unidades debe ser numérico, gracias");
	ElemenT.focus();
	ElemenT.select();
	} 
}
function selectFormatOption(form)
{
f = document.forms[form];
for (x=0;x<f.length;x++)
	{
	if ((f.elements[x].name == "ListaFormatos[]") && (f.elements[x].tagName == "SELECT"))
		{
		f.elements[x][0].selected = true;
		}
	}
}
function WinPopUp(url,winName,params,autoclose,time)
{
newWin = window.open(url,winName,params);
newWin.focus();
var temps = time*1000;
if ( autoclose == "yes" ){
		setTimeout( 'newWin.close()', temps );
	}
}

function clickedButton(name)
{
	ButtonName = name;
}

function DownloadOrder(DownloadPage,ConfirmationPage,autoclose)
{
WinPopUp(DownloadPage,'download','top=350,left=350,width=5,height=5',autoclose,2);
if ( autoclose == 'yes' )
	{
		setTimeout('redirectDownloaded()',2200);
	}
else
	{
		document.location=ConfirmationPage;
	}
}
function CloseDownloadWin()
{
	if(!newWin.closed){
	newWin.close();
	}
}
function redirectDownloaded(){
document.location='../orderdownloaded';
}
function cancelRegister(){
	if(document.referrer.indexOf("/user/register")>-1){
		window.history.go(-3);}
	else{window.history.back()}
}

function checkConditions(lang){
	element = document.getElementById("Condiciones");
	if ((!element.checked)&&(ButtonName=="PublishButton"))
		{
			if(lang=="esl-ES"){
			alert("Por favor marca la aceptación de las condiciones legales si quieres darte de alta, gracias.");
			return false;
			}
		}
	else if ((!element.checked)&&(ButtonName=="ActionCollectInformation"))
		{
			if(lang=="esl-ES"){
			alert("Por favor, para continuar, marca la aceptación de las condiciones legales, gracias.");
			return false;
			}		
		}
	else
		{
			return true;
		}
}
function clickedbuttonenviar(name){
	ButtonName = name;
}
	
function checkautor_es(identificado)
{
	if (identificado)
	{
		return "";
	}
	mensajeautor = "";
	codpost = document.getElementById("codigo_postal");
	if (isNaN(codpost.value))
		{
			mensajeautor += "• El valor del campo Codigo Postal debe ser numérico.\n";
		} 
	telefono = document.getElementById("telefono");
	if (isNaN(telefono.value))
		{
			mensajeautor += "• El valor del campo Teléfono debe ser numérico.\n";
		} 
	fax = document.getElementById("fax");
	if (isNaN(fax.value))
		{
			mensajeautor += "• El valor del campo Fax debe ser numérico.\n";
		} 
	return mensajeautor;
}
function checkboletin(lang, identificado)
{
	if(lang=="esl-ES")
		{
			return checkboletin_es(identificado);
		}
}
function checkboletin_es(identificado)
{
	error = false;
	mensaje = "Por favor, siga las siguientes instrucciones:\n";
	autor_error = checkautor_es(identificado);
	if(!(autor_error==""))
		{
			error = true;
			mensaje += autor_error;
		} 
	if (!checkconditionsradio())
		{
			error = true;
			mensaje += "• Selecciona la opción de aceptación de las condiciones legales si quieres darte de alta.\n";
		}
	if (error)
		{
			mensaje += "\nGracias.\n";
			alert(mensaje);
			return false;
		} 
	else
		{
			return true;
		}
}
function checktextos(lang, identificado)
{
	if(lang=="esl-ES")
		{
			return checktextos_es(identificado);
		}
}
function checktextos_es(identificado)
{
	error = false;
	mensaje = "Por favor, siga las siguientes instrucciones:\n";
	autor_error = checkautor_es(identificado);
	if(!(autor_error==""))
		{
			error = true;
			mensaje += autor_error;
		} 
	numpaginas = document.getElementById("numero_de_paginas");
	if (isNaN(numpaginas.value))
		{
			error = true;
			mensaje += "• El valor del campo Número de Páginas debe ser numérico.\n";
		} 
	precio = document.getElementById("precio");
	if (isNaN(precio.value))
		{
			error = true;
			mensaje += "• El valor del campo del precio en Euros debe ser numérico.\n";
		} 
	if (!checkconditionsradio())
		{
			error = true;
			mensaje += "• Selecciona la opción de aceptación de las condiciones legales si quieres darte de alta.\n";
		}
	if (error)
		{
			mensaje += "\nGracias.\n";
			alert(mensaje);
			return false;
		} 
	else
		{
			return true;
		}
}
function checkplantillas(lang, identificado)
{
	if(lang=="esl-ES")
		{
			return checkplantillas_es(identificado);
		}
}
function checkplantillas_es(identificado)
{
	error = false;
	mensaje = "Por favor, siga las siguientes instrucciones:\n";
	autor_error = checkautor_es(identificado);
	if(!(autor_error==""))
		{
			error = true;
			mensaje += autor_error;
		} 
	precio = document.getElementById("precio");
	if (isNaN(precio.value))
		{
			error = true;
			mensaje += "• El valor del campo del precio en Euros debe ser numérico.\n";
		} 
	if (!checkconditionsradio())
		{
			error = true;
			mensaje += "• Selecciona la opción de aceptación de las condiciones legales si quieres darte de alta.\n";
		}
	if (error)
		{
			mensaje += "\nGracias.\n";
			alert(mensaje);
			return false;
		} 
	else
		{
			return true;
		}
}
function checksoftware(lang)
{
	if(lang=="esl-ES")
		{
			return checksoftware_es();
		}
}
function checksoftware_es()						//REEMPLAZAR
{
	//document.empresa.reset();
	error = false;
	mensaje = "Por favor, siga las siguientes instrucciones:\n";

	for(j=0;!document.form_tipo_datos.tipo_datos[j].checked;j++);
	tipo_de_datos = document.form_tipo_datos.tipo_datos[j].value;
	
		if(tipo_de_datos=="personales")
		{
			activar_datospersonales(true);
			
					autor_error = checkautor_es();	//chequeamos la parte q se chequeaba para el 1er form
					if(!(autor_error==""))
					{
							error = true;
							mensaje += autor_error;
					} 
		}
	else if(tipo_de_datos=="empresa")
		{
			activar_datospersonales(false);
					
					mensaje_empresa = checksoftwareempresa_es();	//chequeamos la parte q se chequeaba para el 2º form
					if(!(mensaje_empresa==""))
					{
							error = true;
							mensaje += mensaje_empresa;
					}
		}
	else 
		{
			error = true;
			mensaje = "Ha ocurrido un error, rellene otra vez el formulario, por favor";
		}	
	 	
	if (error)
		{
			mensaje += "\nGracias.\n";
			alert(mensaje);
			return false;
		} 
	else
		{
		
			return true;
		}
}
function checksoftwareempresa(lang)
{
	if(lang=="esl-ES")
		{
			return checksoftwareempresa_es();
		}
}
function checksoftwareempresa_es()
{
	//document.persona.reset();
	codpost = document.getElementById("codigo_postal_empresa");
	mensaje_error_empresa="";
	if (isNaN(codpost.value))
		{
			mensaje_error_empresa += "• El valor del campo Codigo Postal debe ser numérico.\n";
		} 
	telefono1 = document.getElementById("telefono_empresa_1");
	if (isNaN(telefono1.value))
		{
			mensaje_error_empresa += "• El valor del campo Teléfono 1 debe ser numérico.\n";
		} 
	telefono2 = document.getElementById("telefono_empresa_2");
	if (isNaN(telefono2.value))
		{
			mensaje_error_empresa += "• El valor del campo Teléfono 2 debe ser numérico.\n";
		} 
	fax = document.getElementById("fax_empresa");
	if (isNaN(fax.value))
		{			
			mensaje_error_empresa += "• El valor del campo Fax debe ser numérico.\n";
		} 
		return mensaje_error_empresa;		
}

function agregar(titulo,url){
   if ((navigator.appName=="Microsoft Internet Explorer") && 
         (parseInt(navigator.appVersion)>=4)) {
      window.external.AddFavorite(url,titulo);
   } else { 
      if(navigator.appName == "Netscape") 
         alert("Por favor, presiona Crtl+D para agregar este sitio a los 'Bookmarks'"); 
   }
}
function checkforminfo(lang)
{
	if(lang=="esl-ES")
		{
			return checkforminfo_es();
		}
}
function checkdatospersonalesempresa_es()
{
	mensajeautor = "";
	codpost = document.getElementById("codigo_postal");
	if (isNaN(codpost.value))
		{
			mensajeautor += "• El valor del campo Codigo Postal debe ser numérico.\n";
		} 
	telefono = document.getElementById("telefono");
	if (isNaN(telefono.value))
		{
			mensajeautor += "• El valor del campo Teléfono debe ser numérico.\n";
		} 
	fax = document.getElementById("fax");
	if (isNaN(fax.value))
		{
			mensajeautor += "• El valor del campo Fax debe ser numérico.\n";
		} 
	codpostemp = document.getElementById("codigo_postal_empresa");
	if (isNaN(codpostemp.value))
		{
			mensajeautor += "• El valor del campo Codigo Postal Empresa debe ser numérico.\n";
		} 
	telefonoemp = document.getElementById("telefono_empresa");
	if (isNaN(telefonoemp.value))
		{
			mensajeautor += "• El valor del campo Teléfono Empresa debe ser numérico.\n";
		} 
	faxemp = document.getElementById("fax_empresa");
	if (isNaN(faxemp.value))
		{
			mensajeautor += "• El valor del campo Fax Empresa debe ser numérico.\n";
		} 
	email = document.getElementById("email");
	emailempresa = document.getElementById("email_empresa");
	if ((email.value=="") && (emailempresa.value==""))
		{
			mensajeautor += "• Debes proporcionar una dirección de correo.\n";
		} 
	comentarios = document.getElementById("comentarios");
	if (comentarios.value=="") 
		{
			mensajeautor += "• Debes introducir algún comentario.\n";
		}
	return mensajeautor;
}

function checkconditionsradiocolaborar(){

	for (var j = 0 ; j < document.form.opcion.length ;j ++) { 
		if (document.form.opcion[j].checked) { 
			return true; 
			break; 
		} 
	}
	
	return false;
}



function checkforminfo_es()
{
	error = false;
	mensaje = "Por favor, siga las siguientes instrucciones:\n";
	autor_error = checkdatospersonalesempresa_es();
	if(!(autor_error==""))
		{
			error = true;
			mensaje += autor_error;
		} 
		
	if (error)
		{
			mensaje += "\nGracias.\n";
			alert(mensaje);
			return false;
		} 
	else
		{
			return true;
		}
return true;
}
function removeSelectItem(referer,Id)
{
elemt=document.forms['seleccionDelete'].elements['RemoveProductItemDeleteList'];
valor="|"+Id;
if ( referer.checked )
	{
	elemt.value += valor;
	}
else
	{
	posValor = elemt.value.indexOf(valor);
	largoValor = valor.length;
	largoCampo = elemt.value.length;
	if ( posValor > -1 )
		{
		if ( ( posValor == 0 ) && ( largoValor == largoCampo ) )
			{
			elemt.value="";
			}
		else
			{
			elemtAnt = elemt.value.substring(0,posValor);
			elemtPos = elemt.value.substring(posValor+largoValor,largoCampo);
			elemt.value = elemtAnt+elemtPos;
			}
		}
	}
}




/************************************************/
/*
Simple Image Trail script- By JavaScriptKit.com
Visit http://www.javascriptkit.com for this script and more
This notice must stay intact
*/ 

var w=1
var h=1

if (document.getElementById || document.all)
document.write('<div id="trailimageid" style="position:absolute;visibility:hidden;left:0px;top:-1000px;width:1px;height:1px;border:1px solid #888888;background:#DDDDDD;"><img id="ttimg" src="img/s.gif" /></div>')

function gettrailobj()
{
	if (document.getElementById) return document.getElementById("trailimageid").style
	else if (document.all) return document.all.trailimagid.style
}

function truebody()
{
	return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function hidetrail()
{
	document.onmousemove=""
	document.getElementById('ttimg').src='/img/s.gif'
	gettrailobj().visibility="hidden"
	gettrailobj().left=-1000
	gettrailobj().top=0
}


function showtrail(width,height,file)
{
	if(navigator.userAgent.toLowerCase().indexOf('opera') == -1)
	{
		w=width
		h=height
		
		// followmouse()
	
		document.getElementById('ttimg').src=file
		document.onmousemove=followmouse
		gettrailobj().visibility="visible"
		gettrailobj().width=w+"px"
		gettrailobj().height=h+"px"


	}
}


function followmouse(e)
{

	if(navigator.userAgent.toLowerCase().indexOf('opera') == -1)
	{

		var xcoord=20
		var ycoord=20

		if (typeof e != "undefined")
		{
			xcoord+=e.pageX
			ycoord+=e.pageY
		}
		else if (typeof window.event !="undefined")
		{
			xcoord+=truebody().scrollLeft+event.clientX
			ycoord+=truebody().scrollTop+event.clientY
		}

		var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
		var docheight=document.all? Math.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight)

		if (xcoord+w+3>docwidth)
		xcoord=xcoord-w-(20*2)

		if (ycoord-truebody().scrollTop+h>truebody().clientHeight)
		ycoord=ycoord-h-20;

		gettrailobj().left=xcoord+"px"
		gettrailobj().top=ycoord+"px"

	}

}


/******************************************************************/


function ShowDiv(id,id_inicial){
	if(document.getElementById(id).style.display=='none'){
		document.getElementById(id).style.display='';
	}else{
		document.getElementById(id).style.display='none';
	}
	
	if(document.getElementById(id_inicial).style.display=='none'){
		document.getElementById(id_inicial).style.display='';
	}else{
		document.getElementById(id_inicial).style.display='none';
	}
}





/****animacion div open - close dinamico**/

var animatedcollapse={
divholders: {}, //structure: {div.id, div.attrs, div.$divref, div.$togglerimage}
divgroups: {}, //structure: {groupname.count, groupname.lastactivedivid}
lastactiveingroup: {}, //structure: {lastactivediv.id}
preloadimages: [],

show:function(divids){ //public method
	if (typeof divids=="object"){
		for (var i=0; i<divids.length; i++)
			this.showhide(divids[i], "show")
	}
	else
		this.showhide(divids, "show")
},

hide:function(divids){ //public method
	if (typeof divids=="object"){
		for (var i=0; i<divids.length; i++)
			this.showhide(divids[i], "hide")
	}
	else
		this.showhide(divids, "hide")
},

toggle:function(divid){ //public method
	if (typeof divid=="object")
		divid=divid[0]
	this.showhide(divid, "toggle")
},

addDiv:function(divid, attrstring){ //public function
	this.divholders[divid]=({id: divid, $divref: null, attrs: attrstring})
	this.divholders[divid].getAttr=function(name){ //assign getAttr() function to each divholder object
		var attr=new RegExp(name+"=([^,]+)", "i") //get name/value config pair (ie: width=400px,)
		return (attr.test(this.attrs) && parseInt(RegExp.$1)!=0)? RegExp.$1 : null //return value portion (string), or 0 (false) if none found
	}
	this.currentid=divid //keep track of current div object being manipulated (in the event of chaining)
	return this
},

showhide:function(divid, action){
	var $divref=this.divholders[divid].$divref //reference collapsible DIV
	if (this.divholders[divid] && $divref.length==1){ //if DIV exists
		var targetgroup=this.divgroups[$divref.attr('groupname')] //find out which group DIV belongs to (if any)
		if ($divref.attr('groupname') && targetgroup.count>1 && (action=="show" || action=="toggle" && $divref.css('display')=='none')){ //If current DIV belongs to a group
			if (targetgroup.lastactivedivid && targetgroup.lastactivedivid!=divid) //if last active DIV is set
				this.slideengine(targetgroup.lastactivedivid, 'hide') //hide last active DIV within group first
				this.slideengine(divid, 'show')
			targetgroup.lastactivedivid=divid //remember last active DIV
		}
		else{
			this.slideengine(divid, action)
		}
	}
},

slideengine:function(divid, action){
	var $divref=this.divholders[divid].$divref
	var $togglerimage=this.divholders[divid].$togglerimage
	if (this.divholders[divid] && $divref.length==1){ //if this DIV exists
		var animateSetting={height: action}
		if ($divref.attr('fade'))
			animateSetting.opacity=action
		$divref.animate(animateSetting, $divref.attr('speed')? parseInt($divref.attr('speed')) : 500, function(){
			if ($togglerimage){
				$togglerimage.attr('src', ($divref.css('display')=="none")? $togglerimage.data('srcs').closed : $togglerimage.data('srcs').open)
			}
			if (animatedcollapse.ontoggle){
				try{
					animatedcollapse.ontoggle(jQuery, $divref.get(0), $divref.css('display'))
				}
				catch(e){
					alert("An error exists inside your \"ontoggle\" function:\n\n"+e+"\n\nAborting execution of function.")
				}
			}
		})
		return false
	}
},

generatemap:function(){
	var map={}
	for (var i=0; i<arguments.length; i++){
		if (arguments[i][1]!=null){ //do not generate name/value pair if value is null
			map[arguments[i][0]]=arguments[i][1]
		}
	}
	return map
},

init:function(){
	var ac=this
	jQuery(document).ready(function($){
		animatedcollapse.ontoggle=animatedcollapse.ontoggle || null
		var urlparamopenids=animatedcollapse.urlparamselect() //Get div ids that should be expanded based on the url (['div1','div2',etc])
		var persistopenids=ac.getCookie('acopendivids') //Get list of div ids that should be expanded due to persistence ('div1,div2,etc')
		var groupswithpersist=ac.getCookie('acgroupswithpersist') //Get list of group names that have 1 or more divs with "persist" attribute defined
		if (persistopenids!=null) //if cookie isn't null (is null if first time page loads, and cookie hasnt been set yet)
			persistopenids=(persistopenids=='nada')? [] : persistopenids.split(',') //if no divs are persisted, set to empty array, else, array of div ids
		groupswithpersist=(groupswithpersist==null || groupswithpersist=='nada')? [] : groupswithpersist.split(',') //Get list of groups with divs that are persisted
		jQuery.each(ac.divholders, function(){ //loop through each collapsible DIV object
			this.$divref=$('#'+this.id)
			if ((this.getAttr('persist') || jQuery.inArray(this.getAttr('group'), groupswithpersist)!=-1) && persistopenids!=null){ //if this div carries a user "persist" setting, or belong to a group with at least one div that does
				var cssdisplay=(jQuery.inArray(this.id, persistopenids)!=-1)? 'block' : 'none'
			}
			else{
				var cssdisplay=this.getAttr('hide')? 'none' : null
			}
			if (urlparamopenids[0]=="all" || jQuery.inArray(this.id, urlparamopenids)!=-1){ //if url parameter string contains the single array element "all", or this div's ID
				cssdisplay='block' //set div to "block", overriding any other setting
			}
			else if (urlparamopenids[0]=="none"){
				cssdisplay='none' //set div to "none", overriding any other setting
			}
			this.$divref.css(ac.generatemap(['height', this.getAttr('height')], ['display', cssdisplay]))
			this.$divref.attr(ac.generatemap(['groupname', this.getAttr('group')], ['fade', this.getAttr('fade')], ['speed', this.getAttr('speed')]))
			if (this.getAttr('group')){ //if this DIV has the "group" attr defined
				var targetgroup=ac.divgroups[this.getAttr('group')] || (ac.divgroups[this.getAttr('group')]={}) //Get settings for this group, or if it no settings exist yet, create blank object to store them in
				targetgroup.count=(targetgroup.count||0)+1 //count # of DIVs within this group
				if (jQuery.inArray(this.id, urlparamopenids)!=-1){ //if url parameter string contains this div's ID
					targetgroup.lastactivedivid=this.id //remember this DIV as the last "active" DIV (this DIV will be expanded). Overrides other settings
					targetgroup.overridepersist=1 //Indicate to override persisted div that would have been expanded
				}
				if (!targetgroup.lastactivedivid && this.$divref.css('display')!='none' || cssdisplay=="block" && typeof targetgroup.overridepersist=="undefined") //if this DIV was open by default or should be open due to persistence								
					targetgroup.lastactivedivid=this.id //remember this DIV as the last "active" DIV (this DIV will be expanded)
				this.$divref.css({display:'none'}) //hide any DIV that's part of said group for now
			}
		}) //end divholders.each
		jQuery.each(ac.divgroups, function(){ //loop through each group
			if (this.lastactivedivid && urlparamopenids[0]!="none") //show last "active" DIV within each group (one that should be expanded), unless url param="none"
				ac.divholders[this.lastactivedivid].$divref.show()
		})
		if (animatedcollapse.ontoggle){
			jQuery.each(ac.divholders, function(){ //loop through each collapsible DIV object and fire ontoggle event
				animatedcollapse.ontoggle(jQuery, this.$divref.get(0), this.$divref.css('display'))
			})
		}
 		//Parse page for links containing rel attribute
		var $allcontrols=$('a[rel]').filter('[rel^="collapse["], [rel^="expand["], [rel^="toggle["]') //get all elements on page with rel="collapse[]", "expand[]" and "toggle[]"
		$allcontrols.each(function(){ //loop though each control link
			this._divids=this.getAttribute('rel').replace(/(^\w+)|(\s+)/g, "").replace(/[\[\]']/g, "") //cache value 'div1,div2,etc' within identifier[div1,div2,etc]
			if (this.getElementsByTagName('img').length==1 && ac.divholders[this._divids]){ //if control is an image link that toggles a single DIV (must be one to one to update status image)
				animatedcollapse.preloadimage(this.getAttribute('data-openimage'), this.getAttribute('data-closedimage')) //preload control images (if defined)
				$togglerimage=$(this).find('img').eq(0).data('srcs', {open:this.getAttribute('data-openimage'), closed:this.getAttribute('data-closedimage')}) //remember open and closed images' paths
				ac.divholders[this._divids].$togglerimage=$(this).find('img').eq(0) //save reference to toggler image (to be updated inside slideengine()
				ac.divholders[this._divids].$togglerimage.attr('src', (ac.divholders[this._divids].$divref.css('display')=="none")? $togglerimage.data('srcs').closed : $togglerimage.data('srcs').open)
			}
			$(this).click(function(){ //assign click behavior to each control link
				var relattr=this.getAttribute('rel')
				var divids=(this._divids=="")? [] : this._divids.split(',') //convert 'div1,div2,etc' to array 
				if (divids.length>0){
					animatedcollapse[/expand/i.test(relattr)? 'show' : /collapse/i.test(relattr)? 'hide' : 'toggle'](divids) //call corresponding public function
					return false
				}
			}) //end control.click
		})// end control.each

		$(window).bind('unload', function(){
			ac.uninit()
		})
	}) //end doc.ready()
},

uninit:function(){
	var opendivids='', groupswithpersist=''
	jQuery.each(this.divholders, function(){
		if (this.$divref.css('display')!='none'){
			opendivids+=this.id+',' //store ids of DIVs that are expanded when page unloads: 'div1,div2,etc'
		}
		if (this.getAttr('group') && this.getAttr('persist'))
			groupswithpersist+=this.getAttr('group')+',' //store groups with which at least one DIV has persistance enabled: 'group1,group2,etc'
	})
	opendivids=(opendivids=='')? 'nada' : opendivids.replace(/,$/, '')
	groupswithpersist=(groupswithpersist=='')? 'nada' : groupswithpersist.replace(/,$/, '')
	this.setCookie('acopendivids', opendivids)
	this.setCookie('acgroupswithpersist', groupswithpersist)
},

getCookie:function(Name){ 
	var re=new RegExp(Name+"=[^;]*", "i"); //construct RE to search for target name/value pair
	if (document.cookie.match(re)) //if cookie found
		return document.cookie.match(re)[0].split("=")[1] //return its value
	return null
},

setCookie:function(name, value, days){
	if (typeof days!="undefined"){ //if set persistent cookie
		var expireDate = new Date()
		expireDate.setDate(expireDate.getDate()+days)
		document.cookie = name+"="+value+"; path=/; expires="+expireDate.toGMTString()
	}
	else //else if this is a session only cookie
		document.cookie = name+"="+value+"; path=/"
},

urlparamselect:function(){
	window.location.search.match(/expanddiv=([\w\-_,]+)/i) //search for expanddiv=divid or divid1,divid2,etc
	return (RegExp.$1!="")? RegExp.$1.split(",") : []
},

preloadimage:function(){
	var preloadimages=this.preloadimages
	for (var i=0; i<arguments.length; i++){
		if (arguments[i] && arguments[i].length>0){
			preloadimages[preloadimages.length]=new Image()
			preloadimages[preloadimages.length-1].src=arguments[i]
		}
	}
}

}

/****fin animacion div open - close dinamico**/
