<!-- Copyright 2004 Bontrager Connection, LLC
// See the "Easy IFRAME Slide Show" article linked from
//      http://willmaster.com/possibilities/archives/
//      for more information about this JavaScript.


// Type the URLs of iframe content pages, in order, 
//    between the parenthesis. URLs are in quotes 
//    and separated with a comma.

ContentURLs = new Array("content/content_home_1.htm",
                        "content/content_home_2.htm",
                        "content/content_home_3.htm",
                        "content/content_home_4.htm");


// What is the id of the anchor link to the 
//    first iframe content page?

var idToFirstContentPage = "start";


// What is the id of the anchor link to the 
//    last iframe content page?

var idToLastContentPage = "end";


// What is the id of the anchor link to the 
//    previous iframe content page?

var idToPreviousContentPage = "previous";


// What is the id of the anchor link to the 
//    next iframe content page?

var idToNextContentPage = "next";


// End of customization.


var ThisIsIt = 0;
function ShowingContent(s) {
     if(s == idToFirstContentPage)    { ThisIsIt = 0; }
else if(s == idToLastContentPage)     { ThisIsIt = ContentURLs.length - 1; }
else if(s == idToNextContentPage)     { ThisIsIt++; if(ThisIsIt >= ContentURLs.length) { ThisIsIt = 0; } }
else if(s == idToPreviousContentPage) { ThisIsIt--; if(ThisIsIt < 0) { ThisIsIt = ContentURLs.length - 1; } }
setTimeout('AdjustLinkDestinations()',500);
return true;
} // ShowingContent()

function AdjustLinkDestinations() {
var start = 0;
var end = ContentURLs.length - 1;
var previous = ThisIsIt - 1;
if(previous < 0) { previous = ContentURLs.length - 1; }
var next = ThisIsIt + 1;
if(next >= ContentURLs.length) { next = 0; }
var numlinks = document.links.length - 1;
for(var i = 0; i <= numlinks; i++) {
	var Tid = document.links[i].id;
	     if(Tid == idToFirstContentPage)    { document.links[i].href = ContentURLs[start];    }
	else if(Tid == idToLastContentPage)     { document.links[i].href = ContentURLs[end];      }
	else if(Tid == idToPreviousContentPage) { document.links[i].href = ContentURLs[previous]; }
	else if(Tid == idToNextContentPage)     { document.links[i].href = ContentURLs[next];     }
	}
} // AdjustLinkDestinations()

//-->


