<!--
	
	function initScrollers() {
		// tickers
		if(document.getElementsByClassName) {
			findTickers = document.getElementsByClassName("messageTicker");
		} else {
			findTickers = getElementsByClass("messageTicker",document,"div");
		}
		for(x=0; x<findTickers.length ;x++) {
			// create area expander objects in an array
			allTickers[x] = new messageTicker(findTickers[x], x);
		}
		// scrollers
		if(document.getElementsByClassName) {
			findScrollers = document.getElementsByClassName("messageScroller");
		} else {
			findScrollers = getElementsByClass("messageScroller",document,"div");
		}
		for(x=0; x<findScrollers.length ;x++) {
			// create area expander objects in an array
			allScrollers[x] = new messageScroller(findScrollers[x], x);
		}
	}

//**************************************
//**********  Message Ticker  **********
//**************************************

	// array to store scrollers
	var allTickers = Array();
	
	function messageTicker(getDiv, getIndex) {
		this.ticker = getDiv;
		this.index = getIndex;
		// variables
		this.messageContent = new Array;
		this.mIndex = -1;
		this.messageMouseOver = false;
		this.revealInterval = null;
		this.displayTime = 4000;
		// store all message data
		this.allMessages = this.ticker.getElementsByTagName('li');
		if(this.allMessages.length > 0) {
			// store content
			for(this.i=0;this.i<this.allMessages.length;this.i++) {
				this.messageContent[this.i] = "<p>" + this.allMessages[this.i].innerHTML + "<\/p>";
			}
			// get width of H2
			this.h2Width = parseFloat(this.ticker.getElementsByTagName("H2")[0].offsetWidth);
			this.maskWidth = 0;
			this.maskMaxWidth = 890 - this.h2Width;
			this.messageX = 910 - this.maskMaxWidth;
			// add messageContainer
			this.newDiv = document.createElement('div');
			this.divID = "mt" + this.index;
			this.newDiv.setAttribute('id',this.divID);
			this.newDiv.setAttribute('class',"messageMask");
			this.ticker.appendChild(this.newDiv);
			this.messageMask = document.getElementById("mt" + this.index);
			this.messageMask.className = "messageMask";
			setPos(this.messageMask, this.messageX, 0);
			//turn on first message
			this.nextMessage();
		}
	}
	
	messageTicker.prototype.nextMessage = function() {
		this.mIndex +=1;
		if(this.mIndex >= this.allMessages.length) this.mIndex = 0;
		this.messageMask.innerHTML = this.messageContent[this.mIndex];
		// mouseover behaviours
		this.messageMask.getElementsByTagName("P")[0].parentIndex = this.index;
		this.messageMask.getElementsByTagName("P")[0].onmouseover = function() {allTickers[this.parentIndex].messageMouseOver = true;};
		this.messageMask.getElementsByTagName("P")[0].onmouseout = function() {allTickers[this.parentIndex].messageMouseOver = false;};
		// start reveal
		this.revealInterval = setInterval("allTickers[" + this.index + "].reveal();",30);
	}
	
	messageTicker.prototype.reveal = function() {
		this.maskWidth += 10;
		if(this.maskWidth >= this.maskMaxWidth) {
			this.maskWidth = this.maskMaxWidth;
			this.messageMask.style.width = this.maskWidth + "px";
			clearInterval(this.revealInterval);
			this.revealInterval = null;
			setTimeout("allTickers[" + this.index + "].hide();",this.displayTime);
		} else {
			this.messageMask.style.width = this.maskWidth + "px";
		}
	}
	
	messageTicker.prototype.hide = function() {
		if(this.messageMouseOver) {
			setTimeout("allTickers[" + this.index + "].hide();",this.displayTime);
		} else {
			this.messageMask.innerHTML = "";
			this.messageMask.style.width = 0 + "px";
			this.maskWidth = 0;
			this.nextMessage();
		}
	}


