// routine to more or less unpredictably display pictures (by returning true)
// pictures at locations addressed with a hash are always displayed
//  (hashes are used when we come to a location in the artists page from the programme pages)
// if a * is passed to showpic then the picture is always displayed
// otherwise the code arranges the pictures generally spaced out
// p is the starting (and then on-going) probability of a pic being displayed
// pp is the incremental probability - a larger value makes pics more frequent
// if hs matches the passed parameter then the routine returns true ie. show pic

var p = 0.25;
var pp = 0.25
var hs = location.hash.substring(1);

function showpic (hash)
   {
//   return true;     /* remove comment to always return true */
   var r = Math.random();
   if (hash == hs) r = -1.0;
   if (hash == '*') r = -1.0;
   if (r < p)
      {
      p = 0.0;    
      return true;
      }
   else
      {
      p = p + pp;      
      return false;
      }
   }


function missingArtist (name)
   {
   if (name == 'brennan') name = 'Bill Brennan-Jones';
   if (name == 'chant') name = 'Denmark Chanting Group';
   alert ("No information available on " + name);
   }
