function sprDataCalendar()
{
	var http = null;
    if(window.XMLHttpRequest)
	http = new XMLHttpRequest();
    else if (window.ActiveXObject)
    http = new ActiveXObject("Microsoft.XMLHTTP");
	
	var r = document.getElementById("rok");
	var rok=r.options[r.selectedIndex].value;
	
    var m = document.getElementById("miesiac");
	var miesiac=m.options[m.selectedIndex].value;
	
	var d = document.getElementById("dzien");
	var dzien=d.options[d.selectedIndex].value;
	
   http.onreadystatechange = function()
    {
        if(http.readyState == 4)
	{
	    if( http.status == 200 ) 
	    {
	    	var odpowiedz = http.responseText;
			var wstawEl = document.getElementById('znak');
								while(wstawEl.lastChild){
				   					wstawEl.removeChild(wstawEl.lastChild);
								}
									
			wstawEl.innerHTML='<img src="public/images/dateFengshui/'+odpowiedz+'.gif">';
		}
	}
    }
	http.open("POST", "class/ajax.php", true);
    http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    http.send("action=sprDataCalendar&rok="+rok+"&miesiac="+miesiac+"&dzien="+dzien);
}
function sprData()
{
	var http = null;
    if(window.XMLHttpRequest)
	http = new XMLHttpRequest();
    else if (window.ActiveXObject)
    http = new ActiveXObject("Microsoft.XMLHTTP");
	
	var r = document.getElementById("rok2");
	var rok=r.options[r.selectedIndex].value;
	var m = document.getElementById("miesiac2");
	var miesiac=m.options[m.selectedIndex].value;
	var d = document.getElementById("dzien2");
	var dzien=d.options[d.selectedIndex].value;
	
	var g=document.getElementById('godzina2');
	var godzina=g.options[g.selectedIndex].value;
	
	http.onreadystatechange = function()
    {
        if(http.readyState == 4)
	{
	    if( http.status == 200 ) 
	    {
	    	var odpowiedz = http.responseText;
	    	var wstawEl = document.getElementById('znak2');
								while(wstawEl.lastChild){
				   					wstawEl.removeChild(wstawEl.lastChild);
								}
									//wstawEl.appendChild(document.createTextNode('<img src="public/images/dateFengshui/'+odpowiedz+'.jpg">'));
			wstawEl.innerHTML=odpowiedz;
		}
	}
    }
	http.open("POST", "class/ajax.php", true);
    http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    http.send("action=sprData&rok="+rok+"&miesiac="+miesiac+"&dzien="+dzien+"&godzina="+godzina);
}