	/** Displays a message in a modal dialog.
		@param string title : message title
		@param string text : message text
		@param string type : options type sets message image
		@param string customPath : look in this image folder for icon
	 */
	function displayMessage(title, text, type, customPath) {
		$("div#message").empty();
		
		var img = document.createElement("img");
		$(img).attr("alt", title);
		$(img).attr("title", title);
		
		if (customPath) {
			$(img).attr("src", customPath);
		} else if (!type) {
			$(img).attr("src", "/images/message/48/message.png");
		} else {
			$(img).attr("src", "/images/message/48/" + type + ".png");
		}
		
		$("div#message").append(img);
		
		// create span to give hook for message text updates
		var span = document.createElement("span");
		$(span).addClass("message_text");
		$(span).append(text);
		
		$("div#message").append(span);
		
		if (title) { $("div#message").attr("title", title); }
			
		$("div#message").dialog({ 
		    modal: true, 
		    overlay: { 
		        opacity: 0.6, 
		        background: "black" 
		    } 
		});		

	}