function PicNavPage(sgallery,ialbum,ioffset,isgallery) {
if (isgallery == 1) {
$.ajax({
	url: '/ajax/?module=pictures&action=gallery&saction=pictures&gallery=' + sgallery + '&id=' + ialbum + '&offset=' + ioffset,
	type: 'GET',
	dataType: 'html',
	timeout: 1000,
	error: function(XMLHttpRequest, textStatus, errorThrown){
		//alert('Error loading text: This means either our page is broken or your Internet connection is currently unavailable -- it\'s probably the latter.');
	},
	success: function(shtml){
	$('#album-pictures').html(shtml);
	}
});
} else {
$.ajax({
	url: '/ajax/?module=pictures&action=album&saction=pictures&gallery=' + sgallery + '&album=' + ialbum + '&offset=' + ioffset,
	type: 'GET',
	dataType: 'html',
	timeout: 1000,
	error: function(XMLHttpRequest, textStatus, errorThrown){
		//alert('Error loading text: This means either our page is broken or your Internet connection is currently unavailable -- it\'s probably the latter.');
	},
	success: function(shtml){
	$('#album-pictures').html(shtml);
	}
});
}
}