Ayuda con este scritp

Gustavo
13 de Diciembre del 2004
Alguien me puede ayudar con este script, llevo dos dĂ­as intentando hacer que funcione y cambie lo que le cambie no hay forma.
Es un script de husos horarios para colocarlo en mi pĂĄgina web pero no me aparecen los gif de cada huso horario en el mapamundi, solo me aparece el cuadrito con la equis en el centro, como si no encontrara en que carpeta se hallan estos.
He creado incluso las mismas carpetas que venĂ­an de donde cogĂ­ el script, pero nada. Creo que es en esta lĂ­nea (en el final de la funciĂłn zone de javascript ) donde puede provenir el problema que es donde indica donde se hallan los gif:

this.image.src = '/imgviajar/servicios/husos/'+src+'.gif';
}
pero yo he creado las mismas carpetas y directorios y los he colocado ahĂ­ y sigue sin aparecerme nada.

Los nĂșmeros de mas abajo en el script : 110,19,18, ... r1, r2, r3, ... r11, r12 son los nombres de los gifs.
La parte de html si funciona pero donde comienza el javascritp es donde empieza a fallar.
ÂżHay que cambiar algo mĂĄs aparte de la lĂ­nea anterior? Por favor lo saben.
Un saludo y gracias por la molestias.

Este es el script:

<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"><LINK
href="/s_explorer4x.css" type=text/css rel=stylesheet>
<STYLE type=text/css>#capa1 {
Z-INDEX: 1; VISIBILITY: hidden; WIDTH: 449px; CLIP: rect(0px 449px 314px 0px); POSITION: absolute; HEIGHT: 314px
}
#capa2 {
Z-INDEX: 2; LEFT: 0px; WIDTH: 898px; POSITION: absolute; TOP: 0px; HEIGHT: 314px
}
#texto {
Z-INDEX: 1; LEFT: 0px; WIDTH: 449px; CLIP: rect(0px 449px 90px 0px); POSITION: absolute; TOP: 0px; HEIGHT: 90px
}
#GMT {
Z-INDEX: 1; WIDTH: 138px; CLIP: rect(0px 138px 16px 0px); POSITION: absolute; HEIGHT: 16px
}
#mapa {
Z-INDEX: 2; LEFT: 0px; WIDTH: 898px; POSITION: absolute; TOP: 0px; HEIGHT: 314px
}
#franja1 {
Z-INDEX: 100; LEFT: 0px; WIDTH: 449px; POSITION: absolute; TOP: 0px; HEIGHT: 314px; align: left
}
#franja2 {
Z-INDEX: 100; LEFT: 0px; WIDTH: 449px; POSITION: absolute; TOP: 0px; HEIGHT: 314px; align: left
}
A {
FONT-WEIGHT: bold; FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: Arial, sans-serif; TEXT-DECORATION: none
}
A:visited {
FONT-WEIGHT: bold; FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: Arial, sans-serif; TEXT-DECORATION: none
}
A:active {
FONT-WEIGHT: bold; FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: Arial, sans-serif; TEXT-DECORATION: none
}
A:hover {
FONT-WEIGHT: bold; FONT-SIZE: 11px; COLOR: #000000; FONT-FAMILY: Arial, sans-serif; TEXT-DECORATION: underline
}
</STYLE>

