function showSection(section) {	if(typeof(openSection) == "undefined"){ openSection = ''; }		//Close section if clicking on an open heading	if(section == openSection){			var openElements = getElementsByClass(document,section,'*');		var totalElements = openElements.length;				for(i=0; i < totalElements; i++){			openElements[i].style.display = 'none'; 			openSection = '';		} 		return;	}		//Close any open sections	if(openSection != ''){		var visibleSection = getElementsByClass(document,openSection,'*');		var visibleElements = visibleSection.length;		for(i=0; i < visibleElements; i++){			visibleSection[i].style.display = 'none'; 		}				openSection = '';	}		//Open selected section	if(openSection == '' && openSection != section){			var openElements = getElementsByClass(document,section,'*');		var totalElements = openElements.length;				for(i=0; i < totalElements; i++){			openElements[i].style.display = 'block'; 			openSection = section;		} 	}}//Hide all of the course entriesfunction hideAll(){	//Get all elements on the page using the name of the class	var allEl = getElementsByClass(document,"course",'*');	//Get the total number of class elements	var totalAllElements = allEl.length;	//Loop through all open elements and hide them	for(j=0; j < totalAllElements; j++){		allEl[j].style.display = 'none'; 	}	}function getElementsByClass(node,searchClass,tag) {	var classElements = new Array();	var els = node.getElementsByTagName(tag); // use "*" for all elements	var elsLen = els.length;	var pattern = new RegExp("\\b"+searchClass+"\\b");	for (i = 0, j = 0; i < elsLen; i++) {		if ( pattern.test(els[i].className) ) { 			classElements[j] = els[i];			 j++;		}	}	return classElements;}