document.getElementById("photo").src = Photo[n];
DEMO:
<script>
function f() {
document.getElementById(document.getElementById("iId").value).src = document.getElementById("src").value;
}
</script>Img id(i1-i6):
<input id="iId">
<br/>Img url:
<input id="src" />
<br/>
<input type="button" value="Ok" onclick="f()" />
<br/>
<img id="i1" />
<br/>
<img id="i2" />
<br/>
<img id="i3" />
<br/>
<img id="i4" />
<br/>
<img id="i5" />
<br/>
<img id="i6" />