function displayEditText(id) {
		advAJAX.post({
				url: "functions.php",
				parameters : {
			 		  what: 'displayEditText',
			 		  id : id
				    },
				onLoading : function(obj) { document.getElementById('edycja_tekstu').innerHTML = "<img src=\"loading.gif\" />"; },
				onComplete : function(obj) { document.getElementById('edycja_tekstu').innerHTML = ""; },
				onSuccess : function(obj) {
					document.getElementById('edycja_tekstu').innerHTML = obj.responseText; 
					
					}
												   })
		}
function displayAddText(kat_id) {
		advAJAX.post({
				url: "functions.php",
				parameters : {
			 		  what: 'displayAddText',
			 		  kat_id : kat_id
				    },
				onLoading : function(obj) { document.getElementById('dodawanie_tekstu').innerHTML = "<img src=\"loading.gif\" />"; },
				onComplete : function(obj) { document.getElementById('dodawanie_tekstu').innerHTML = ""; },
				onSuccess : function(obj) {
					document.getElementById('dodawanie_tekstu').innerHTML = obj.responseText; 
					
					}
												   })
		}
function addText() {
			tinyMCE.execCommand("mceRemoveControl",true,"add_text");
			tinyMCE.execCommand("mceRemoveControl",true,"add_text_small");
			advAJAX.submit(document.getElementById("addtext"), {
				disableForm: false,
				onLoading : function(obj) { document.getElementById('loading').innerHTML = "<img src=\"loading.gif\" />"; },
				onComplete : function(obj) { document.getElementById('loading').innerHTML = ""; },
				onSuccess : function(obj) {
					document.getElementById('textContent').innerHTML = obj.responseText;  
					}
												   })
		}
function saveText() {
			tinyMCE.execCommand("mceRemoveControl",true,"add_text");
			tinyMCE.execCommand("mceRemoveControl",true,"add_text_small");
			advAJAX.submit(document.getElementById("addtext"), {
				disableForm: false,
				onLoading : function(obj) { document.getElementById('loading').innerHTML = "<img src=\"loading.gif\" />"; },
				onComplete : function(obj) { document.getElementById('loading').innerHTML = ""; },
				onSuccess : function(obj) {
					document.getElementById('white').innerHTML = obj.responseText;  
					}
												   })
		}
		
