
	 function AttachEvent(obj,evt,fnc,useCapture){
	if (!useCapture) useCapture=false;
	if (obj.addEventListener) {
		obj.addEventListener(evt,fnc,useCapture);
		return true;
	} else if (obj.attachEvent) return obj.attachEvent("on"+evt,fnc);
	else {
		MyAttachEvent(obj,evt,fnc);
		obj['on'+evt]=function(){ MyFireEvent(obj,evt) };
	}
	return true; //added 2/4/08
}
//For NS4 or IE5Mac 
function MyAttachEvent(obj,evt,fnc) {
    if (!obj.myEvents) obj.myEvents={};
    if (!obj.myEvents[evt]) obj.myEvents[evt]=[];
    var evts = obj.myEvents[evt];
    evts[evts.length]=fnc;
	}

function MyFireEvent(obj,evt) {
	if (!obj || !obj.myEvents || !obj.myEvents[evt]) return;
	var evts = obj.myEvents[evt];
	for (var i=0,len=evts.length;i<len;i++) evts[i]();
	}
//control for the scroller itself
var scrollTimer = null;	
var scrollAutoTimer = null;
var width = 131;                                               //adjust this width to best fit each item in the overall scroller window
function initScroller() {
	var obj = document.getElementById('scroller-items');	
	if(obj != null) {
		objs = obj.getElementsByTagName('dl');
		var posx = 0;
		for(x=0; x<objs.length; x++) {
			objs[x].className = "scroller-viewer";
			objs[x].style.left = posx+"px";
			posx = posx+width;
			}
		
		var a = document.getElementById('scroller-next');	
		if(objs.length > 3) {
			
			a.onclick = nextScroller;
			a.objs = objs;
			a.style.display = "block";
		} else {
			a.style.display = "none";
			}	
		if((objs.length > 3)) {  //(sectionId == 'Test') && 
			scrollAutoTimer = setInterval("nextScroller();", 1500);	 //controls the amount of time each item sits before advancing. milliseconds (1000 = 1 second) - 
																	// set both "scrollAutoTimer values the same (7 lines below)	
			var obj = document.getElementById('scroller');	
			obj.onmouseover = function() {
				clearInterval(scrollAutoTimer);
				scrollAutoTimer = null;
				}
			obj.onmouseout = function() {
				scrollAutoTimer = setInterval("nextScroller();", 1500); //controls the amount of time each item sits before advancing. milliseconds (1000 = 1 second)
				}														// set both "scrollAutoTimer values the same (7 lines above)
			}
		}
	}
function nextScroller() {
	if(!scrollTimer) {
		for(x=0; x<objs.length; x++) {
			newPosition = parseInt(objs[x].style.left)-width;
			objs[x].newPosition = newPosition;
			}	
		scrollTimer = setInterval("scrollScroller()", 20); //controls the slide time. adjust from 0 to 100 max. (lower interger = faster slide) adjust with the 
															//"scrollAutoTimer" above to set a pleasing scroll - lower integer/faster slide here may warrant a 
															// higher number for the "scrollAutoTimer" above
		}
	}

function scrollScroller() {
	if(parseInt(objs[0].style.left) > objs[0].newPosition) {
		for(x=0; x<objs.length; x++) {
			posx = Math.floor(parseInt(objs[x].style.left)-((parseInt(objs[x].style.left)-objs[x].newPosition)/7));
			objs[x].style.left = posx+"px";
			}	   
	} else {
		clearInterval(scrollTimer);
		scrollTimer = null;
		endPosition = (objs.length*width)-width;
		for(x=0; x<objs.length; x++) {
			if(objs[x].newPosition < 0) objs[x].style.left = endPosition+"px";
			else objs[x].style.left = objs[x].newPosition+"px";
			}			
		}
	}

AttachEvent(window,'load',initScroller,false);	

