var quadrants = {seasons:{},seasprogram:{},menstrate:{},weeks:{},weeksprogram:{},removal:{},removalprogram:{},bodyblues:{}};
	
	
	//Here be the logic for what hilights and dims when clicking yesno boxes in various quadrants.
	
	quadrants.seasons = {
		yes:{lite:[
				"seasons","seasprogram"
				]
			,
			dim:[
				"menstrate","weeks","weeksprogram","removal","removalprogram","bodyblues"
				]
			},
		no:{lite:[
				"seasons","menstrate"
				]
			,
			dim:[
				"seasprogram","weeks","weeksprogram","removal","removalprogram","bodyblues"
				]
			}
		};
	
	quadrants.menstrate = {
		yes:{lite:[
				"seasons","menstrate", "weeks"
				]
			,
			dim:[
				"seasprogram", "weeksprogram","removal","removalprogram","bodyblues"
				]
			},
		no:{lite:[
				"seasons","menstrate", "removal"
				]
			,
			dim:[
				"seasprogram","weeks","weeksprogram","removalprogram","bodyblues"
				]
			}
		};
	quadrants.removal = {
		yes:{lite:[
				"seasons","menstrate","removal", "removalprogram"
				]
			,
			dim:[
				"seasprogram","weeks","weeksprogram","bodyblues"
				]
			},
		no:{lite:[
				"seasons","menstrate","removal","bodyblues"
				]
			,
			dim:[
				"seasprogram","weeks","removalprogram","weeksprogram"
				]
			}
		};
	quadrants.weeks = {
		yes:{lite:[
				"seasons","menstrate","weeks","weeksprogram"
				]
			,
			dim:[
				"seasprogram","removal","removalprogram","bodyblues"
				]
			},
		no:{lite:[
				"seasons","menstrate","weeks","bodyblues"
				]
			,
			dim:[
				"seasprogram","weeksprogram","removal","removalprogram"
				]
			}
		};
	//Here be the filenames for the arrows and yesno boxes in each quadrant
	
	quadrants.seasons.images = {
		arrows:{
			lite:"images/seasons_arrow_lite.gif",
			dim:"images/seasons_arrow_dim.gif"
			},
		arrows_stem:{
			lite:"images/seasons_arrowstem_lite.gif",
			dim:"images/seasons_arrowstem_dim.gif"
			},
		radiobuttons:{
			dim:"images/seasons_radio_dim.gif",
			lite:"images/seasons_radio_lite.gif",
			yes:"images/seasons_radio_yes.gif",
			no:"images/seasons_radio_no.gif"
			}
		};
	quadrants.seasprogram.images = {
		arrows:{
			lite:"images/seasprogram_arrow_lite.gif",
			dim:"images/seasprogram_arrow_dim.gif"
			}
		};
	quadrants.menstrate.images = {
		arrows:{
			lite:"images/menstrate_arrow_lite.gif",
			dim:"images/menstrate_arrow_dim.gif"
			},
		radiobuttons:{
			dim:"images/menstrate_radio_dim.gif",
			lite:"images/menstrate_radio_lite.gif",
			yes:"images/menstrate_radio_yes.gif",
			no:"images/menstrate_radio_no.gif"
			}
		};
	quadrants.removal.images = {
		arrows:{
			lite:"images/removal_arrow_lite.gif",
			dim:"images/removal_arrow_dim.gif"
			},
		radiobuttons:{
			dim:"images/removal_radio_dim.gif",
			lite:"images/removal_radio_lite.gif",
			yes:"images/removal_radio_yes.gif",
			no:"images/removal_radio_no.gif"
			}
		};
	quadrants.removalprogram.images = {
		arrows:{
			lite:"images/removalprogram_arrow_lite.gif",
			dim:"images/removalprogram_arrow_dim.gif"
			}
		};
	quadrants.weeks.images = {
		arrows:{
			lite:"images/weeks_arrow_lite.gif",
			dim:"images/weeks_arrow_dim.gif"
			},
		radiobuttons:{
			dim:"images/weeks_radio_dim.gif",
			lite:"images/weeks_radio_lite.gif",
			yes:"images/weeks_radio_yes.gif",
			no:"images/weeks_radio_no.gif"
			}
		};
	quadrants.weeksprogram.images = {
		arrows:{
			lite:"images/weeksprogram_arrow_lite.gif",
			dim:"images/weeksprogram_arrow_dim.gif"
			}
		};
	quadrants.bodyblues.images = {
		arrows:{
			lite:"images/bodyblues_arrow_lite.gif",
			dim:"images/bodyblues_arrow_dim.gif"
			},
		arrows2:{
			lite:"images/bodyblues_arrow2_lite.gif",
			dim:"images/bodyblues_arrow2_dim.gif"
			}
		};

