/* script for displaying and hiding popular articles on left side */

// renders a category visible or invisible
function switchCategoryVisibility(id,img,plussrc,minussrc){
	if(document.getElementById){
		// retrieve unordered list
		var element = document.getElementById("main_populararticles" + id);
		// if it's invisible change the image to a minus and render it visible
		if(element.style.display == "none"){
			element.style.display = "block";
			img.src = minussrc;
		}
		else{ // it's visible, so hide it and change the image to a plus
			element.style.display = "none";
			img.src = plussrc;
		}
	}
	else{
		alert("We're sorry, but your browser does not support this feature.  Please use the Browseable Library instead.");
	}
}