// additions should be organized alphabetically by FIRST name, per editorial.  however, files use only last names.  
var authorsArray = new Array("nightingale","owen","mogul","astrolife","mulligan","hajdu","scofield","pagano","oliver","oja","jones","whitehurst","francis","meyers","ronco","star","heather","seltzer","mathis","valsecia","legge","shepherd","tracey","kast","townley","pearl","garcia","ktaylor","chambers","surtees","gallagher","canter","frano","houston","hill","lerner","orr","shea","currie","hajjar","mtaylor","erlewine","best","mchenry","sedgwick","roffe","goodwin","redd","geppi","schostak","rosenbaum","forrest","levitt","white");
pageName = location.href;

var foundit=false;
if (pageName != "http://www.astrology.com/readings/index.html") {
  var lastPart = pageName.split("_");
  var currentAuthor = lastPart[1].split(".");

	for(i=0; i<authorsArray.length; i++) {
		if (currentAuthor[0] == authorsArray[i]) {
			var currentAuthorNum = i;
			var foundit = true;
		}
	}
}

if (foundit==false) {
document.getElementById('next').href="http://www.astrology.com/readings/author_intro.html";
document.getElementById('previous').href="http://www.astrology.com/readings/author_intro.html";
document.getElementById('next').innerHTML="";
document.getElementById('previous').innerHTML="";
} else {
document.getElementById('next').href="http://www.astrology.com/readings/author_" + authorsArray[currentAuthorNum+1] + ".html";
document.getElementById('previous').href="http://www.astrology.com/readings/author_" + authorsArray[currentAuthorNum-1] + ".html";
if (currentAuthorNum == 0) {
document.getElementById('previous').href="http://www.astrology.com/readings/author_" + authorsArray[(authorsArray.length-1)] + ".html";
}
if (currentAuthorNum == (authorsArray.length-1)) {
document.getElementById('next').href="http://www.astrology.com/readings/author_" + authorsArray[0] + ".html";
}
}

