// to do - alt for external link pics
// to do - get rid of "places"
// to do - make thumbs smaller?
// to do - fynone thumb bigger?

<!-- Hide from older browsers

// generate random image in "places"

function setPlacesImg( Dir, n, Size ) {

//  if n not supplied get a random image
//   alert( 'setPlacesImg ' + n );
  if ( n == 0 ) {
    n = Math.round( Math.random() * 7 );
    n = parseInt( n );
    if ( isNaN( n ) ) n = 0; // for Netscape, yes, I know, it happens
    n = n + 1;
//   alert( n );
    };
  setImgAttr( Dir, n, Size );
//  document.placesImgLink.href="../";
//  alert( 'setPlacesImg ' + document.placesImgLink.href );
//  alert( 'setPlacesImg ' + document.placesImg.src );
  }

function disAllImgs( Dir, Size ) {

  for (var n = 4; n <= 8; n++) {
    setImgAttr( Dir, n, Size );
//    if ( document.placesImgLink.href.substring( 0, 5 ) !== 'http:' ) {
      ImgHtml =   '<A href="javascript:setPlacesImg(\''+Dir+'\','+n+',\'big\')">'
                + '<IMG src="'+document.placesImg.src+'"'
                + ' alt="'+document.placesImg.alt+'" title="'+document.placesImg.alt+'"'
//                + ' width="'+document.placesImg.width+'" height="'+document.placesImg.height+'" border="0"'
                + ' style="display: block; padding: 5pt;"></A>';
//    alert( 'disAllImg' + ImgHtml );
      document.writeln( ImgHtml );
//      }
    }
  setImgAttr( Dir, 0, '' );
  return false;
  }

function setImgAttr( Dir, n, Size ) {

//   alert( 'setImgAttr '+ n + ' ' + Size );
  if (n==0) {
//    document.placesImgLink.href = "";
    document.placesImg.file     = "";
    document.placesImg.alt      = "";
    document.placesImg.width    = "0";
    document.placesImg.height   = "0";
    };
  if (n==1) {
//    document.placesImgLink.href = "http://www.mandalas.freeserve.co.uk/Other_images.html";
    document.placesImg.file     = "placesFynonePool.jpg";
    document.placesImg.alt      = "Fynone pool, by Barry Stevens";
    document.placesImg.width    = "100";
    document.placesImg.height   = "133";
    };
  if (n==2) {
//    document.placesImgLink.href = "http://www.nineladies.uklinux.net/gallery.php";
    document.placesImg.file     = "placesNineLadiesThumb.jpg";
    document.placesImg.alt      = "Nine Ladies Stone Circle, by Bristol FoE";
    document.placesImg.width    = "160";
    document.placesImg.height   = "120";
    };
  if (n==3) {
//    document.placesImgLink.href = "photos.html?placesMeadowfootBeach.jpg";
    if ( Size == 'thumb' ) {
      document.placesImg.file     = "placesMeadowfootBeachThumb.jpg";
      document.placesImg.width    = "160";
      document.placesImg.height   = "129";
      } else {
      document.placesImg.file     = "placesMeadowfootBeach.jpg";
      document.placesImg.width    = "678";
      document.placesImg.height   = "546";
      }
    document.placesImg.alt      = "Meadowfoot beach, South Devon, by dmmh, August 2004";
    };
  if (n==4) {
//    document.placesImgLink.href = "photos.html?placesHuntersYardLudham.jpg";
    if ( Size == 'thumb' ) {
      document.placesImg.file     = "placesHuntersYardLudhamThumb.jpg";
      document.placesImg.width    = "160";
      document.placesImg.height   = "120";
      } else {
      document.placesImg.file     = "placesHuntersYardLudham.jpg";
      document.placesImg.width    = "600";
      document.placesImg.height   = "480";
      }
    document.placesImg.alt      = "Hunter\'s Yard, Womack Water, Ludham, Norfolk, July 2002";
//   alert( n + ' setImgAttr placesImg.src'+' ' + placesImg.src );
//   alert( n + ' setImgAttr placesImg.width'+' ' + placesImg.width );
//   alert( n + ' setImgAttr placesImg.height'+' ' + placesImg.height );
    };
  if (n==5) {
//    document.placesImgLink.href = "photos.html?placesMalthouseBroad.jpg";
    if ( Size == 'thumb' ) {
      document.placesImg.file     = "placesMalthouseBroadThumb.jpg";
      document.placesImg.width    = "160";
      document.placesImg.height   = "150";
      } else {
      document.placesImg.file     = "placesMalthouseBroad.jpg";
      document.placesImg.width    = "700";
      document.placesImg.height   = "656";
      }
    document.placesImg.alt      = "St Helens, Ranworth, Malthouse Broad, Norfolk, July 2003";
    };
  if (n==6) {
//    document.placesImgLink.href = "photos.html?placesCockshootBroad.jpg";
    if ( Size == 'thumb' ) {
      document.placesImg.file     = "placesCockshootBroadThumb.jpg";
      document.placesImg.width    = "160";
      document.placesImg.height   = "120";
      } else {
      document.placesImg.file     = "placesCockshootBroad.jpg";
      document.placesImg.width    = "700";
      document.placesImg.height   = "560";
      }
    document.placesImg.alt      = "Cockshoot Broad, Norfolk, June 2002";
    };
  if (n==7) {
//    document.placesImgLink.href = "photos.html?placesLothlorien.jpg";
    if ( Size == 'thumb' ) {
      document.placesImg.file     = "placesLothlorienThumb.jpg";
      document.placesImg.width    = "160";
      document.placesImg.height   = "120";
      } else {
      document.placesImg.file     = "placesLothlorien.jpg";
      document.placesImg.width    = "700";
      document.placesImg.height   = "560";
      }
    document.placesImg.alt      = "Lothlorien, Norfolk, July 2003";
    };
  if (n==8) {
//    document.placesImgLink.href = "photos.html?placesHuntersYardLudham2.jpg";
    if ( Size == 'thumb' ) {
      document.placesImg.file     = "placesHuntersYardLudham2Thumb.jpg";
      document.placesImg.width    = "160";
      document.placesImg.height   = "211";
      } else {
      document.placesImg.file     = "placesHuntersYardLudham2.jpg";
      document.placesImg.width    = "520";
      document.placesImg.height   = "686";
      }
    document.placesImg.alt      = "Hunter\'s Yard, Womack Water, Ludham, Norfolk, July 1981";
    };
  if ( Size == 'thumb' ) {
    document.placesImg.alt = document.placesImg.alt + "; click for larger image.";
    }
  document.placesImg.title    = document.placesImg.alt;
  document.placesImg.src      = Dir + document.placesImg.file;
  }


// End -->

