
	var parent;
	var parentPos;
	var menu;
	var pos;
	
	window.addEvents({
		
		// When the DOM is loaded...
		"domready": function(){

			parent 		= $('parent');
			parentPos 	= parent.getPosition(); // the position of the menu container
			menu		= $('leftMenu');
			
			// Set the menu's start position
			menu.set('move', {
				position: 'upperleft',
				offset: {x: parentPos.x, y: 205}
			});
			
			// Put the menu in it's start position (called twice due to table layout)
			callMenu();
			callMenu();
			
		},
		
		// Set window's onScroll event (the side bar scroller) to check the position of the menu
		"scroll": function(){
			callMenu();
		},
		
		// Set the mouse's onScroll event to check the position of the menu
		'mouseScroll': function(){
			callMenu();
		}
		
	});
	
	// This does the work of putting the menu in it's position
	function callMenu(){
	
		var menuY;
	
		pos = $('body').getScroll(); // Get the scroll coordinates of the window.
		
		// Makes sure that the menu never rolls over the image of the teeth (miniumum y position of 200).
		if (pos.y > 205) {menuY = 0;} else {menuY = (205 - pos.y);}
		
		// Do the move...
		menu.set('move',{
			position: 'upperleft',
			offset: {x: parentPos.x, y: menuY}
		}).get('move').start();
		
	}