//a ludicrously simple javascript gallery thing

visPic = 'refine';

function changeCurrImg(divid) {
	document.getElementById(visPic).style.display = 'none';
	document.getElementById(divid).style.display = 'block';
	visPic = divid;
}

//must do it this way so that it works cleanly with javascript disabled
function initGallery(w,h) {
	document.getElementById("nojs").style.display = 'none';
	document.getElementById("piclist").style.display = 'table-cell';
	picnode = document.getElementById("pic");
	divnodes = picnode.getElementsByTagName("div");
	for(i=0;i<divnodes.length;i++) {
		divnodes[i].style.display = 'none';
	}
	picnode.width='420px';
	picnode.height='450px';
	document.getElementById(visPic).style.display = 'block';
}

function popupimg(imgpa, wid, hei) {
	if(!window.focus) return true;
	winname = imgpa;
	window.open(imgpa, winname, 'width='+(wid+18)+',height='+(hei+26)+',status=no,scrollbars=yes');
	return false;
}

