var theSection;

function runLinks(theAction, theSection) {
	if (theAction != 1) {
		document.getElementById('linksarea').style.visibility = "hidden";
	} else {
		document.getElementById('linksarea').style.visibility = "visible";
		document.getElementById(theSection).style.display = "block"
	}
	
	//this.theSection = theSection;
}

function scrollObject() {

	this.objID = null;
	this.scrollAmount = null;
	
	this.scrollUp = function() {
	
		document.getElementById(this.objID).scrollTop = document.getElementById(this.objID).scrollTop - this.scrollAmount;
		
	}
	
	this.scrollDown = function() {

		document.getElementById(this.objID).scrollTop = document.getElementById(this.objID).scrollTop + this.scrollAmount;

	}

}

function doScrollUp(objID, amount) {

	myObject = new scrollObject();
	myObject.objID = objID;
	myObject.scrollAmount = amount;

	myInterval = setInterval( "myObject.scrollUp()", 100 );

}

function doScrollDown(objID, amount) {

	myObjectIn = new scrollObject();
	myObjectIn.objID = objID;
	myObjectIn.scrollAmount = amount;

	myIntervalIn = setInterval( "myObjectIn.scrollDown()", 100 );

}

function scrollArea(element, amount) {

	
	document.getElementById(element).scrollTop = document.getElementById(element).scrollTop + amount;
	
}

function showLinks(thelinksname) {
	document.getElementById('thelinks_cola_live').style.display = "none";
	document.getElementById('thelinks_cola_work').style.display = "none";
	document.getElementById('thelinks_cola_play').style.display = "none";
	document.getElementById('thelinks_cola_learn').style.display = "none";
	document.getElementById('thelinks_cola_heal').style.display = "none";
	document.getElementById(thelinksname).style.display = "block";
}