var pages = {             
             'books':['outback-books.html','cart/1.add','book-discounts.html','book-contents.html','book-card-order-info.html','book-comments.html'],
             'cards':['outback-cards.html','cards-order.html','cards-info.html','postcards.html','book-card-order-info.html'],
             'art':['art-info.html','art-gallery','art-order-info.html','framing-info.html','art-care.html','investment-art.html'],
             'events':['exhibitions-events.html','next-exhibitions.html','past-exhibitions.html','exhibition-faq.html'],
             'outback':['outback-information.html','agricultural-info.html','horses.html','bronco-branding.html','camels.html','sheep.html','cattle-dogs.html','cattle.html','helicopters.html','windmills-bores.html','maps.html','rural-employment.html','music-films-books.html','australia-film.html','mcleods-daughters.html','outback-television.html','outback-radio.html','recommended-books.html','country-music.html','outback-tourism.html','outback-travelling.html','outback-flying.html','agricultural-journalism.html','bush-poetry.html','bush-biography-books.html','agricultural-reference-books.html','childrens-bush-books.html','aussie-expats.html','feral-pigs.html','feral-goats.html','biosecurity.html','farm-utes.html', 'on-our-selection-film.html'],
             'translations':['rural-words.html','horse-words.html','cow-words.html','station-words.html','stockman-words.html','stockman-gear-words.html','outback-words.html','outback-other-languages-words.html','australian-american-words.html'],
             'admin':['other-information.html','links.html','fiona-lake-mckindlay.html','privacy-policy.html','refunds-returns.html','copyright.html','photographs.html','website-problems.html']
            };
for(var i in pages) {
  if(in_array(page(document.location.href), pages[i]))
    ID(i).style.display = '';
  else
    ID(i).style.display = 'none';
} 
function in_array(needle,haystack) {
  for(var i in haystack)
    if(haystack[i] == needle)
      return true;
  return false;
}        
function ID(id) {
  return document.getElementById(id);
}   
function page(url) {
  apage = url.substring(url.lastIndexOf('/')+1);
  if(apage.indexOf('#') > 0)
    apage = apage.substring(0, apage.indexOf('#'));
  return apage;
}
