
smallSizes = new Array(80,80);
mediumSizes = new Array(249,187);
pageName = 'portfolio.htm';
scriptName = 'portfolio.js';
countX = 2;
countY = 4;

// sections: name, small images path, medium images path, big images path
// images: name, src, big width, big height
var arImages = new Array(
  new Array('Stone','images/portfolio/stone/small/','images/portfolio/stone/medium/','images/portfolio/stone/big/',
    new Array(
      new Array('Photo 1','p07.jpg',400,300),
      new Array('Photo 2','pp36.jpg',400,300),
      new Array('Photo 3','pp45.jpg',400,300),
      new Array('Photo 4','pp47.jpg',400,300),
      new Array('Photo 5','pp49.jpg',400,300),
      new Array('Photo 6','pp53.jpg',400,300),
      new Array('Photo 7','hayduk009.jpg',450,300),
      new Array('Photo 8','hayduk015.jpg',450,300),
      new Array('Photo 9','michaels003.jpg',450,300),
      new Array('Photo 10','pp54.jpg',400,300),
      new Array('Photo 11','pp55.jpg',400,300),
      new Array('Photo 12','Hayduk2-009.jpg',400,300),
      new Array('Photo 13','P5090056.jpg',533,400),
      new Array('Photo 14','P5030075.jpg',533,400),
      new Array('Photo 15','P6050009.jpg',533,400),
      new Array('Photo 16','PA160021.jpg',300,400),
      new Array('Photo 17','stone-kings-013.jpg',500,375),
      new Array('Photo 18','pool-vogal-019.jpg',500,375),
      new Array('Photo 19','stone_epik_009.jpg',500,375),
      new Array('Photo 20','P5240002.jpg',500,375),
      new Array('Photo 21','P7200010.jpg',534,400),
      new Array('Photo 22','work 026.jpg',534,400),
      new Array('Photo 23','stone_pavers.jpg',500,375),
      new Array('Photo 24','stone-veneers5.jpg',500,375),
      new Array('Photo 25','stone-veneers6.jpg',300,400),
      new Array('Photo 26','stone-veneers7.jpg',300,400),
      new Array('Photo 27','stone_001.jpg',534,400),
      new Array('Photo 28','Stone1.jpg',590,400),
      new Array('photo 29','stone.jpg',450,338),
      new Array('photo 30','p9010076.jpg',500,375),
      new Array('Photo 31','SHUKEN 012.jpg',534,400),
      new Array('Photo 32','SHUKEN 016.jpg',534,400),
      new Array('Photo 33','SHUKEN 017.jpg',534,400),
      new Array('Photo 34','work 144.jpg',534,400),
      new Array('Photo 35','vander2110-006.jpg',533,400),
      new Array('Photo 36','vander2110-003.jpg',533,400),
      new Array('Photo 37','vander2110-017.jpg',533,400),
      new Array('Photo 38','epik-stone.jpg',550,413),
      new Array('Photo 39','epik-stone2.jpg',600,399)
    )
  ),
  
  new Array('Concrete','images/portfolio/concrete/small/','images/portfolio/concrete/medium/','images/portfolio/concrete/big/',
    new Array(
      new Array('Photo 1','epick_concrete.jpg',400,300),
      new Array('Photo 2','pp12.jpg',400,300),
      new Array('Photo 3','pp13.jpg',400,300),
      new Array('Photo 4','pp38.jpg',400,300),
      new Array('Photo 5','pp39.jpg',400,300),
      new Array('Photo 6','pp40.jpg',400,300),
      new Array('Photo 7','pp62.jpg',327,490),
      new Array('Photo 8','pp37.jpg',350,490),
      new Array('Photo 9','motorcourt.jpg',450,338),
      new Array('Photo 10','PA160024.jpg',500,375),
      new Array('Photo 11','PA160025.jpg',500,375),
      new Array('Photo 12','stone-kings-014.jpg',500,375),
      new Array('Photo 13','stone-kings-016.jpg',500,375),
      new Array('Photo 14','elk-stone-013.jpg',450,338),
      new Array('Photo 15','concrete_epik_009.jpg',500,375),
      new Array('Photo 16','Concrete1.jpg',606,400),
      new Array('Photo 17','Concrete2.jpg',593,400),
      new Array('Photo 1','SHUKEN 007.jpg',534,400)
    )
  ),
  
  new Array('Brick','images/portfolio/brick/small/','images/portfolio/brick/medium/','images/portfolio/brick/big/',
    new Array(
      new Array('Photo 1','p04.jpg',400,300),
      new Array('Photo 2','p06.jpg',400,300),
      new Array('Photo 3','pp48.jpg',400,300),
      new Array('Photo 4','pp51.jpg',400,300),
      new Array('Photo 5','pp55.jpg',400,300),
      new Array('Photo 6','Brick1.jpg',658,400),
      new Array('Photo 7','Brick2.jpg',614,400),
      new Array('Photo 8','Brick3.jpg',614,400),
      new Array('Photo 9','Brick4.jpg',700,396),
      new Array('Photo 10','brick.jpg',335,400)
    )
  ),
  
  new Array('Pools','images/portfolio/ponds/small/','images/portfolio/ponds/medium/','images/portfolio/ponds/big/',
    new Array(
      new Array('Photo 1','pp34.jpg',400,300),
      new Array('Photo 2','pp35.jpg',450,300),
      new Array('Photo 3','pp36.jpg',450,300),
      new Array('Photo 4','pp37.jpg',500,237),
      new Array('Photo 5','P5090055.jpg',533,400),
      new Array('Photo 6','ponds_epik_009.jpg',500,375),
      new Array('Photo 7','pool vogal 010.jpg',534,400),
      new Array('Photo 8','pool vogal 012.jpg',534,400),
      new Array('Photo 9','pool vogal 013.jpg',534,400),
      new Array('Photo 10','1pools.jpg',533,400),
      new Array('Photo 11','2pools.jpg',533,400),
      new Array('Photo 12','work 147.jpg',534,400),
      new Array('Photo 13','epik-pools.jpg',550,413)
    )
  ),
  
  new Array('Barbecues','images/portfolio/barbecues/small/','images/portfolio/barbecues/medium/','images/portfolio/barbecues/big/',
    new Array(
      new Array('Photo 1','pp14.jpg',400,300),
      new Array('Photo 2','pp35.jpg',400,300),
      new Array('Photo 3','pp38.jpg',400,300),
      new Array('Photo 4','pp58.jpg',400,300),
      new Array('Photo 5','pp61.jpg',400,300),
      new Array('Photo 6','fireplace.jpg',400,300),
      new Array('Photo 7','bbq.jpg',400,300),
      new Array('Photo 8','pp-3.jpg',400,225),
      new Array('Photo 9','BBQ1.jpg',450,300),
      new Array('Photo 10','erivers.jpg',400,265),
      new Array('Photo 11','tilbury.jpg',400,265),
      new Array('Photo 12','P5090051.jpg',533,400),
      new Array('Photo 13','barbecues_epik_009.jpg',500,375),
      new Array('Photo 14','1barbecues.jpg',533,400),
      new Array('Photo 15','barbecues_002.jpg',534,400),
      new Array('Photo 16','barbecues.jpg',450,338),
      new Array('Photo 17','hope ranch 005.jpg',300,400),
      new Array('Photo 18','SHUKEN 014.jpg',534,400),
      new Array('Photo 19','vander2110-014.jpg',533,400)
    )
  ),
  
   new Array('Homes','images/portfolio/homes/small/','images/portfolio/homes/medium/','images/portfolio/homes/big/',
    new Array(
      new Array('Photo 1','pp01.jpg',400,300),
      new Array('Photo 2','pp05.jpg',400,300),
      new Array('Photo 3','pp08.jpg',400,300),
      new Array('Photo 4','pp51.jpg',400,300),
      new Array('Photo 5','pp52.jpg',400,300),
      new Array('Photo 6','pp57.jpg',400,300),
      new Array('Photo 7','pp58.jpg',500,342),
      new Array('Photo 8','Hayduk2-010.jpg',400,300),
      new Array('Photo 9','elk-stone-010.jpg',450,338),
      new Array('Photo 10','homes_epik_009.jpg',500,375),
      new Array('Photo 11','work 019.jpg',534,400),
      new Array('Photo 12','1Homes.jpg',533,400),
      new Array('Photo 13','Homes1.jpg',700,396),
      new Array('Photo 14','Homes2.jpg',583,400),
      new Array('Photo 15','Homes3.jpg',658,400),
      new Array('Photo 16','Homes4.jpg',583,400),
      new Array('Photo 17','Homes5.jpg',606,400),
      new Array('Photo 18','Homes6.jpg',700,396),
      new Array('Photo 19','homes.jpg',450,338),
      new Array('Photo 20','houses_2.jpg',450,338)
    )
  ),

   new Array('Fireplaces','images/portfolio/fireplaces/small/','images/portfolio/fireplaces/medium/','images/portfolio/fireplaces/big/',
    new Array(
      new Array('Photo 1','fireplace.jpg',450,300),
      new Array('Photo 2','fireplace_01.jpg',531,400),
      new Array('Photo 3','fireplace_02.jpg',533,400),
      new Array('Photo 4','P5090053.jpg',533,400),
      new Array('Photo 5','P4270039.jpg',300,400),
      new Array('Photo 6','P5230083.jpg',300,400),
      new Array('Photo 7','P5230080.jpg',300,400),
      new Array('Photo 8','wall_fireplace.jpg',338,450),
      new Array('Photo 9','elk-stone-003.jpg',300,400),
      new Array('Photo 10','pool-vogal-029.jpg',500,375),
      new Array('Photo 11','fireplaces-005.jpg',500,375),
      new Array('Photo 12','P7260034.jpg',534,400),
      new Array('Photo 13','P7180004.jpg',534,400),
      new Array('Photo 14','pp-4.jpg',450,338),
      new Array('Photo 15','pool vogal 014.jpg',534,400),
      new Array('Photo 16','work 025.jpg',534,400),
      new Array('Photo 17','fireplace_04.jpg',500,375),
      new Array('Photo 18','fireplace_mantle_01.jpg',500,375),
      new Array('Photo 19','fireplace_mantle_02.jpg',500,375),
      new Array('Photo 20','fireplaces.jpg',301,400),
	  new Array('Photo 21','1fireplaces.jpg',533,400),
      new Array('Photo 22','fireplace_004.jpg',534,400),
      new Array('Photo 23','surround-055.jpg',500,375),
      new Array('Photo 24','fireplace-005.jpg',375,500),
      new Array('Photo 25','fireplaces1.jpg',450,338),
      new Array('Photo 26','fireplaces2.jpg',525,350),
      new Array('Photo 27','jan 10 019.jpg',534,400),
      new Array('Photo 28','jan 10 020.jpg',300,400),
      new Array('Photo 29','jan 10 029.jpg',300,400),
      new Array('Photo 30','vander2110-008.jpg',533,400),
      new Array('Photo 31','epik-fireplace.jpg',600,450)
    )
  ),
   
  new Array('HGTV: I want that kitchen','images/portfolio/hgtv/small/','images/portfolio/hgtv/medium/','images/portfolio/hgtv/big/',
    new Array(
      new Array('<b>The Great Outdoors</b><br>By building a large outdoor kitchen with all the functions of their indoor kitchen, the homeowners can now spend more time soaking up the sun in style.','fullview.jpg',534,400),
      new Array('<b>Cooking Area</b><br>The main cooking area is centered around a massive gas grill, two side burners and a prep area. With a grill this large, the homeowners never have to worry about running out of cooking space.','bbq.jpg',534,400),
      new Array('<b>Pizza Oven</b>Included in the large cooking area is a wood-burning pizza oven. With a good fire, it takes the oven about two hours to get up to the right temperature. Then the coals are pushed to one side, and the pizza slides right onto the oven deck to be cooked.','pizzaoven.jpg',534,400),
      new Array('<b>Overhead View</b><br>Seating is not a problem in this kitchen; the huge island can seat 12 people comfortably. The surface of the multi-level countertops and island are made out of white cement that was polished for a smooth, shiny finish.','overhead.jpg',534,400),
      new Array('<b>Seating Area</b><br>At each end of the long countertop are two rounded tables that come in handy for big cookouts. They are at bar height, making them comfortable for sitting as well as convenient for buffets.','umbrella.jpg',534,400),
      new Array('<b>Outdoor Living Room</b><br>When the cooking is complete, the party can move underneath the beautiful cabana. The outdoor kitchen takes full advantage of the southern California weather, but the homeowners like having a little protection from the sun or winter rains. If weather turns cold, they can sit on the hearth and enjoy the fabulous built-in fireplace.','seatingarea.jpg',534,400),
      new Array('<b>Media Center</b><br>Why go inside to watch a movie or football game? The homeowners installed an entertainment center and enclosed it in glass so they can watch TV outdoors, no matter the weather.','enclosedtv.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]);
}
