function oldalbytulajajax(mappaid){		
   var _mappaid = mappaid;

	var div = document.getElementById('fooldal');

	var httpObject = getHTTPObject();
	if (httpObject != null) {
		httpObject.onreadystatechange = function setOutput(){
			if (httpObject.readyState == 4) {
				if (httpObject.status == 200) {
					if(httpObject.responseText.substring(0, 5) == 'Hiba:'){
					  	alert(httpObject.responseText);
					}
					else if (div!=null){
						div.innerHTML = httpObject.responseText;
						init_hints("a","highslide");
						init_hints("a","needhint");
						init_hints("img","needhint");
					}
					else 
						alert("Nem található a div:"+div.id);
				}
			}
		};
  		httpObject.open("GET","docutar/files/oldalbytulaj.php?mappaid=" + _mappaid, true);
		httpObject.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
		httpObject.send(null);
	}
};
function oldalbyszures(mappaid){	
	var _mappaid = mappaid;	
    var _feltetel = document.getElementById('Feltetel').value;
	 var _id1 = document.getElementById('id1').value;
	 var _id2 = document.getElementById('id2').value;
//	 alert('pöcök: '+document.getElementById('pocok').checked);
	 var _pocok = document.getElementById('pocok').checked;

	var div = document.getElementById('fooldal');

	var httpObject = getHTTPObject();
	if (httpObject != null) {
		httpObject.onreadystatechange = function setOutput(){
			if (httpObject.readyState == 4) {
				if (httpObject.status == 200) {
					if(httpObject.responseText.substring(0, 5) == 'Hiba:'){
					  	alert(httpObject.responseText);
					}
					else if (div!=null){
						div.innerHTML = httpObject.responseText;
						init_hints("a","highslide");
						init_hints("a","needhint");
						init_hints("img","needhint");
					}
					else 
						alert("Nem található a div:"+div.id);
				}
			}
		};
  		httpObject.open("GET","docutar/files/oldalbyszures.php?mappaid=" + _mappaid+"&feltetel=" + encodeURI(_feltetel)+"&id1=" + _id1+"&id2=" + _id2+"&pocok=" + _pocok, true);
		httpObject.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
		httpObject.send(null);
	}
};
function oldalbyvisszaajax(index){		
   var _index = index;
	var div = document.getElementById('fooldal');

	var httpObject = getHTTPObject();
	if (httpObject != null) {
		httpObject.onreadystatechange = function setOutput(){
			if (httpObject.readyState == 4) {
				if (httpObject.status == 200) {
					if(httpObject.responseText.substring(0, 5) == 'Hiba:'){
					  	alert(httpObject.responseText);
					}
					else if (div!=null){
						div.innerHTML = httpObject.responseText;
						init_hints("a","highslide");
						init_hints("a","needhint");
						init_hints("img","needhint");
					}
					else 
						alert("Nem található a div:"+div.id);
				}
			}
		};
  		httpObject.open("GET","docutar/files/oldalbyvissza.php?index=" + _index, true);
		httpObject.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
		httpObject.send(null);
	}
};

function oldallapozasajax(index){		
   var _index = index;
	var div = document.getElementById('fooldal');

	var httpObject = getHTTPObject();
	if (httpObject != null) {
		httpObject.onreadystatechange = function setOutput(){
			if (httpObject.readyState == 4) {
				if (httpObject.status == 200) {
					if(httpObject.responseText.substring(0, 5) == 'Hiba:'){
					  	alert(httpObject.responseText);
					}
					else if (div!=null){
						div.innerHTML = httpObject.responseText;
						init_hints("a","highslide");
						init_hints("a","needhint");
						init_hints("img","needhint");
					}
					else 
						alert("Nem található a div:"+div.id);
				}
			}
		};
  		httpObject.open("GET","docutar/files/oldalkeszito.php?aktoldal=" + _index, true);
		httpObject.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
		httpObject.send(null);
	}
};

function oldaltorol(index){		
   var _index = index;

	var div = document.getElementById('fooldal');
	var belsodiv = document.getElementById('belsooldal');

	var httpObject = getHTTPObject();
	if (httpObject!=null)
	if (httpObject != null) {

		httpObject.onreadystatechange = function setOutput(){
			if (httpObject.readyState == 4) {
				if (httpObject.status == 200) {
					if(httpObject.responseText.substring(0, 5) == 'Hiba:'){
					  	alert(httpObject.responseText);
					}
					else if (belsodiv!=null){
						oldalbytulajajax(_index);
					}
					else 
						alert("Nem található a div:"+div.id);
				}
			}
		};
  		httpObject.open("GET","docutar/files/oldaltorol.php", true);
		httpObject.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
		httpObject.send(null);
	}
};
function megnyitas(mit){
   Effect.toggle('szovegdoboz'+mit, 'BLIND');
	return false;
};

function createszovegdoboz(id,sorszam){		
   var _tulajid = id;
	var _sorszam = sorszam;
	var elem = 'szovegdoboz'+_sorszam;
	var div = document.getElementById(elem);

	var httpObject = getHTTPObject();
	if (httpObject!=null)
	if (httpObject != null) {

		httpObject.onreadystatechange = function setOutput(){
			if (httpObject.readyState == 4) {
				if (httpObject.status == 200) {
					if(httpObject.responseText.substring(0, 5) == 'Hiba:'){
					  	alert(httpObject.responseText);
					}
					else if (div!=null){
						div.innerHTML = httpObject.responseText;
//						alert('dobozkreálós highslideos init...');
						init_hints("a","highslide");
						init_hints("a","needhint");
						init_hints("img","needhint");
						megnyitas(_sorszam);
					}
					else 
						alert("Nem található a div:"+div.id);
				}
			}
		};
  		httpObject.open("GET","docutar/files/szovegdoboztart.php?tulajid=" + _tulajid, true);
		httpObject.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
		httpObject.send(null);
	}
};
