Here is the function I'm trying to use:

Code:
function expand_collapse(content_div, expand_image)
{
	var select_div = document.getElementById(content_div);
	var select_image = document.getElementById(expand_image);
	
	if(select_div.style.display == 'none')
		select_div.style.display = 'block';
	else
		select_div.style.display = 'none';
		
	if(select_image.src == 'images/COLLAPSE.gif')
		select_image.src = 'images/EXPAND.gif';
	else
		select_image.src = 'images/COLLAPSE.gif';
		
}
I essentially pass it two variables, both of which are ID tags for the appropriate div and image. the div displays or hides correctly, but the image is not changing. Does anyone see anything wrong with my function?