Ver Mensaje Individual
  #5 (permalink)  
Antiguo 06/07/2006, 08:48
Avatar de Gaby_Corr
Gaby_Corr
 
Fecha de Ingreso: junio-2005
Mensajes: 672
Antigüedad: 19 años, 7 meses
Puntos: 0
bueno mira puse la funcion q escribiste la puse antes de la funcion azar, pero no supe donde mandarla llamar, aparte como que se trababa la pag de internet mira asi lo puse:
Código:
<script>
var imagenes = [
	"images/arko.gif",
	"images/vida.gif",
	"images/vindi.jpg",
	"images/ara.jpg",
	"images/infit.gif",
	"images/apoyfo.gif",
	"images/ingresos_ad.gif"
];

var enlaces = [
	"http://www.espio.com",
	"http://www.google.com",
	"http://www.expsa.com",
	"http://www.proi.com.mx",
	"http://www.sucaricatura.com/2002/mini/2002H005.jpg",
	"http://www.sucaricatura.com/2002/mini/2002H006.jpg",
	"http://www.sucaricatura.com/2002/mini/2002H007.jpg"
];

function distinto() {
 var entrada = distinto.arguments;
 dife = true;
 for (var i = 0; i < entrada.length - 1; i ++)
  for (var j = i + 1; j < entrada.length; j ++)
   dife = dife && (entrada[i] != entrada[j])
 return dife;
}

function azar()    { 
    var temp = new Array(4); 
    temp[0] = Math.floor(Math.random() * imagenes.length); 
    do 
        temp[1] = Math.floor(Math.random() * imagenes.length); 
    (distinto(temp[0], temp[1], temp[2], temp[3]));  **aki es donde lo cambie**
    do 
        temp[2] = Math.floor(Math.random() * imagenes.length); 
    while (temp[0] == temp[1] || temp[0] == temp[2] || temp[1] == temp[2]) 
    do 
        temp[3] = Math.floor(Math.random() * imagenes.length); 
    while (    temp[0] == temp[1] || 
        temp[0] == temp[2] || 
        temp[1] == temp[2] || 
        temp[0] == temp[3] || 
        temp[1] == temp[3] || 
        temp[2] == temp[3]
  		
		
) 


//    alert(document.links.length); 
    document.getElementById("enlace1").setAttribute("href", enlaces[temp[0]]); 
    document.getElementById("enlace2").href = enlaces[temp[1]]; 
    document.getElementById("enlace3").href = enlaces[temp[2]]; 
    document.getElementById("enlace4").href = enlaces[temp[3]];
    document.images.imagen1.src = imagenes[temp[0]]; 
    document.images.imagen2.src = imagenes[temp[1]]; 
    document.images.imagen3.src = imagenes[temp[2]]; 
    document.images.imagen4.src = imagenes[temp[3]]; 
 
} 
</script>

</head> 
<body onload=azar()> 

<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><a href="#" name="enlace1" target="_blank"><img src="" name=imagen1></a></td>
<td><a href="" name=enlace2 target="_blank"><img src="" name=imagen2></a></td>
<td><a href="" name=enlace3 target="_blank"><img src="" name=imagen3></a></td>
</tr>
<tr>
<td><a href="" name=enlace4 target="_blank"><img src="" name=imagen4></a></td>
</tr>
</table>
mmm que tengo mal ???
__________________
" Recuerda , estas donde debes estar ..."