// JavaScript Document


<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
// If it's Internet Explorer, use automatic link
// Be sure to change the "http://www.YourWebSiteHere.com\"
// to the URL you want them to bookmark.
if (document.all){
  document.write('<a href="javascript:history.go(0);" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\'http://www.mblangham.com\');">');
  document.write('Make mblangham.com your homepage</a>');
}

// If it's Netscape 6, tell user to drag link onto Home button
// Be sure to change the "http://www.YourWebSiteHere.com\"
// to the URL you want them to bookmark.
else if (document.getElementById){
  document.write('<a href="http://www.mblangham.com" title="Drag this link onto your Home button to make this your Home Page">Make mblangham.com your homepage</a>');
}

// If it's Netscape 4 or lower, give instructions to set Home Page
else if (document.layers){
  document.write('Make this site your home page:</b><br>- Go to <b>Preferences</b> in the Edit Menu. - Choose <b>Navigator</b> from the list on the left.<br>- Click on the <b>"Use Current Page"</b> button.');
}

// If it's any other browser, for which I don't know the specifications of home paging, display instructions
else {
  document.write('<b>Make this site your home page:</b><br>- Go to <b>Preferences</b> in the Edit Menu.<br>- Choose <b>Navigator</b> from the list on the left.<br>- Click on the <b>"Use Current Page"</b> button.');
}
//  End -->
<!-- Begin

NewImg = new Array (
"/images/africa/two_at_dinner.jpg",
"/images/africa/three_chairs.jpg", 
"/images/africa/tech_director.jpg",
"/images/africa/dancers_in_ring.jpg",
"images/africa/display_in_action.jpg");

NewCap = new Array(
"Two at dinner",
"Three chairs",
"The staff",
"African dance",
"Display in action"
);
var ImgNum = 0;
var ImgLength = NewImg.length - 1;

var lock = false;
var run;

function chgImg(direction) {
	if (document.images) {
		ImgNum = ImgNum + direction;
		if (ImgNum > ImgLength) {
			ImgNum = 0;
		}
		if (ImgNum < 0) {
			ImgNum = ImgLength;
		}
		document.slideshow.src = NewImg[ImgNum];
		caption.innerText = NewCap [ImgNum];
	}
}

function auto() {
	if (lock == true) {
		lock = false;
		window.clearInterval(run);
	}
	else if (lock == false) {
		lock = true;
		run = setInterval("chgImg(1)", delay);
   }
}
//  End -->
