function showPic(whichpic, whichholder) {
    if (document.getElementById) {
        fadeoutPic(whichpic.href, whichholder);
        return false;
    } else {
        return true;
    }
}

function fadeoutPic(newpicurl, whichholder) {
	$(document.getElementById(whichholder)).fadeOut("slow", function(){
		replacePic(newpicurl, whichholder);
	});
}

function replacePic(newpicurl, whichholder) {
	$(function () {
		var img = new Image();
		$(img)
			.load(function() {
				document.getElementById(whichholder).src = this.src;
				$(document.getElementById(whichholder)).fadeIn("slow");
			})
			.error(function() {
				// alert('there was a loading error');
			})
			.attr('src', newpicurl);
	})
}