function ThumbOver (which, gall) {
	thumb = which + '_thumb';
	thumbpic = '/images/galleries/' + gall + '/' + which + '_th.jpg';
	document.images[thumb].src = thumbpic;
}

function ThumbOut (which, gall) {
	thumb = which + '_thumb';
	thumbpic = '/images/galleries/' + gall + '/' + which + '_th_dim.jpg';
	document.images[thumb].src = thumbpic;
}

function PaintOver (which, gall) {
	medpic = '/images/galleries/' + gall + '/' + which + '_med.jpg';
	document.images.med.src = medpic;
}


function toggle( targetId ){

med = targetId + '_med';

	for (i in paintings) {
		p_id = paintings[i];
		
		p_med = p_id + '_med';
	
		if (document.getElementById){
			target = document.getElementById( p_med );
			target.style.display = "none";
		}
	}
	
	
	if (document.getElementById){
		target = document.getElementById('default_med');
		target.style.display = "none";

		target = document.getElementById(med);
		target.style.display = "";

	}

	if (document.getElementById){
		target = document.getElementById('clickagain');
		target.style.display = "";

	}
}



function popup (a, name, w, h) {
	url = a.href;
  var details= "toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizeable=yes,status=no,width=" + w + ",height= " + h + " ";
  window.open(url,name,details);
}


function newWindow(a) {
      a.target = "_blank";
}
