// JavaScript Document
function purpleMenuColours() {
  var array = ["Arts & Crafts", "Global Crafts", "Quipu", "Craft Centre", "Pauline's Patchwork", "Sewing Store", "Brunswick Interiors", "Spellbound", "Jigsaw Shop", "MargStudio", "Jolero", "Heritage Art", "Lyn's Ironing Service", "Weyland Windows", "SJ's Hair Salon"];
  menuColours(array);
}

function blueMenuColours() {
  var array = ["Ferry", "Hope Square Breweries", "Nothe Gardens", "Tudor House"];
  menuColours(array);
}

function brownMenuColours() {
  var array = ["Aphrodite", "Harbour Lights", "Quay Moments", "Ship to Shore", "Wowz on Canvas", "Blissfull Beauty", "The Quartermaster's Stores", "Volumes", "Quayside Leather"];
  menuColours(array);
}

function greenMenuColours() {
  var array = ["Discovery", "Timewalk", "Weymouth Museum"];
  menuColours(array);
}

function mintMenuColours() {
  var array = ["Dorset Brewing Company", "Sweet Sensations", "Village Stores"];
  menuColours(array);
}

function cyanMenuColours() {
  var array = ["Courtyard Restaurant", "Excise House"];
  menuColours(array);
}

function orangeMenuColours() {
  var array = ["Cloud 9 Collectables", "Old Trains n Toys", "Past & Presents", "Bracelets to Buckles"];
  menuColours(array);
}

function redMenuColours() {
  var array = ["Born to Dance", "Crafty Arty's Castle", "Pooh & Pals"];
  menuColours(array);
}

function visitorMenuColours() {
  var array = ["Opening Times", "Directions", "Disabled Access", "Group Visits", "Request Information"];
  menuColours(array);
}

function virtualtoursMenuColours() {
  var array = ["Courtyard Restaurant", "Ship-To-Shore", "Timewalk"];
  menuColours(array);
}

function newsMenuColours() {
  var array = ["Latest News & Events", "Archived News & Events"];
  menuColours(array);
}

function menuColours(array) {
  title = document.title.substr(15);
  for (var i=0; i<array.length; i++) {
     if (title.indexOf(array[i]) > -1) {
       var current = document.getElementById(array[i]);
	   current.style.backgroundColor = "#777777";
       var current = document.getElementById(array[i] + " A");
	   current.style.color = "#ffffff";
	 }
  }
}