function insertPictures() {
	
		jQuery.post('?fnc=Foto&proc=admin&do=insertimages', { dir: $F('dir'), album: $F('album') }, function(data){
	//			load('index.php?fnc=Foto&proc=admin', 'GET', 'content');
				document.getElementById('message').innerHTML = data;
		} );
	
	
}
function albumRequest() {

		jQuery.post('?fnc=Foto&proc=admin&do=submitalbum', { albumname: $F('name') }, function(data){
			load('index.php?fnc=Foto&proc=admin', 'GET', 'content');
		} );
		
}
function myResponse(req){
		//alert(req.responseText);
		load('index.php?fnc=Foto&proc=admin', 'GET', 'content');
}

function deletePicture(album,photo)
{
	var resp = confirm('Are you sure you want to delete this photo?');
	
	if (resp == true ) {

	jQuery.post('?fnc=Foto&proc=admin&do=delphoto', {album: album, photo:photo}, function(data){
			load('index.php?fnc=Foto&proc=admin', 'GET', 'content');
		} );
		
	}
	
}
function deleteAlbum(album)
{
	var resp = confirm('Are you sure you want to delete this album? All pictures will be deleted');
	
	if (resp == true ) {
		
		jQuery.post('?fnc=Foto&proc=admin&do=delalbum', {album: album}, function(data){
			load('index.php?fnc=Foto&proc=admin', 'GET', 'content');
		} );
		
	}
	
}