function showDetails(fid) {
var numDetails = 1;  //this value has to match the number of popopen details items
var detail = 'viewDetail'+fid;
CloseAllButOne(detail,numDetails);
}

function swapDisplay(varID) {
	// check for IE
	if(document.all){
            itemToSwap = document.all[varID]
        }
		// check for NN6
        if(!document.all && document.getElementById){
           itemToSwap = document.getElementById(varID)
        }	

	if(itemToSwap.style.display=="none") {
		itemToSwap.style.display=""
	}
	else {
		itemToSwap.style.display="none"
	}
}

function CloseAllButOne(varID,numofsolutions) {
      solcount = numofsolutions;
      for(i=1;i<=solcount; i++) {
            var controlName = "viewDetail"+i;
			
	// check for IE
	if(document.all){
            var itemClicked = document.all[varID]
            itemToSwap = document.all[controlName]
        }
		// check for NN6
        if(!document.all && document.getElementById){
            var itemClicked = document.getElementById(varID)
           itemToSwap = document.getElementById(controlName)
        }				

            if(controlName != varID) {
                  itemToSwap.style.display="none"
            }
            else {
				if(itemToSwap.style.display=="none") {
					itemToSwap.style.display=""
				}
				else 	{
					itemToSwap.style.display="none"
				}
            }
      }     
}
