function checkpage(mainloc, img_root, pagefilename, buttonname, override)
{
  var newimg = img_root + buttonname + ".gif"
  var result = false
  if ((!override) && (mainloc.indexOf(pagefilename) != -1)) {
    newimg = img_root + buttonname + "_hi.gif"
	result = true
  }
  if (document['top/'+buttonname]) {
    var currntimg = document['top/'+buttonname].src
    if ((currntimg.indexOf(newimg) == -1) && ((currntimg.indexOf('_roll.gif') == -1) || (result == true))) {
      document['top/'+buttonname].src = path_modifier + newimg
    }
  }
  return result
}

function checkframe()
{
  if (document.images && parent.mainDrCheese)
  {
    var mainloc = parent.mainDrCheese.location.href
	var menu_btn_root = "graphics/buttons/top/"
    resvalue = checkpage(mainloc, menu_btn_root, "contents.htm", "home", false)
    resvalue |= checkpage(mainloc, menu_btn_root, "the_menu.htm", "the_menu", resvalue)
    resvalue |= checkpage(mainloc, menu_btn_root, "the_hardware.htm", "the_hardware", resvalue)
    resvalue |= checkpage(mainloc, menu_btn_root, "the_software.htm", "the_software", resvalue)
    resvalue |= checkpage(mainloc, menu_btn_root, "prices_request/index.htm", "prices", resvalue)
    resvalue |= checkpage(mainloc, menu_btn_root, "enquiries/index.htm", "enquiries", resvalue)
    resvalue |= checkpage(mainloc, menu_btn_root, "contact.htm", "contact", resvalue)
  }
  setTimeout("checkframe()",1000);
}
checkframe()
