function imageDelete(gallery, image) {
		var conf = confirm("Do you really want to delete this image?\n\nThis will delete the image from the server.");
    	if(conf == true) {
			var myRequest = new Request({
			method: 'get',
			url: '/saltbox/admin/gallery.php',
			onSuccess: refreshGallery(), 
		
		}).send({data: 'action=imageDelete&gallery=' + gallery + '&image=' + image});
	}
}

function imagePoster(gallery, image){
	
	var myRequest = new Request({
		method: 'get',
		url: '/saltbox/admin/gallery.php',
		
	}).send({data: 'action=imagePoster&gallery=' + gallery + '&image=' + image});
	
}

function galleryDelete(id){
	 var conf = confirm("Do you really want to delete this gallery?\n\nThis will delete all the images from the server.");
     if(conf == true) {
		var myRequest = new Request({
			method: 'get',
			url: '/saltbox/admin/gallery.php',
			data: 'action=galleryDelete&id=' + id,
			onSuccess: refreshGallery(), 
			
		}).send();
	}
}

function galleryCreate(){
	
	var myRequest = new Request({
		method: 'get',
		url: '/saltbox/admin/gallery.php',
		data: 'action=galleryCreate&title=' + $('galleryTitle').value,
		onSuccess: refreshGallery(), 
		
	}).send();
	
}

function refreshGallery(){
	 window.location.reload( true );
	
}