Why isn't this doing what I want?

Code JavaScript:
function switchImage(obj) {
	if (obj.src == 'images/minus.gif') {
		obj.src = 'images/plus.gif';
	}
	else {
		obj.src = 'images/minus.gif';
	}
}

basically, this function is meant to check what image is currently set as the source, and swap it with the other image. I'm using it as part of a collapsing tree. What's happening at the moment is it will change the sign from plus.gif to minus.gif (as the if statement returns false so it performs the else command) but the if statement doesn't parse as true even when 'obj' is set to 'images/minus.gif'. I'm a javascript noob, so I could have made a really basic mistake.

I always call the function within an img tag like so onclick="switchImage(this)". Here's the exact img tag I'm using incase that helps.

Code HTML4Strict:
<img src="images/plus.gif" onclick="switchImage(this);">

Heaps of brownie points to those who help

Cheers!