// glass_portfolio.js - javascript for Donele's glass portfolio// bowls, jewellery, sculpture, othervar ntmax = 4;var typestr = 'bjso';var numbergp = new Object();numbergp.b = 30;numbergp.j = 5;numbergp.s = 5;numbergp.o = 4;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 = "glass_portfolio/gp_msg1.gif";      more = false;      }   else      {      n = nmax - nstart + 1;      if (n > ntmax) { n = ntmax; }      document.gpmsg.src = "glass_portfolio/gp_msg0.gif";      more = true;      }   nblock++;   for (var i=1; i<=ntmax; i++)      {      if (i <= n)         {         ii = nstart + i - 1;         eval ('document.gt' + i + '.src = "glass_portfolio/gpt_pic' + typechar + ii + '.jpg"');         }      else { eval ('document.gt' + i + '.src = "glass_portfolio/gpt_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 = 'glass_portfolio/gp_pic' + typechar + n + '.jpg';      document.glasspic.src = s;      }   return false;   }