
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.js';
countX = 5;
countY = 2;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(

  new Array('Before and After ','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Before 1','before1.jpg',448,335),
      new Array('After 1','after1.jpg',445,331),
      new Array('Before 2','before2.jpg',446,335),
      new Array('After 2','after2.jpg',443,335),
      new Array('Before 3','before3.jpg',445,333),
      new Array('After 3','after3.jpg',440,332),
      new Array('Before 4','before4.jpg',433,331),
      new Array('After 4','after4.jpg',458,331),
      new Array('Before 5','before5.jpg',434,335),
      new Array('After 5','after5.jpg',461,331),
      new Array('Before 6','before6.jpg',431,330),
      new Array('After 6','after6.jpg',454,333),
      new Array('Before 7','before7.jpg',433,332),
      new Array('After 7','after7.jpg',463,332),
      new Array('Before 8','before8.jpg',427,331),
      new Array('After 8','after8.jpg',467,329),
      new Array('Before 9','before9.jpg',457,333),
      new Array('After 9','after9.jpg',431,329),
	  new Array('Before 10','before10.jpg',455,330),
      new Array('After 10','after10.jpg',437,330),
      new Array('Before 11','before11.jpg',463,330),
      new Array('After 11','after11.jpg',434,333),
      new Array('Before 12','before12.jpg',460,331),
      new Array('After 12','after12.jpg',435,332),
      new Array('Before 13','before13.jpg',428,332),
      new Array('After 13','after13.jpg',456,331),
      new Array('Before 14','before14.jpg',459,332),
      new Array('After 14','after14.jpg',437,329),
      new Array('Before 15','before15.jpg',430,330),
      new Array('After 15','after15.jpg',456,334),
      new Array('Before 16','before16.jpg',431,331),
      new Array('After 16','after16.jpg',460,332),
      new Array('Before 17','before17.jpg',433,332),
      new Array('After 17','after17.jpg',453,326),
      new Array('Before 18','before18.jpg',442,332),
      new Array('After 18','after18.jpg',448,329),
      new Array('Before 19','before19.jpg',436,331),
      new Array('After 19','after19.jpg',459,331),
      new Array('Before 20','before20.jpg',432,331),
      new Array('After 20','after20.jpg',462,330),
	  new Array('Before 21','before21.jpg',438,331),	  
      new Array('After 21','after21.jpg',459,335),
      new Array('Before 22','before22.jpg',446,332),
      new Array('After 22','after22.jpg',444,333),
      new Array('Before 23','before23.jpg',445,330),
      new Array('After 23','after23.jpg',448,332),
      new Array('Before 24','before24.jpg',446,331),
      new Array('After 24','after24.jpg',447,329),
      new Array('Before 25','before25.jpg',434,332),
      new Array('After 25','after25.jpg',458,332),
      new Array('Before 26','before26.jpg',446,332),
      new Array('After 26','after26.jpg',446,329),
      new Array('Before 27','before27.jpg',447,330),
      new Array('After 27','after27.jpg',449,331),
      new Array('Before 28','before28.jpg',443,335),
      new Array('After 28','after28.jpg',452,330),
      new Array('Before 29','before29.jpg',448,330),
      new Array('After 29','after29.jpg',450,332),
      new Array('Before 30','before30.jpg',452,335),
      new Array('After 30','after30.jpg',446,335),
      new Array('Before 31','before31.jpg',462,335),
      new Array('After 31','after31.jpg',436,335),
	  new Array('Before 32','before32.jpg',442,328),
      new Array('After 32','after32.jpg',432,330),
      new Array('Before 33','before33.jpg',445,331),
	  new Array('After 33','after33.jpg',446,334),
      new Array('Before 34','before34.jpg',443,332),
      new Array('After 34','after34.jpg',442,332),
      new Array('Before 35','before35.jpg',447,336),
      new Array('After 35','after35.jpg',445,334),
      new Array('Before 36','before36.jpg',448,333),
      new Array('After 36','after36.jpg',446,334),
      new Array('Before 37','before37.jpg',536,400),
      new Array('After 37','after37.jpg',533,400),
      new Array('Before 38','before38.jpg',536,401),
      new Array('After 38','after38.jpg',537,401),
      new Array('Before 39','before39.jpg',444,334),
      new Array('After 39','after39.jpg',441,333),
      new Array('Before 40','before40.jpg',533,401),
      new Array('After 40','after40.jpg',531,401),
      new Array('Before 41','before41.jpg',536,401),
      new Array('After 41','after41.jpg',536,401),
      new Array('Before 42','before42.jpg',536,400),
      new Array('After 42','after42.jpg',535,400),
      new Array('Before 43','before43.jpg',535,400),
      new Array('After 43','after43.jpg',534,400),
      new Array('Before 44','before44.jpg',446,333),
      new Array('After 44','after44.jpg',444,331),
      new Array('Before 45','before45.jpg',448,335),
      new Array('After 45','after45.jpg',445,335),
      new Array('Before 46','before46.jpg',448,334),
      new Array('After 46','after46.jpg',446,333),
      new Array('Before 47','before47.jpg',492,370),
      new Array('After 47','after47.jpg',493,370),
      new Array('Before 48','before48.jpg',494,371),
      new Array('After 48','after48.jpg',492,370)      
      
    )
  ),

  new Array('Driveways','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Driveways-sdc10067.jpg',533,400),
      new Array('Photo 2','Driveways1.jpg',534,400),
      new Array('Photo 3','Driveways10.jpg',533,400),
      new Array('Photo 4','Driveways11.jpg',533,400),
      new Array('Photo 5','Driveways12.jpg',300,400),
      new Array('Photo 6','Driveways13.jpg',534,400),
      new Array('Photo 7','Driveways14.jpg',534,400),
      new Array('Photo 8','Driveways15.jpg',533,400),
      new Array('Photo 9','Driveways16.jpg',533,400),
      new Array('Photo 10','Driveways17.jpg',533,400),
      new Array('Photo 11','Driveways18.jpg',533,400),
      new Array('Photo 12','Driveways19.jpg',533,400),
      new Array('Photo 13','Driveways2.jpg',534,400),
      new Array('Photo 14','Driveways20.jpg',533,400),
      new Array('Photo 15','Driveways21.jpg',533,400),
      new Array('Photo 16','Driveways22.jpg',533,400),
      new Array('Photo 17','Driveways23.jpg',533,400),
      new Array('Photo 18','Driveways24.jpg',533,400),
      new Array('Photo 19','Driveways25.jpg',533,400),
      new Array('Photo 20','Driveways26.jpg',533,400),
      new Array('Photo 21','Driveways27.jpg',533,400),
      new Array('Photo 22','Driveways28.jpg',533,400),
      new Array('Photo 23','Driveways29.jpg',534,400),
      new Array('Photo 24','Driveways3.jpg',534,400),
      new Array('Photo 25','Driveways30.jpg',533,400),
      new Array('Photo 26','Driveways31.jpg',533,400),
      new Array('Photo 27','Driveways32.jpg',533,400),
      new Array('Photo 28','Driveways33.jpg',533,400),
      new Array('Photo 29','Driveways34.jpg',533,400),
      new Array('Photo 30','Driveways35.jpg',533,400),
      new Array('Photo 31','Driveways36.jpg',533,400),
      new Array('Photo 32','Driveways37.jpg',533,400),
      new Array('Photo 33','Driveways38.jpg',533,400),
      new Array('Photo 34','Driveways39.jpg',533,400),
      new Array('Photo 35','Driveways4.jpg',534,400),
      new Array('Photo 36','Driveways40.jpg',533,400),
      new Array('Photo 37','Driveways41.jpg',533,400),
      new Array('Photo 38','Driveways42.jpg',533,400),
      new Array('Photo 39','Driveways43.jpg',300,400),
      new Array('Photo 40','Driveways44.jpg',533,400),
      new Array('Photo 41','Driveways45.jpg',533,400),
      new Array('Photo 42','Driveways46.jpg',534,400),
      new Array('Photo 43','Driveways47.jpg',533,400),
      new Array('Photo 44','Driveways48.jpg',533,400),
      new Array('Photo 45','Driveways49.jpg',533,400),
      new Array('Photo 46','Driveways5.jpg',534,400),
      new Array('Photo 47','Driveways50.jpg',534,400),
      new Array('Photo 48','Driveways51.jpg',533,400),
      new Array('Photo 49','Driveways52.jpg',534,400),
      new Array('Photo 50','Driveways53.jpg',533,400),
      new Array('Photo 51','Driveways54.jpg',700,394),
      new Array('Photo 52','Driveways55.jpg',533,400),
      new Array('Photo 53','Driveways56.jpg',533,400),
      new Array('Photo 54','Driveways57.jpg',533,400),
      new Array('Photo 55','Driveways58.jpg',533,400),
      new Array('Photo 56','Driveways59.jpg',534,400),
      new Array('Photo 57','Driveways6.jpg',533,400),
      new Array('Photo 58','Driveways7.jpg',533,400),
      new Array('Photo 59','Driveways8.jpg',534,400),
      new Array('Photo 60','Driveways9.jpg',534,400),
	  //new
	  new Array('Photo 61','104_0490_2.jpg',534,400),
      new Array('Photo 62','2805 Rosebud Circle, Corona_01_2.jpg',268,400),
      new Array('Photo 63','587 Grapevine Dr, Corona_01_2.jpg',525,400),
      new Array('Photo 64','Banks001_2.jpg',534,400),	  
      new Array('Photo 65','by Fairplex.jpg',534,400),	  
      new Array('Photo 66','DSCN3248_2.jpg',534,400),
      new Array('Photo 67','DSCN3362.jpg',534,400),	  
      new Array('Photo 68','P1010091_2.jpg',534,400),	  
      new Array('Photo 69','DSCN3420.jpg',534,400),	  
      new Array('Photo 70','SDC10291_2.jpg',300,400)
    )
  ),

  new Array('Entries','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Entries1.jpg',534,400),
      new Array('Photo 2','Entries10.jpg',533,400),
      new Array('Photo 3','Entries11.jpg',300,400),
      new Array('Photo 4','Entries12.jpg',533,400),
      new Array('Photo 5','Entries13.jpg',300,400),
      new Array('Photo 6','Entries14.jpg',533,400),
      new Array('Photo 7','Entries15.jpg',533,400),
      new Array('Photo 8','Entries16.jpg',300,400),
      new Array('Photo 9','Entries17.jpg',533,400),
      new Array('Photo 10','Entries18.jpg',300,400),
      new Array('Photo 11','Entries19.jpg',533,400),
      new Array('Photo 12','Entries2.jpg',534,400),
      new Array('Photo 13','Entries20.jpg',533,400),
      new Array('Photo 14','Entries21.jpg',533,400),
      new Array('Photo 15','Entries22.jpg',300,400),
      new Array('Photo 16','Entries23.jpg',533,400),
      new Array('Photo 17','Entries24.jpg',533,400),
      new Array('Photo 18','Entries25.jpg',533,400),
      new Array('Photo 19','Entries26.jpg',533,400),
      new Array('Photo 20','Entries27.jpg',533,400),
      new Array('Photo 21','Entries28.jpg',300,400),
      new Array('Photo 22','Entries29.jpg',300,400),
      new Array('Photo 23','Entries3.jpg',534,400),
      new Array('Photo 24','Entries30.jpg',533,400),
      new Array('Photo 25','Entries31.jpg',533,400),
      new Array('Photo 26','Entries32.jpg',533,400),
      new Array('Photo 27','Entries33.jpg',533,400),
      new Array('Photo 28','Entries34.jpg',533,400),
      new Array('Photo 29','Entries35.jpg',533,400),
      new Array('Photo 30','Entries36.jpg',533,400),
      new Array('Photo 31','Entries4.jpg',533,400),
      new Array('Photo 32','Entries5.jpg',534,400),
      new Array('Photo 33','Entries6.jpg',534,400),
      new Array('Photo 34','Entries7.jpg',533,400),
      new Array('Photo 35','Entries8.jpg',300,400),
      new Array('Photo 36','Entries9.jpg',300,400)
    )
  ),

  new Array('Patios','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Patios1.jpg',534,400),
      new Array('Photo 2','Patios10.jpg',533,400),
      new Array('Photo 3','Patios11.jpg',534,400),
      new Array('Photo 4','Patios12.jpg',534,400),
      new Array('Photo 5','Patios13.jpg',534,400),
      new Array('Photo 6','Patios14.jpg',533,400),
      new Array('Photo 7','Patios15.jpg',534,400),
      new Array('Photo 8','Patios16.jpg',533,400),
      new Array('Photo 9','Patios17.jpg',534,400),
      new Array('Photo 10','Patios18.jpg',533,400),
      new Array('Photo 11','Patios19.jpg',533,400),
      new Array('Photo 12','Patios2.jpg',534,400),
      new Array('Photo 13','Patios20.jpg',533,400),
      new Array('Photo 14','Patios21.jpg',533,400),
      new Array('Photo 15','Patios22.jpg',533,400),
      new Array('Photo 16','Patios23.jpg',533,400),
      new Array('Photo 17','Patios24.jpg',533,400),
      new Array('Photo 18','Patios25.jpg',533,400),
      new Array('Photo 19','Patios26.jpg',533,400),
      new Array('Photo 20','Patios27.jpg',533,400),
      new Array('Photo 21','Patios28.jpg',533,400),
      new Array('Photo 22','Patios29.jpg',533,400),
      new Array('Photo 23','Patios3.jpg',534,400),
      new Array('Photo 24','Patios30.jpg',533,400),
      new Array('Photo 25','Patios31.jpg',533,400),
      new Array('Photo 26','Patios32.jpg',533,400),
      new Array('Photo 27','Patios33.jpg',533,400),
      new Array('Photo 28','Patios34.jpg',534,400),
      new Array('Photo 29','Patios35.jpg',534,400),
      new Array('Photo 30','Patios36.jpg',534,400),
      new Array('Photo 31','Patios4.jpg',534,400),
      new Array('Photo 32','Patios5.jpg',300,400),
      new Array('Photo 33','Patios6.jpg',300,400),
      new Array('Photo 34','Patios7.jpg',533,400),
      new Array('Photo 35','Patios8.jpg',533,400),
      new Array('Photo 36','Patios9.jpg',534,400),
	  //new	
	  new Array('Photo 37','DSCN3360_2.jpg',534,400),
      new Array('Photo 38','P1010753.jpg',534,400),	  
      new Array('Photo 39','bbq fire pit 007_2.jpg',534,400),
      new Array('Photo 40','DSCN3539.jpg',534,400),
      new Array('Photo 41','malibubbq6.jpg',534,400),
      new Array('Photo 42','P1010755.jpg',534,400),
      new Array('Photo 43','SDC10240_2.jpg',534,400),
      new Array('Photo 44','Small Custom BBQ Island.jpg',534,400)
    )
  ),

  new Array('Pooldecks','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','pooldecks-sdc10061.jpg',533,400),
      new Array('Photo 2','pooldecks1.jpg',533,400),
      new Array('Photo 3','pooldecks10.jpg',533,400),
      new Array('Photo 4','pooldecks11.jpg',533,400),
      new Array('Photo 5','pooldecks12.jpg',534,400),
      new Array('Photo 6','pooldecks13.jpg',533,400),
      new Array('Photo 7','pooldecks14.jpg',533,400),
      new Array('Photo 8','pooldecks15.jpg',533,400),
      new Array('Photo 9','pooldecks16.jpg',533,400),
      new Array('Photo 10','pooldecks17.jpg',533,400),
      new Array('Photo 11','pooldecks18.jpg',533,400),
      new Array('Photo 12','pooldecks19.jpg',533,400),
      new Array('Photo 13','pooldecks2.jpg',534,400),
      new Array('Photo 14','pooldecks20.jpg',533,400),
      new Array('Photo 15','pooldecks21.jpg',534,400),
      new Array('Photo 16','pooldecks22.jpg',534,400),
      new Array('Photo 17','pooldecks23.jpg',533,400),
      new Array('Photo 18','pooldecks24.jpg',533,400),
      new Array('Photo 19','pooldecks25.jpg',534,400),
      new Array('Photo 20','pooldecks26.jpg',534,400),
      new Array('Photo 21','pooldecks3.jpg',534,400),
      new Array('Photo 22','pooldecks4.jpg',533,400),
      new Array('Photo 23','pooldecks5.jpg',533,400),
      new Array('Photo 24','pooldecks6.jpg',533,400),
      new Array('Photo 25','pooldecks7.jpg',534,400),
      new Array('Photo 26','pooldecks8.jpg',533,400),
      new Array('Photo 27','pooldecks9.jpg',533,400)
    )
  ),

  new Array('Steps','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','steps1.jpg',534,400),
      new Array('Photo 2','steps10.jpg',534,400),
      new Array('Photo 3','steps11.jpg',534,400),
      new Array('Photo 4','steps12.jpg',534,400),
      new Array('Photo 5','steps13.jpg',534,400),
      new Array('Photo 6','steps14.jpg',534,400),
      new Array('Photo 7','steps15.jpg',534,400),
      new Array('Photo 8','steps16.jpg',534,400),
      new Array('Photo 9','steps17.jpg',300,400),
      new Array('Photo 10','steps18.jpg',534,400),
      new Array('Photo 11','steps19.jpg',534,400),
      new Array('Photo 12','steps2.jpg',534,400),
      new Array('Photo 13','steps20.jpg',534,400),
      new Array('Photo 14','steps21.jpg',533,400),
      new Array('Photo 15','steps22.jpg',534,400),
      new Array('Photo 16','steps23.jpg',534,400),
      new Array('Photo 17','steps3.jpg',534,400),
      new Array('Photo 18','steps4.jpg',534,400),
      new Array('Photo 19','steps5.jpg',534,400),
      new Array('Photo 20','steps6.jpg',534,400),
      new Array('Photo 21','steps7.jpg',534,400),
      new Array('Photo 22','steps8.jpg',534,400),
      new Array('Photo 23','steps9.jpg',534,400),	
	  //new
      new Array('Photo 24','DSCN3210_2.jpg',534,400),
      new Array('Photo 25','P1010327_2.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]);
}
