<!--
//define message content
var message = "SunDelight Space...",bgcolor="ffffff";
message=message.split(""); 
var times=message.length;

//predefine preferences
var x,y,xspace,yspace,speed,colorv="ff0000";
var xpos=new Array(),ypos=new Array();
for (i=0;i<=times-1;i++)xpos[i]=-50;
for (i=0;i<=times.length-1;i++)ypos[i]=-50;

//predefine switchs
var flag=false,Pcolorstyle=3,runflag=true;

//predefine colorgraind
var cyclecolor=new Array(times),runcolor=new Array(times);
var keycolor=0,randkey=-1,basestep=0,keycstate=true;

function preset(xval,yval,spval,xreval,yreval){	
	xspace=xval*xreval;yspace=yval*yreval;speed=spval;
	bgcolor=(document.bgColor.length == 7)?document.bgColor.substring(1,7):"ffffff";
	makecolor();
}

function makecolor(){//make a color cycle
	if (Pcolorstyle > 0){
		hexa = new Array(16);
		for(var i = 0; i < 10; i++)hexa[i] = i;hexa[10]="a"; hexa[11]="b"; hexa[12]="c";hexa[13]="d"; hexa[14]="e"; hexa[15]="f";
		var alycolor=new Array(parseInt("0x"+colorv.substring(0,2)),parseInt("0x"+colorv.substring(2,4)),parseInt("0x"+colorv.substring(4,6)));
		var alybgcolor=new Array(parseInt("0x"+bgcolor.substring(0,2)),parseInt("0x"+bgcolor.substring(2,4)),parseInt("0x"+bgcolor.substring(4,6)));
		var colordelta=new Array((alycolor[0]-alybgcolor[0])/times,(alycolor[1]-alybgcolor[1])/times,(alycolor[2]-alybgcolor[2])/times);
		for(i=0;i<times;i++){
			var rgb1=alycolor[0]-colordelta[0]*i;
			var rgb2=alycolor[1]-colordelta[1]*i;
			var rgb3=alycolor[2]-colordelta[2]*i;
			cyclecolor[i]="#"+hexa[Math.floor(rgb1/16)] + hexa[Math.floor(rgb1%16)]+hexa[Math.floor(rgb2/16)] + hexa[Math.floor(rgb2%16)]+hexa[Math.floor(rgb3/16)] + hexa[Math.floor(rgb3%16)];
		}
	}else for(i=0;i<times;i++)cyclecolor[i]="#"+colorv;
}

makecolor();

for (i=0;i<times;i++){ 
 	var towrit = "<span id=\"span"+i+"\" style=\" FONT-WEIGHT: bold; FONT-SIZE: 12pt; VISIBILITY: visible; COLOR:"+cyclecolor[i]+"; font-family:mono; POSITION: absolute; TOP: -50px \" >"; 
 	document.write(towrit); 
 	document.write(message[i]);
 	document.write("</span>");
} 

if (document.layers)document.captureEvents(Event.MOUSEMOVE); 
document.onmousemove = handlerMM; 

function AKmakesnake() { //make fly snake
	if (Pcolorstyle >2){ //exchange color
		for(i=0;i<times;i++)if(keycolor-i>-1)runcolor[keycolor-i]=(keycstate)?cyclecolor[i]:cyclecolor[times-i-1];
		for(i=0;i<times;i++)if(keycolor+i<times)runcolor[keycolor+i]=(keycstate)?cyclecolor[i]:cyclecolor[times-i-1];
		if(keycolor == times){
			keycolor=0;
			keycstate=(keycstate)?false:true;
		}else keycolor++;
	}
	if(flag){
    	for (i=times-1; i>=1; i--) {
   			xpos[i]=xpos[i-1]+Math.abs(xspace);
			ypos[i]=ypos[i-1];
    	}
		if (runflag){
			xpos[0]=x+xspace+basestep*2;
			ypos[0]=y+yspace+basestep*2;
			basestep += randkey;
			if (Math.abs(basestep)>times/3)randkey=(randkey==1)?-1:1;
		}else{
			xpos[0]=x+xspace;
			ypos[0]=y+yspace;
		}
		for (i=0; i<times; i++) {
			var layerleft=(document.all)?eval("span"+(i)+".style.posLeft=xpos[i]"):("document.span"+i+".left=xpos[i]");
			var layertop=(document.all)?eval("span"+(i)+".style.posTop=ypos[i]"):("document.span"+i+".top=ypos[i]");
			if (Pcolorstyle >2)(document.all)?eval("span"+(i)+".style.color=runcolor[i]"):("document.span"+i+".color=runcolor[i]");
		}
	}
	var timer=setTimeout("AKmakesnake()",speed)
}

function handlerMM(e){
	x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX;
	y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY;
	flag=true;
}
//--> 