
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('Commercial Pavers','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','64.jpg',333,293),
      new Array('Photo 2','65.jpg',444,253),
      new Array('Photo 3','66.jpg',444,296),
      new Array('Photo 4','70.jpg',390,390),
      new Array('Photo 5','Burnt Toast Cobble (15).jpg',533,400),
      new Array('Photo 6','Burnt Toast Cobble (4).jpg',533,400),
      new Array('Photo 7','CHOC9.jpg',533,400),
      new Array('Photo 8','Streets of Slovang (1).jpg',533,400),
      new Array('Photo 9','Streets of Slovang (7).jpg',533,400),
      new Array('Photo 10','74.jpg',285,390),
      new Array('Photo 11','75.jpg',257,390),
      new Array('Photo 12','76.jpg',444,308),
      new Array('Photo 13','IMG_6228.jpg',626,400),

      new Array('Photo 14','Higgins CHOC Hospital.jpg',534,400),
      new Array('Photo 15','IMG_1114_1.jpg',534,400)
    )
  ),

  new Array('Residential Pavers','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','63.jpg',389,390),
      new Array('Photo 2','67.jpg',379,390), 
      new Array('Photo 3','68.jpg',379,390),
      new Array('Photo 4','72.jpg',379,390),
      new Array('Photo 5','73.jpg',379,390),
      new Array('Photo 6','pp06.jpg',500,328),
