
	removeElement = function( rmElement, message) {
		
		$('#'+rmElement).fadeOut();
		$('#'+rmElement).remove();
		
		if( message.length != 0) {
			showMessage( message, "#5fa651");
		}
	};
	
	removeItem = function( url, rmElement) {
		
		$( '#'+rmElement).fadeTo('slow', 0.4);
		$.get( 
			url, 
			function(message) {
				removeElement( rmElement, message);
			}, 
			'json'
		);
	};
	
	updateSelect = function( theSelect, destinationUrl) {

		$(theSelect).after( renderLoading());
	    selectedIndex = theSelect.options[theSelect.selectedIndex].value;
		$.get( destinationUrl, {ID: selectedIndex}, function( data) {
			$('#'+data.selectID).html(data.code);
			removeLoading();
		}, "json");
	};
	
	renderLoading = function() {
		return '<span id="loading-select"><img src="/images/loading.gif" alt="loading" /></span>';
	};
	
	removeLoading = function() {
		$('#loading-select').remove();
	};

