var dismissafter=1 var initialvisible=0 var IE = document.all?true:false if (!IE) document.captureEvents(Event.MOUSEMOVE) document.onmousemove = posicRatonX; var posicX = 0 var posicY = 0 var x = 0 var y = 0 function posicRatonX(e) { if (IE) { posicX = document.body.scrollLeft+event.clientX-2;//event.clientX + document.body.scrollLeft } else { posicX = e.pageX; } if (posicX < 0){posicX = 0;} return posicX } function posicRatonY(e) { if (IE) { posicY = document.body.scrollTop+event.clientY+20;//event.clientY + document.body.scrollTop } else { posicY = e.pageY } if (posicY < 0){posicY = 0;} return posicY } function followcursor(curscroll) { if (initialvisible==0) { curscroll.style.visibility="hidden"; initialvisible=1; } } function dismissmessage(curscroll) { curscroll.style.visibility="hidden"; } function posicionX() { document.onmouseover = posicRatonX; x=posicX document.onmouseover = posicRatonY; y=posicY return x } function posicionY() { document.onmouseover = posicRatonY; y=posicY return y } /** * Nos crea un objeto MARQUEE al que aņadimos las descripciones de los juegos * Se hace asi para que funcione con exploradores distintos al Internet Explorer */ function creaMarq(id, texto) { var marq = document.createElement("marquee"); marq.id = id; marq.setAttribute("scrolldelay","80"); marq.setAttribute("scrollamount","1"); marq.setAttribute("class","font"); marq.setAttribute("direction","up"); marq.setAttribute("height","50px"); marq.style.position = "absolute"; marq.style.top = y+"px"; marq.style.left = x+"px"; marq.style.width = "200px"; marq.style.height = "50px"; marq.style.border = "1px solid black"; marq.style.background = "white"; marq.style.visibility = "hidden"; marq.innerHTML = texto; document.body.appendChild(marq); return marq; } function showDesc(desc,id) { scroller_msg = desc; nom = "curscroll"+id; if (document.all) { document.write(''+scroller_msg+''); curscroll = document.getElementById(nom); } else if (document.createElement) { curscroll = creaMarq(nom, scroller_msg); } followcursor(curscroll); dismissmessage(curscroll); //if (dismissafter!=0) //setTimeout("dismissmessage(curscroll)",dismissafter*1000) }