problema de navegacion no creo que sea, a continuacion un ejemplo usando tu codigo
Código:
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Foros del Web - Test</title>
<script type='text/javascript'>
var posicionActual = 0, cuantasImagenes = 10;
function cargarImagen(posicion){
posicionActual+=posicion;
if(posicionActual==-1) posicionActual=cuantasImagenes-1;
if(posicionActual==cuantasImagenes) posicionActual=0;
document.getElementById('estado').innerHTML='Carga ndo imagen ...' + posicionActual;
document.getElementById('foto').src='imagen.php?id='+posicionActual;
}
</script>
<style type="text/css">
</style>
</head>
<body>
<a href='#' onclick="cargarImagen(-1); return false;">Anterior</a>
<a href='#' onclick="cargarImagen(1); return false;">Sig.</a>
<p id="estado"></p>
<img id="foto" />
</body></html>