
smallSizes = new Array(100,75);
mediumSizes = new Array(160,120);
pageName = 'job.htm';
scriptName = 'job.js';
countX = 4;
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('Job of the Summer','images/residential/small/','images/residential/medium/','images/residential/big/',
    new Array(
      new Array('Photo 1','7-9-09 001.jpg',800,600),
      new Array('Photo 2','7-9-09 002.jpg',800,600),
      new Array('Photo 3','7-9-09 004.jpg',800,600),
      new Array('Photo 4','7-16-09 003.jpg',800,600),
      new Array('Photo 5','7-16-09 004.jpg',800,600),
      new Array('Photo 6','7-16-09 005.jpg',800,600),
      new Array('Photo 7','7-16-09 006.jpg',800,600),
      new Array('Photo 8','7-16-09 008.jpg',800,600),
      new Array('Photo 9','7-16-09 010.jpg',800,600),
      new Array('Photo 10','7-16-09 011.jpg',450,600),
      new Array('Photo 11','7-16-09 012.jpg',800,600)
/*
      new Array('Photo 1','DSC00655.jpg',800,600),
      new Array('Photo 2','DSC00656.jpg',800,600),
      new Array('Photo 3','DSC00657.jpg',450,600),
      new Array('Photo 4','DSC00658.jpg',800,600),
      new Array('Photo 5','DSC00659.jpg',800,600),
      new Array('Photo 6','DSC00661.jpg',800,600),
      new Array('Photo 7','DSC00662.jpg',800,600),
      new Array('Photo 8','DSC00663.jpg',800,600),
      new Array('Photo 9','DSC00664.jpg',450,600),
      new Array('Photo 10','DSC00665.jpg',800,600),
      new Array('Photo 11','DSC00666.jpg',800,600)
*/
    )
  )
)

var section = getParameter(self.document.location.href, 'section');
if (isNaN(section) || (section=='') || (section<0) || (section>arImages.length)) section = 0;

var 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]);
}