function itemDelete(itemId, kunstId)
{
	var msg = 'Deze foto wissen?';
	if (confirm(msg)) {
		window.location.href = 'kunstenaar.php?kunstId=' + kunstId + '&itemDelete=' + itemId;
	}
}


function kunstenaarDelete(kunstId, itemCount)
{
	var msg = 'Gegevens van deze kunstenaar' + (itemCount ? ' en ' + itemCount + ' foto\'s' : '') + ' wissen?';
	if (confirm(msg)) {
		window.location.href = 'kunstenaars.php?kunstenaarDelete=' + kunstId;
	}
	
}



function initDeleteImage()
{
	var imgDelete = document.getElementById( 'imgDelete' );
	if ( !imgDelete ) {
		return;
	}
	imgDelete.onclick = function() {
		if ( confirm('Deze foto wissen?') ) {
			var newsId = window.location.href.match( /newsId=(\d+)/ );
			window.location = 'newsWijzigen.php?newsId=' + newsId[1] + '&imgDelete=1';
		}
	}
}



function initDeleteNews()
{
	var spans = document.getElementsByTagName( 'SPAN' );
	if ( spans.length == 0 ) {
		return;
	}
	
	for ( var i = 0; i < spans.length; i++ ) {
		
		if ( spans[i].className.indexOf('newsDelete') == -1 ) {
			continue;
		}
		
		spans[i].onclick = function() {
			if ( confirm('Dit bericht wissen?') ) {
				newsId = this.getAttribute( 'newsId' );
				window.location.href = 'nieuws.php?newsDelete=' + newsId;
			}
		}
		
	}
	
}