
var navDscr = new Array;
navDscr[1] = "Find out more about Ann in her Biography, FAQ, and more…";
navDscr[2] = "See photographs from Ann in her travels, book signings, vacations, and more…";
navDscr[3] = "Read letters written from Ann to you, her fans!";
navDscr[4] = "Find out more about <i>The Baby-sitter’s Club</i>, other novels and series, and all of other books Ann M. Martin has written.";
navDscr[5] = "Chat with other readers about your favorite Ann M. Martin books.";

function showDscr(which) {
	obj = document.getElementById("amNavBarDscr");
	obj.innerHTML = navDscr[which];
	obj.style.visibility = "visible";
}
function hideDscr() {
	document.getElementById("amNavBarDscr").style.visibility = "hidden";
}


// Number of hot topic links
hotTopicCount = 3;

// Set initial variables
hotTopicLink = 1;

speed = 2000;
timer = "off";

hotTopics = new Array(hotTopicCount);

function kickstart() {
		
	hotTopics[1] = '<a href="/annmartin/bsc/index.htm">See the Complete BSC Series List!</a>';
	hotTopics[2] = '<a href="/annmartin/photoalbum/main-street_tours.htm">Check out the Main Street Tour!</a>';
	hotTopics[3] = '<a href="/annmartin/about/index.htm">Read Ann\'s Biography</a>';

	if (timer=="off")	{
	 		setTimeout("cycle()",speed);
		}
		timer = "on";
	
}

function cycle() {
	obj = document.getElementById("amHottopics");
   	hotTopicLink += 1;
	if (hotTopicLink > hotTopicCount) hotTopicLink = 1;
	obj.innerHTML = hotTopics[hotTopicLink];
    setTimeout("cycle()",speed);
  
}


//nav letters section

var h = "";

function toggle(theDiv) {
	if(h != "") {
		if(h != theDiv) document.getElementById(h).style.display = "none";
	}
	h = theDiv;
     var elem = document.getElementById(theDiv);
     elem.style.display = (elem.style.display == "none")?"":"none";
}


//nav about section
function toggle2(theDiv) {
     var elem = document.getElementById(theDiv);
     elem.style.display = (elem.style.display == "none")?"":"none";
}


function getURL(uri) {
uri.dir = location.href.substring(0, location.href.lastIndexOf('\/'));
uri.dom = uri.dir; if (uri.dom.substr(0,7) == 'http:\/\/') uri.dom = uri.dom.substr(7);
uri.path = ''; var pos = uri.dom.indexOf('\/'); if (pos > -1) {uri.path = uri.dom.substr(pos+1); uri.dom = uri.dom.substr(0,pos);}
uri.page = location.href.substring(uri.dir.length+1, location.href.length+1);
pos = uri.page.indexOf('?');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
pos = uri.page.indexOf('#');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
uri.ext = ''; pos = uri.page.indexOf('.');if (pos > -1) {uri.ext =uri.page.substring(pos+1); uri.page = uri.page.substr(0,pos);}
uri.file = uri.page;
if (uri.ext != '') uri.file += '.' + uri.ext;
if (uri.file == '') uri.page = 'index';
uri.args = location.search.substr(1).split("?");
return uri;
}
