function menu(list) {
 var temp = list.selectedIndex
 list.selectedIndex = 0
 window.location = list.options[temp].value
}
var petlist = "snuggles.html|Snuggles*dora.html|Dora*herbie.html|Herbie*bandy.html|Bandy*greenguy.html|Green Guy*harriet.html|Harriet*syd.html|SYD*mack.html|Mack*ogre.html|Ogre*boots.html|Boots*kiwi.html|Kiwi*rocky.html|Rocky*mo.html|Mo"
var dplist = "colony.html|Roaches*blana.html|B'lana*fish.html|Red Fish*fish2.html|Other Red Fish*zane.html|Zane*skit.html|Skit*cart.html|Cart*nancy.html|Nancy*snap.html|Snap*gus.html|Gustav*gammara.html|Gamarra*";
petarray = petlist.split("*")
var href = document.location.href
harray = href.split("/")
curdoc = harray[harray.length-1]

var curpet = -1;
// which pet am I?
for (i=0; i <= petarray.length -1;i++) {
 var temp = petarray[i]
 var lookpet = temp.split("|")
 if (lookpet[0] == curdoc) {
  curpet = i
 }
}
document.write('<form name=pet>')
document.write("<P align=center>")
// write the previous if I'm not the first chronicle.
if (curpet > 0) {
 var temp = petarray[curpet - 1]
 var firstpet = temp.split("|")
 document.write("<a href=" + firstpet[0] + ">Previous</a>")
}
// create the drop down list to go to each chronicle...

document.write(' &nbsp; <select NAME="Category" SIZE="1" onChange="menu(this)">\n')
document.write('<option VALUE="">Choose One</option>\n')
document.write('<option VALUE="/pets/">Pets</option>\n')
for (i=0; i <= petarray.length - 1; i++) {
 var oneline = petarray[i]
 petdtl = oneline.split("|")
 document.write('<option value=' + petdtl[0] + '>'+ petdtl[1] + ' </option>\n')
}
document.write('</select>')
// try to figure out if I'm the last chronicle
pets = petarray.length - 1
if (curpet < pets) {
 var i = curpet + 1
 var temp = petarray[i]
 var firstpet = temp.split("|")
 document.write(" &nbsp; <a href=" + firstpet[0] + ">Next</a>")
}
document.write('</p>')
document.write('</form>')


