
B = document.all;
C = document.layers;
T1 = new Array("http://www.reg.combr.net/imagens/mousevisabistro.gif", 75, 58)
nos = parseInt(T1.length/3)
rate = 25

for (i = 0; i < nos; i++) { 
	createContainer("CUR"+i, i*10, i*10, i*3+1, i*3+2, "", "<img src = '"+T1[i*3]+"' width = "+T1[(i*3+1)]+" height = "+T1[(i*3+2)]+" border = 0>")
}

function createContainer(N, Xp, Yp, W, H, At, HT, Op, St){with (document){write((!B) ? "<layer id = '"+N+"' z-index = 300 left = "+Xp+" top = "+Yp+" width = "+W+" height = "+H : "<div id = '"+N+"'"+" style = 'position:absolute; left:"+Xp+"; top:"+Yp+"; Z-INDEX: 300;width:"+W+"; height:"+H+"; ");if(St){if (C)write(" style = '");write(St+";' ")}else write((B)?"'":"");write((At) ? At+">" : ">");write((HT) ? HT : "");if (!Op)closeContainer(N)}}

function closeContainer(){document.write((B)?"</div>":"</layer>")}

function getXpos(N){return (B) ? parseInt(B[N].style.left) : C[N].left}

function getYpos(N){return (B) ? parseInt(B[N].style.top) : C[N].top}

function moveContainer(N, DX, DY){c = (B) ? B[N].style : C[N];c.left = DX;c.top = DY}

function cycle(){for (i = 0;i<(nos-1);i++){moveContainer("CUR"+i, getXpos("CUR"+(i+1)), getYpos("CUR"+(i+1)))}}

function newPos(e) {
x = ((B)?event.clientX+document.body.scrollLeft:e.pageX) + 2
y = ((B)?event.clientY+document.body.scrollTop:e.pageY) + 2
		moveContainer("CUR"+(nos-1), x, y)
}

if (document.layers) 
	document.captureEvents(Event.MOUSEMOVE)
else if (B)
		document.body.onscroll = newPos
	document.onmousemove = newPos
setInterval("cycle()", rate)
