
function goto(link)
{
	window.location.href = 'http://'+ window.location.host + link;
}

function chowaj(id)
{
	if(document.getElementById(id).style.display == 'none') document.getElementById(id).style.display='block'; 
	else document.getElementById(id).style.display='none';
}

function chowaj_form(id)
{
	document.getElementById(id).style.display='none';
}

function zaslona(){
	if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
		jQuery("body","html").css({height: "100%", width: "100%"});
		jQuery("html").css("overflow","hidden");
		if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
			jQuery("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
		}
	}else{//all others
		if(document.getElementById("TB_overlay") === null){
			jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
		}
	}
	if(tb_detectMacXFF()){
		jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash
	}else{
		jQuery("#TB_overlay").addClass("TB_overlayBG");//use background and opacity
	}	
	jQuery("body").append("<div id='TB_load' style='z-index: 1002;padding:20px 20px 40px 20px;background:#fff;border:2px solid #7d7d7d'><div><img src='"+imgLoader.src+"' /></div><div style='text-align:center;font-weight:bold'>Proszę czekać...</div></div>");//add loader to the page
	jQuery('#TB_load').show();
}

function user_alert_left(){
	var w = document.body.clientWidth;
	w = (w/2)-150;
	document.getElementById('user_alert').style.left = w+'px';
	h = document.documentElement.scrollTop + 250;
	document.getElementById('user_alert').style.top = "45%";
	user_alert_check();
}

function user_alert_check(){
	var url = "/inc/ajax_user_alert_check.php";
	var params = "alert=1";
	startPOSTRequest(url, params, user_alert_check_onComplete, user_alert_check_onEnd);     
}

function user_alert_check_onComplete(responseText, responseXML){
	if(responseText!='') user_alert(responseText);
}

function user_alert_check_onEnd(){
}

function user_alert_clear(){
	var url = "/inc/ajax_user_alert_clear.php";
	var params = "alert=0";
	startPOSTRequest(url, params, user_alert_clear_onComplete, user_alert_clear_onEnd);     
}

function user_alert_clear_onComplete(responseText, responseXML){
}

function user_alert_clear_onEnd(){
}

function user_alert(content){
	if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
		jQuery("body","html").css({height: "100%", width: "100%"});
		jQuery("html").css("overflow","hidden");
		if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
			jQuery("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
			jQuery("#TB_overlay").click(tb_remove);
		}
	}else{//all others
		if(document.getElementById("TB_overlay") === null){
			jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
			jQuery("#TB_overlay").click(tb_remove);
		}
	}
	if(tb_detectMacXFF()){
		jQuery("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash
	}else{
		jQuery("#TB_overlay").addClass("TB_overlayBG");//use background and opacity
	}	
	document.getElementById('user_alert_cont').innerHTML = content;
	document.getElementById('user_alert').style.display = 'block';
}

function user_alert_exit(){
	document.getElementById('user_alert').style.display = 'none';
	user_alert_clear();
	jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
	jQuery("#TB_load").remove();
	if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
		jQuery("body","html").css({height: "auto", width: "auto"});
		jQuery("html").css("overflow","");
	}
	document.onkeydown = "";
	document.onkeyup = "";
	return false;
}

var sc;

function slajd(on,max)
{
	var czas = 6000;
	$('#slajd_'+on).fadeTo('slow', 1);
	for(i=1;i<=max;i++)
	{
		if(i!=on) $('#slajd_'+i).fadeOut('slow');
	}
	var next = on; 
	if(on<max) next = next+1; else next = 1;
	sc = setTimeout('slajd('+next+','+max+')', czas); 
}

function chfota(id)
{
	var url = "/inc/ajax_chfota.php";
	var params = "id=" + id;
	startPOSTRequest(url, params, chfota_onComplete, chfota_onEnd);     
}

