
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.js';
countX = 3;
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('Portfolio','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','100_0654.jpg',300,400),
      new Array('Photo 2','100_0714.jpg',534,400),
      new Array('Photo 3','100_0752.jpg',534,400),
      new Array('Photo 4','100_0753.jpg',534,400),
      new Array('Photo 5','100_0755.jpg',534,400),
      //new Array('Photo 6','101_0186.jpg',534,400),
      //new Array('Photo 7','101_0187.jpg',534,400),
      //new Array('Photo 8','101_0188.jpg',300,400),
      new Array('Photo 6','101_0509.jpg',534,400),
      new Array('Photo 7','101_0510.jpg',534,400),
      new Array('Photo 8','downtown river.jpg',700,313),
      new Array('Photo 9','Monroe 011.jpg',534,400),
      new Array('Photo 10','Palo Duro Rd 001.jpg',534,400),
      new Array('Photo 11','Palo Duro Rd 003.jpg',534,400),
      new Array('Photo 12','Palo Duro Rd 007.jpg',534,400),
      new Array('Photo 13','Palo Duro Rd 009.jpg',534,400),
      new Array('Photo 14','Plumbing 1709 Payne 018.jpg',534,400),
      new Array('Photo 15','Plumbing 1709 Payne 019.jpg',534,400),
      new Array('Photo 16','Plumbing 1709 Payne 020.jpg',300,400),
      new Array('Photo 17','Plumbing 1709 Payne 021.jpg',300,400),
      new Array('Photo 18','Plumbing 1709 Payne 022.jpg',300,400),
      new Array('Photo 19','Plumbing 1709 Payne 023.jpg',300,400),
      new Array('Photo 20','Plumbing 1709 Payne 024.jpg',300,400)
      //new Array('Photo 24','post-oak.jpg',350,350),
      //new Array('Photo 25','solar_homes_tiles.jpg',458,266)	 

   )
  ),

  new Array('Remodels/additions','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Plumbing 1709 Payne 018.jpg',534,400),
      new Array('Photo 2','Plumbing 1709 Payne 019.jpg',534,400),
      new Array('Photo 3','Plumbing 1709 Payne 020.jpg',300,400),
      new Array('Photo 4','Plumbing 1709 Payne 021.jpg',300,400),
      new Array('Photo 5','Plumbing 1709 Payne 022.jpg',300,400),
      new Array('Photo 6','Plumbing 1709 Payne 023.jpg',300,400),
      new Array('Photo 7','Plumbing 1709 Payne 024.jpg',300,400)
	  
	)
  ),  
	  
	    new Array('Before After Pics','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','101_0148.jpg',534,400),
      new Array('Photo 2','101_0156.jpg',534,400),
      new Array('Photo 3','101_0161.jpg',534,400),
      new Array('Photo 4','101_0182.jpg',534,400),
      new Array('Photo 5','101_0222.jpg',534,400),
      new Array('Photo 6','101_0230.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]);
}

