function loadData(tab,letra,page,hori,tabsub) {
  var xmlHttp;
  try { // Gehiengoarentzat
    xmlHttp=new XMLHttpRequest();
  }
  catch (e) { // Internet Explorer-entzat
    try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); }
    catch (e) {
      try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); }
      catch (e) { alert("Your browser does not support AJAX!"); return false; }
    }
  }
	xmlHttp.onreadystatechange=function() {
		if(xmlHttp.readyState==4) {
			// oaingoz ez dakigu kargatu aurretik elementu guzien barrukoa hustutzeak merezi duen ala ez. Hustutzeko, ondorengo 'for' hau deskomentatu behar da...
			/*for(i=1;i<3;i++) {
				document.getElementById('talde_'+i).innerHTML='';
			}*/
			// behar den 'ul' elementuaren (getElementById) barruan (innerHTML) php orriak itzulitako emaitza (responseText) sartzeko:
			document.getElementById('talde_'+tab).innerHTML=xmlHttp.responseText;
			// JSak kargatzeko
			// H2 "z"
			sIFR.replace(chaparral, {
			  selector: 'h2.z span.sifr',
				css:[
					'.sIFR-root { color: #409398; font-size: 30px; }',
					'a { text-decoration: none; }',
				'a:link { color: #409398; }',
				'a:hover { color: #6AC7CC; }'
				],
				thickness: -120,
				wmode: 'transparent',
				fixHover: true,
				useStyleCheck: true
			});
			// Lehenengo tab irekitzeko
			$('#ocio > ul.tabList').tabs({ selected: tab-1 });
			// Accordion
			$(function(){
				$(".closed")
					.next()
						.hide();
				$(".accTitle").click(function () {
					var $this = $(this);
					if($this.is('.closed')) {
						$(".open").next()
								.slideUp(200);
						$(this).next()
								.slideDown(200);
						$(".accTitle")
							.removeClass('open')
						$(".accTitle")
							.addClass('closed')
						$this
							.removeClass('closed')
						$this
							.addClass('open')
					}
					else if($this.is('.open')) {
						$this.next()
							.slideUp(200);
							$this
								.removeClass('open')
							$this
								.addClass('closed')
					}
				});
				$(".closed").hover(function(){
					$(this).addClass("hover");
					}, function(){
					$(this).removeClass("hover");
				});
			});
		}
	}
	xmlHttp.open("GET",jsroot+"botika/echo/guideLeisure.php?tab="+tab+"&page="+page+"&hori="+hori+"&tabsub="+tabsub,true);	
	xmlHttp.send(null);
}
