// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

			function scrollUp(element) {
				new Effect.Move (element,{ duration: .5, x: 0, y: 250, mode: 'relative', afterFinish: function(){showNavLinks($(element))}});

			}
			
			function scrollDown(element) {
				new Effect.Move (element,{ duration: .5, x: 0, y: -250, mode: 'relative', afterFinish: function(){showNavLinks($(element))}});				
			}
			
			function showNavLinks(element) {
				if (element == null) {
					return
				}
				var top = element.getStyle('top');
				var height = element.getHeight();
				var parent = Element.up(element);
				var parentHeight = parent.getHeight();
				
				if(height < parentHeight) {
					$('down_link').hide();
					$('up_link').hide();
				}
				else {
					if (top != null) {
						top = top.replace('px','');
					}
					else {
						top = 0;
					}
					if (Math.abs(top) + 250 >= height) {
						$('down_link').hide();
					}
					else {
						$('down_link').show();
					}
					if (top < 0) {
						$('up_link').show();
					}
					else {
						$('up_link').hide();
					}
					Element.absolutize(parent);
				}
			}
