function onpageload()
{
  // Display a status bar message:
  var message1="Bath Spa University";
  window.status=message1;
  // Escape framesets and iframes, except from designated URLs:
  if ( top.location.hostname != "minerva.bathspa.ac.uk" )
  {
    if (top != self)
    {
      top.location.replace(self.location.href);
    }
  }
}

function gohandheld()
{
  var message2="Clicking OK will load the handheld version of this site.  To return to the graphics rich version of this site you will need to delete your web cookies or re-start your web browser.";
  if (confirm(message2))
  {
    location=('/resources/scripts/style.asp?colour=handheld');
  }
}

function addSearchEngine()
{
  // Is this web browser based on Mozilla?
  if ( (typeof window.sidebar == "object") && (typeof window.sidebar.addSearchEngine == "function") )
  {
    window.sidebar.addSearchEngine(
      "http://www.bathspa.ac.uk/resources/search/search.src",
      "http://www.bathspa.ac.uk/resources/graphics/icon-fav.png",
      "Bath Spa University",
      "General"
    );
  }
  else
  {
    alert("Sorry, you need Mozilla (version M15 or later) or Firefox to add a search engine to your web browser.");
	return false;
  }
}