function dvdUseScroll(clonedElem) {
	//check browser compatibility
	if (!document.getElementById) return false;
	if (!document.getElementsByTagName) return false;
	
	
	//function
	
	var dvdUseList;
	var dvdUseAnchors = clonedElem.getElementsByTagName("a");
	var dvdUseDivs = clonedElem.getElementsByTagName("div");
	var currentSection;
	var dvdElemToScroll = document.getElementById("scrollMoreElement"); //UNUSED its the element that scrolls.
	
	
	//UNUSED function to get dvdUseList in cloned element.
	for(var i = 0; i < dvdUseDivs.length; i++) {
		if(dvdUseDivs[i].getAttribute("id") == "dvdUseList") {
			dvdUseList = dvdUseDivs[i];
		}
	}
	
	// Assign which dvd section to appear on click.
	for(var i = 0; i < dvdUseAnchors.length; i++) {
		var thisAnchorID = dvdUseAnchors[i].getAttribute("id");
		
		switch(thisAnchorID) {
			case "dvdUseHome":
				for(var j = 0; j < dvdUseDivs.length; j++) {
					if(dvdUseDivs[j].getAttribute("id") == "dvdHomeSect") {
						dvdUseAnchors[i].thisSect = dvdUseDivs[j];
						dvdUseAnchors[i].thisTop = "-50px";
					}
				}
			break;
			
			case "dvdUseClassroom":
				for(var j = 0; j < dvdUseDivs.length; j++) {
					if(dvdUseDivs[j].getAttribute("id") == "dvdClassroomSect") {
						dvdUseAnchors[i].thisSect = dvdUseDivs[j];
						dvdUseAnchors[i].thisTop = "-395px";
					}
				}
			break
			
			case "dvdUseConference":
				for(var j = 0; j < dvdUseDivs.length; j++) {
					if(dvdUseDivs[j].getAttribute("id") == "dvdConferenceSect") {
						dvdUseAnchors[i].thisSect = dvdUseDivs[j];
						dvdUseAnchors[i].thisTop = "-740px";
					}
				}
			break
			
			case "dvdUseScreening":
				for(var j = 0; j < dvdUseDivs.length; j++) {
					if(dvdUseDivs[j].getAttribute("id") == "dvdScreeningSect") {
						dvdUseAnchors[i].thisSect = dvdUseDivs[j];
						dvdUseAnchors[i].thisTop = "-1085px";
					}
				}
			break
		}
		
		dvdUseAnchors[i].onclick = function () {			
			if(currentSection) {
				currentSection.style.visibility = "hidden";
				this.thisSect.style.position = "static";
			}
			this.thisSect.style.visibility = "visible";
			this.thisSect.style.position = "relative";
			this.thisSect.style.top = this.thisTop;
			
			currentSection = this.thisSect;
			return false;
		}
	}
	
}

function learnMoreScroll(clonedElem) {
	//check browser compatibility
	if (!document.getElementById) return false;
	if (!document.getElementsByTagName) return false;
	
	
	//function
	
	var learnMoreList;
	var learnMoreAnchors = clonedElem.getElementsByTagName("a");
	var learnMoreDivs = clonedElem.getElementsByTagName("div");
	var currentSection;
	var startY = 30;
	var heights = 0;
	
	
	// Assign which learn section to appear on click.
	for(var i = 0; i < learnMoreAnchors.length; i++) {
		var thisAnchorID = learnMoreAnchors[i].getAttribute("id");
		
		switch(thisAnchorID) {
			case "giCaseStudies":
				for(var j = 0; j < learnMoreDivs.length; j++) {
					if(learnMoreDivs[j].getAttribute("id") == "caseStudiesSect") {
						learnMoreAnchors[i].thisSect = learnMoreDivs[j];
						learnMoreDivs[j].style.position = "absolute";
						learnMoreDivs[j].style.top = "160px";
						learnMoreDivs[j].style.visibility = "visible";
						currentSection = learnMoreDivs[j];
					}
				}
			break;
			
			
			case "giForeignAid":
				for(var j = 0; j < learnMoreDivs.length; j++) {
					if(learnMoreDivs[j].getAttribute("id") == "foreignAidSect") {
						learnMoreAnchors[i].thisSect = learnMoreDivs[j];
					}
				}
			break;
			
			case "giKibera":
				for(var j = 0; j < learnMoreDivs.length; j++) {
					if(learnMoreDivs[j].getAttribute("id") == "kiberaSect") {
						learnMoreAnchors[i].thisSect = learnMoreDivs[j];
					}
				}
			break
			
			case "giYalaSwamp":
				for(var j = 0; j < learnMoreDivs.length; j++) {
					if(learnMoreDivs[j].getAttribute("id") == "yalaSwampSect") {
						learnMoreAnchors[i].thisSect = learnMoreDivs[j];
					}
				}
			break
			
			case "giTakeAction":
				for(var j = 0; j < learnMoreDivs.length; j++) {
					if(learnMoreDivs[j].getAttribute("id") == "takeActionSect") {
						learnMoreAnchors[i].thisSect = learnMoreDivs[j];
					}
				}
			break
		}
		
		learnMoreAnchors[i].onclick = function () {			
			if(currentSection) {
				currentSection.style.visibility = "hidden";
				currentSection.style.position = "static";
			}
			this.thisSect.style.position = "absolute";
			this.thisSect.style.top = "160px";
			this.thisSect.style.visibility = "visible";
			currentSection = this.thisSect;
			return false;
		}
	}
	
}
