	function kategorizer(nev) {
  	/*
  	if ($(div).checked == true){
  		$(div).checked = false;
  	}else{
  		$(div).checked = true;
  	}// else end
  	*/
  	if ( document.getElementById(nev).checked == true){
  		document.getElementById(nev).checked = false;
  	}else{
  		document.getElementById(nev).checked = true;
  	}// else end
	
		//ajax.request();
  	
  	return false;
	}// fn end


	
	function socordinate(url) {
 		var ajax = new Ajax(url, {
   		method: 'get',
   		evalScripts: false
 		});// var end
  	ajax.request();
  	return false;
	}// fn end

	
	
	
	
	
	function tfb(param, time){
  d = document.getElementById(param);
  a = time - 1;
  if(a > 0){
  	d.value = a;
  	d.disabled = true;
    setTimeout("tfb('"+param+"', '"+a+"')", 1100);
    document.getElementById(param).className = 'arena_harc_hasznal_btn_disabled';
  }else{
  	d.value = 'Mehet';
  	d.disabled = false;
  	document.getElementById(param).className = 'arena_harc_hasznal_btn';
  }// else end
}
	
// dinamic tooltips
	
	this.tooltip = function(){	
	/* CONFIG */		
		xOffset = -30;
		yOffset = -60;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$("a.tooltip").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<div id='tooltip'>"+ this.t +"</div>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("a.tooltip").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};





$(document).ready(function(){
	tooltip();
	
	//$("#news_textarea").htmlarea();
	//$("#news_textarea").wysiwyg();
	//$('#wysiwyg').wysiwyg();



	
	function updateStatus() {
     $.ajax({
         url: 'showhistory.php',
         success: function(response) {
             // update status element
             $('#history_refresh').html(response);
         }
     });
 }
	
	if( $('#history_refresh') ){
		var refreshId = setInterval(function(){
		 	$('#history_refresh').fadeOut("fast").load('/showhistory.php').fadeIn("slow");
		 	//$('#history_refresh').fadeOut("fast").load('changelog.txt').fadeIn("slow");
		 	$('#history_line_refresh').fadeOut("fast").load('/showhistory_line.php').fadeIn("slow");
		 	//setInterval("updateStatus()",10000);
		}, 10000);
	}
	if( $('#ujratolt') ){
		var refreshId = setInterval(function(){
		 	$('#ujratolt').fadeOut("fast").load('timeisit.php #ujratolt').fadeIn("fast");
		 	//$('#ujratolt').fadeOut("slow");
		 	/*
		 	$.ajax({
  			url: "timeisit.php",
  			cache: false,
  			success: function(html){
    			$("#ujratolt").append(html);
    			//alert(XMLHttpRequest.status);
    			//break;
  			}
  			
			});
			*/
		 	//$('#ujratolt').html("ekkonakko").fadeIn("slow");
		 	//$('#ujratolt').html("").load("timeisit.php").fadeIn("slow");
		}, 5000);
	}

});	
	

	
