var isNS = (navigator.appName == "Netscape");layerRef = (isNS) ? "document" : "document.all";styleRef = (isNS) ? "" : ".style";var queue = new Array();var NUM_OF_star_PARTS = 5for (x=1; x < 6; x++) {	 ///////////////Image Preload	eval("starSpriteFrame" + x + " = new Image(40,40);");	eval("starSpriteFrame" + x + ".src = 'star" + x + ".gif';");}////////////////////////////////////////////////The star Objectfunction starSpriteObj(anID) {	this.starSpriteID = "starSprite" + anID; //as before 	this.imgRef = "starSprite" + anID + "img"; //reference to the sprites image name	this.currentFrame = 1; //the varible for looking after the frame	this.animatestarSprite = animatestarSprite; //declare the objects method cycle}function animatestarSprite() {	if (this.currentFrame <6 ) {	//if there are animation frames left, the change sprites the current frame		if (isNS) { 				//Detect the browser and perform coresponding image switch			eval("document." + this.starSpriteID +".document['"+ this.imgRef + "'].src  =  starSpriteFrame" + this.currentFrame + ".src");		} else {			eval("document['" + this.imgRef + "'].src  =  starSpriteFrame" + this.currentFrame + ".src");		}		this.currentFrame ++; 		//and increase the objects current frame 	} else { 						//the current frame has reached its limit so hide the sprite		eval(layerRef + '.' + this.starSpriteID +  styleRef + '.visibility = "hidden"');	}	}/////////////////////////////////////////////////////////////////function processAnim() {	for(x=0; x < NUM_OF_star_PARTS; x++)			queue[x].animatestarSprite();}function processMouse(e) {	currentObj = shuffleQueue();	if (isNS) {		eval("document." + currentObj + ".left = e.pageX - 50 ;");		eval("document." + currentObj + ".top = e.pageY + 5;");	} else {		eval("document.all." + currentObj + ".style.pixelLeft = event.clientX + document.body.scrollLeft - 50 ;");		eval("document.all." + currentObj + ".style.pixelTop = event.clientY + document.body.scrollTop + 5;");	}}function shuffleQueue() {	lastItemPos = queue.length - 1;	lastItem = queue[lastItemPos];	for (i = lastItemPos; i>0; i--) 		queue[i] = queue[i-1];	queue[0] = lastItem;		queue[0].currentFrame = 1;	//reset the objects frame number & make the sprite visible again	eval(layerRef + '.' + queue[0].starSpriteID +  styleRef + '.visibility = "visible"');		return 	queue[0].starSpriteID;}function init() {		for(x=0; x<NUM_OF_star_PARTS; x++) 	//fill array with star objects		queue[x] = new starSpriteObj(x+1) ;		if (isNS) { document.captureEvents(Event.MOUSEMOVE); }	document.onmousemove = processMouse;	setInterval("processAnim();",25);}	window.onload = init;