01/02/2004, 07:12
|
| | | Fecha de Ingreso: diciembre-2002
Mensajes: 488
Antigüedad: 21 años, 11 meses Puntos: 1 | |
El código:
Código:
<html>
<head>
<title</title>
<link rel="STYLESHEET" type="text/css" href="css/comunes.css">
</head>
<body style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">
<table border="10" bordercolor= "navy" cellspacing="0" cellpadding="10">
<tr>
<td>xxxxx xxx x xxxx xxxx</td>
<td>
<script language="JavaScript1.2">
//configurar la ruta de las flechas
var goleftimage='img/flechaizq.gif'
var gorightimage='img/flechader.gif'
//configurara el ancho
var menuwidth=150
//configurar altura
var menuheight=25
//configurar la velocodad del scroll de 1 a 10, 1 es el mínimo
var scrollspeed=5
//contenido del scroll
var menucontents='<nobr><a href="#" onmouseover="cambiaFoto(1)" onmouseout="liberar();"><img src="img/uno.gif" width="22" height="32" alt="foto 1" title="foto 1" border="0" hspace="4"></a><a href="#" onmouseover="cambiaFoto(2)" onmouseout="liberar();"><img src="img/dos.gif" width="22" height="32" alt="foto 2" title="foto 2" border="0" hspace="4"></a><a href="#" onmouseover="cambiaFoto(3)" onmouseout="liberar();"><img src="img/tres.gif" width="22" height="32" alt="foto 3" title="foto 3" border="0" hspace="4"></a><a href="#" onmouseover="cambiaFoto(4)" onmouseout="liberar();"><img src="img/cuatro.gif" width="22" height="32" alt="foto 4" title="foto 4" border="0" hspace="4"></a><a href="#" onmouseover="cambiaFoto(5)" onmouseout="liberar();"><img src="img/cinco.gif" width="22" height="32" alt="foto 5" title="foto 5" border="0" hspace="4"></a><a href="#" onmouseover="cambiaFoto(6)" onmouseout="liberar();"><img src="img/seis.gif" width="22" height="32" alt="foto 6" title="foto 6" border="0" hspace="4"></a><a href="#" onmouseover="cambiaFoto(7)" onmouseout="liberar();"><img src="img/siete.gif" width="22" height="32" alt="foto 7" title="foto 7" border="0" hspace="4"></a></nobr>';
var fotosver= new Array('<img src="img/uno.gif" width="88" height="128" alt="foto 1" title="foto 1" border="0" hspace="4">','<img src="img/dos.gif" width="88" height="128" alt="foto 2" title="foto 2" border="0" hspace="4">','<img src="img/tres.gif" width="88" height="128" alt="foto 3" title="foto 3" border="0" hspace="4">','<img src="img/cuatro.gif" width="88" height="128" alt="foto 4" title="foto 4" border="0" hspace="4">','<img src="img/cinco.gif" width="88" height="128" alt="foto 5" title="foto 5" border="0" hspace="4">','<img src="img/seis.gif" width="88" height="128" alt="foto 6" title="foto 6" border="0" hspace="4">','<img src="img/siete.gif" width="88" height="128" alt="foto 7" title="foto 7" border="0" hspace="4">');
var tFoto = new Array('<span class=t_treb9neg>text foto 1</span>','<span class=t_treb9neg>texto foto 2</span>','<span class=t_treb9neg>texto foto 3</span>','<span class=t_treb9neg>texto foto 4</span>','<span class=t_treb9neg>texto foto 5</span>','<span class=t_treb9neg>texto foto 6</span>','<span class=t_treb9neg>texto foto 7</span>');
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:relative;top:-100;left:-1000">'+menucontents+'</span>')
var actualwidth=''
var cross_scroll, ns_scroll
var loadedyes=0
function liberar(){
loadedyes=1
fillup();
}
function fillup(){
if (iedom){
cross_scroll=document.getElementById? document.getElementById("test2") : document.all.test2
cross_scroll.innerHTML=menucontents
actualwidth=document.all? cross_scroll.offsetWidth : document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_scroll=document.ns_scrollmenu.document.ns_scrollmenu2
ns_scroll.document.write(menucontents)
ns_scroll.document.close()
actualwidth=ns_scroll.document.width
}
loadedyes=1
}
window.onload=fillup
function moveleft(){
if (loadedyes){
if (iedom&&parseInt(cross_scroll.style.left)>(menuwidth-actualwidth)){
cross_scroll.style.left=parseInt(cross_scroll.style.left)-scrollspeed
//alert(cross_scroll.style.left)
}
else if (document.layers&&ns_scroll.left>(menuwidth-actualwidth))
ns_scroll.left-=scrollspeed
}
lefttime=setTimeout("moveleft()",50)
}
function moveright(){
if (loadedyes){
if (iedom&&parseInt(cross_scroll.style.left)<0)
cross_scroll.style.left=parseInt(cross_scroll.style.left)+scrollspeed
else if (document.layers&&ns_scroll.left<0)
ns_scroll.left+=scrollspeed
}
righttime=setTimeout("moveright()",50)
}
if (iedom||document.layers){
with (document){
if (iedom){//alert();
write('<table cellpadding="10" cellspacing="0" border="1" bordercolor="lime">');
write(' <tr>');
write(' <td>');
write(' <table cellpadding="0" cellspacing="0" border="1" bordercolor="red"');
write(' <tr>');
write(' <td>');
write('<div style="position:relative;top:0;left:0;">')//write('<div style="position:relative;width:'+menuwidth+';top:0;left:0">')
write('<a href=#" onMouseover="moveright()" onMouseout="clearTimeout(righttime)"><img src="'+goleftimage+'"border=0 alt="Flecha Izquierda" title="Flecha Izquierda"></a>')
write('</div>')
write(' </td>');
write(' <td>');
//write('<div style="position:relative;top:0;left:0;">')//write('<div style="position:relative;width:'+menuwidth+';top:0;left:0;">')
write('<div style="position:relative;width:'+menuwidth+';height:'+menuheight+';overflow:hidden;">')
write('<div id="test2" style="position:relative;left:0;top:0;">')
write('</div></div>')//write('</div></div></div>')
write(' </td>');
write(' <td>');
write('<div style="position:relative;top:0;left:0;">')//write('<div style="position:relative;width:'+menuwidth+';top:0;left:0">')
write('<a href="#" onMouseover="moveleft()" onMouseout="clearTimeout(lefttime)"><img src="'+gorightimage+'"border=0 alt="Flecha Derecha" title="Flecha Derecha"></a>')
write('</div>')
write(' </td>');
write(' </tr>');
write(' </table>');
write(' </td>');
write(' </tr>');
write(' <tr>');
write(' <td>');
write('<div id="fotos" style="position:relative;top:0;left:0;width:88px;height:100px;">')
write('<img src="img/uno.gif" width="88" height="128" alt="" title="foto" border="0" hspace="4">')
write('</div>')
write(' </td>');
write(' </tr>');
write(' <tr>');
write(' <td>');
write('<div style="position:relative;top:0;left:0;">')
write('<div id="textoFoto" style="position:relative;left:0;top:0;">')
write('<span class="t_treb9neg" >texto foto 1</span>')
write('</div></div>')
write(' </td>');
write(' </tr>');
write('</table>');
}
}
}
function cambiaFoto(cual){
cual = cual - 1
if (iedom){
cross_scroll=document.getElementById? document.getElementById("fotos") : document.all.fotos
cross_scroll.innerHTML=fotosver[cual]
cross_scroll=document.getElementById? document.getElementById("textoFoto") : document.all.textoFoto
cross_scroll.innerHTML=tFoto[cual]
//textoFoto tFoto
actualwidth=document.all? cross_scroll.offsetWidth : document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_scroll=document.fotos.document.fotos1
ns_scroll.document.write(fotosver[cual])
ns_scroll.document.close()
ns_scroll2=document.textoFoto.document.textoFoto1
ns_scroll2.document.write(fotosver[cual])
ns_scroll2.document.close()
actualwidth=ns_scroll.document.width
}
}
</script>
</td>
</tr>
</table>
</body>
</html>
__________________ No es sabio el que sabe sino el que no sabe y quiere aprender |