function chfota_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	var img = document.getElementById('big');
	var imgsmall = document.getElementById('idp_'+tab[2]);
	var obj1 = document.getElementById('profil_fota_opis');
	var obj2 = document.getElementById('profil_fota_data');
	var previmgsmall = "idp_" + document.getElementById('idpp').value;
	
	img.src = tab[1];
	document.getElementById(previmgsmall).style.border = 'solid 1px #ffffff';
	imgsmall.style.border = 'solid 1px #ff0000';
	
	document.getElementById('idpp').value = tab[2];
	obj1.innerHTML = tab[3];
	obj2.innerHTML = tab[4];
	komentarze(1, document.getElementById('idpp').value, 3, 10);
	count_comments(document.getElementById('idpp').value, 3);	
}

function chfota_onEnd()
{
}

function chfota_mojastacja(id)
{
	var url = "/inc/ajax_chfota.php";
	var params = "id=" + id;
	startPOSTRequest(url, params, chfota_mojastacja_onComplete, chfota_mojastacja_onEnd);     
}

function chfota_mojastacja_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	var img = document.getElementById('big');
	var imgsmall = document.getElementById('idp_'+tab[2]);
	var obj1 = document.getElementById('e_phopis');
	var obj2 = document.getElementById('profil_fota_data');
	var previmgsmall = "idp_" + document.getElementById('idpp').value;
	
	img.src = tab[1];
	document.getElementById(previmgsmall).style.border = 'solid 1px #ffffff';
	imgsmall.style.border = 'solid 1px #ff0000';
	
	document.getElementById('idpp').value = tab[2];
	obj1.value = tab[3];
	obj2.innerHTML = tab[4];
	komentarze(1, document.getElementById('idpp').value, 3, 10);
	count_comments(document.getElementById('idpp').value, 3);	
}

function chfota_mojastacja_onEnd()
{
}

function change_photo(idalbum, idpp, val)
{
	var url = "/inc/ajax_change_photo.php";
	var params = "idalbum=" + idalbum + "&idpp=" + idpp + "&val=" + val;
	startPOSTRequest(url, params, change_photo_onComplete, change_photo_onEnd);     
}

function change_photo_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	chfota(tab[1]);
}

function change_photo_onEnd()
{
}

function change_photo_mojastacja(idalbum, idpp, val)
{
	var url = "/inc/ajax_change_photo.php";
	var params = "idalbum=" + idalbum + "&idpp=" + idpp + "&val=" + val;
	startPOSTRequest(url, params, change_photo_mojastacja_onComplete, change_photo_mojastacja_onEnd);     
}

function change_photo_mojastacja_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	chfota_mojastacja(tab[1]);
}

function change_photo_mojastacja_onEnd()
{
}

function change_movie(idalbum, idpp, val)
{
	var url = "/inc/ajax_change_movie.php";
	var params = "idalbum=" + idalbum + "&idpp=" + idpp + "&val=" + val;
	startPOSTRequest(url, params, change_movie_onComplete, change_movie_onEnd);     
}

function change_movie_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	if(tab[1]!='' && tab[2]!='' && tab[3]!='') goto('/profil/'+tab[3]+'/filmy/album/'+tab[2]+'/film/'+tab[1]+'/');
}

function change_movie_onEnd()
{
}

function change_movie_mojastacja(idalbum, idpp, val)
{
	var url = "/inc/ajax_change_movie.php";
	var params = "idalbum=" + idalbum + "&idpp=" + idpp + "&val=" + val;
	startPOSTRequest(url, params, change_movie_mojastacja_onComplete, change_movie_mojastacja_onEnd);     
}

function change_movie_mojastacja_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	if(tab[1]!='' && tab[2]!='' && tab[3]!='') goto('/Moja-stacja/filmy/album/'+tab[2]+'/film/'+tab[1]+'/');
}

function change_movie_mojastacja_onEnd()
{
}

function chfota_ms(id)
{
	var url = "/inc/ajax_chfota.php";
	var params = "id=" + id;
	startPOSTRequest(url, params, chfota_ms_onComplete, chfota_ms_onEnd);     
}

