Ver Mensaje Individual
  #5 (permalink)  
Antiguo 11/10/2005, 08:58
luzin
 
Fecha de Ingreso: abril-2005
Mensajes: 169
Antigüedad: 19 años, 1 mes
Puntos: 0
Hola Pinchoso muchas gracias por responder y con tanta brevedad, pegue tu codigo tal que asi quedo....

<script type='text/JavaScript' src='fotos.js'> </script>
<script>
var afoto = new Array()
var idx=0
function inicio()
{
for (a=0;a<fotos.length;a++)
{
afoto[a] = new Image()
afoto[a].src = fotos[a]
}
muestra()
}

function pasa(dir)
{
if (dir=="i")
{
idx--
if (idx < 0) idx = afoto.length - 1
}
else
{
idx++
if (idx == afoto.length) idx = 0
}
muestra()
}

function muestra()
{
document.images["fotico"].src = afoto[idx].src
document.forms[0].leyenda.value = "Foto " + (idx+1) + " de " + afoto.length
}
</script>
<SCRIPT LANGUAGE="JavaScript">
<!--
var isNav4, isIE4;
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
isNav4 = (navigator.appName == "Netscape") ? 1 : 0;
isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
}
function fitWindowSize() {
if (isNav4) {
window.innerWidth = document.layers[0].document.images[0].width;
window.innerHeight = document.layers[0].document.images[0].height;
}
if (isIE4) {
window.resizeTo(500, 500);
width = 500 - (document.body.clientWidth - document.images[0].width);
height = 500 - (document.body.clientHeight - document.images[0].height);
window.resizeTo(width, height);
}
}
// -->
</script>
<BODY onLoad="fitWindowSize()">
<form>
<input type="button" value="anterior" onclick="pasa('i')">
<input type="button" value="siguiente" onclick="pasa('d')">
</form>
<img id="fotico">
</body>


Y nada que no tira para nada......