//****************************************
//**********  Message Scroller  **********
//****************************************

	// array to store scrollers
	var allScrollers = Array();
	// gap in pixels between messages
	var messageGap = 60;
	// movement increment in pixels
	var scrollIncrement = 1;
	// update delay in milliseconds
	var scrollDelay = 15;
	
	function messageScroller(getDiv, getIndex) {
		this.scroller = getDiv;
		this.index = getIndex;
		// variables
		this.initialX = 0;
		this.messageContent = new Array;
		this.messageStatus = new Array;
		this.messageX = new Array;
		this.messageWidth = new Array;
		this.messageIndex = 0;
		this.mIndex = 0;
		this.lastIndex = 0;
		this.messageMouseOver = false;
		// setup
		this.initialX = parseFloat(this.scroller.offsetWidth);
		// store all message data
		this.allMessages = this.scroller.getElementsByTagName('LI');
		if(this.allMessages.length > 0) {
			// store content
			for(this.i=0;this.i<this.allMessages.length;this.i++) {
				this.messageContent[this.i] = this.allMessages[this.i].innerHTML;
			}
			// clear content
			this.scroller.innerHTML = "<hr \/>";
			//turn on first message
			this.startMessage();
			this.doMessagesScroll();
		}
	}
	
	messageScroller.prototype.startMessage = function() {
		this.newDiv = document.createElement('div');
		this.divID = "ms" + this.index + "_" + this.mIndex;
		this.newDiv.setAttribute('id',this.divID);
		this.newDiv.setAttribute('class',"messageContainer");
		this.newDiv.innerHTML = "<p class='messageText'>" + this.messageContent[this.messageIndex] + "<\/p>";
		this.scroller.appendChild(this.newDiv);
		// store settings
		this.messageStatus[this.mIndex] = true;
		this.messageX[this.mIndex] = this.initialX;
		document.getElementById(this.divID).className = "messageContainer";
		this.messageWidth[this.mIndex] = parseFloat(document.getElementById(this.divID).getElementsByTagName('P').item(0).offsetWidth);
		document.getElementById(this.divID).width = this.messageWidth[this.mIndex] + 10;
		// bring message to top of zIndex
		document.getElementById(this.divID).style.zIndex = (this.mIndex + 10);
		// mouseover behaviours
		document.getElementById(this.divID).getElementsByTagName("P")[0].parentIndex = this.index;
		document.getElementById(this.divID).getElementsByTagName("P")[0].onmouseover = function() {allScrollers[this.parentIndex].messageMouseOver = true;};
		document.getElementById(this.divID).getElementsByTagName("P")[0].onmouseout = function() {allScrollers[this.parentIndex].messageMouseOver = false;};
		// increment
		this.lastIndex = this.mIndex;
		this.mIndex += 1;
		if(this.mIndex > 20) this.mIndex = 0;
		this.messageIndex +=1;
		if(this.messageIndex >= this.messageContent.length) this.messageIndex = 0;
	}
	
	messageScroller.prototype.stopMessage = function(getIndex) {
		this.messageStatus[getIndex] = false;
		this.oldDiv = document.getElementById("ms" + this.index + "_" + getIndex);
		this.scroller.removeChild(this.oldDiv);
	}
	
	messageScroller.prototype.doMessagesScroll = function() {
		if(!this.messageMouseOver) {
			// for each message
			for (this.i=0;this.i<=20;this.i++) {
				if(this.messageStatus[this.i] == true) {
					this.messageX[this.i] -= scrollIncrement;
					if((this.messageX[this.i] + this.messageWidth[this.i]) < 0) {
						
						// remove div and turn inactive
						this.stopMessage(this.i);
						
					} else if((this.i == this.lastIndex) && (this.messageX[this.i] + this.messageWidth[this.i]) <= (this.initialX - messageGap)) {
						
						// start next message
						this.startMessage();
						
					}
					
					if(this.messageStatus[this.i] == true) {
						// update position
						setPos(document.getElementById("ms" + this.index + "_" + this.i), this.messageX[this.i], 0);
					}
				}
			}
		}
		// set delay for next call
		setTimeout("allScrollers[" + this.index + "].doMessagesScroll();",scrollDelay);
	}

// -->