function displayPopup(msg){
	$('#popup-message').dialog({
		autoOpen:false,
		buttons:{'Ok':function(){$(this).dialog("close");}},
		closeOnEscape:true,
		draggable:false,
		modal:true,
		resizable:false,
		title:'Information',
		width:480
	});
	$('#popup-message').html(msg);
	$('#popup-message').dialog('open');
}

function loadNewsItems(page){
	$.get("ajax_load_news_items.php", {page:page}, function(data){
		$("#news-items").html(data);
	});		
}

function loadNews(id){
	$.get("ajax_load_news.php", {id:id}, function(data){
		$("#list-projects").html(data);
	});		
}

function confirmDelete(){
	input_box=confirm("Are you sure you want to delete?\nClick OK to confirm or CANCEL to cancel.");
	if (input_box==true){
		document.admin_delete.submit();
	}
}

function filterProjects(letter, type){
	$.get("ajax_filter_projects.php", {letter:letter, type:type}, function(data){
		$("#list-projects").html(data);
	});		
}

function filterArtists(letter){
	$.get("ajax_filter_artists.php", {letter:letter}, function(data){
		$("#list-artists").html(data);
	});		
}

function loadDownloadsForCategory(type, id){
	$.get("ajax_load_downloads.php", {type:type, id:id}, function(data){
		$("#list-projects").html(data);
	});		
}

function confirmDeleteProjectLink(project, link){
	input_box=confirm("Are you sure you want to delete?\nClick OK to confirm or CANCEL to cancel.");
	if (input_box==true){
		$.get("ajax_delete_project_link.php", {project:project, link:link}, function(data){
			$("#links-project").html(data);
		});
	}		
}

function confirmDeleteArtistLink(artist, link){
	input_box=confirm("Are you sure you want to delete?\nClick OK to confirm or CANCEL to cancel.");
	if (input_box==true){
		$.get("ajax_delete_artist_link.php", {artist:artist, link:link}, function(data){
			$("#links-artist").html(data);
		});
	}		
}
