<!--
function watchCategory(id) {
advAJAX.setDefaultParameters({
	mimeType: 'text/html',
	onSuccess : function(obj) {
		if (obj.responseText == "1") {
			document.getElementById("eventInfo").innerHTML = 'Tylko zalogowani użytkownicy mogą dodawać kategorie do obserwowanych';
			document.getElementById(obj.tag).innerHTML = '<a href="logowanie.htm">Zaloguj się</a> aby dodawać kategorie do obserowanych';
			}
		if (obj.responseText == "2") {
			document.getElementById("eventInfo").innerHTML = 'Tą kategorię masz już na liście oserwowanych';
			document.getElementById(obj.tag).innerHTML = '<img src="template/' + templateID + '/icon/heart.png" width="16" height="16">Ulubiona kategoria</b>&nbsp;<span class="link" onClick="removeFavCategory('+id+');">usuń</span>';
			}
		if (obj.responseText == "100") {
			$.jGrowl("Kategoria została dodana do obserwowanych. Listę obserwowanych kategorii możesz ogladać w panelu Moje bangla.", {life: 4000, position: 'center' });
/*			document.getElementById("eventInfo").innerHTML = 'Kategoria została dodana do ulubionych. Listę ulubionych kategorii pomozesz ogladać w panelu Moje bangla'; */
			document.getElementById(obj.tag).innerHTML = '<b><img src="template/' + templateID + '/icon/attach.png" width="16" height="16" align="absmiddle">&nbsp;Obserwowana kategoria</b>&nbsp;<span class="link" onClick="removeWatchCategory('+id+');">usuń</span>';
			}
/*		$("#eventInfo").slideToggle("slow"); */
		;},
	onError : function(obj) { document.getElementById(obj.tag).innerHTML = "..."; }
	});
advAJAX.get({ url: "modules/ajax/watchCategory.php?id=" + id, tag: "watch" });
advAJAX.setDefaultParameters({});
}					

function removeWatchCategory(id) {
advAJAX.setDefaultParameters({
	mimeType: 'text/html',
	onSuccess : function(obj) {
		if (obj.responseText == "1") {
			document.getElementById("eventInfo").innerHTML = 'Najpierw musisz się zalogować';
			document.getElementById(obj.tag).innerHTML = '<a href="logowanie.htm">Zaloguj się</a> aby usuwać kategorie z obserwowanych';
			}
		if (obj.responseText == "2") {
			document.getElementById("eventInfo").innerHTML = 'Tej kategorii nie masz na liście obserwowanych';
			document.getElementById(obj.tag).innerHTML = '<span class="link" onClick="favCategory('+id+');">dodaj kategorię do ulubionych</span>';
			}
		if (obj.responseText == "100") {
			$.jGrowl("Kategoria została usunięta z listy obserwowanych.", {life: 3000, position: 'center' });
/*			document.getElementById("eventInfo").innerHTML = 'Kategoria została usunięta z listy obserwowanych.'; */
			document.getElementById(obj.tag).innerHTML = '<span class="link" onClick="watchCategory('+id+');"><img src="template/' + templateID + '/icon/attach.png" width="16" height="16" align="absmiddle">&nbsp;Obserwuj kategorię</span>';
			}
/*		$("#eventInfo").slideToggle("slow"); */
		;},
	onError : function(obj) { document.getElementById(obj.tag).innerHTML = "..."; }
	});
advAJAX.get({ url: "modules/ajax/removeWatchCategory.php?id=" + id, tag: "watch" });
advAJAX.setDefaultParameters({});
}

-->