	var http2 = false;
		
		if(navigator.appName == "Microsoft Internet Explorer") {
		  http2 = new ActiveXObject("Microsoft.XMLHTTP");
		} else {
		  http2 = new XMLHttpRequest();
		}
		
	var http = false;		
		
		if(navigator.appName == "Microsoft Internet Explorer") {
		  http = new ActiveXObject("Microsoft.XMLHTTP");
		} else {
		  http = new XMLHttpRequest();
		}
		
	var http3 = false;		
		
		if(navigator.appName == "Microsoft Internet Explorer") {
		  http3 = new ActiveXObject("Microsoft.XMLHTTP");
		} else {
		  http3 = new XMLHttpRequest();
		}		
		
	var http4 = false;		
		
		if(navigator.appName == "Microsoft Internet Explorer") {
		  http4 = new ActiveXObject("Microsoft.XMLHTTP");
		} else {
		  http4 = new XMLHttpRequest();
		}			
		
	// Functiom to reaload ajax		
	function ajax_reload(site, container, loadingbar, kanal){
			
		  if ( loadingbar == 1 ){	
		  document.getElementById(''+container+'').innerHTML = '<img src=http://woho.tv/img/loader3.gif> Loading...</div>';		
		  }
		  if ( loadingbar == 2 ){	
		  document.getElementById(''+container+'').innerHTML = '<div style="margin-left: 420px; margin-top: 180px"><img src=http://woho.tv/img/ajax-loader-green.gif></div>';		
		  }		  
		  
		  if ( kanal == 1 ){
			  http2.open("POST", ''+site+'', true);			
			  http2.onreadystatechange=function() {
			  if(http2.readyState == 4) {
				  document.getElementById(''+container+'').innerHTML = http2.responseText;				  
				}
			  }
			  http2.send(null);	
		  }
		  if ( kanal == 2 ){
			  http.open("POST", ''+site+'', true);			
			  http.onreadystatechange=function() {
			  if(http.readyState == 4) {
				  document.getElementById(''+container+'').innerHTML = http.responseText;				  
				}
			  }
			  http.send(null);	
		  }		
		  if ( kanal == 3 ){
			  http3.open("POST", ''+site+'', true);			
			  http3.onreadystatechange=function() {
			  if(http3.readyState == 4) {
				  document.getElementById(''+container+'').innerHTML = http3.responseText;				  
				}
			  }
			  http3.send(null);	
		  }			  
		  
	};
	
function kaka(co){
	var ile = document.getElementById('debug').innerHTML;
	if ( ile < 1 || ile > 8 ){ ile = 1; document.getElementById('debug').innerHTML = 1 }
	if ( co == 1){
	var ilen = parseFloat(ile)+1;
	}
	else
	{
	var ilen = parseFloat(ile)-1;		
	}
	ajax_reload("site/ajax/projekty.php?x="+ile,"projekty",1,1);
	document.getElementById('debug').innerHTML = ilen	
}


function nextproject(co){
	
	$("#projekty").hide("slow");
	if ( co == 0 ){
	setTimeout("kaka(0)",1000);
	}
	else
	{
	setTimeout("kaka(1)",1000);		
	}
	setTimeout('$("#projekty").show("slow");',1000);
	
}