var subDirections = new Array()

function setDirection(divID,direction){
	//
	//
	if(direction=='up'){
		subDirections[divID] = 'up';
	}else if(direction=='down'){
		subDirections[divID] = 'down';
	}
	//var name = id+"Direction";
	//[name] = direction;
}
function slide(id,endY,divID) {
	// access the layer to move, via the DOM
	var myLayer = document.getElementById(id);	

	// the current y-position of the layer
	var startY = myLayer.offsetTop;

	// the amount of pixels to shift per-iteration
	if (endY < startY){
		//confirm(subDirections[divID]);
		//document.write(subDirections[divID]);
		if(subDirections[divID]=="up")
		{			
			var pixShiftY = -5;
		}else{
			return;
		}
	} else if (endY >= startY) {		
		if(subDirections[divID]=='down')
		{
			var pixShiftY = 5;
		}else{
			return;
		}
	}
	// now move the layer until startX = endX
	if (startY != endY) {
		// add/subtract shift x-pixels
		startY += pixShiftY;		
		myLayer.style.top = startY;
		// write in the updated coordinates to the display layer!
		setTimeout('slide("'+id+'","'+endY+'",'+divID+')');
	}
}