function nextPhoto(id) {
	var current = $F(id+'_current_photo');
	var nextElement = $(current).next();
	if(nextElement == false || nextElement == null) {
		nextElement = $(id+'_1');
	}
	$(current).hide();
	nextElement.show();
	$(id+'_current_photo').value = nextElement.identify();
}

function previousPhoto(id) {
	var current = $F(id+'_current_photo');
	var prevElement = $(current).previous();
	if(prevElement == false || prevElement == null) {
		prevElement = $(id+'_last');
	}
	$(current).hide();
	prevElement.show();
	$(id+'_current_photo').value = prevElement.identify();
}