//check for and read URL bubble cookiesfunction readCookie(){	if (document.cookie)	{		var bubble_cookie = document.cookie;		var cookieCrumbleOne = bubble_cookie.split(";");		var cookieStart = cookieCrumbleOne[0];		var cookieCrumble = cookieStart.split("@");		var endOfCookie = cookieCrumble.length -1;		var bubblePref = cookieCrumble[endOfCookie];		var bubblePref = unescape(bubblePref);		if (bubblePref == 'stop')		{			controlSwitch('stop');		}	else { 		controlSwitch('start');		startAnimation(cycleLayer()); 		}	} else { 		controlSwitch('start');		startAnimation(cycleLayer()); 			}} // define function for adding cookie for bubbles to move or notfunction defBubblePref(StopORstart){	// set expiration date	var ExpireDate = new Date("October 31,2008");	var cookieDate = ExpireDate.toGMTString();	// build cookie	var bubble_cookie = "bubblePref=yeaORnay@" + escape(StopORstart) + ";expires=" + cookieDate;	document.cookie = bubble_cookie;}// Determine browser and load correct variablesvar layerRef = "null", layerStyleRef = "null", styleSwitch = "null", pxSwitch = "null";var is_ie = (document.all && document.getElementById);var is_moz = (!document.all && document.getElementById);var is_opera = (navigator.userAgent.indexOf("Opera") > -1);function init(){if (document.getElementById) {	layerStyleRef="layer.";	layerRef="document.getElementById";	styleSwitch="";	pxSwitch="";} else if (document.all){	layerStyleRef="layer.style.";	layerRef="document.all";	styleSwitch=".style";	pxSwitch="px";} else if (document.layers) {	layerStyleRef="layer.";	layerRef="document.layers";	styleSwitch="";	pxSwitch="";} }// make control button workfunction controlSwitch(sORs){	init();	if (sORs == 'stop')	{		eval(layerRef+'["buttonStop"]'+styleSwitch+'.visibility = "hidden"');		eval(layerRef+'["buttonStart"]'+styleSwitch+'.visibility = "visible"');	} else if (sORs == 'start') {		eval(layerRef+'["buttonStart"]'+styleSwitch+'.visibility = "hidden"');		eval(layerRef+'["buttonStop"]'+styleSwitch+'.visibility = "visible"');	}}// load array to hold all animated layers var oneLayer = 0;// cycle trough all layersfunction cycleLayer(){	var allLayers = new Array('orb0','orb1','orb2','orb3','orb4','orb5','orb6','orb7')	oneLayer++;	if (oneLayer == 8)	{		oneLayer = 0;	}	return allLayers[oneLayer];}// create a random number between 0 and 10function createRandom(){	var randomNumber = Math.round(Math.random()*10);	return randomNumber;}// randomly decide if positive or naegativefunction posORneg(){	var ranNum = Math.round(Math.random()*10);	if (ranNum > 4)	{		var pOn = "+";	} else {		var pOn = "-";	}	return pOn}// start animation and determine which way to move objectfunction startAnimation(layerName){	var farthestLeft = 3+pxSwitch;	var farthestRight = 52+pxSwitch;	var farthestTop = -50+pxSwitch;	var restartNum =600+pxSwitch;	init();	if 	(eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top <= farthestTop'))	{		eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top = restartNum');	}	if 	(eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left <= farthestLeft'))	{		posMove(layerName);	} else {		if 	(eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left >= farthestRight'))		{			negMove(layerName);		} else {			randomMove(layerName);		}	}}// if the object is too close to the left, move it to the rightfunction posMove(layerName){	var topPix =  "-" + createRandom();	var leftPix =  "+" + createRandom();	moveLayerBy(layerName,leftPix,topPix);}// if the object is too close to the right, move it to the leftfunction negMove(layerName){	var topPix =  "-" + createRandom();	var leftPix =  "-" + createRandom();	moveLayerBy(layerName,leftPix,topPix);}// if the object is in the middle, move it in a random directionfunction randomMove(layerName){	var topPix =  "-" + createRandom();	var leftPix =  posORneg() + createRandom();	moveLayerBy(layerName,leftPix,topPix);}// this funtion collects all the coordinates, moves the objects, and sets the process to begin againfunction moveLayerBy(layerName,leftPix,topPix){	var timeStop = Math.round((createRandom()*10)/6);	var topCoord = eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top');	var leftCoord = eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left');	var testString = leftCoord.toString();	var lastChar = testString.charAt(testString.length - 1);	if (lastChar =='x')	{			var leftNumL = leftCoord.length - 2;		var topNumL = topCoord.length - 2;		var fixTopCoord = topCoord.substring(0,topNumL);		var fixLeftCoord = leftCoord.substring(0,leftNumL);	} else { 		var fixLeftCoord = leftCoord;		var fixTopCoord = topCoord;	}	var newTopCoord = eval(fixTopCoord+topPix) + pxSwitch;	var newLeftCoord = eval(fixLeftCoord+leftPix) + pxSwitch;	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top = newTopCoord');	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left = newLeftCoord');	bubbleTime = setTimeout('startAnimation("' + cycleLayer() + '")', timeStop)}