//in your page, create an array of DIVs like this: allObjects = new Array("1","2","3")

function checkOpen(){
	theValue = location.search;
	theValue = theValue.substring(theValue.indexOf("=")+1)
	if(theValue!=""){CloseOpen(theValue); }

}

function CloseOpen(objectID){
//find out if the link they clicked is already open
	var thisObjectDisplay =  getDisplay(objectID);

//if it's open, then close it
if(thisObjectDisplay=="block"){
	closeClamShellMenu(objectID)
	}else{
	//else, open it, and close everything else
	for (i=0; i<allObjects.length;i++){
		if (objectID == allObjects[i]) 
		{
			openClamShellMenu(objectID) 
			}else{
			closeClamShellMenu(allObjects[i]) 
			}
		}
	}
}








function openAll(){
for (i=0; i<allObjects.length;i++){
		openClamShellMenu(allObjects[i]) 
	}
}

function closeAll(){
for (i=0; i<allObjects.length;i++){
		closeClamShellMenu(allObjects[i]) 
	}
}


function openClamShellMenu(objectID) {
	if (isAll || isID) {
		if(findDOM(objectID,0)){
			// alert("openClamShellMenu " + objectID);
			domStyle = findDOM(objectID,1);
			domStyle.display='block';
		}
	}
	return;
}
function closeClamShellMenu(objectID) {
	if (isAll || isID) {
		if(findDOM(objectID,0)){
			// alert("closeClamShellMenu " + objectID);
			domStyle = findDOM(objectID,1);
			domStyle.display='none';
		}
	}
	return;
}

function getDisplay(objectID) {
if (isAll || isID) {
	var domStyle = findDOM(objectID,1);
	return	domStyle.display;
	}
}
