/* betöltéshez */

    function showContent() {
      document.getElementById("loading").style.display='none';
      document.getElementById("content").style.display='block';
    }

/* AJAX-hoz */

	function requestCustomerInfo($id) {
		top.frames["hiddenFrame"].location = "./pages/szallashely_kepek.php?id=" + $id;
	}
	
	function displayCustomerInfo($text, $id) {
		$puff = "divReklamKepek_" + $id;
		var divCustomerInfo = document.getElementById($puff);		
		divCustomerInfo.innerHTML = $text;
		LyteBox.prototype.updateLyteboxItems();	
	}

	function futtasd_ezt($ez) {
		$ez = "" + $ez;
		top.frames["hiddenFrame"].location = $ez;	
	}
	
	function rakd_ezt_ide($cucc, $ide) {
		$puff = "" + $ide;
		var hova = document.getElementById($puff);		
		hova.innerHTML = $cucc;
		LyteBox.prototype.updateLyteboxItems();	
	}

/* ujabb AJAX-hoz */

var Ajax = null;

var $hova;

function getHTTP(element, URL, method) {  
//		alert ('most');
	    var wpanel= document.getElementById(element);
		wpanel.style.visibility = 'visible';  
	
		var req = null;
		if(window.XMLHttpRequest) {
			try {
			req = new XMLHttpRequest();
		  } catch (e) {}
		} else {
			if (window.ActiveXObject)  {
				try {
				req  = new ActiveXObject('Microsoft.XMLHTTP');
			} catch (e) {}
		  }
		}	
	
		req.onreadystatechange = function () {
			if (req.readyState == 4) {
				if (req.status == 200){
					wpanel.innerHTML = req.responseText;
				}
				else{
                wpanel.style.backgroundImage = 'none';
                wpanel.innerHTML = 'Hiba a letöltéskor';
/*				
                if(onerror) {
                	onerror(event);
                }				
*/				}
			}
		}
//		req.open('GET', URL, true);
		req.open(method, URL, true);		
		req.send(null);

} 

/*  nyelvhez */

function nyelv_valtas($erre) {
		session[nyelv] = $erre;
	}
	function createCookie(name,value,days) {
		if (days) {
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}
		else var expires = "";
		document.cookie = name+"="+value;
	}
	
	function readCookie(name) {
		var nameEQ = name + "=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
		return null;
	}
	
	function eraseCookie(name) {
		createCookie(name,"",-1);
	}



/* galériához */


	function galeriaba(konyvtar) {
		alert(konyvtar);

		/*  */

		LyteBox.prototype.updateLyteboxItems();	/* 'újragalerizál' */
	}

/* reklám középre*/

function reklam(width,height){

var div = document.getElementById('reklam');

div.style.width = width + "px";
div.style.height = height + "px";

div.style.left = (parseInt(document.body.clientWidth)-parseInt(div.style.width))/2;
div.style.top = (parseInt(document.body.clientHeight)-parseInt(div.style.height))/2;
}


function mutat_rejt(mit){
// alert ( document.getElementById(mit).style.display );

if ((document.getElementById(mit).style.display == 'none') || (document.getElementById(mit).style.display == '')){
	document.getElementById(mit).style.display = 'block';
}
else
	document.getElementById(mit).style.display = 'none';
}


/* SCROLL  */

 var pos = 0;  
 
 function Scroll_xy() {  
 alert(pos);
   if (!document.getElementById) return;  
   obj=document.getElementById("scroll_up");  

   pos -= 1;

   if (pos < 0 - obj.offsetHeight) {	
	pos = 0;  
//   	return;  
   }
	
   obj.style.top=pos + 'px';    
   window.setTimeout("Scroll_xy();", 3);
   
 }  

/*               */





function changeBig($id, $plusz){
$puff = $id + "box_center_szoveg";

//alert($puff);

this.navbar=document.getElementById($id + "box_center_szoveg");
this.navbar.style.fontSize = 15;

	$orig = this.navbar.style.height;
	$new_height = parseInt($orig) + $plusz;

this.navbar.style.height = $new_height + 'px';
/*
this.navbar=document.getElementById($id + "box_center_left");
this.navbar.style.height = $new_height + 'px';

this.navbar=document.getElementById($id + "box_center_right");
this.navbar.style.height = $new_height + 'px';
*/
this.navbar=document.getElementById($id + "box");
this.navbar.style.height = $new_height + 'px';

this.navbar=document.getElementById($id + "box");
this.navbar.style.zIndex = 1000;

}

function changeSmall($id, $height){
$puff = $height - 80;	

this.navbar=document.getElementById($id + "box_center_szoveg");
this.navbar.style.height= $puff+'px';
this.navbar.style.fontSize = 12;

/*
this.navbar=document.getElementById($id + "box_center_left");
this.navbar.style.height= $puff+'px';

this.navbar=document.getElementById($id + "box_center_right");
this.navbar.style.height= $puff+'px';
*/
this.navbar=document.getElementById($id + "box");
this.navbar.style.height= $height + 'px';

this.navbar=document.getElementById($id + "box");
this.navbar.style.zIndex = 0;

}
