// Scroller script
	var strControls = '<div class="controls"><a href="javascript:movefast()" class="marquee_button" title="Speed up">+</a>&nbsp;<a href="javascript:moveslow()" class="marquee_button" title="Slow down and Stop">&minus;</a></div>';
	var strMarquee = '<marquee id="marquee" scrollamount="2" scrolldelay="5" onmouseover="this.stop()" onmouseout="this.start()">'
	
	var ua = navigator.userAgent.toLowerCase();
	var ie  = (ua.indexOf("msie") && document.all && ua.indexOf("netscape") == -1);
	
	function addScroller(outer,inner) {
		if(!$(outer)) return;
		if(!$(inner)) return;
		$(outer).addClassName("scroller") // add new scroller classes
		$(inner).addClassName("scroll")
		var arrItems = $$("#"+inner+" li") // get all list items
		var arrInner = $$("#"+inner+" li h3");
		var arrInnerDl = $$("#"+inner+" li dl");
		var iWidth=0; var imgWidth = 160; var newWidth;
		var dlWidth=0; var aWidth=0; var addWidth=0;
		for(var i=0; i < arrItems.length; i++) { // loop through list items
			if(arrInnerDl[i].getWidth()+50 > arrInner[i].getWidth()) { 
				addWidth=arrInnerDl[i].getWidth();
				newWidth = imgWidth+addWidth+50;
				if(ie) newWidth = newWidth - 60;
				arrItems[i].style.width = newWidth + 'px';
			} else { 
				addWidth=arrInner[i].getWidth();
				newWidth = imgWidth+addWidth;
				arrItems[i].style.width = newWidth + 'px';
			}
			iWidth = iWidth + newWidth; // add up width
		}
		iWidth = iWidth + 130;
		$(inner).style.width = iWidth + 'px'; // give inner list new width
		var strScroller = strMarquee + $(outer).innerHTML + '<\/marquee>'; // compile marquee string
		$(outer).innerHTML = strScroller; // add it to container
		$(outer).insert({ after: strControls }); // add controls outside of container
	}
	// control functions
	var sd = 1;
	function movefast() {
		if (sd < 3 ) {
			sd = sd+1;
			marquee.scrollAmount = sd;
		}
	}
	function moveslow() {
		if (sd > 0 ) {
			sd = sd-1;
			marquee.scrollAmount = sd;
		}
	}
	
// Adjust content height
	var originalHeight

	function alterContentHeight(firstLoad) {
		if(firstLoad) { originalHeight = $("content").getHeight() };
		var viewPortHeight = document.viewport.getHeight();
		var requiredHeight = viewPortHeight - 240;
		if(originalHeight < requiredHeight) {
			$("content").style.height = requiredHeight + "px";
		}		
	}
	
	Event.observe( window, "load", function() { alterContentHeight(true) } );
	Event.observe( window, "resize", function() { alterContentHeight(false) } );


