// **************************************************
// fine elegant coding by s.l.miller winter 2009-2010
// **************************************************


function init() {
	b1 = document.getElementById('g1');
	b2 = document.getElementById('g2');
	b3 = document.getElementById('g3');
	b4 = document.getElementById('g4');
	lodr = document.getElementById('loaderDiv');
	big = document.getElementById('bigImage');
	bDiv = document.getElementById('bigImageDiv');
	cup = document.getElementById('captionCup');
}


function i(photo, txt) {
	if (photo) {
		big.onload = function() {
			if (big.height !== 580) {
				var m = Math.floor((580 - big.height) / 2);
				big.style.marginTop = m + 'px';
				}
			bDiv.className = 'show';
			};
		cup.innerHTML = txt;
		big.src = 'img/' + photo;
		setTimeout(function() {lodr.className = 'show';}, 200);
		}
	else {
		big.onload = '';
		lodr.className = 'hide';
		bDiv.className = 'hide';
		big.src = 'gfx/blank.gif';
		big.style.marginTop = '0px';
		}
}


function cc(x) {
	b1.className = '';
	b2.className = '';
	if (b3) {b3.className = '';}
	if (b4) {b4.className = '';}
	switch(x)
	{
	case 1:
		b1.className = 'on';
		break;
	case 2:
		b2.className = 'on';
		break;
	case 3:
		b3.className = 'on';
		break;
	case 4:
		b4.className = 'on';
		break;
	}
}


function nav(nextPage) {
	location.replace(nextPage);
}