//Here be the dim color for the dimming of text
	var dimColor = "#565656";
	
//Here be the mouse-activated function that dims and hilights the quadrants
//Images have 'name' attribute of 'quadrant_imagetype'; an arrow in the seasons quadrant would be named 'seasons_arrow'; a yes/no box would be named "seasons_radio"
	
	function TestClick() {
		//document.getElementById("removalprogramtext").style.color = "#003466";
	}
	function ClickAnswer(answer,quadrant) {
		var quadImgSource; //defines the image object CONTAINER from which to reference an image source
		var radio; //defines radio document image object
		var arrow; //defines arrow document image object
		var arrow2; //defines arrow2 document image object
		var arrow_stem; //defines arrow_stem document image object
		var text; //defines the text div object
		var quadIteration; //defines the quadrant currently being processed by this function to dim or lite
		var curQuad = quadrant; //defines the quadrant name passed by the mouseclick
		var quadsQuadAnswer = eval("quadrants." + curQuad + "." + answer);
		var quadsQuadYesLite = eval("quadrants." + curQuad + ".yes.lite");
		var quadsSkipList = "";
		//********put in call to a file name constructor function here at later date
		//an image constructor would allow me to get rid of the file name object literals above

		//first loop is to hilight specific quadrants
		for(i=0; i< quadsQuadYesLite.length; i++) {
			if(quadsQuadYesLite[i] == curQuad) break;
			quadsSkipList += quadsQuadYesLite[i];
		}
		for(i=0; i < quadsQuadAnswer.lite.length; i++) {
			//store the name of the currently iterated quadrant
			quadIteration = quadsQuadAnswer.lite[i];
			//store reference to quadrant image container
			quadImgSource = eval("quadrants." + quadIteration + ".images");
			//Hilight specific radio buttons
			//check if current iteration is clicked quadrant, if so need to hilite yes or no 
			if(quadIteration == curQuad){
				radio = eval("document.images." + quadIteration + "_radio");
				radio.src = eval("quadImgSource.radiobuttons." + answer);
			} else {
				if(quadImgSource.radiobuttons) {
					if(quadsSkipList.indexOf(quadIteration) == -1) {
						radio = eval("document.images." + quadIteration + "_radio");
						radio.src = quadImgSource.radiobuttons.lite;
						//alert(radio.src);
					}
				}
			}
			
			//Hilight specific arrows
			
			arrow = eval("document.images." + quadIteration + "_arrow");
			arrow.src = quadImgSource.arrows.lite;
			
			
			//Hilight specific secondary arrows
			
			if(quadImgSource.arrows2) {
				arrow2 = eval("document.images." + quadIteration + "_arrow2");
				arrow2.src = quadImgSource.arrows2.lite;
			}

			//Hilight specific arrowstem, if any
			
			if(quadImgSource.arrows_stem) {
				arrow_stem = eval("document.images." + quadIteration + "_arrow_stem");
				arrow_stem.src = quadImgSource.arrows_stem.lite;
			}
			
			//Hilight specific text
			text = quadIteration + "text";
			document.getElementById(text).style.color = "#003466";
			document.getElementById(text).style.fontWeight = "bold";

			//add border around specific box				
			document.getElementById(quadIteration).style.backgroundColor = "#FFFACD";
			
		}
		
		//second loop is to dim specific quadrants

		for(i=0; i < quadsQuadAnswer.dim.length; i++) {
			//store the name of the currently iterated quadrant
			quadIteration = quadsQuadAnswer.dim[i];
			//store reference to quadrant image container
			quadImgSource = eval("quadrants." + quadIteration + ".images");
			
			//Dim specific radio buttons
				
			if(quadImgSource.radiobuttons) {
					radio = eval("document.images." + quadIteration + "_radio");
					radio.src = quadImgSource.radiobuttons.dim;
			}
			
			//Dim specific arrows
			
			arrow = eval("document.images." + quadIteration + "_arrow");
			arrow.src = quadImgSource.arrows.dim;
			
			
			//Dim specific secondary arrows
			
			if(quadImgSource.arrows2) {
				arrow2 = eval("document.images." + quadIteration + "_arrow2");
				arrow2.src = quadImgSource.arrows2.dim;
			}
			
			//Dim specific text
			text = quadIteration + "text";
			document.getElementById(text).style.color = "#C0C0C0";
			document.getElementById(text).style.fontWeight = "normal";
			document.getElementById(quadIteration).style.backgroundColor = "#FFFFFF";
			

			
		}

	}
	
	function HiliteResults() {
		var query = (location.search).substr(1);
		var scoreArray = query.split("&");
		if(scoreArray[0] > 10) {
			if(scoreArray[1] > 3) {
				//alert("atypical depression");
				//document.getElementById('scorepointer').style.top = "84px";
				document.getElementById('atypicalscore').style.backgroundColor = "#FFCC33";
				document.getElementById('atypicalscore').style.color = "01016E";
				
				document.getElementById('atypicalinfo').style.backgroundColor = "#FFFACD";
				document.getElementById('atypicalinfotext').style.fontWeight = "bold";
				document.getElementById('atypicalinfotext').style.color = "01016E";
				
				//position boxes
				document.getElementById('atypicalinfo').style.top = "84px";
				document.getElementById('majorinfo').style.top = "230px";
				document.getElementById('bluesinfo').style.top = "380px";
			} else {
				//alert("bodyblues");
				//document.getElementById('scorepointer').style.top = "380px";
				document.getElementById('bluesscore').style.backgroundColor = "FFCC33";
				document.getElementById('bluesscore').style.color = "01016E";
				
				document.getElementById('bluesinfo').style.backgroundColor = "#FFFACD";
				document.getElementById('bluesinfotext').style.fontWeight = "bold";
				document.getElementById('bluesinfotext').style.color = "01016E";
				
				//position boxes
				document.getElementById('bluesinfo').style.top = "84px";
				document.getElementById('atypicalinfo').style.top = "230px";
				document.getElementById('majorinfo').style.top = "380px";
				
				
				/*
				document.getElementById('seasonstext').style.color = "003466";
				document.getElementById('seasonstext').style.fontWeight = "bold";
				document.getElementById('seasons').style.backgroundColor = "#FFFACD";
				document.images.seasons_arrow_stem.src="images/seasons_arrowstem_lite.gif";
				document.images.seasons_arrow.src="images/seasons_arrow_lite.gif";
				document.images.seasons_radio.src="images/seasons_radio_lite.gif";
				*/
			}
		} else {
			if(scoreArray[1] > 3) {
				//alert("major depression");
				
				//document.getElementById('scorepointer').style.top = "230px";
				document.getElementById('majorscore').style.backgroundColor = "FFCC33";
				document.getElementById('majorscore').style.color = "01016E";
				
				document.getElementById('majorinfo').style.backgroundColor = "FFFACD";
				document.getElementById('majorinfotext').style.fontWeight = "bold";
				document.getElementById('majorinfotext').style.color = "01016E";
				
				//position boxes
				document.getElementById('majorinfo').style.top = "84px";
				document.getElementById('bluesinfo').style.top = "230px";
				document.getElementById('atypicalinfo').style.top = "380px";

			} 
			/*
			else {
				//alert("few symptoms");
				document.getElementById('scorepointer').style.top = "192px";
				document.getElementById('fewscore').style.backgroundColor = "#FFCC33";
				document.getElementById('fewscore').style.color = "01016E";
				
				document.getElementById('fewinfotext').style.backgroundColor = "#FFFACD";
				document.getElementById('fewinfotext').style.fontWeight = "bold";
				document.getElementById('fewinfotext').style.color = "01016E";
			}
			*/
		}
	}