<META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD>
<BODY><BR>
<CENTER>
<TABLE cellSpacing=0 cellPadding=1 width=450 bgColor=#862020 border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR align=middle>
<TD colSpan=7><IMG height=27
src="husos_archivos/hotamundialtit01.gif" width=449></TD></TR>
<TR align=middle>
<TD bgColor=#f7f3d8 colSpan=7>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD><IMG height=90 src="husos_archivos/blank.gif" width=449
name=spaceText></TD></TR></TBODY></TABLE></TD></TR>
<TR vAlign=bottom height=16>
<TD width=49 bgColor=#862020><A onmouseup=stop();
onmousedown=start(3); onmouseover=start(1); onmouseout=stop();
href="javascript://"><IMG height=15
src="husos_archivos/flechasizq01.gif" width=49 border=0></A></TD>
<TD width=90 bgColor=#862020><IMG height=15
src="husos_archivos/blank.gif" width=90></TD>
<TD width=16 bgColor=#f7f3d8><IMG height=16
src="husos_archivos/esquinizq01.gif" width=16></TD>
<TD align=middle width=138 bgColor=#f7f3d8><IMG height=16
src="husos_archivos/blank.gif" width=138 name=spaceGMT></TD>
<TD align=right width=16 bgColor=#f7f3d8><IMG height=16
src="husos_archivos/esquinder01.gif" width=16></TD>
<TD align=right width=90 bgColor=#862020><IMG height=15
src="husos_archivos/blank.gif" width=90></TD>
<TD align=right width=49 bgColor=#862020><A onmouseup=stop();
onmousedown=start(-3); onmouseover=start(-1); onmouseout=stop();
href="javascript://"><IMG height=15
src="husos_archivos/flechasder01.gif" width=49
border=0></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD noWrap><IMG height=314 src="husos_archivos/blank.gif" width=449
name=spaceMap></TD></TR></TBODY></TABLE>
<DIV id=capa1>
<DIV id=capa2>
<DIV id=franja1></DIV>
<DIV id=franja2></DIV>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD noWrap><IMG height=314 src="husos_archivos/mapamundo01.gif"
width=449><IMG height=314 src="husos_archivos/mapamundo01.gif"
width=449></TD></TR></TBODY></TABLE></DIV></DIV>
<DIV id=texto></DIV>
<DIV id=GMT></DIV><BR></CENTER>
<SCRIPT language=JavaScript> <!---

var topefin=449;
var posx=0;
var objeto;
var tempo=null;

function colocar() {

objeto='document.all.capa1.document.all.capa2.style';
fr1='document.all.capa1.document.all.capa2.document.all.franja1.style';
fr2='document.all.capa1.document.all.capa2.document.all.franja2.style';
doc=document.all["texto"];
docGMT=document.all["GMT"];
adjust(document.all.spaceMap,document.all.capa1);
adjust(document.all.spaceText,document.all.texto);
adjust(document.all.spaceGMT,document.all.GMT);
document.all.capa1.style.visibility="visible";
docFr1=document.all.franja1;
docFr2=document.all.franja2;

escribir();
}


function adjust(obj1, obj2) {
var eL=0;
var eT=0;
while(obj1&&obj1.tagName!="BODY"){
eT+=obj1.offsetTop;
eL+=obj1.offsetLeft;
obj1=obj1.offsetParent;
}
obj2.style.left=eL;
obj2.style.top=eT;
}



function zone(timediff,src,x,a,b,time,cities) {
this.timediff=timediff*60000;
this.src=src;
this.x=x;
this.a=a;
this.b=b;
this.time=time;
this.cities=cities;
this.image=new Image;
this.image.src = '/imgviajar/servicios/husos/'+src+'.gif';
}

tz = new Array();
var i=0;

