
	formPost = function(destinationUrl, formId, loaderId, submitId)
	{
		
		var useAjaxLoader= false; // zmena na false
		var hideSubmitAction = true;
		
		if (loaderId===undefined) {     
			useAjaxLoader = false;
		}
	
		if (submitId===undefined) {    
			hideSubmitAction  = false; 
		}
		var postParams = { 
				url: destinationUrl,
				load: function(data) {
					dojo.eval(data);
	
					//hide ajax loader
					if (useAjaxLoader)    { 
						dojo.byId(loaderId).style.display = "none";
					}
	
					if (hideSubmitAction) {
						submit = dojo.byId(submitId);
						if( submit !== null) {
							submit.style.display = "";
						}
					} 
				},
	
				error: function(data) { 
					console.debug("An error occurred: ", data); 
				},
	
				form: formId,
	
				timeout: 4000,
	
				headers: { "X-Requested-With": "XMLHttpRequest" }
	
		};
	
		//show ajax loader
		if (hideSubmitAction) {
			dojo.byId(submitId).style.display = "none";
		}
	
		if (useAjaxLoader) {
			dojo.byId(loaderId).style.display = "";
		} //block
		dojo.xhrPost(postParams);
	}
	
	removeElement = function( parent, child) {
		
		div = dojo.byId( parent);
		element = dojo.byId( child);
		div.removeChild( element);
		
		showMessage( "Fotka byla smazána!", "#5fa651");
	}
