<!--

// Set starting point for all letters
var startPointX = 80;
var startPointY = 125;

// Set spacing for the next letter to the left and down
var xOffSet = 20;
var yOffSet = 20;

// Sets x & y grids locations
var leftPos = new Array (0,1,2,3,4,5);
var topPos = new Array (0,1,2,3,4);

//Sets he cordinates where the letters in "Cybren"  Should stopp moving
var cybrenXLock = new Array ();
	cybrenXLock[0] = startPointX + (leftPos[0] * xOffSet);
	cybrenXLock[1] = startPointX + (leftPos[1] * xOffSet);
	cybrenXLock[2] = startPointX + (leftPos[2] * xOffSet);
	cybrenXLock[3] = startPointX + (leftPos[3] * xOffSet);
	cybrenXLock[4] = startPointX + (leftPos[4] * xOffSet);
	cybrenXLock[5] = startPointX + (leftPos[5] * xOffSet);
var cybrenYLock = startPointY + (topPos[3] * yOffSet);

function move(letter){
	var x = Math.random()*6+1;
	var y = Math.random()*5+1;
//console.log(y);	
	var randomXMove = parseInt(x);
	var randomYMove = parseInt(y);
	var xpos = startPointX + (randomXMove-1) * xOffSet;
	var ypos = startPointY + (randomYMove) * yOffSet;

	// if any of 'C', 'y', 'b', 'r', 'e', 'n' is in the correct spot, do not reassign the position. 	
	if (((letter == 'pos13') && ($(letter).cumulativeOffset()[1] == cybrenYLock) && ($(letter).cumulativeOffset()[0] == cybrenXLock[0])) ||
	    ((letter == 'pos14') && ($(letter).cumulativeOffset()[1] == cybrenYLock) && ($(letter).cumulativeOffset()[0] == cybrenXLock[1])) ||
	    ((letter == 'pos15') && ($(letter).cumulativeOffset()[1] == cybrenYLock) && ($(letter).cumulativeOffset()[0] == cybrenXLock[2])) ||
	    ((letter == 'pos16') && ($(letter).cumulativeOffset()[1] == cybrenYLock) && ($(letter).cumulativeOffset()[0] == cybrenXLock[3])) ||
	    ((letter == 'pos17') && ($(letter).cumulativeOffset()[1] == cybrenYLock) && ($(letter).cumulativeOffset()[0] == cybrenXLock[4])) ||
	    ((letter == 'pos18') && ($(letter).cumulativeOffset()[1] == cybrenYLock) && ($(letter).cumulativeOffset()[0] == cybrenXLock[5])))   {}

	// if any letter is not in any of the 'C', 'y', 'b', 'r', 'e', 'n' positions, reassign the position. 	
	else if (((letter != 'pos13') && (ypos == cybrenYLock) && (xpos == cybrenXLock[0])) || 
			 ((letter != 'pos14') && (ypos == cybrenYLock) && (xpos == cybrenXLock[1])) ||  
			 ((letter != 'pos15') && (ypos == cybrenYLock) && (xpos == cybrenXLock[2])) ||  
			 ((letter != 'pos16') && (ypos == cybrenYLock) && (xpos == cybrenXLock[3])) ||  
			 ((letter != 'pos17') && (ypos == cybrenYLock) && (xpos == cybrenXLock[4])) ||  
			 ((letter != 'pos18') && (ypos == cybrenYLock) && (xpos == cybrenXLock[5]))) {}
	else {  
        Element.setStyle(letter, {top:  ypos});
        Element.setStyle(letter, {left: xpos});
	}
}

function startMove(){
for (var x = 1; x <= 30; x++){
    div_id = "pos" + x;
    move(div_id);
}

setTimeout("startMove()", 200);
}
// -->