
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.js';
countX = 4;
countY = 3;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(

  new Array('Patios and Walkways','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Picture 306.jpg',534,400),
      new Array('Photo 2','Picture 412.jpg',534,400),
      new Array('Photo 3','Picture 777.jpg',534,400),
      new Array('Photo 4','Picture 826.jpg',534,400),
      new Array('Photo 5','Picture 878.jpg',534,400),
      new Array('Photo 6','Picture 899.jpg',534,400),
      new Array('Photo 7','Picture 929.jpg',534,400),
      new Array('Photo 8','Picture 957.jpg',534,400),
      new Array('Photo 9','Picture 962.jpg',534,400),
      new Array('Photo 10','Picture 971.jpg',534,400),
      new Array('Photo 11','Picture 982.jpg',534,400),
      new Array('Photo 12','100_1728.jpg',534,400),
      new Array('Photo 13','100_1732.jpg',534,400),
      new Array('Photo 14','100_1853.jpg',534,400),

      new Array('Photo 15','100_1365.jpg',534,400),
      new Array('Photo 16','100_1366.jpg',534,400),
      new Array('Photo 17','100_1367.jpg',534,400),
//      new Array('Photo 18','100_1486.jpg',534,400),
//      new Array('Photo 19','100_1487.jpg',534,400),
//      new Array('Photo 20','100_1488.jpg',534,400),
//      new Array('Photo 21','100_1489.jpg',534,400),
//      new Array('Photo 22','100_1490.jpg',534,400),
      new Array('Photo 18','100_1623.jpg',534,400),
      new Array('Photo 19','100_1624.jpg',534,400),
      new Array('Photo 20','100_1625.jpg',534,400),
      new Array('Photo 21','100_1626.jpg',534,400),
      new Array('Photo 22','100_1627.jpg',534,400),
      new Array('Photo 23','100_1628.jpg',534,400),
      new Array('Photo 24','100_1629.jpg',534,400),
      new Array('Photo 25','100_1635.jpg',534,400),
      new Array('Photo 26','100_1636.jpg',534,400),
      new Array('Photo 27','100_1637.jpg',534,400),
      new Array('Photo 28','100_1653.jpg',534,400),
      new Array('Photo 29','100_1654.jpg',534,400),
      new Array('Photo 30','100_1655.jpg',534,400),
      new Array('Photo 31','100_1656.jpg',534,400),
      new Array('Photo 32','100_1657.jpg',534,400),
      new Array('Photo 33','100_1658.jpg',534,400),
      new Array('Photo 34','100_1659.jpg',534,400),
      new Array('Photo 35','100_1660.jpg',534,400),
      new Array('Photo 36','100_1661.jpg',534,400),
      new Array('Photo 37','100_1662.jpg',534,400),
      new Array('Photo 38','100_1663.jpg',534,400),
      new Array('Photo 39','100_1664.jpg',534,400),
      new Array('Photo 40','100_1665.jpg',534,400),
      new Array('Photo 41','100_1666.jpg',534,400),
      new Array('Photo 42','100_1667.jpg',534,400),
      new Array('Photo 43','100_1668.jpg',534,400),
      new Array('Photo 44','100_1669.jpg',534,400),
      new Array('Photo 45','100_1685.jpg',534,400),
      new Array('Photo 46','100_1686.jpg',534,400),
      new Array('Photo 47','100_1687.jpg',534,400),
      new Array('Photo 48','100_1688.jpg',534,400),
      new Array('Photo 49','100_1728_1.jpg',534,400),
      new Array('Photo 50','100_1729.jpg',534,400),
      new Array('Photo 51','100_1730.jpg',534,400),
      new Array('Photo 52','100_1731.jpg',534,400),
      new Array('Photo 53','100_1732_1.jpg',534,400),
      new Array('Photo 54','100_1733.jpg',534,400),
      new Array('Photo 55','100_1734.jpg',534,400),
      new Array('Photo 56','Picture 023.jpg',534,400),
      new Array('Photo 57','Picture 024.jpg',534,400),
      new Array('Photo 58','Picture 306_1.jpg',534,400),
      new Array('Photo 59','Picture 363.jpg',534,400),
      new Array('Photo 60','Picture 364.jpg',534,400),
      new Array('Photo 61','Picture 366.jpg',534,400),
      new Array('Photo 62','Picture 368.jpg',534,400),
      new Array('Photo 63','Picture 369.jpg',534,400),
      new Array('Photo 64','Picture 400.jpg',534,400),
      new Array('Photo 65','Picture 402.jpg',534,400),
      new Array('Photo 66','Picture 412_1.jpg',534,400),
      new Array('Photo 67','Picture 417.jpg',534,400),
      new Array('Photo 68','Picture 732.jpg',534,400),
      new Array('Photo 69','Picture 777_1.jpg',534,400),
      new Array('Photo 70','Picture 781.jpg',534,400),
      new Array('Photo 71','Picture 824.jpg',534,400),
      new Array('Photo 72','Picture 826_1.jpg',534,400),
      new Array('Photo 73','Picture 827.jpg',534,400),
      new Array('Photo 74','Picture 829.jpg',534,400),
      new Array('Photo 75','Picture 830.jpg',534,400),
      new Array('Photo 76','Picture 831.jpg',534,400),
      new Array('Photo 77','Picture 878_1.jpg',534,400),
      new Array('Photo 78','Picture 899_1.jpg',534,400),
      new Array('Photo 79','Picture 929_1.jpg',534,400),
      new Array('Photo 80','Picture 957_1.jpg',534,400),
      new Array('Photo 81','Picture 962_1.jpg',534,400),
      new Array('Photo 82','Picture 971_1.jpg',534,400),
      new Array('Photo 83','Picture 982_1.jpg',534,400),

      new Array('Photo 84','100_2952.jpg',534,400),
      new Array('Photo 85','100_2988.jpg',534,400),
      new Array('Photo 86','100_2989.jpg',534,400),
      new Array('Photo 87','100_2990.jpg',534,400),
      new Array('Photo 88','100_2991.jpg',534,400),
      new Array('Photo 89','100_2992.jpg',534,400),
      new Array('Photo 90','100_3036.jpg',534,400),
      new Array('Photo 91','patios & walkways.jpg',534,400)
    )
  ),

  new Array('Retaining Walls','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Picture 361.jpg',534,400),
      new Array('Photo 2','Picture 416.jpg',534,400),
      new Array('Photo 3','Picture 883.jpg',534,400),
      new Array('Photo 4','Picture 888.jpg',534,400),
      new Array('Photo 5','Picture 948.jpg',534,400),
      new Array('Photo 6','Picture 952.jpg',534,400),

      new Array('Photo 7','100_2893.jpg',534,400),
      new Array('Photo 8','100_2983.jpg',534,400),
      new Array('Photo 9','100_2984.jpg',534,400),
      new Array('Photo 10','100_2985.jpg',534,400),
      new Array('Photo 11','100_2993.jpg',534,400),
      new Array('Photo 12','100_2996.jpg',534,400)
    )
  ),

  new Array('Plantings','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','plantings.jpg',534,400)
    )
  )

)

section = getParameter(self.document.location.href, 'section');
if (isNaN(section) || (section=='') || (section<0) || (section>arImages.length))
  section = 0; 

ind = getParameter(self.document.location.href, 'ind');
if (isNaN(ind) || (ind=='') || (ind<0) || (ind>arImages[section][4].length))
  ind = 0; 

var arPreloadImages = new Array();
function preload() {
  if (arImages[section][2]!='') {
    for (i=ind;(i<(Number(ind)+Number(countX*countY))) && (i<arImages[section][4].length);i++) {
      arPreloadImages[i] = new Image(mediumSizes[0],mediumSizes[1]);
      arPreloadImages[i].src = arImages[section][2]+arImages[section][4][i][1];
    }
  }
}
  
function showImageMedium(number) {
  showImage('imagemedium',arImages[section][2]+arImages[section][4][number][1]);
  showMessage('imagemediumname',arImages[section][4][number][0]);
}

function showImageBig(number) {
  showImagePopup(scriptName,section,number,arImages[section][4][number][2],
   arImages[section][4][number][3]);
}
