var xmlHttp;

function kalendarz(r,m)
{

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  } 
var url="gethint.php";
url=url+"?rok="+r+"&miesiac="+m;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("kalbox").innerHTML=xmlHttp.responseText;
 //po przeładowaniu kalendarza trzeba ponownie wywołąć tą funkcję, by 'podpieła' nowo załadowane tooltipsy
 $(".tooltip").tooltip({tip:'#demotip',effect:'fade',opacity: 0.8, position: "center right" });
 }
 
 if (xmlHttp.readyState!=4)
 { 
 //document.getElementById("kalbox").innerHTML="<img src='images/loading.gif' style='display:block;margin:auto;' /><div style='display:block;margin:auto;text-align:center;'>Trwa ładowanie danych</div>";
 }
  
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}

function rozwin(co){
	with(document.getElementById(co)){className=className=='h'?'v':'h';}
}


//SLIDER - lewy, środkowy, prawy
$(document).ready(function() {
    $('#slider').s3Slider({
        timeOut: 10000
    });
    $('#slider1').s3Slider({
        timeOut: 10000
    });
    $('#slider2').s3Slider({
        timeOut: 10000
    });
});


