function toggleDiv(divName) { var theDiv = document.getElementById(divName); var theImg = document.getElementById('img' + divName); if (theDiv.style.display == 'none') { //show it theDiv.style.display = 'block'; theImg.src = '/images/collapse.gif'; } else { //hide it theDiv.style.display = 'none'; theImg.src = '/images/expand.gif'; } } function setImage(divName,mouseOver) { var theDiv = document.getElementById(divName); var theImg = document.getElementById('img' + divName); if (theDiv.style.display == 'none') { //it's collapsed if(mouseOver) theImg.src = '/images/expand_over.gif'; else theImg.src = '/images/expand.gif'; } else { //it's expanded if(mouseOver) theImg.src = '/images/collapse_over.gif'; else theImg.src = '/images/collapse.gif'; } }