// JavaScript Document
function menuprincipal()
{	
	document.frmdatos.action='../administrador/menu.php';
	document.frmdatos.submit();	
}


function popupeditarevento(Identificador_Xmod_Eventos)
{
	var cadena="";
	cadena="editarevento.php?idevento="+Identificador_Xmod_Eventos;
	secondwindow=open(cadena,'Editar','height=900,width=600,scrollbars=yes,directories=NO,location=NO,alwaysRaised');
    secondwindow.moveTo(150,120);
}

function popupverevento(Identificador_Xmod_Eventos)
{
	var cadena="";
	cadena="verevento.php?idevento="+Identificador_Xmod_Eventos;
	secondwindow=open(cadena,'Editar','height=220,width=680,scrollbars=no,directories=NO,location=NO,alwaysRaised');
    secondwindow.moveTo(150,120);
}
function popupvereventovermas(Identificador_Xmod_Eventos)
{
	var cadena="";
	cadena="vereventovermas.php?idevento="+Identificador_Xmod_Eventos;
	secondwindow=open(cadena,'Editar','height=620,width=680,scrollbars=yes,directories=NO,location=NO,alwaysRaised');
    secondwindow.moveTo(150,120);
}


function editarevento(valor)
{
	if(valor==0){cargar();setTimeout("salir()",4500);}	
}

function cargar(){
document.getElementById('qq').innerHTML="<table border='0' align='center'><tr><td>&nbsp;</td><td><strong>--------------Guardando-------------</strong></td><td>&nbsp;</td></tr><tr><td>0%</td><td><dl><dd><span><em style='left:200px'>100%</em></span></dd></dl></td><td>100%</td></tr></table>";
}
function salir(){
window.opener.location.reload();
window.close();
}

function eliminarevento(Identificador_Xmod_Eventos)
{
	if(confirm("Realmente desea eliminar este evento"))
	{
		document.frmdatos.action='eliminarevento.php';
		document.getElementById('Identificador_Xmod_Eventos').value=Identificador_Xmod_Eventos;
		document.frmdatos.submit();			
	}	
}

function mensajes()
{	
	document.getElementById('evento').style.display ="none";
	document.getElementById('mens').style.display ="";
	/*document.frmdatos.action='registromensajeseventos.php';
	document.frmdatos.submit();	*/
}


function guardamensajes()
{
	$(document).ready(
				function()
				{				
					$.post("ajaxmensajeseventos.php",{mensajebda:$("#mensajebda").val(),descripcionbda:$("#descripcionbda").val(),mensajedda:$("#mensajedda").val(),descripciondda:$("#descripciondda").val(),mensajebdaing:$("#mensajebdaing").val(),descripcionbdaing:$("#descripcionbdaing").val(),mensajeddaing:$("#mensajeddaing").val(),descripcionddaing:$("#descripcionddaing").val()},
								function(data)
								{ 	
									alert("Los Mensajes se guardaron satisfactoriamente");
									//$('form')[0].reset();								
								}
							);						
				}
	);	
}
function vermas(Identificador_Xmod_Eventos,Idioma)
{
//	alert(Identificador_Xmod_Eventos);
	$(document).ready(
				function()
				{				
					$.post("xmod_eventos/ajaxeventos.php",{Identificador_Xmod_Eventos:Identificador_Xmod_Eventos,Idioma:Idioma},
								function(data)
								{ 																			
									$("#subseccion").html(data);
								}
							);						
				}
	);	
}
function creareventogaleriafotos(Identificador_Xmod_Eventos_Galeria)
{	
	document.getElementById('Identificador_Xmod_Eventos_Galeria').value=Identificador_Xmod_Eventos_Galeria;
	document.frmdatos.action='creaeventogaleriafotos.php';
	document.frmdatos.submit();	
}

function vereventosatras(Idioma)
{
$(document).ready(
				function()
				{				
					$.post("xmod_eventos/ajaxeventosatras.php",{Idioma:Idioma},
								function(data)
								{ 																			
									$("#subseccion").html(data);
								}
							);						
				}
	);	
}
function creaevento()
{
	document.getElementById('evento').style.display ="";
	document.getElementById('mens').style.display ="none";
	document.frmdatos.action='creaevento.php';
	document.frmdatos.submit();		
}
function EventosFrontVermasEnlace(id,idioma)
{
	scrollBy(0,-500);	
	document.getElementById("front1").style.display ="none";
	document.getElementById("front2").style.display ="";
	if(id!=0)
	{
		$(document).ready(
						function()
						{				
							$.post("xmod_eventos/ajaxeventosfrontenlacevermas.php",{id:id,idioma:idioma},
										function(data)
										{ 																																								
											$("#subseccion").html(data);
										}
									);						
						}
			);	
	}
}
function frontalenlaceeventos()
{
	document.getElementById('front1').style.display ="";	
	document.getElementById('front2').style.display ="none";		
}
