var images = new Array("images/good_doctor/sneezer_01.jpg", 
						"images/good_doctor/sneezer_02.jpg", 
						"images/good_doctor/sneezer_03.jpg", 
						"images/good_doctor/sneezer_04.jpg",
						"images/good_doctor/sneezer_05.jpg",
						"images/good_doctor/sneezer_06.jpg",
						"images/good_doctor/sneezer_07.jpg",
						"images/good_doctor/sneezer_08.jpg",
						"images/good_doctor/drowned_man01.jpg",
						"images/good_doctor/drowned_man02.jpg",
						"images/good_doctor/drowned_man03.jpg",
						"images/good_doctor/drowned_man04.jpg",
						"images/good_doctor/drowned_man05.jpg",
						"images/good_doctor/drowned_man06.jpg",
						"images/good_doctor/drowned_man08.jpg",
						"images/good_doctor/drowned_man10.jpg",
						"images/good_doctor/arrangement_01.jpg",
						"images/good_doctor/arrangement_02.jpg",
						"images/good_doctor/arrangement_04.jpg",
						"images/good_doctor/arrangement_05.jpg",
						"images/good_doctor/arrangement_06.jpg"
						);

var widths = new Array("410",
						"410",
						"410",
						"410",
						"410",
						"410",
						"410",
						"410",
						"410",
						"410",
						"410",
						"410",
						"410",
						"410",
						"410",
						"410",
						"410",
						"410",
						"410",
						"410",
						"410"
						);
var spot = 0;

function viewImage(num) {
	var i;
	var d;
	
	if (document.getElementById) { 
		i = document.getElementById("largepic");
		d = document.getElementById("img-shadow");
	}
	else if (document.all && !document.getElementById) {
		i = document.all("largepic");
		d = document.all("img-shadow");
	}
	i.src = images[num];
	d.style.width = widths[num] + "px";
	spot = num;
	scroll(0,0);
}

function nextImage() {
	if (document.getElementById) { 
		i = document.getElementById("largepic");
		d = document.getElementById("img-shadow");
	}
	else if (document.all && !document.getElementById) {
		i = document.all("largepic");
		d = document.all("img-shadow");
	}
	spot += 1;
	if (spot >= images.length) {
		spot = 0;
	}
	i.src = images[spot];
	d.style.width = widths[spot] + "px";
}

function previousImage() {
	if (document.getElementById) { 
		i = document.getElementById("largepic");
		d = document.getElementById("img-shadow");
	}
	else if (document.all && !document.getElementById) {
		i = document.all("largepic");
		d = document.all("img-shadow");
	}
	spot -= 1;
	if (spot < 0) {
		spot = images.length - 1;
	}
	i.src = images[spot];
	d.style.width = widths[spot] + "px";
}