tz[i++]=new zone(-660,"l10",3,205,232,'GMT-10:00','USA: HonolulĂș');
tz[i++]=new zone(-600,"l9",9,232,265,'GMT-09:00','USA: Anchorage');
tz[i++]=new zone(-540,"l8",49,265,282,'GMT-08:00','USA y CANADÁ: Los Ángeles, San Francisco, Seattle, VancĂșver. MÉJICO: Tijuana.');
tz[i++]=new zone(-480,"l7",54,282,305,'GMT-07:00','USA y CANADÁ: Denver, Edmonton, Kansas City, Phoenix, Salt Lake City');
tz[i++]=new zone(-420,"l6",85,305,327,'GMT-06:00','USA y CANADÁ: Dallas, Cincinnati, Nueva Orleans, Winnipeg, EL SALVADOR: El Salvador, GUATEMALA: Guatemala, NICARAGUA: Managua. MÉJICO: CancĂșn, MĂ©jico D.F., San JosĂ©, Tegucigalpa');
tz[i++]=new zone(-360,"l5",107,327,350,'GMT-05:00','USA y CANADÁ: Atlanta, Boston, Chicago, Miami, Montreal, Nueva York, Orlando, Filadelfia, Toronto, Washington D.C.. CUBA: La Habana. HAITI: Puerto Príncipe. SUDAMÉRICA: Bogotá, Lima, Quito');
tz[i++]=new zone(-300,"l4",115,350,360,'GMT-04:00','CANADÁ: St John\'s, Halifax. BAHAMAS: Nassau, SUDAMÉRICA: Asunción, Caracas, La Paz, Santiago, Santo Domingo, Punta Arenas');
tz[i++]=new zone(-270,"l35",151,360,370,'GMT-03:30','CANADÁ: Terranova');
tz[i++]=new zone(-240,"l3",121,370,390,'GMT-03:00','Groenlandia. SUDAMÉRICA: Brasilia, Buenos Aires, Montevideo, Sao Paolo, Río de Janeiro');
tz[i++]=new zone(-120,"l1",173,390,406,'GMT-01:00','Groenlandia');
tz[i++]=new zone(-60,"0",180,406,432,'GMT+00:00','IRLANDA: Dublín. GRAN BRETAÑA: Edimburgo, Londres. PORTUGAL: Lisboa, ISLANDIA: Reikiavik. COSTA DE MARFIL: Abidjan. GUINEA-BISSAU: Bissau. MARUECOS: Casablanca. SENEGAL: Dakar. SIERRA LEONE: Freetown.');
tz[i++]=new zone(0,"r1",195,432,449,'GMT+01:00','EUROPA OCCIDENTAL: Amsterdam, Barcelona, BerlĂ­n, Berna, Bratislava, Budapest, Bruselas, Copenhague, Madrid, Oslo, ParĂ­s, Roma, Sarajevo, SofĂ­a, Estocolmo, Praga, Viena, Varsovia, Zagreb, Zurich. ARGELIA: Argel. GABÓN: Libreville. ANGOLA: Luanda. LIBIA: TrĂ­poli. TÚNEZ: TĂșnez');
tz[i++]=new zone(0,"r1",195,0,05,'GMT+01:00','EUROPA OCCIDENTAL: Amsterdam, Barcelona, BerlĂ­n, Berna, Bratislava, Budapest, Bruselas, Copenhague, Madrid, Oslo, ParĂ­s, Roma, Sarajevo, SofĂ­a, Estocolmo, Praga, Viena, Varsovia, Zagreb, Zurich. ARGELIA: Argel. GABÓN: Libreville. ANGOLA: Luanda. LIBIA: TrĂ­poli. TÚNEZ: TĂșnez');
tz[i++]=new zone(60,"r2",224,05,23,'GMT+02:00','JORNANIA: Amman. TURQUÍA: Estambul, Ankara. GRECIA: Atenas. LÍBANO: Beirut. RUMANÍA: Bucarest. FINLANDIA: Helsinki. ISRAEL: JerusalĂ©n, Tel Aviv. SIRIA: Petra. BIELORUSIA: Minks. UCRANIA: Kiev. LETONIA: Riga, ESTONIA: Tallinn, EGYPTO: El Cairo. ZIMBABWE: Harare. BOTWANA: Gaborone. SUDÁN: Khartoum. UGANDA: Kampala. RUANDA: Kigali. ZAMBIA: Lusaka. SUDÁFRICA: Pretoria, Johannesburgo');
tz[i++]=new zone(120,"r3",242,23,42,'GMT+03:00','RUSIA: MoscĂș, San Petersburgo, Volgogrado. IRAK: Bagdad. Kuwait. ARABIA SAUDÍ: Riyadh, ETIOPIA: Addis Ababa, SOMALIA: Mogadiscio, KENYA: Nairobi');
tz[i++]=new zone(150,"r35",269,42,60,'GMT+03:30','IRÁN: Teherån');
tz[i++]=new zone(180,"r4",251,60,73,'GMT+04:00','AZERBAIJAN: Baku, GEORGIA: Tbilisi, EMIRATES ÁRABES: Abu Dhabi, OMAN: Masqat');
tz[i++]=new zone(210,"r45",291,73,80,'GMT+04:30','AFGANISTAN: KabĂșl');
tz[i++]=new zone(240,"r5",264,80,88,'GMT+05:00','TURKMENISTAN: Ashgabat, PAKISTAN: Islamabad, PAKISTAN: Karachi, UZBEKISTAN: Toshkent');
tz[i++]=new zone(270,"r55",297,88,98,'GMT+05:30','INDIA: Bombay, Calcuta, Colombo, MadrĂĄs, Nueva Delhi');
tz[i++]=new zone(300,"r6",266,98,105,'GMT+06:00','KAZAKHSTAN: Almaty, Astana. BANGLADESH: Dhaka');
tz[i++]=new zone(330,"r65",320,105,111,'GMT+06:30','MYANMAR: Yangon');
tz[i++]=new zone(360,"r7",308,111,120,'GMT+07:00','TAILANDIA: Bangkok. VIETNAM: Hanoi, Ho Chi Minh. INDONESIA: Jakarta. CAMBOYA: Phnon Penh');
tz[i++]=new zone(420,"r8",299,120,132,'GMT+08:00','BRUNEI: Bandar seri begawan. MALASIA: Kuala Lumpur. FILIPINAS: Manila. AUSTRALIA: Perth. SINGAPUR: Singapur. TAIWAN: Taipei. CHINA: Chongqing, Hong Kong, PequĂ­n, Urumqi.');
tz[i++]=new zone(480,"r9",346,132,142,'GMT+09:00','COREA DEL NORTE: Pyongyang. COREA DEL SUR: SeĂșl. JAPÓN: Tokio. RUSIA: Yakutsk');
tz[i++]=new zone(510,"r95",361,142,150,'GMT+09:30','AUSTRALIA: Adelaida, Darwin');
tz[i++]=new zone(540,"r10",369,150,168,'GMT+10:00','AUSTRALIA: Camberra, Melburne, Sydney, Hobart, NUEVA GUINEA: Port Moresby. RUSIA: Vladivostok.');
tz[i++]=new zone(600,"r11",391,168,183,'GMT+11:00','RUSIA: Magadan.');
tz[i++]=new zone(660,"r12",404,183,205,'GMT+12:00','NUEVA ZELANDA: Auckland, ISLAS MARSHALL. RUSIA: Anadyr, Kamtchatski');


