var ie4 = (document.all) ? true : false; var ns4 = (document.layers) ? true : false; var ns6 = (document.getElementById && !document.all) ? true : false; var oldx, oldy, timer; var destx = screen.width/2; var desty = 100; oldx=0; oldy = desty; var content = '
'; content += ''; content += ''; content += '
\'Listen
'; content += '\'buju\'
\'Close
'; writetolayer('newlayer', content, oldx, oldy); timer = setTimeout('show()', 100); function hidelayer(lay) { if (ie4) {document.all[lay].style.visibility = "hidden";} if (ns4) {document.layers[lay].visibility = "hide";} if (ns6) {document.getElementById([lay]).style.display = "none";} } function showlayer(lay) { if (ie4) {document.all[lay].style.visibility = "visible";} if (ns4) {document.layers[lay].visibility = "show";} if (ns6) {document.getElementById([lay]).style.display = "block";} } function writetolayer(lay,txt, x, y) { if (ie4) { document.all[lay].style.pixelLeft = x; document.all[lay].style.pixelTop = y; document.all[lay].innerHTML = txt; } if (ns4) { document[lay].left = x; document[lay].top = y; document[lay].document.write(txt); document[lay].document.close(); } if (ns6) { over = document.getElementById([lay]); over.style.left = x + 'px'; over.style.top = y + 'px'; range = document.createRange(); range.setStartBefore(over); domfrag = range.createContextualFragment(txt); while (over.hasChildNodes()) { over.removeChild(over.lastChild); } over.appendChild(domfrag); } } function movelayer(lay, x, y) { if (ie4) { document.all[lay].style.pixelLeft = x; document.all[lay].style.pixelTop = y; } if (ns4) { document[lay].left = x; document[lay].top = y; } if (ns6) { over = document.getElementById([lay]); over.style.left = x + 'px'; over.style.top = y + 'px'; } } function mouseover() { clearTimeout(timer); } function mouseout() { show(); } function hide() { hidelayer('newlayer'); } function show() { movelayer('newlayer', oldx, oldy); if (oldx <= destx) { oldx+=5; timer = setTimeout('show()', 100); } }