//      new Array('Photo 12','Higgins Cobble (3).jpg',533,400),
//      new Array('Photo 13','Higgins Cobble (4).jpg',533,400),
//      new Array('Photo 14','Higgins Cobble (6).jpg',533,400),
      new Array('Photo 7','Higgins Cobble (9).jpg',300,400),
      new Array('Photo 8','P1250035.jpg',300,400),
      new Array('Photo 9','P1250042.jpg',533,400),
      new Array('Photo 10','IMG_3789.jpg',267,400),
      new Array('Photo 11','IMG_3795.jpg',601,400),
      new Array('Photo 12','IMG_3804.jpg',267,400),
      new Array('Photo 13','Pool brick finals to eM 005.jpg',534,400),
      new Array('Photo 14','Pool brick finals to eM 006.jpg',534,400),
      new Array('Photo 15','Pool brick finals to eM 008.jpg',534,400),
      new Array('Photo 16','Pool brick finals to eM 009.jpg',300,400),
      new Array('Photo 17','Pool brick finals to eM 010.jpg',534,400),
      new Array('Photo 18','Pool brick finals to eM 011.jpg',534,400),
      new Array('Photo 19','Pool brick finals to eM 017.jpg',534,400),
      new Array('Photo 20','CIMG1869.jpg',534,400),
      new Array('Photo 21','Crestline Wyoming 2.jpg',288,266),
      new Array('Photo 22','Haystack, Palm Desert, CA (3).jpg',534,400),
      new Array('Photo 23','IMG_0133.jpg',288,192),
      new Array('Photo 24','IMG_0475.jpg',288,216),
      new Array('Photo 25','IMG_0566.jpg',230,288),
      new Array('Photo 26','IMG_1114.jpg',534,400),
      new Array('Photo 27','IMG_6245.jpg',288,192),
      new Array('Photo 28','IMG_6252.jpg',288,192),
      new Array('Photo 29','IMG_6257.jpg',288,192),
      new Array('Photo 30','YM6D7560.jpg',288,192),
      new Array('Photo 31','56.jpg',379,390),
      new Array('Photo 32','58.jpg',387,390),
      new Array('Photo 33','59.jpg',386,390),
      new Array('Photo 34','60.jpg',379,390),
      new Array('Photo 35','61.jpg',379,390),

      new Array('Photo 36','Balboa Cobble Cubes.jpg',268,400),
      new Array('Photo 37','Balboa Cobble.jpg',268,400)
    )
  ),

  new Array('Commercial Veneer','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','pp02.jpg',500,328),
      new Array('Photo 2','pp03.jpg',496,326),
      new Array('Photo 3','pp04.jpg',500,325),
      new Array('Photo 4','pp07.jpg',456,400),
      new Array('Photo 5','pp08.jpg',306,400),
      new Array('Photo 6','Kunst Jr. High 1 .jpg',533,400),
      new Array('Photo 7','P6150136.jpg',533,400),
      new Array('Photo 8','Paso Robles Library (3).jpg',533,400),
      new Array('Photo 9','Paso Robles Library (6).jpg',533,400),
      new Array('Photo 10','PC300042.jpg',533,400),
      new Array('Photo 11','res_devprof_westwood_photo1.jpg',510,400),
      new Array('Photo 12','SantaAnaHS101 (10).jpg',533,400),
      new Array('Photo 13','Park House Project.jpg',360,270),
      new Array('Photo 14','Park House.jpg',360,270),
      new Array('Photo 15','Chino Fire Station.jpg',561,400),
      new Array('Photo 16','Cumberland 11-11-2009 1-45-56 AM.jpg',288,216),
      new Array('Photo 17','DSC01928.jpg',288,216),
      new Array('Photo 18','IMG_0169.jpg',288,216),
      new Array('Photo 19','IMG_0191.jpg',216,288),
      new Array('Photo 20','IMG_0200.jpg',288,216),
      new Array('Photo 21','IMG_0219.jpg',288,216),
      new Array('Photo 22','IMG_0230.jpg',534,400),
      new Array('Photo 23','IMG_0238.jpg',534,400),
      new Array('Photo 24','IMG_0247.jpg',300,400),
      new Array('Photo 25','IMG_0696.jpg',288,216),
      new Array('Photo 26','IMG_0711.jpg',216,288),
      new Array('Photo 27','IMG_0738.jpg',216,288),
      new Array('Photo 28','IMG_9560.jpg',534,400),
      new Array('Photo 29','IMG_9580.jpg',288,216),
      new Array('Photo 30','IMG_9624.jpg',288,216),
      new Array('Photo 31','IMG_9635.jpg',216,288),
      new Array('Photo 32','IMG_9762.jpg',216,288),
      new Array('Photo 33','IMG_9777.jpg',288,155),
      new Array('Photo 34','IMG_9787.jpg',140,288),
      new Array('Photo 35','IMG_9860_1.jpg',216,288),
      new Array('Photo 36','IMG_9885.jpg',288,216),
      new Array('Photo 37','IMG_9941.jpg',288,216),
      new Array('Photo 38','IMG_9965.jpg',216,288),
      new Array('Photo 39','MarcellaScottsdale-PatioShot-IMG_8659.jpg',288,192),
      new Array('Photo 40','MarcellasScottsdale-ExteriorSideShot-IMG_8499.jpg',288,203),
      new Array('Photo 41','IMG_9020.jpg',288,216),
      new Array('Photo 42','IMG_9060.jpg',216,288),
      new Array('Photo 43','IMG_9082.jpg',288,216),
      new Array('Photo 44','IMG_9107.jpg',288,216),
      new Array('Photo 45','IMG_9115.jpg',288,216),
      new Array('Photo 46','IMG_9164.jpg',288,216),
      new Array('Photo 47','IMG_9165.jpg',216,288),
      new Array('Photo 48','IMG_9182.jpg',288,216),
      new Array('Photo 49','IMG_9189.jpg',288,216),
      new Array('Photo 50','IMG_9241.jpg',288,216),
      new Array('Photo 51','IMG_9266.jpg',288,216),
      new Array('Photo 52','IMG_9275.jpg',288,216),
      new Array('Photo 53','IMG_9302.jpg',288,216),
      new Array('Photo 54','IMG_9319.jpg',288,216),

      new Array('Photo 55','Astoria.jpg',108,144),
      new Array('Photo 56','Critical Care La Quinta.jpg',534,400),
      new Array('Photo 57','Critical Care2.jpg',534,400),
      new Array('Photo 58','Higgins Saturn Red Jumbo.jpg',534,400),
      new Array('Photo 59','Higgins Sedona in San Dimas.jpg',534,400),
      new Array('Photo 60','Jumbo Red Flashed, Mammoth.jpg',300,400),
      new Array('Photo 61','Jumbo Red Flashed_Mammoth.jpg',300,400),
      new Array('Photo 62','Orange Coast College-2.jpg',534,400),
      new Array('Photo 63','Orange Coast College.jpg',534,400),
      new Array('Photo 64','P1010007.jpg',300,400),
      new Array('Photo 65','Red Flash Jumbo. Santa Ana.jpg',534,400),
      new Array('Photo 66','Red. brick.jpg',300,400),
      new Array('Photo 67','Taps Brewery_Macon.jpg',128,96),
      new Array('Photo 68','Williams-Building-with-Catalina-Flash-in-Fullerton (14).jpg',534,400)
    )
  ),

  new Array('Residential Veneer','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','pp01.jpg',338,400),
      new Array('Photo 2','higgins_big.jpg',306,400),
      new Array('Photo 3','pp09.jpg',306,400),
      new Array('Photo 4','Flash on Victorian home in Costa Mesa (5).jpg',533,400),
      new Array('Photo 5','Flash on Victorian home in Costa Mesa (6).jpg',533,400),
      new Array('Photo 6','Georgetown house in Upland on Euclid ...Robco (2).jpg',533,400),
      new Array('Photo 7','Georgetown house in Upland on Euclid ...Robco (3).jpg',533,400),
      new Array('Photo 8','P1010018.jpg',533,400),
      new Array('Photo 9','P1250039.jpg',533,400),
      new Array('Photo 10','P1250041.jpg',533,400),
      new Array('Photo 11','PB010054.jpg',533,400),
      new Array('Photo 12','PB010067.jpg',533,400),
      new Array('Photo 13','SanVincente.jpg',533,400),
      new Array('Photo 14','IMG_0045.jpg',600,400),
      new Array('Photo 15','IMG_0293.jpg',600,400),
      new Array('Photo 16','IMG_0525.jpg',601,401),
      new Array('Photo 17','Crestline 11-17-2009 12-10-42 AM.jpg',300,400),
      new Array('Photo 18','IMG_0158.jpg',288,192),
      new Array('Photo 19','IMG_0465.jpg',216,288),
      new Array('Photo 20','IMG_0669.jpg',248,288),
      new Array('Photo 21','IMG_0675.jpg',288,216),
      new Array('Photo 22','IMG_2049.jpg',216,288),
      new Array('Photo 23','IMG_2051.jpg',288,216),
      new Array('Photo 24','IMG_2080_1.jpg',216,288),
      new Array('Photo 25','Moraga in Chino Hills 2-4-2010 8-47-52 AM.jpg',534,400),
      new Array('Photo 26','Windamere in  Arizona 11-23-2009 6-46-15 PM 11-23-2009 6-46-15 PM.jpg',288,192),
      new Array('Photo 27','Windamere in Arizona 11-23-2009 6-50-10 PM.jpg',240,288),
      new Array('Photo 28','Windamere in Arizona 11-23-2009 6-51-00 PM.jpg',288,192),
      new Array('Photo 29','Windamere in Arizona 11-23-2009 7-19-09 PM.jpg',288,192),
      new Array('Photo 30','YM6D7572.jpg',288,192),
      new Array('Photo 31','YM6D7578.jpg',288,192),
      new Array('Photo 32','YM6D7580.jpg',288,206),
      new Array('Photo 33','DSC01884.jpg',288,216),
      new Array('Photo 34','IMG_9609.jpg',300,400),
      new Array('Photo 35','Windamere  9-27-2009 11-33-33 PM.jpg',300,400),

      new Array('Photo 36','Emberweave, Upland, CA.jpg',534,400),
      new Array('Photo 37','Flash on Victorian home in Costa Mesa (6)_1.jpg',534,400),
      new Array('Photo 38','Haystack La Qunita.jpg',534,400),
      new Array('Photo 39','Higgins Flash on Victorian  in Costa Mesa.jpg',534,400),
      new Array('Photo 40','Higgins Old Town_Gable.jpg',534,400),
      new Array('Photo 41','Higgins Sahvanna-wall Fullerton.jpg',534,400),
      new Array('Photo 42','Higgins Sandhurst at cambridge square (2).jpg',534,400),
      new Array('Photo 43','Higgins Sandhurst at cambridge square (4).jpg',300,400),
      new Array('Photo 44','Moraga.phx.jpg',601,400),
      new Array('Photo 45','Moraga.phx2.jpg',267,400),
      new Array('Photo 46','Moraga.phx3.jpg',601,400),
      new Array('Photo 47','Old Hampton house Temecula.jpg',534,400),
      new Array('Photo 48','Old Hampton House Temecula2.jpg',534,400),
      new Array('Photo 49','Sahvanna-wall-in-Fullerton (1).jpg',534,400),
      new Array('Photo 50','Yellowstone Japan.jpg',600,401),
      new Array('Photo 51','Yellowstone Japan2.jpg',600,401)
    )
  ),

  new Array('Used Brick','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Brick Bench.jpg',360,270),
      new Array('Photo 2','Brick chimney.jpg',270,360),
      new Array('Photo 3','Brick Entry.jpg',270,360),
      new Array('Photo 4','Brick Gables.jpg',360,270),
      new Array('Photo 5','Brick Hearth and Fire Place.jpg',270,360),
      new Array('Photo 6','Brick Lovers Stove.jpg',360,270),
      new Array('Photo 7','Brick steps and paving.jpg',360,270),
      new Array('Photo 8','Brick Steps.jpg',360,270),
      new Array('Photo 9','Brick Wall.jpg',360,270),
      new Array('Photo 10','Ginger Bread.jpg',360,270),
      new Array('Photo 11','Hand Chisled Ledge.jpg',360,270),
      new Array('Photo 12','Hand Chisled Wall Cap.jpg',360,270),
      new Array('Photo 13','TAPS Corona Macon 14.jpg',300,400),
      new Array('Photo 14','TAPS Corona Macon 18.jpg',300,400),
      new Array('Photo 15','TAPS Corona Macon 20.jpg',534,400),
      new Array('Photo 16','TAPS Corona Macon 39.jpg',534,400),
      new Array('Photo 17','TAPS Corona Macon 47.jpg',534,400),
      new Array('Photo 18','TAPS Corona Macon 61.jpg',534,400),
      new Array('Photo 19','TAPS Corona Macon 7.jpg',534,400),
      new Array('Photo 20','TAPS Corona Macon 80.jpg',300,400),
      new Array('Photo 21','TAPS Corona Macon 85.jpg',534,400),
      new Array('Photo 22','TAPS Corona Macon 93.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]);
}
