// JavaScript Document

function swapImage(imagea,imageb)
{
		//alert("swapImage: " + imagea + " with " + imageb);
		var urlA = document.getElementById(imagea).src
		var urlB = document.getElementById(imageb).src
		var altA = document.getElementById(imagea).alt
		var altB = document.getElementById(imageb).alt
		urlA = urlA.replace(/small/,"medium");
		urlB = urlB.replace(/medium/,"small");
	
		//put the medium image in place
		document.getElementById(imagea).src = urlB
		
		//put the small image in place
		document.getElementById(imageb).src = urlA
		
		//swap the alts!
		document.getElementById(imagea).alt = altB
		document.getElementById(imageb).alt = altA
}