		


	
			var theGreaterPath = window.location.protocol + "//" + window.location.host + "/";
			pathArray = window.location.pathname.split( '/' );
			newPathname = pathArray[1] + "/";
			theGreaterPath+=newPathname;
						
			function HideContent(d) {
				
				if(d.length < 1) { return; }
				document.getElementById(d).className = "hidden";
			}
			
			function ShowContent(d) {
				if(d.length < 1) { return; }
				document.getElementById(d).className = "visible";
			}
			function ChangeBack(elementa,imagea,elementb,imageb) {
				if(elementa.length < 1 || imagea.length < 1 || elementb.length < 1 || imageb.length < 1) { return; }
				if (document.layers){
    					document[elementa].background.src = imagea
    					document[elementb].background.src = imageb
    				}else if (document.all){
    					document.all[elementa].style.background = 'url('+imagea+')';
    					document.all[elementb].style.background = 'url('+imageb+')';
    					
  				}else if (document.getElementById){
    					document.getElementById(elementa).style.background =  'url('+imagea+')';;
    					document.getElementById(elementb).style.background =  'url('+imageb+')';;
    				}
				document.getElementById('contentModuleMainStory').className='hidden';
			}
			
			function changePage(theURL) {
				window.location.href=theURL;	
			}
			
			function createXMLHttpRequest() {
				var therequest = false;
				
				if (window.XMLHttpRequest){
					
					if(typeof XMLHttpRequest != 'undefined')
						try {
							therequest = new XMLHttpRequest();
						} catch (e) {
							therequest = false;
						}
				} else if (window.ActiveXObject) {
						try {
							therequest = new ActiveXObject('Msxml2.XMLHTTP');
						} catch (e) {
							try {
							therequest = new ActiveXObject('Microsoft.XMLHTTP');
							} catch (e) {
								therequest = false;
							}
						}
					
				}
					
				return therequest;
			}
			
			thecontentdivs = new Array();

			
			function parseTheResponse() {
				if (therequest.readyState == 4) {
					if (therequest.status == 200) {

						var response = therequest.responseXML;
						var topicsList = response.getElementsByTagName('topic');
						var thePreviousNodeValue='';
						var outAll = '<ul>';
						
						var theNavText = "<div id='exploreNavInner'>";
						for (var iNode = 0; iNode < topicsList.length; iNode++) {
							var theNodeValue=topicsList[iNode].getAttribute('name');
							theNodeValue = theNodeValue.charAt(0);
							if (theNodeValue.match(/[a-zA-Z]+/)){
								
								theNodeValue = theNodeValue.toLowerCase();
								if (thecontentdivs.length==0 || theNodeValue != thePreviousNodeValue){
									var out = '<ul>';
									thecontentdivs.push(theNodeValue);
									theNavText += "<span><a id=\""+theNodeValue+"Link\" href=\"javascript:void(switchme('"+theNodeValue+"'))\">"+theNodeValue.toUpperCase()+"</a></span>";
								}

								out += '<li id=\"'+topicsList[iNode].getAttribute('id')+'\" name=\"'+topicsList[iNode].getAttribute('id')+'\" onmouseout=\"changeBackOff(\''+topicsList[iNode].getAttribute('id')+'\')\" onmouseover=\"changeBack(\''+topicsList[iNode].getAttribute('id')+'\')\" onclick=\"showQuestion(\''+topicsList[iNode].getAttribute('questions')+'\',\''+topicsList[iNode].getAttribute('id')+'\',\''+topicsList[iNode].getAttribute('id')+'\')\"><span>' + topicsList[iNode].getAttribute('name') + '</span></li>';
								
								outAll += '<li id="all'+topicsList[iNode].getAttribute('id')+'\" name=\"all'+topicsList[iNode].getAttribute('id')+'\" onmouseout=\"changeBackOff(\'all'+topicsList[iNode].getAttribute('id')+'\')\" onmouseover=\"changeBack(\'all'+topicsList[iNode].getAttribute('id')+'\')\" onclick=\"showQuestion(\''+topicsList[iNode].getAttribute('questions')+'\',\'all'+topicsList[iNode].getAttribute('id')+'\',\''+topicsList[iNode].getAttribute('id')+'\')\"><span>' + topicsList[iNode].getAttribute('name') + '</span></li>';
								thePreviousNodeValue = theNodeValue;
								if (theNodeValue != thePreviousNodeValue){
									out += '</ul>';
								}
								
							
								document.getElementById(theNodeValue+'Topic').innerHTML = out;
							}
						}
						document.getElementById('allTopic').innerHTML = outAll+'</ul>';
						document.getElementById('exploreNav').innerHTML = document.getElementById('exploreNav').innerHTML+theNavText+"<span><a id=\"allLink\" href=\"javascript:void(switchme('all'))\">Show&nbsp;All</a></span></div>";
						document.getElementById('allTopic').className='visible';
						
					}
					therequest=null;
				}
			}
			
			function changeBack(theLi){
			
				document.getElementById(theLi).className = 'back';
			}
			
			function changeBackOff(theLi){
			
				document.getElementById(theLi).className = 'backoff';
			}
			
			function parseTheQuestion() {
				if (therequest.readyState == 4) {
					if (therequest.status == 200) {

						var response = therequest.responseXML;
						var questionList = response.getElementsByTagName('question');
						
						var out = '<ul>';
						for (var iNode = 0; iNode < questionList.length; iNode++) {
							
							var theNodeValue=questionList[iNode].getAttribute('name');
							
							
								
								
								//document.getElementById('exploreNav').innerHTML = document.getElementById('exploreNav').innerHTML+"<a id=""+theNodeValue+"Link" href="javascript:void(switchme('"+theNodeValue+"'))">"+theNodeValue.toUpperCase()+"</a>&nbsp;&nbsp;";
							
							out += '<li id=\"q'+questionList[iNode].getAttribute('id')+'\" name=\"q'+questionList[iNode].getAttribute('id')+'\" onmouseout="changeBackOff(\'q'+questionList[iNode].getAttribute('id')+'\')\" onmouseover=\"changeBack(\'q'+questionList[iNode].getAttribute('id')+'\')\" onclick=\"changePage(\''+questionList[iNode].getAttribute('story')+'\')"><span>' + questionList[iNode].getAttribute('name') + '</span></li>';
							
							
							
		
							
						}
						out += '</ul>';
						document.getElementById('exploreQuestions').innerHTML = out;
						document.getElementById('exploreQuestions').className='visible';
						
					}
					therequest=null;
				}
			}
			function parseTheStory() {
				
				if (therequest.readyState == 4) {
					if (therequest.status == 200) {

						var response = therequest.responseXML;
						var storyList = response.getElementsByTagName('question');
						
						var out = '';
						for (var iNode = 0; iNode < storyList.length; iNode++) {
							out += '<div class="question">';
							out += '<div class="questionImg"><img src="';
							out += storyList[iNode].getAttribute('image');
							out += '" /></div>';
							out += '<div class="questionBlurb"><h3>';
							out += storyList[iNode].getAttribute('name')+'</h3>';
							out += storyList[iNode].firstChild.nodeValue;	
							out += '</div>';
							out += '</div>';

						}
						
						document.getElementById('questions').innerHTML = out;
						
					}
					therequest=null;
				}
			}
			function showStory(thePath){
				document.getElementById('contentModuleMainStory').className='visible';
				
				
				therequest = createXMLHttpRequest();
				
				if (therequest) {
					
					therequest.open('GET',theGreaterPath+thePath, true);
					therequest.onreadystatechange = parseTheStory;
					therequest.send('test');
				}
			}
			
			function showQuestion(thePath,theTopicValue,topicID){
				document.getElementById('exploreQuestions').innerHTML = "<p style=\"text-align:center;\">LOADING QUESTIONS...</p><p style=\"text-align:center;\">please wait</p>";
				document.getElementById('exploreQuestions').className='loading';
				document.getElementById(theTopicValue).onmouseout = function(){document.getElementById(theTopicValue).className = 'backset';}
				therequest = createXMLHttpRequest();
				if (therequest) {
					
					therequest.open('GET',theGreaterPath+thePath, true);
					therequest.onreadystatechange = parseTheQuestion;
					therequest.send('test');
				}
				var theChildren = document.getElementById(theTopicValue).parentNode.childNodes;
				for (var i = 0; i < theChildren.length; i++) 
   				{
   					if (theChildren[i].getAttribute('id')!= theTopicValue){
   						document.getElementById(theChildren[i].getAttribute('id')).onmouseout = function (){changeBackOff(this.getAttribute('id'))};
   						changeBackOff(theChildren[i].getAttribute('id'));
   					}
   						
   				}
   				
				document.getElementById(theTopicValue).onmouseout = function(){document.getElementById(theTopicValue).className = 'backset';}
			}
			
			
			var therequest = createXMLHttpRequest();
			
			function switchme(theDiv){

				for (i=0;i<thecontentdivs.length;i++){
					
					document.getElementById(thecontentdivs[i]+'Topic').className='hidden';
					document.getElementById('exploreQuestions').className='hidden';
				}
				document.getElementById('allTopic').className='hidden';
				document.getElementById(theDiv+'Topic').className='visible';		
		
			}
			
			function theClock(theURL){
				
				
				if (therequest) {
					
					therequest.open('GET',theGreaterPath+theURL, true);
					therequest.onreadystatechange = parseTheResponse;
					therequest.send('test');
				}
			
			}
								