function whichElement(e,dest)
{
    var targ
    if (!e) var e = window.event
    if (e.target) targ = e.target
    else if (e.srcElement) targ = e.srcElement
    if (targ.nodeType == 3) // defeat Safari bug
       targ = targ.parentNode
    
      
    document.getElementById("menu-selected").setAttribute("id","");
    setAll();
    targ.parentNode.setAttribute("id","menu-selected"); 
    var x1=document.getElementById(dest);
    x1.setAttribute('class',"content-selected");    
    x1.style.display='inline';
}

function setAll()
{
    var sections = document.getElementsByTagName("div");
    for(var i = 0; i < sections.length; i++) {  // Loop through the returned tags
        var section = sections[i];    
        if(section.getAttribute('name')== 'content-section'){
            section.style.display='none';
        }
    } 
}