var currentPicture = 0;
function showPicture(id){	
	currentPicture = id
	var path = pictures[id];
	var height = pictures_height[id];
	var image = "<img height=\"" + height + "\" src=\"/" + path + "\" border=\"0\" />";
	$("#foto").html(image);
	$("#foto img").hide();
	$("#foto img").fadeIn(500);
	//prev-next buttons
	var totalPictures = pictures.length;
	if (id >= (totalPictures - 1)) {
		$("#fotonav #next").hide();
	} else {
		$("#fotonav #next").show();
	}
	if (id > 0) {
		$("#fotonav #prev").show();
	} else {
		$("#fotonav #prev").hide();
	}	
	

}
function next(){
	currentPicture = currentPicture + 1;
	showPicture(currentPicture);
}
function prev(){
	currentPicture = currentPicture - 1;
	showPicture(currentPicture);	
}
