// paint_portfolio.js - javascript for Donele's painting portfolio// Purnululu, Pilbara, Kimberley, othervar ntmax = 4;var typestr = 'bpko';var numbergp = new Object();numbergp.b = 6;numbergp.p = 4;numbergp.k = 4;numbergp.o = 3;var typechar, nmax, more;var nblock = 0;// when a new type of object is selected we need to reset all the basic values and redraw the thumbnailsfunction changeType ()   {   var si = document.gp.type.selectedIndex;   typechar = typestr.charAt(si);   nmax = numbergp[typechar];   nblock = 0;   showThumbs();   return false;   }// this routine displays a sequence of thumbnail pics on the LHS// the first pic displayed is pointed at by nstart// ntmax is the maximum number of spaces available// nmax is the maximum number of thumbnails of this type// n pics are displayed followed by blanks if there are not enough to fill the available spacesfunction showThumbs ()   {   var n, ii;   if (!more) nblock = 0;   var nn = nblock + 1;   var nstart = ((nn-1) * ntmax) + 1;   if (nstart > nmax)      {      n = 0;      document.gpmsg.src = "paint_portfolio/pp_msg1.gif";      more = false;      }   else      {      n = nmax - nstart + 1;      if (n > ntmax) { n = ntmax; }      document.gpmsg.src = "paint_portfolio/pp_msg0.gif";      more = true;      }   nblock++;   for (var i=1; i<=ntmax; i++)      {      if (i <= n)         {         ii = nstart + i - 1;         eval ('document.gt' + i + '.src = "paint_portfolio/ppt_pic' + typechar + ii + '.jpg"');         }      else { eval ('document.gt' + i + '.src = "paint_portfolio/ppt_pic00.gif"'); }      }   return false;   }// this routine displays the large picture on the RHS// it relies on the current type (encoded in typechar) and is passed the idfunction showPic (id)   {   var n = (nblock-1) * ntmax + Math.abs(id);   if (n > 0 && n <= nmax)      {      var s = 'paint_portfolio/pp_pic' + typechar + n + '.jpg';      document.paintpic.src = s;      }   return false;   }