// Declare an array with the Endeca Ids for all of the common dimensions that are displayed in the search options box
var optionsArray = new Array();
optionsArray[0]='6597';		// Format
optionsArray[1]='6635';		// Age Level
optionsArray[2]='7098';		// Fiction/ Nonfiction
optionsArray[3]='6639';		// Item Status
optionsArray[4]='6642';		// Location
optionsArray[5]='6665';		// Other Languages

function displayOptionBox(){
	// Turn on 
	if(document.getElementById('optionList').style.display == "none") {
		document.getElementById('optionList').style.display = "";
		document.getElementById('optionListIF').style.display = "";
	
	// Turn off, reset the display attribute for all divs, and reset the form
	}else {
		for (var i=0; i<optionsArray.length; i++) { 
			var dim = optionsArray[i];
			if(document.getElementById(dim)){
				document.getElementById(dim).style.display = "none";
			}
		}
		
		// Reset the form
		document.search_form.reset();
		
		// Turn on the default
		document.getElementById('optionDefaultList').style.display = "";
		
		// Turn off the options box and the IFrame behind it
		document.getElementById('optionList').style.display = "none";
		document.getElementById('optionListIF').style.display = "none";
	}
}
function displayRefinements(e){
	// Turn off the default display
	document.getElementById('optionDefaultList').style.display = "none";	
	
	// Turn on the display that matches the submitted id
	for (var i=0; i<optionsArray.length; i++) { 
		var dim = optionsArray[i];
		if(optionsArray[i] == e ) {
			document.getElementById(e).style.display = "";
		}else if(document.getElementById(dim)) {
			document.getElementById(dim).style.display="none";			
		}

	}
}
						 




