function imgswap(newsrc, dimension){
	the_pic = new Image();
	if (newsrc==''){
			var resrc = document.getElementById('the_painting').getAttribute('src');
			var chopat = resrc.lastIndexOf('=');
			resrc = resrc.substring(0, chopat+1);
			resrc = resrc+dimension;
			the_pic.src = resrc;
	} else {
		the_pic.src = 'imager.php?img='+newsrc+'&resizer=max&dimension='+dimension;
	}
	document.getElementById('the_painting').setAttribute('src', the_pic.src);
}
