var pages = {
             'about_us':['', 'index.html','staff.html','nicky-jurd.html','kaj-haffenden.html','eve-seruelas.html','emmy-kerrigan.html','belinda-vere.html','adam-wolfs.html','linda-wilks.html','jennifer-paolucci.html','james-orland.html','jason-hendry.html','abhi-beckert.html','matt-langtree.html','arthur-watts.html','rob-agar.html','erick-zegeer.html','maggie-mcneil.html','ben-norris.html','employment.html'],
             'website_development':['website-design.html','website-modifications.html','website-types.html','preparation.html','copywriting.html','proofreading.html','development-portfolio.html','portfolio-all.html','development-prices.html','modification-request-thanks.html'],             
             'programming':['programming-services.html','programming-portfolio.html','programming-prices.html'],             
             'internet_marketing':['internet-marketing.html','internet-marketing-training.html','search-engine-optimisation.html','success-stories.html','seo-prices.html','should-you.html'],             
             'prices':['prices.html'],             
             'articles':['articles.html','article-google-best.html','article-ecommerce-success.html','article-advertising-standards.html' ],
             'contact':['contact.html','contact-thanks.html','resolutions-2009.html','resolution-thanks.html'],
             'readytogo':['readytogo-websites.html','readytogo-tc.html','readytogo-contact-thanks.html','readytogo-portfolio.html']                    
            };
for(var i in pages) {
  if(in_array(page(document.location.href), pages[i])) {
    if (ID(i))
      ID(i).style.display = '';
    if (ID(i+'_parent'))
      ID(i+'_parent').className = 'active';
  } else {
    if (ID(i))
      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;
}
