// Parts (c) 2001 Moon on a Stick Design

document.writeln('<STYLE>');
document.writeln('	DIV.message { color: yellow; font-family: Arial, Helvetica, Sans-Serif;  font-size: 8pt; position: absolute; visibility: hidden; z-index: 3 }');
document.writeln('	DIV.shadow { color: #004668; font-family: Arial, Helvetica, Sans-Serif; font-size: 8pt; position: absolute; visibility: hidden; z-index: 2 }');
document.writeln('</STYLE>');

message=message.split("")

if (!(document.layers)){
	document.writeln('<div id="ys" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
}
for (i=0;i<=message.length-1;i++) {
	document.write("<div id='span_shadow"+i+"' class='shadow'>")
	document.write(message[i])
	document.write("</div>")
}
for (i=0;i<=message.length-1;i++) {
	document.write("<div id='span"+i+"' class='message'>")
	document.write(message[i])
	document.write("</div>")
}
if (!(document.layers)){
	document.writeln('</div></div>');
};

if (document.layers){
	document.captureEvents(Event.MOUSEMOVE);
}

document.onmousemove = handlerMM;


var xpos=new Array()
for (i=0;i<=message.length-1;i++) {
	xpos[i]=-50
}

var ypos=new Array()
for (i=0;i<=message.length-1;i++) {
	ypos[i]=-50
}

function handlerMM(e){
	x = (document.layers) ? e.pageX : event.clientX
	y = (document.layers) ? e.pageY : event.clientY
	flag=1
}

function textfollow() {
	if (flag==1 && document.all) {
	//IE
		if (! visible) {
			for (i=0; i<message.length-1; i++) {
				eval("span_shadow"+i+".style.visibility='visible'");
				eval("span"+i+".style.visibility='visible'");
			};
			visible=true;
		};

   		for (i=message.length-1; i>=1; i--) {
			xpos[i]=xpos[i-1]+step
			ypos[i]=ypos[i-1]
   		}
		xpos[0]=x+step+5
		ypos[0]=y-5

		for (i=0; i<message.length-1; i++) {
			var thisspan;
	
			thisspan = eval("document.all.span_shadow"+(i)+".style")
			thisspan.visibility="visible";
			thisspan.posLeft=xpos[i]+4
			thisspan.posTop=ypos[i]+3
	
			thisspan = eval("document.all.span"+(i)+".style")
			thisspan.posLeft=xpos[i]
			thisspan.posTop=ypos[i]
	   	}
	}

	if (flag==1 && document.layers) {
	// NN
		if (! visible) {
			for (i=0; i<message.length-1; i++) {
				eval("document.span_shadow"+i+".visibility='visible'");
				eval("document.span"+i+".visibility='visible'");
			};
			visible=true;
		};

		for (i=message.length-1; i>=1; i--) {
 			xpos[i]=xpos[i-1]+step
			ypos[i]=ypos[i-1]
	   	}
		xpos[0]=x+step+5
		ypos[0]=y

		for (i=0; i<message.length-1; i++) {
			var thisspan;

   			thisspan = eval("document.span_shadow"+i)
  			thisspan.left=xpos[i]+4
			thisspan.top=ypos[i]+3
  			thisspan = eval("document.span"+i)
  			thisspan.left=xpos[i]
			thisspan.top=ypos[i]
    		}
	}
	var timer=setTimeout("textfollow()",10)
}

