prova così:

codice:
<script language="JavaScript>

var n=0;
var maxfoto=10;

function view(action) {
 if (action=="+") {
  if (n<maxfoto) n++;
 }
 else if (action=="-") {
  if (n>1) n--;
 }
 document.getElementById('gallery').src="foto"+n+".htm";
}

</script>
da richiamare così:

codice:
<input type="button" onClick="view('+');" value="Avanti">

<input type="button" onClick="view('-');" value="Indietro">
mentre, nel tuo iframe, metti:

codice:
<iframe id="gallery" src="foto1.htm">
fammi sapere.