function chfota_ms_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	var img = document.getElementById('big');
	var imgsmall = document.getElementById('idp_'+tab[2]);
	var obj1 = document.getElementById('e_phopis');
	var obj2 = document.getElementById('profil_fota_data');
	var previmgsmall = "idp_" + document.getElementById('idpp').value;
	
	img.src = tab[1];
	document.getElementById(previmgsmall).style.border = 'solid 1px #ffffff';
	imgsmall.style.border = 'solid 1px #ff0000';
	
	document.getElementById('idpp').value = tab[2];
	obj1.value = tab[3];
	obj2.innerHTML = tab[4];
	komentarze(1, document.getElementById('idpp').value, 3, 10);
	count_comments(document.getElementById('idpp').value, 3);	
}

function chfota_ms_onEnd()
{
}

function addblacklist(id)
{
	var url = "/inc/ajax_addblacklist.php";
	var params = "id=" + id;
	startPOSTRequest(url, params, addblacklist_onComplete, addblacklist_onEnd);     
}

function addblacklist_onComplete(responseText, responseXML)
{
	document.getElementById('user_alert_cont').innerHTML = responseText;
	document.getElementById('user_alert').style.display = 'block';
}

function addblacklist_onEnd()
{
}

function savephopis(id,opis)
{
	var url = "/inc/ajax_savephopis.php";
	var params = "id=" + id + "&opis=" + opis;
	startPOSTRequest(url, params, savephopis_onComplete, savephopis_onEnd);     
}

function savephopis_onComplete(responseText, responseXML)
{
	document.getElementById('e_phopis_zapisz').style.display = 'none';
}

function savephopis_onEnd()
{
}

function savemopis(id,opis)
{
	var url = "/inc/ajax_savemopis.php";
	var params = "id=" + id + "&opis=" + opis;
	startPOSTRequest(url, params, savemopis_onComplete, savemopis_onEnd);     
}

function savemopis_onComplete(responseText, responseXML)
{
	document.getElementById('e_phopis_zapisz').style.display = 'none';
}

function savemopis_onEnd()
{
}

function savemotto(id,opis)
{
	var url = "/inc/ajax_savemotto.php";
	var params = "id=" + id + "&opis=" + opis;
	startPOSTRequest(url, params, savemotto_onComplete, savemotto_onEnd);     
}

function savemotto_onComplete(responseText, responseXML)
{
	document.getElementById('e_motto_zapisz').style.display = 'none';
}

function savemotto_onEnd()
{
}

function setavatar(id)
{
	var url = "/inc/ajax_setavatar.php";
	var params = "id=" + id;
	startPOSTRequest(url, params, setavatar_onComplete, setavatar_onEnd);     
}

function setavatar_onComplete(responseText, responseXML)
{
	window.location.href=location;
	document.getElementById('user_alert_cont').innerHTML = responseText;
	document.getElementById('user_alert').style.display = 'block';	
}

function setavatar_onEnd()
{
}

function delmsg(id)
{
	var url = "/inc/ajax_delmsg.php";
	var params = "id=" + id;
	startPOSTRequest(url, params, delmsg_onComplete, delmsg_onEnd);     
}

function delmsg_onComplete(responseText, responseXML)
{
	window.location.href=location;
}

function delmsg_onEnd()
{
}

function delmsgs()
{	
	formularz = document.getElementById('form_wiadomosci');
    var ile = formularz.msg_ch.length;  
	var numery_id = '';
    for (var i=0; i < ile ; i++)  
    {  
        if(formularz.msg_ch[i].checked == true)  
        {  
			numery_id = numery_id + formularz.msg_ch[i].value + ';';
        }  
    }  
	var url = "/inc/ajax_delmsgs.php";
	var params = "id=" + numery_id;	
	startPOSTRequest(url, params, delmsgs_onComplete, delmsgs_onEnd);     
}

function delmsgs_onComplete(responseText, responseXML)
{
	window.location.href=location;
}

function delmsgs_onEnd()
{
}

function msgoproznij()
{
	var url = "/inc/ajax_msgoproznij.php";
	var params = "id=0";
	startPOSTRequest(url, params, msgoproznij_onComplete, msgoproznij_onEnd);     
}

function msgoproznij_onComplete(responseText, responseXML)
{
	window.location.href=location;
}

