//start vertical scrolling divs
function TextScroll(scrollname, div_name, up_name, down_name) {
	this.div_name = div_name;
	this.name = scrollname;
	this.scrollCursor = 0;
	this.speed = 15;
	this.timeoutID = 0;
	this.div_obj = null;
	this.up_name = up_name;
	this.dn_name = down_name;

{
		if (document.getElementById) {
			div_obj = document.getElementById(this.div_name);
			if (div_obj) {
				this.div_obj = div_obj;
				this.div_obj.style.overflow = 'hidden';
			}
			div_up_obj = document.getElementById(this.up_name);
			div_dn_obj = document.getElementById(this.dn_name);
			if (div_up_obj && div_dn_obj) {
				div_up_obj.onmouseover = function() { eval(scrollname + ".scrollUp();"); roll_Over(div_up_obj, 'on'); };
				div_up_obj.onmouseout = function() { eval(scrollname + ".stopScroll();"); roll_Over(div_up_obj, 'off'); };
				div_dn_obj.onmouseover = function() { eval(scrollname + ".scrollDown();"); roll_Over(div_dn_obj, 'on'); };
				div_dn_obj.onmouseout = function() { eval(scrollname + ".stopScroll();"); roll_Over(div_dn_obj, 'off'); };
			}
		}
	}

this.stopScroll = function() {
		clearTimeout(this.timeoutID);
	}

this.scrollUp = function() {
		if (this.div_obj) {
			this.scrollCursor = (this.scrollCursor - this.speed) < 0 ? 0 : this.scrollCursor - this.speed;
			this.div_obj.scrollTop = this.scrollCursor;
			this.timeoutID = setTimeout(this.name + ".scrollUp()", 60);
		}
	}

this.scrollDown = function() {
		if (this.div_obj) {
			this.scrollCursor += this.speed;
			this.div_obj.scrollTop = this.scrollCursor;
			if (this.div_obj.scrollTop == this.scrollCursor) {
				this.timeoutID = setTimeout(this.name + ".scrollDown()", 60);
			} else {
				this.scrollCursor = this.div_obj.scrollTop;
			}
		}
}
this.resetScroll = function() {
		if (this.div_obj) {
			this.div_obj.scrollTop = 0;
			this.scrollCursor = 0;
		}
	}
}
//end vertical scrolling divs

//start horizontal scrolling divs
function TextScrollHoriz(scrollNameHoriz, divName, leftName, rightName) {
	this.divName = divName;
	this.scrollNameHoriz = scrollNameHoriz;
	this.scrollCursor = 0;
	this.speed = 15;
	this.timeoutID = 0;
	this.divObjHoriz = null;
	this.leftName = leftName;
	this.rightName = rightName;

{
		if (document.getElementById) {
			divObjHoriz = document.getElementById(this.divName);
			if (divObjHoriz) {
				this.divObjHoriz = divObjHoriz;
				this.divObjHoriz.style.overflow = 'hidden';
			}
			divLeftObj = document.getElementById(this.leftName);
			divRightObj = document.getElementById(this.rightName);
			if (divLeftObj && divRightObj) {
				divLeftObj.onmouseover = function() { eval(scrollNameHoriz + ".scrollHorizLeft();") };
				divLeftObj.onmouseout = function() { eval(scrollNameHoriz + ".stopScrollHoriz();") };
				divRightObj.onmouseover = function() { eval(scrollNameHoriz + ".scrollHorizRight();") };
				divRightObj.onmouseout = function() { eval(scrollNameHoriz + ".stopScrollHoriz();") };
			}
		}
	}

this.stopScrollHoriz = function() {
		clearTimeout(this.timeoutID);
	}

this.scrollHorizLeft = function() {
		if (this.divObjHoriz) {
			this.scrollCursor = (this.scrollCursor - this.speed) < 0 ? 0 : this.scrollCursor - this.speed;
			this.divObjHoriz.scrollLeft = this.scrollCursor;
			this.timeoutID = setTimeout(this.scrollNameHoriz + ".scrollHorizLeft()", 60);
		}
	}

this.scrollHorizRight = function() {
		if (this.divObjHoriz) {
			this.scrollCursor += this.speed;
			this.divObjHoriz.scrollLeft = this.scrollCursor;
			if (this.divObjHoriz.scrollLeft == this.scrollCursor) {
				this.timeoutID = setTimeout(this.scrollNameHoriz + ".scrollHorizRight()", 60);
			} else {
				this.scrollCursor = this.divObjHoriz.scrollLeft;
			}
		}
}
this.resetScrollHoriz = function() {
		if (this.divObjHoriz) {
			this.divObjHoriz.scrollLeft = 0;
			this.scrollCursor = 0;
		}
	}
}
//end horizontal scrolling divs

//start toggle tabs
function showNavTab(tabId,tabNo) {
	var tabCollection = document.getElementById(tabId);
	tabCollection.className='Tab'+tabNo+'Visible';
}
//end toggle tabs


//start roll_over image function
function roll_Over(imgOb, state) {
	mouseOver_suffix = "_on.gif";
	
	if(state == 'on') {
		imgOb.src = (imgOb.src).substring(0,((imgOb.src).length - 4) );
		imgOb.src += "_on.gif";
	}
	else {
		imgOb.src = (imgOb.src).substring(0,((imgOb.src).length - mouseOver_suffix.length) );
		imgOb.src += ".gif";
	}

}
//end roll_over image function