function ajax_utworz_obiekt(){
	if (window.XMLHttpRequest) {
		http = new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		http = new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	return http;
}

var http = ajax_utworz_obiekt();


function ajax_prognoza() {
	http.open("get", sciezka + "ajax_prognoza.php", true);
	http.onreadystatechange = ajax_prognoza_obsloz;
	http.send(null);
}

function ajax_prognoza_obsloz() {
	if (http.readyState == 4 && http.status == 200){
		var response = http.responseText;
		if (response) {
			jQuery('#prognoza').toggle();
			document.getElementById("prognoza").innerHTML = response;
			jQuery('#prognoza').toggle('slow');
		}
	}
}
