// JavaScript Image Gallery
// by Jeremy Keith
// http://www.alistapart.com/articles/imagegallery/
// modificado por Adriano Ribeiro

function showPic (whichpic, thumbnail) {
	if (document.getElementById) {
		
	if (document.getElementById('active')) {
		anterior = document.getElementById('active');
		anterior.id = '';
		}
		whichpic.parentNode.id = 'active';
		
		thumb = document.getElementsByTagName("img");

		for(var x=0;x<thumb.length;x++) {
			if(thumb[x].className=="checked") {
				thumb[x].className="";
			}
		}
					
		document.getElementById('thumb'+thumbnail).className = 'checked';
		
		document.getElementById('full').src = whichpic.href;
		
			return false;
		} else {
			return true;
	}
}