function msgoproznij_onEnd()
{
}

function addfriend(id)
{
	var url = "/inc/ajax_addfriend.php";
	var params = "id=" + id;
	startPOSTRequest(url, params, addfriend_onComplete, addfriend_onEnd);     
}

function addfriend_onComplete(responseText, responseXML)
{
	document.getElementById('user_alert_cont').innerHTML = responseText;
	document.getElementById('user_alert').style.display = 'block';	
}

function addfriend_onEnd()
{
}

function akceptfriend(id)
{
	var url = "/inc/ajax_akceptfriend.php";
	var params = "id=" + id;
	startPOSTRequest(url, params, akceptfriend_onComplete, akceptfriend_onEnd);     
}

function akceptfriend_onComplete(responseText, responseXML)
{
	document.getElementById('user_alert_cont').innerHTML = responseText;
	document.getElementById('user_alert').style.display = 'block';
}

function akceptfriend_onEnd()
{
}

function galeria_albumy_min(strona, iduser, idalbum)
{
	var url = "/inc/ajax_galeria_albumy_min.php";
	var params = "strona=" + strona + "&iduser=" + iduser + "&idalbum=" + idalbum;
	startPOSTRequest(url, params, galeria_albumy_min_onComplete, galeria_albumy_min_onEnd);     
}

function galeria_albumy_min_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	var obj1 = document.getElementById('str_galeria_albumy_min');
	obj1.innerHTML = tab[0];
}

function galeria_albumy_min_onEnd()
{
}

function galeria_albumy_min_mojastacja(strona, idalbum)
{
	var url = "/inc/ajax_galeria_albumy_min_mojastacja.php";
	var params = "strona=" + strona + "&idalbum=" + idalbum;
	startPOSTRequest(url, params, galeria_albumy_min_mojastacja_onComplete, galeria_albumy_min_mojastacja_onEnd);     
}

function galeria_albumy_min_mojastacja_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	var obj1 = document.getElementById('str_galeria_albumy_min_mojastacja');
	obj1.innerHTML = tab[0];
}

function galeria_albumy_min_mojastacja_onEnd()
{
}

function filmy_albumy_min(strona, iduser, idalbum)
{
	var url = "/inc/ajax_filmy_albumy_min.php";
	var params = "strona=" + strona + "&iduser=" + iduser + "&idalbum=" + idalbum;
	startPOSTRequest(url, params, filmy_albumy_min_onComplete, filmy_albumy_min_onEnd);     
}

function filmy_albumy_min_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	var obj1 = document.getElementById('str_filmy_albumy_min');
	obj1.innerHTML = tab[0];
}

function filmy_albumy_min_onEnd()
{
}

function filmy_albumy_min_mojastacja(strona, idalbum)
{
	var url = "/inc/ajax_filmy_albumy_min_mojastacja.php";
	var params = "strona=" + strona + "&idalbum=" + idalbum;
	startPOSTRequest(url, params, filmy_albumy_min_mojastacja_onComplete, filmy_albumy_min_mojastacja_onEnd);     
}

function filmy_albumy_min_mojastacja_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	var obj1 = document.getElementById('str_filmy_albumy_min_mojastacja');
	obj1.innerHTML = tab[0];
}

function filmy_albumy_min_mojastacja_onEnd()
{
}

function galeria_min(strona)
{
	var url = "/inc/ajax_galeria_min.php";
	var params = "strona=" + strona;
	startPOSTRequest(url, params, galeria_min_onComplete, galeria_min_onEnd);     
}

function galeria_min_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	var obj1 = document.getElementById('str_galeria_min');
	obj1.innerHTML = tab[0];
}

function galeria_min_onEnd()
{
}

function gallery_min(strona,id)
{
	var url = "/inc/ajax_gallery_min.php";
	var params = "strona=" + strona + "&id=" + id;
	startPOSTRequest(url, params, gallery_min_onComplete, gallery_min_onEnd);     
}

function gallery_min_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	var obj1 = document.getElementById('str_gallery_min');
	obj1.innerHTML = tab[0];
}

