var SlideShowSpeed = 8000;
var CrossFadeDuration = 3;
var keep_going = true;
var Picture = new Array(); // don't change this
var Caption = new Array(); // don't change this
var Caption2 = new Array(); // don't change this
var linked = new Array(); // don't change this

Picture[1]   = 'http://gallery.usgs.gov/video/water/20091015_106_Streamgages.jpg';
Picture[2]   = 'http://ar.water.usgs.gov/meras/images/studyarea1.png';
Picture[3]   = 'http://ar.water.usgs.gov/nawqa/ozark/images/fourth.jpg';
/****
Picture[3]   = 'http://ar.water.usgs.gov/sparta_recovery/images/inTake.jpg';
****/

linked[1]   = "http://www.usgs.gov/corecast/details.asp?ep=106";
linked[2]   = "http://ar.water.usgs.gov/meras/index2.php";
linked[3]   = "http://ar.water.usgs.gov/nawqa/ozark/nawqa.html";
/***
linked[3]   = "http://ar.water.usgs.gov/sparta_recovery/header.phtml";
****/

Caption[1]   = "Streamgages: The Silent Superhero";
Caption[2]   = "Mississippi Embayment Study Aquifer (MERAS) ";
Caption[3]   = "Ozark NAWQA Study Unit";
/***
Caption[3]   = "Sparta Recovery Project";
***/

Caption2[1]  = "Whether you drink water from your tap, use electricity or canoe down your local river, chances are you benefit from USGS streamgage information. So what is a streamgage and what does it do for you? This CoreCast episode gives you the inside scoop on your silent superhero.";


Caption2[2]  = "As part of the <a href=\"http://water.usgs.gov/ogw/gwrp/activities/principal_aquifers.html\">USGS Ground-Water Resources Program</a>, a ground-water flow model of the northern Mississippi embayment will be developed using data and knowledge gained from the <a href=\"http://water.usgs.gov/cgi/rasabiblio/?category=11&form=introduction\">Gulf Coast Regional Aquifer System Analysis (GCRASA) studies</a> and other more recently completed USGS models to aid in answering questions about ground-water availability. ";
Caption2[3] = "The Ozark Plateaus NAWQA is one of more the 50 study units that are part of the U.S. Geological Survey's National Water-Quality Assessment (NAWQA) Program. The Ozark Plateaus study unit is approximately 48,000 square miles in size and includes parts of northern Arkansas, southeastern Kansas, southern Missouri, and northeastern Oklahoma."
/****
Caption2[3] = "The Sparta aquifer is Union County's only source of municipal and industrial ground water. Since development began in the early 1920's ground-water levels have declined more than 390 feet in some areas. As a result, Union was among five southern Arkansas counties designated as the state's first \"Critical Ground Water Area\" in 1996.";
***/


// =====================================
// Do not edit anything below this line!
// =====================================

var tss;
var iss;
var jss = 1;
var pss = Picture.length-1;

var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}

function stopit(){
	keep_going = false;
	jss= jss-1;
}

function startit(){
	keep_going = true;
	runSlideShow();
}


function runSlideShow(){
if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
document.images.PictureBox.src = preLoad[jss].src;


if (document.getElementById)
	{
	document.getElementById("CaptionBox").innerHTML= Caption[jss];
	document.getElementById("CaptionBox2").innerHTML= Caption2[jss];
	}
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
jss = jss + 1;
if (jss > (pss)) jss=1;
if (keep_going) tss = setTimeout('runSlideShow()', SlideShowSpeed);
}



function canManipulateImages() {
	if (document.images)
		return true;
	else
		return false;
}
function loadSlide(imageURL) {
	if (gImageCapableBrowser) {
		document.slide.src = imageURL;
		return false;
	}
	else {
		return true;
	}
}

function nextSlide() {
	gCurrentImage = (gCurrentImage + 1) % gNumberOfImages;
	loadSlide(gImages[gCurrentImage]);
}

//document.getElementById("pic_chg").href = linked[jss];
//document.getElementById("tit_chg").href = linked[jss];
//document.links[116].href       = linked[jss];
//document.links[117].href       = linked[jss];
//tit_chg.href = linked[jss];
//pic_chg.href = linked[jss];

gImageCapableBrowser = canManipulateImages();
gCurrentImage = 0;


function changeColour(elementId) {
var interval = 1000;
var colour1 = "red", colour2 = "blue";
if (document.getElementById) {
var element = document.getElementById(elementId);
element.style.background = (element.style.background == colour1) ? colour2 : colour1;
setTimeout("changeColour('" + elementId + "')", interval);
}
}




// -->
