// JavaScript Document
window.onload = initAll;

var currImg = 0;
var captionText = new Array(
	"Slide 01: Welcome to Harleigh Knoll, located across the Chesapeake Bay and north of St. Mary's City.  Although this may not look a burial site, what archaeologists and forensic anthropologists find hidden beneath the soil will uncover mysteries that have been buried for hundreds of years.",
	"Slide 02: These cobblestones, which initially were scattered along the top of the knoll, caught the attention of archaeologists.  In colonial cemeteries, cobblestones like these were sometimes used as grave markers.   A team of scientists, students, and the author of Written in Bone, Sally M. Walker, begin their investigation.",
	"Slide 03: Ground Penetrating Radar is used on Harleigh Knoll to indicate where objects such as coffins are buried. Work crews remove dirt and begin sifting the soil of 12 possible burial plots.",
	"Slide 04: As scientists continue to dig, they make a surprise discovery!  In this burial plot, designated as Harleigh Knoll Burial 7 (HK7), the team expected to find the remains of a European, but this skeleton tells a different story.",
	"Slide 05: After removing the remains of the coffin, the team discovers the skeleton is actually consistent with an individual of African ancestry.  But how do they know?  The angle of the front of the jaw, the rounded forehead, and the broad nasal opening are consistent with those of a person of African heritage.",
	"Slide 06: The team continues to gather more clues to piece together who this person was.  Further measurements and studies of the skull, pelvic bones, long bones, and teeth help reveal that these are the remains of young woman, approximately five feet tall, who was 18 or 19 years old when she died.",
	"Slide 07: One thing scientists and historians cannot determine about HK7 is what the girl looked like when she was alive.  Forensic artists help solve these puzzles by creating lifelike facial reconstructions.",
	"Slide 08: Using a CT scanner, the team makes digital &quot;slices&quot; of the actual skull then combines them together to form a virtual image that will be used to make replica skulls for facial reconstruction.  This image accurately reflects the surface features of the original skull-including the tiniest cracks, depressions, and raised areas.",
	"Slide 09: Forensic artists use the replica skulls to create a clay reconstruction of the face.  Noting the girl's African ancestry, brown eyes are placed in the eye sockets and markers are placed on the skull to stand for the thickness of skin and facial muscles.",
	"Slide 10: Based on the size and location of the markers, clay is added to form tissue and features on the replica skull.  Oil-based clay is used because it does not dry.  It remains soft to the touch, so the artist can rework the features as needed.",
	"Slide 11: Once the forensic artists complete the soft-clay reconstruction, the replica skull is sent to an art studio whose sculptors specialize in creating permanent lifelike models.  The first step at the art studio is to create a plaster mold of the skull.",
	"Slide 12: Once the plaster mold is completed, it is removed and filled with water-based clay.  This clay is pliable enough for the artists to add precise features that give the model the look of a living person.",
	"Slide 13: Working with scientists, the sculptors look at a living teenage girl whose bone structure resembles that of the skeleton, and note the small details of her face-the curve of the tip of an ear or the way the skin lies over a cheek or jaw-to add lifelike characteristics around the eyes, mouth, and chin.",
	"Slide 14: The use of clay allowed the sculptors at StudioEIS to continually refine details on the model until the scientists gave their approval to create the final, permanent reconstruction.",
	"Slide 15: The final product! After one last mold is created and filled with plaster, an artist paints the sculpture to complete the facial reconstruction.  The result is a lasting, durable sculpture worthy of museum display.  It's also one of the first such reconstructions of an American colonist of African ancestry!",
	"Slide 16: Author Sally M. Walker, seen here on the anthropological dig described in Written in Bone, has meticulously researched everything from fossil fish to civil war submarines."
)
var creditText = new Array(
	"Photo: National Museum of Natural History, Smithsonian Institution in Washington, D.C. courtesy of Doug Owsley, photo by Chip Clark.",
	"Photo: National Museum of Natural History, Smithsonian Institution in Washington, D.C. courtesy of Doug Owsley, photo by Chip Clark.",
	"Photo: National Museum of Natural History, Smithsonian Institution in Washington, D.C. courtesy of Doug Owsley, photo by Chip Clark.",
	"Photo: National Museum of Natural History, Smithsonian Institution in Washington, D.C. courtesy of Doug Owsley, photo by Chip Clark.",
	"Photo: National Museum of Natural History, Smithsonian Institution in Washington, D.C. courtesy of Doug Owsley, photo by Chip Clark.",
	"Photo: National Museum of Natural History, Smithsonian Institution in Washington, D.C. courtesy of Doug Owsley, photo by Chip Clark.",
	"Photo: National Museum of Natural History, Smithsonian Institution in Washington, D.C. courtesy of Doug Owsley, photo by Brittney Tatchell",
	"Photo: National Museum of Natural History, Smithsonian Institution in Washington, D.C. courtesy of Doug Owsley, image by Dr. Bruno Frohlich.",
	"Photo: National Museum of Natural History, Smithsonian Institution in Washington, D.C. courtesy of Doug Owsley, photo by Chip Clark.",
	"Photo: National Museum of Natural History, Smithsonian Institution in Washington, D.C. courtesy of Doug Owsley, photo by Chip Clark.",
	"Photo: Sculpture by StudioEIS, Brooklyn NY, photo by BJ Ervick-StudioEIS",
	"Photo: Sculpture by StudioEIS, Brooklyn NY, photo by BJ Ervick-StudioEIS",
	"Photo: Sculpture by StudioEIS, Brooklyn NY, photo by BJ Ervick-StudioEIS",
	"Photo: Sculpture by StudioEIS, Brooklyn NY, photo by BJ Ervick-StudioEIS",
	"Photo: Sculpture by StudioEIS, Brooklyn NY.  Photo:  National Museum of Natural History, Smithsonian Institution in Washington, D.C. courtesy of Doug Owsley, photo by Chip Clark.",
	"Photo: National Museum of Natural History, Smithsonian Institution in Washington, D.C. courtesy of Doug Owsley, photo by Chip Clark."
)

function initAll() {
	document.getElementById("imgText").innerHTML = captionText[0];
	document.getElementById("imgCredit").innerHTML = creditText[0];
	document.getElementById("link-prev-top").onclick = processPrevious;
	document.getElementById("link-next-top").onclick = processNext;
	document.getElementById("link-prev-bottom").onclick = processPrevious;
	document.getElementById("link-next-bottom").onclick = processNext;
}

function processPrevious() {
	newSlide(-1);
}

function processNext() {
	newSlide(1);
}

function newSlide(direction) {
	var imgCt = captionText.length;

	currImg = currImg + direction;
	
	if (currImg < 0) {
		currImg = imgCt-1;
	}
	else if (currImg == imgCt) {
		currImg = 0;
	}
	document.getElementById("slideshow").src = "slideshow/" + currImg + ".jpg";
	document.getElementById("imgText").innerHTML = captionText[currImg];
	document.getElementById("imgCredit").innerHTML = creditText[currImg];
}

						