var franja_id=-1;
var gmt_time="";
var gmt_timediff=0;
function escribir() {
if (tempo) clearTimeout(tempo);
html="";
for(i=0;i<tz.length;i++) {
if (-posx>=tz[i].a && -posx<tz[i].b) {
if (i==franja_id) {return;}
franja_id=i;
html="<html><body><table height=90 width=449 border=0 cellspacing=0 cellpadding=3><tr><td align=center><font face=Verdana size=1>"+tz[i].cities+"</font></td></tr></table></body></html>";
gmt_time=tz[i].time;
gmt_timediff=tz[i].timediff;
html_franja="<html><body><table height=314 width=449 border=0 cellspacing=0 cellpadding=0><tr><td><img src=/imgviajar/servicios/husos/"+tz[franja_id].src+".gif></td></tr></table></body><html>";
}
}

doc.innerHTML=html;
docFr1.innerHTML=html_franja;
docFr2.innerHTML=html_franja;

eval(fr1+'.left='+(tz[franja_id].x));
eval(fr2+'.left='+(449+tz[franja_id].x));
showTime();
}

function start(d) {
salto=d;
go();
}

function go() {
posx+=salto;
if(posx>0) {
posx-=449;
}
if(posx<=-topefin) {
posx+=449;
}
if(posx<=0 && posx>-topefin) {
escribir();
eval(objeto+'.left='+posx);
tempo=setTimeout('go()',50)
} else {
clearTimeout(tempo);
}
}

function stop() {
clearTimeout(tempo);
}


var serverHour= 00;
var serverMinutes = 08;
var serverSeconds = 25;
var serverTime = (new Date(0,0,1,serverHour,serverMinutes,serverSeconds)).getTime();
var browserTime = (new Date()).getTime();
var tempo = null;


function showTime() {
now = new Date((new Date()).getTime()+serverTime-browserTime+gmt_timediff);
hournow= now.getHours();
minutesnow = now.getMinutes();
secondsnow = now.getSeconds();
tv = ((hournow <10) ? "0" : "") + hournow + ((minutesnow <10) ? ":0" : ":") + minutesnow + ((secondsnow < 10) ? ":0" : ":") + secondsnow;
gmt_html="<font face=Verdana size=1><b><font color=#862020>"+tv+"</font> ("+gmt_time+")</b></font>";

docGMT.innerHTML=gmt_html;

tempo = setTimeout("showTime()", 1000);

}

window.onload=colocar;
//---> </SCRIPT>
</BODY></HTML>

Gustavo
13 de Diciembre del 2004
Eoooooooooooooooopss alguien sabe algo. Es que yo de javascript no se practicamente nada.
Un saludo.

jose_java
13 de Diciembre del 2004
EstĂĄ claro que el navegador no encuentra los gifs. Porque no pruebas a ponerle la ruta completa de la imagen a todas las etiquetas <img> ?
Por ejemplo:
http://www.imagenes.com/imagenes/imagen1.gif

Y asĂ­ todas.