// shake browser window

var qDuration=100;

var qCounter=0;

function quake() {

	// the horizontal displacement

	var deltaX=10;

	// make sure the browser support the moveBy method 
	if (window.moveBy) {
	
		for (qCounter=0; qCounter<qDuration; qCounter++) {
			// shake left
			if ((qCounter%4)==0) {
				window.moveBy(deltaX, 0);
			}
			// shake right else 
			if ((qCounter%4)==2) {
				window.moveBy(-deltaX, 0);
			}
			// speed up or slow down every X cycles
			if ((qCounter%30)==0) {
				// speed up halfway
				if (qCounter<qDuration/2) {
					deltaX++;
				}
				// slow down after halfway of the duration
				else {
					deltaX--;
				}
			} 
		}
	}
}

// old-fashioned wrap around slide show

myPix = new Array("lamBlckSheep.jpg", "lamBumber.jpg", "lamCentral01.jpg", "lamFete.jpg", "lamLimb.jpg", "lamLoco.jpg", "lamMont01.jpg", "lamMont02.jpg", "lamSummer.jpg", "lamTh.jpg", "lamUtah.jpg", "lamWhtPlns.jpg")
thisPic = 0
imgCt = myPix.length - 1

function chgSlide(direction) {
	if (document.images) {
		thisPic = thisPic + direction
		if (thisPic > imgCt) {
			thisPic = 0
		}
		if (thisPic < 0) {
			thisPic = imgCt
		}
		document.myPicture.src=myPix[thisPic]
	}
}