function gallery_min_onEnd()
{
}

function chgfota(id)
{
	var url = "/inc/ajax_chgfota.php";
	var params = "id=" + id;
	startPOSTRequest(url, params, chgfota_onComplete, chgfota_onEnd);     
}

function chgfota_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	var img = document.getElementById('big');
	var imgsmall = document.getElementById('idp_'+tab[2]);
	var obj1 = document.getElementById('gal_fota_opis');
	var obj2 = document.getElementById('gal_fota_data');
	var obj3 = document.getElementById('gal_fota_galeria');
	var obj4 = document.getElementById('gal_fota_autor');
	var previmgsmall = "idp_" + document.getElementById('idpp').value;
	
	img.src = tab[1];
	if(document.getElementById(previmgsmall)) document.getElementById(previmgsmall).style.border = 'solid 1px #ffffff';
	if(imgsmall) imgsmall.style.border = 'solid 1px #ff0000';
	
	document.getElementById('idpp').value = tab[2];
	if(obj1) obj1.innerHTML = tab[3];
	if(obj2) obj2.innerHTML = tab[4];
	if(obj3) obj3.innerHTML = tab[5];
	if(obj4) obj4.innerHTML = tab[6];
	komentarze(1, document.getElementById('idpp').value, 3, 10);
	count_comments(document.getElementById('idpp').value, 3);	
}

function chgfota_onEnd()
{
}


function chg2fota(id)
{
	var url = "/inc/ajax_chg2fota.php";
	var params = "id=" + id;
	startPOSTRequest(url, params, chg2fota_onComplete, chg2fota_onEnd);     
}

function chg2fota_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	var img = document.getElementById('big');
	var imgsmall = document.getElementById('idp_'+tab[2]);
	var obj1 = document.getElementById('gal_fota_data');
	var previmgsmall = "idp_" + document.getElementById('idpp').value;
	
	img.src = tab[1];
	if(document.getElementById(previmgsmall)) document.getElementById(previmgsmall).style.border = 'solid 1px #ffffff';
	if(imgsmall) imgsmall.style.border = 'solid 1px #ff0000';
	
	document.getElementById('idpp').value = tab[2];
	obj1.innerHTML = tab[3];
	komentarze(1, document.getElementById('idpp').value, 3, 10);
	count_comments(document.getElementById('idpp').value, 3);	
}

function chg2fota_onEnd()
{
}

function saveblogtitle(id,opis)
{
	var url = "/inc/ajax_saveblogtitle.php";
	var params = "id=" + id + "&opis=" + opis;
	startPOSTRequest(url, params, saveblogtitle_onComplete, saveblogtitle_onEnd);     
}

function saveblogtitle_onComplete(responseText, responseXML)
{
	document.getElementById('b_title_zapisz').style.display = 'none';
}

function saveblogtitle_onEnd()
{
}

function saveblogtitle(id,opis)
{
	var url = "/inc/ajax_saveblogtitle.php";
	var params = "id=" + id + "&opis=" + opis;
	startPOSTRequest(url, params, saveblogtitle_onComplete, saveblogtitle_onEnd);     
}

function saveblogtitle_onComplete(responseText, responseXML)
{
	document.getElementById('b_title_zapisz').style.display = 'none';
}

function saveblogtitle_onEnd()
{
}


function saveblogopis(id,opis)
{
	var url = "/inc/ajax_saveblogopis.php";
	var params = "id=" + id + "&opis=" + opis;
	startPOSTRequest(url, params, saveblogopis_onComplete, saveblogopis_onEnd);     
}

function saveblogopis_onComplete(responseText, responseXML)
{
	document.getElementById('b_opis_zapisz').style.display = 'none';
}

function saveblogopis_onEnd()
{
}


function del_blog_wpis(id)
{
	var url = "/inc/ajax_del_blog_wpis.php";
	var params = "id=" + id;
	startPOSTRequest(url, params, del_blog_wpis_onComplete, del_blog_wpis_onEnd);     
}

