//pass the id (in single quotes) of the div you wish to show, in the function callfunction toggle(elemId){   var a = document.getElementById(elemId);//get all the divs inside the topHeadContentWrap div (I gave it an id, it did not have one before)  var b = document.getElementById("topHeadContentWrap").getElementsByTagName('div');//loop through all the divs in the topHeadContentWrap id'd div   for (var i = 0; i < b.length; i++) { //if they don't have an identical id to the div we want to show, hide them. The && b[i].id != elemId allows to toggle the div later    if (b[i].className === "unhidden" && b[i].id != elemId) {       b[i].className = "hidden";    }  }//toggle the div we are showing - if it is already shown, successive clicks will hide or show it  a.className = (a.className === "unhidden")?"hidden":"unhidden";}