
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio_commercial.htm';
scriptName = 'portfolio_commercial.js';
countX = 4;
countY = 2;

var arImages = new Array(
  new Array('7000 Central','7000_central','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','7000_Central.jpg',300,400),
      new Array('Photo 2','7000_Central_entryway.jpg',535,400),
      new Array('Photo 3','7000_Central_lakeside.jpg',535,400),
      new Array('Photo 4','7000_Central_lakeside_2.jpg',535,400),
      new Array('Photo 5','7000_Central_lakeside_3.jpg',535,400),
      new Array('Photo 6','7000_Central_lakeside_4.jpg',535,400),
      new Array('Photo 7','7000_Central_walkway.jpg',535,400),
      new Array('Photo 8','7000_Central_wall.jpg',535,400)
    )
  ),

  new Array('Buford','buford','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','028.jpg',535,400),
      new Array('Photo 2','029.jpg',300,400),
      new Array('Photo 3','030.jpg',300,400),
      new Array('Photo 4','031.jpg',535,400)
    )
  ),

  new Array('Liburn','liburn','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','lilburn_police_station.jpg',535,400),
      new Array('Photo 2','Lilburn_police_station_2_1.jpg',300,400),
      new Array('Photo 3','Lilburn_streetscape_2.jpg',535,400)
    )
  ),

  new Array('Mercedes','mercedes','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','Mercedes_dealership.jpg',300,400),
      new Array('Photo 2','mercedes_dealership_2.jpg',535,400),
      new Array('Photo 3','mercedes_dealership_3.jpg',640,386)
    )
  ),

  new Array('St Benedict','st_benedict','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','012.jpg',535,400),
      new Array('Photo 2','014.jpg',535,400),
      new Array('Photo 3','016.jpg',300,400),
      new Array('Photo 4','044.jpg',535,400),
      new Array('Photo 5','045.jpg',535,400)
    )
  ),

  new Array('Stone Mountain','stone_mountain','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
      new Array('Photo 1','017.jpg',535,400),
      new Array('Photo 2','027.jpg',300,400),
      new Array('Photo 3','100_1096.jpg',535,400),
      new Array('Photo 4','100_1098.jpg',300,400)
    )
  )
)

section = getParameter(self.document.location.href, 'section');
var sectionIndex = 0;

if (section != '') {
  for (var i=0; i<arImages.length; i++) {
    if (arImages[i][1] == section) {
	  sectionIndex = i;
	  break;
	}
  }
}
section = arImages[sectionIndex][1];

ind = getParameter(self.document.location.href, 'ind');
if (isNaN(ind) || (ind=='') || (ind<0) || (ind>arImages[sectionIndex][5].length))
  ind = 0;

var arPreloadImages = new Array();
function preload() {
  if (arImages[sectionIndex][3]!='') {
    for (i=ind;(i<(Number(ind)+Number(countX*countY))) && (i<arImages[sectionIndex][5].length);i++) {
      arPreloadImages[i] = new Image(mediumSizes[0],mediumSizes[1]);
      arPreloadImages[i].src = arImages[sectionIndex][3]+arImages[sectionIndex][5][i][1];
    }
  }
}

function showImageMedium(number) {
  showImage('imagemedium',arImages[sectionIndex][3]+arImages[sectionIndex][5][number][1]);
  showMessage('imagemediumname',arImages[sectionIndex][5][number][0]);
}