function del_blog_wpis_onComplete(responseText, responseXML)
{
	window.location.href=location;
}

function del_blog_wpis_onEnd()
{
}

function del_forum_topic(id)
{
	var url = "/inc/ajax_del_forum_topic.php";
	var params = "id=" + id;
	startPOSTRequest(url, params, del_forum_topic_onComplete, del_forum_topic_onEnd);     
}

function del_forum_topic_onComplete(responseText, responseXML)
{
	window.location.href=location;
}

function del_forum_topic_onEnd()
{
}

function del_forum(id)
{
	var url = "/inc/ajax_del_forum.php";
	var params = "id=" + id;
	startPOSTRequest(url, params, del_forum_onComplete, del_forum_onEnd);     
}

function del_forum_onComplete(responseText, responseXML)
{
	window.location.href=location;
}

function del_forum_onEnd()
{
}

function stronicowanie_s1(strona, slowo, autor, dzial, date)
{
	var url = "/inc/ajax_stronicowanie_s1.php";
	var params = "strona=" + strona + "&slowo=" + slowo + "&autor=" + autor + "&dzial=" + dzial + "&date=" + date;
	startPOSTRequest(url, params, stronicowanie_s1_onComplete, stronicowanie_s1_onEnd);     
}

function stronicowanie_s1_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	var obj = document.getElementById('stronicowanie_s1');
	obj.innerHTML = tab[0];
	//zaslona(0,'');
}

function stronicowanie_s1_onEnd()
{
}

var checkboxs_checked = false;

function zaznacz(form)
{
	var checkboxy = document.getElementById(form).getElementsByTagName('input');
	for(i = 0; i < checkboxy.length; i++)
	{
		if (checkboxy[i].type == 'checkbox') checkboxy[i].checked = checkboxs_checked ? false : true;
	}
	checkboxs_checked = checkboxs_checked ? false : true;
}


function change_patron(id)
{
	var url = "/inc/ajax_change_patron.php";
	var params = "id=" + id;
	startPOSTRequest(url, params, change_patron_onComplete, change_patron_onEnd);     
}

function change_patron_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	var obj1 = document.getElementById('img_patron_big');
	var obj2 = document.getElementById('patron_title');
	var obj3 = document.getElementById('patron_opis');
	var obj4 = document.getElementById('patron_more');
	var obj5 = document.getElementById('img_patron_big_link');
	obj1.src = tab[1];
	obj2.innerHTML = tab[2];
	obj3.innerHTML = tab[3];
	obj4.href = tab[4];
	obj5.href = tab[1];
}

function change_patron_onEnd()
{
}

function odbierz_gratis(id)
{
	var url = "/inc/ajax_odbierz_gratis.php";
	var params = "id=" + id;
	startPOSTRequest(url, params, odbierz_gratis_onComplete, odbierz_gratis_onEnd);     
}

function odbierz_gratis_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	if(tab[1]=='true') window.location.href = '/Spolecznosc/SK_Plus/'+tab[2]+'/odbierz/';
	else user_alert(tab[1]);
}

function odbierz_gratis_onEnd()
{
}

function kalendarz(rok, miesiac, dzien, idblog)
{
	document.getElementById('div_kalendarz').innerHTML = '<img src="/img/ajax-loading.gif" alt="" style="padding:70px 0 70px 100px"/>';
	var url = "/inc/ajax_kalendarz.php";
	var params = "rok=" + rok + "&miesiac=" + miesiac + "&dzien=" + dzien + "&idblog=" + idblog;
	startPOSTRequest(url, params, kalendarz_onComplete, kalendarz_onEnd);     
}

function kalendarz_onComplete(responseText, responseXML)
{
	var tab = responseText.split(';:xxx:;');
	var obj = document.getElementById('div_kalendarz');
	jQuery('#div_kalendarz').fadeOut(200);
	setTimeout(function(){ obj.innerHTML = tab[0]; jQuery('#div_kalendarz').fadeIn() }, 300);	
}

function kalendarz_onEnd()
{
}

function kalendarz_show(rok, miesiac, dzien, idblog)
{
}
