Me dan una mano?
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<script>
var directorio="";
var indice=0;
var miarray=new Array("http://www.revolucion7.com/wp-content/uploads/2009/10/liderazgo_lumaxart_ccbysa-300x300.jpg", "http://www.ps3attitude.com/wp-content/uploads/2008/10/guitar_hero_kiss_gene_simmonds-300x300.jpg", "http://www.absolutgerona.com/wp-content/uploads/2009/10/pelea1-300x300.gif");
var miarray_txt=new Array("http://www.google.com","http://www.youtube.com","http://www.yahoo.com");
function precarga(){
for(i=0;i<miarray.length;i++){
eval("imagen"+i+"=new Image();");
eval("imagen"+i+".src=" + "\"" +directorio+miarray[i]+"\";");
}
}
function cambia(como){
if(como=='menos'){
indice--;}else{indice++;}
if (indice < 0) indice = miarray.length - 1;
if (indice > miarray.length-1) indice = 0;
document.getElementById("cama").src=directorio+miarray[indice];
document.getElementById('leyenda').firstChild.nodeValue = (indice+1) + " de " + miarray.length;
}
</script>
</head>
<body>
<div style="width:300px; height:auto; border:1px #00FF66 solid;">
<script>precarga();</script>
<div align="center">
<img src="http://www.revolucion7.com/wp-content/uploads/2009/10/liderazgo_lumaxart_ccbysa-300x300.jpg" id="cama" name="cama">
</div>
<div style="text-align:right; ">
<a href="javascript:cambia('menos')">
<img src="img/atras_galeria.jpg" width="17" height="17" border="0" align="absbottom"> </a>
<strong>
<div id="leyenda" style="display:inline; color:#FF8000;font-family:Verdana, Arial, Sans-Serif;font-size:8pt;font-weight:bold; text-align:center">
1 de 3 </div>
</strong>
<a href="javascript:cambia('mas')">
<img src="img/adelante_galeria.jpg" width="17" height="17" border="0" align="absbottom">
</a>
</div>
</div>
</body>
</html>