
	var ajax = new sack();
	
	function showUpdate()
	{
		txt=unescape(ajax.response);
        document.getElementById('texto').innerHTML = txt;
	}
	
	function refreshAjax(fecha)
	{	
		ajax.requestFile = "xthText.php?fecha="+fecha+"";	// Specifying which file to get
		ajax.onCompletion = showUpdate;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
	
	function refreshAjaxAdherents(page)
	{				
		ajax.requestFile = "adherent.php?fecha="+fecha+"";	// Specifying which file to get
		ajax.onCompletion = showUpdate;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
	
	function refreshAjaxPublic(page,archivopage)
	{				
		var str = new String(window.location);
		
		if (archivopage)
		{
			if (str.indexOf(archivopage) == -1)
				window.location = archivopage + "?page="+page+"";
		}
		
		ajax.requestFile = "publicText.php?page="+page+"";	// Specifying which file to get
		ajax.onCompletion = showUpdate;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}

	function refreshAjaxHz(page)
	{				
		ajax.requestFile = "HzText.php?page="+page+"";	// Specifying which file to get
		ajax.onCompletion = showUpdate;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
	
	function refreshAjaxPrive(page, archivopage)
	{				
		if (archivopage.indexOf("adherents") == -1)
		{
			window.location = "adherents.php?page="+page+"";
		}

		ajax.requestFile = "priveText.php?page="+page+"";	// Specifying which file to get
		ajax.onCompletion = showUpdate;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
	
	
	function refreshAjaxPage(data)
	{				
		ajax.requestFile = ""+data+"";	// Specifying which file to get
		ajax.onCompletion = showUpdate;	// Specify function that will be executed after file has been found
		ajax.runAJAX();		// Execute AJAX function
	}
	
	function refreshAjaxVolver(data,form)
	{
		form.page.value = data;
		form.submit();
	}
