// JavaScript Document

function processPrevious() {
	if (document.images && thisPic > 0) {
		thisPic--
		document.mypicture.src=myPix[thisPic]
		}
	}
	
function processNext() {
	if (document.images && thisPic < imgCt) {
		thisPic++
		document.myPicture.src=myPix[thisPic]
		}
	}
	
function chgSlide(direction) {
	if (document.images) {
		thisPic = thisPic + direction
		if (thisPic > imgCt) {
			thisPic = 0
		}
		if (thisPic < 0) {
			thisPic = imgCt
		}
	}
}

function newWindow() {
	slideWindow = window.open('slideshow.htm', 'newWin', 'toolbar=no,location=no,scrollbars=no,resize=no,width=520,height=485')
	slideWindow.focus()
	}
	
function closeWindow() {
	slideWindow = window.open('slideshow.htm', 'newWin', 'toolbar=no,location=no,scrollbars=no,resize=no,width=520,height=485')
	if (slideWindow && !slideWindow.closed) {
		slideWindow.close()
		}
	}

function processPreviousCaption() {
	if (document.caption && thisCap > 0) {
		thisCap--
		document.myCaption.src=myCap[thisCap]
		}
	}
	
function processNextCaption() {
	if (document.caption && thisCap < capCt) {
		thisCap++
		document.myCaption.src=myCap[thisCap]
		}
	}

function chgCaption(direction) {
	if (document.images) {
		thisCap = thisCap + direction
		if (thisCap > capCt) {
			thisCap = 0
		}
		if (thisCap < 0) {
			thisCap = capCt
		}
		document.myCaption.src=myCap[thisCap]
		}
	}