// JavaScript Document
function visualizarComentarios(){
	var aObjects = new Array(
								new Array("nId", document.getElementById('hidValorReg').value)
							);
	peticion('http://www.aniveldecancha.com.mx/ajx/ajxComentarios.php', aObjects, 'divComments');
}

function envioComentario(){			
	var aObjects = new Array(
								new Array("hidMovimiento", 1),								
								new Array("cEmail", document.getElementById('email').value),
								new Array("cNombre", document.getElementById('nombre').value),								
								new Array("nId", document.getElementById('hidValorReg').value),																																																							                                                        																																																											
								new Array("cComentario", document.getElementById('comentario').value)																								
							);
	document.getElementById('email').value = '';
	document.getElementById('nombre').value = '';
	document.getElementById('comentario').value = '';
	peticion('http://www.aniveldecancha.com.mx/ajx/ajxComentarios.php', aObjects, 'divComments');
}

function desplegarJornadas(nJornada, nTipo){			
	var aObjects = new Array(
								new Array("nTipo", nTipo),
								new Array("hidMovimiento", 1),
								new Array("nJornada", nJornada)
							);
	peticion('http://www.aniveldecancha.com.mx/ajx/ajxJornadas.php', aObjects, 'divJornadas' + nTipo);
}

function encuesta(){
	var nValor;
			
	for (i = 0; i < document.getElementById("frmEncuesta").elements.length; i++){		
		if(document.frmEncuesta.rdbEncuesta[i].checked){					
			nValor = document.frmEncuesta.rdbEncuesta[i].value;			
			break;
		}
	}
	
	var aObjects = new Array(
								new Array("nIdRespuesta", nValor),
								new Array("nIdEncuesta", document.getElementById('hidIdEncuesta').value)
							);
															
	peticionencuesta('ajx/ajxEncuesta.php', aObjects, 'divEncuesta');
}

function cambiarVideo(cIdyoutube){
	var aObjects = new Array(
								new Array("nId", cIdyoutube)
							);																														
	peticion('ajx/ajxScript.php', aObjects, 'divVideocontent');
}

function abrirHemeroteca(nId){	
	document.getElementById('hidSeccion').value = nId;
	document.getElementById('frmBusqueda').submit();
}
