/* FUNCTIONS THAT DEAL WITH TAGS OF CLASS NAx */
	
			// Show a single section
			function showNASection(divId) {
				if ( document.getElementById("NA"+divId) ) { 
						document.getElementById("NA"+divId).style.display = "block";
						document.getElementById("dulcinea_section_title_"+divId).style.background =
							"url(<%=request.getContextPath()%>/docroot/dulcinea/img/topics/block_featuresMinus.gif) center left no-repeat";
				}
			}
			
			// Hide a single section
			function hideNASection(divId) {
				if ( document.getElementById("NA"+divId) ) { 
						document.getElementById("NA"+divId).style.display = "none";
						document.getElementById("dulcinea_section_title_"+divId).style.background =
							"url(<%=request.getContextPath()%>/docroot/dulcinea/img/topics/block_featuresPlus.gif) center left no-repeat";
				}
			}
			
			// Toggles a single section
			function toggleNASection(divId) {
				if ( document.getElementById("NA"+divId) )
					if ( document.getElementById("NA"+divId).style.display == "block" )
						hideNASection(divId);
					else 
						showNASection(divId);
			}
			// Toggles a single section
			function toggleSection(divId) {
				if ( document.getElementById("NA"+divId) )
					if ( document.getElementById("NA"+divId).style.display == "block" )
						hideNASection(divId);
					else 
						showNASection(divId);
			}
			// Hides all but a single section
			function hideAllBut(divId) {
			   for (i=0; i<totDiv; i++) {
					if ( document.getElementById("NA"+i) ) {
						if (i == divId)
							showNASection(i);
						else
							hideNASection(i);
					}
				}
			}
			
			// Hides all sections
			function hideAll() {
				for (i=0; i<totDiv; i++)
					if ( document.getElementById("NA"+i) )
						hideNASection(i);	
			}
			
			// Shows all sections
			function showAll() { 
				for (i=0; i<totDiv; i++)
					if ( document.getElementById("NA"+i) )
						showNASection(i);	
			}
			
			// Shows all sections
			function showAllWithinDay(dayNum) { 
				for (i=0; i<totDiv; i++) {
					var section = document.getElementById("NA"+i);
					if ( section != undefined && section.className.indexOf("dulcineaDay" + dayNum) >= 0 )
						showNASection(i);
				}						
			}
						
			/* MISCELLANEOUS FUNCTIONS */
			
			// Centers content horizontally on page
			
			var dayOpenNow; // Which day will be opened now (set where panel section is displayed)
			var sectionOpenNow; // Which panel section will be opened (set where panel section is displayed)
			var dayOpenLast = -1; // Which panel section must be closed when new one is opened
				
			// Closes short version of panel section and opens long version
			function openPanelSection(divId) {
				// The one that was open is now closed
				if ( document.getElementById("day"+dayOpenLast+"Open") ) {
					document.getElementById("day"+dayOpenLast+"Open").style.display = "none";
				}
				if ( document.getElementById("day"+dayOpenLast+"Closed") ) {
					document.getElementById("day"+dayOpenLast+"Closed").style.display = "block";
				}
				
				// The one that was closed is now opened
				if ( document.getElementById("day"+divId+"Closed") ) {
					document.getElementById("day"+divId+"Closed").style.display = "none";
				}
				if ( document.getElementById("day"+divId+"Open") ) {
					document.getElementById("day"+divId+"Open").style.display = "block";
				}
				
				// In main content area, display appropriate day's sections and hide previous ones.
				showOrHideDivsByClassName(true, 'dulcineaDay' + dayOpenLast);
				showOrHideDivsByClassName(false, 'dulcineaDay' + divId);
				
				// There's a new dayOpenLast in town
				dayOpenLast = divId; 
			}
			
			function showOrHideDivsByClassName(turnOff, className) {
				var blockOrNone = turnOff ? "none" : "block";
				
				var divsArray = getElementsByClassName(className, 'div', document);
				for (var y=0; y<divsArray.length; y++) {
					divsArray[y].style.display= blockOrNone;
				}
			}
			
			// Gets all elements of class "className" which are of type "tag" and are descended from element "elm"					
			function getElementsByClassName(className, tag, elm) {
				var testClass = new RegExp("(^|\\s)" + className + "(\\s|$)");
				var tag = tag || "*";
				var elm = elm || document;
				var elements = (tag == "*" && elm.all)? elm.all : elm.getElementsByTagName(tag);
				var returnElements = [];
				var current;
				var length = elements.length;
				for(var i=0; i<length; i++){
					current = elements[i];
					if(testClass.test(current.className)){
						returnElements.push(current);
					}
				}
				return returnElements;
			}