var fullURL = unescape(location.href);
var thisFileName = fullURL.substring(fullURL.lastIndexOf("/")+1, fullURL.length);
if (thisFileName=="") {thisFileName="index.html";}
var currPage="0";
var prevPage="0";
var nextPage="0";

for (i=0; i<total; i++){
  if (thisFileName==Link[i]){
    prevPage=i-1; nextPage=i+1;
    if (prevPage<0) {prevPage=prevPage+total}
    if (prevPage>total-1) {prevPage=prevPage-total}
    if (nextPage<0) {nextPage=nextPage+total}
    if (nextPage>total-1) {nextPage=nextPage-total}
    document.write('<div>\u00AB <a href="' + Link[prevPage] + '">Previous</a> | <a href="' + Link[nextPage] + '">Read more about&nbsp;</a>');
    document.write('<a href="' + Link[nextPage] + '">'+Header[nextPage]);
    if (SubHeader[nextPage]!="") {document.write('\u00A0(' + SubHeader[nextPage] + ')')}
    document.write(' </a>\u00A0\u00BB</div>');
    break;
  }
}
