
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'photos.htm';
scriptName = 'photos.js';
countX = 4;
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('Photo Gallery','images/photos/small/','images/photos/medium/','images/photos/big/',
    new Array(
      new Array('Photo 1','19 Bickett Ridge.jpg',534,400),
      new Array('Photo 2','43LF-Den.jpg',534,400),
      new Array('Photo 3','6 WM - Back Stairway.jpg',267,400),
      new Array('Photo 4','6 WM - Front Stair2.jpg',600,400),
      new Array('Photo 5','6 WM -MB Tub2.jpg',600,400),
      new Array('Photo 6','6WM - Kitchen3.jpg',600,400),
      new Array('Photo 7','76BR - MasB.jpg',534,400),
      new Array('Photo 8','76BR -Kit.jpg',534,400),
      new Array('Photo 9','76BR-DR.jpg',300,400),
      new Array('Photo 10','76BR-Front Ent.jpg',534,400),
      new Array('Photo 11','76BR-GR.jpg',534,400),
      new Array('Photo 12','76BR-Kitchen.jpg',300,400),
      new Array('Photo 13','Cane Pointe.jpg',534,400),
      new Array('Photo 14','Firethorne Kitchen 2.jpg',600,400),
      new Array('Photo 15','Firethorne Kitchen.jpg',600,400),
      new Array('Photo 16','Firethorne mas bath.jpg',600,400),
      new Array('Photo 17','Moore House.jpg',573,400),
      new Array('Photo 18','Singleton Ceiling.jpg',534,400),
      new Array('Photo 19','Singleton Den.jpg',284,400),
      new Array('Photo 20','Singleton Foyer.jpg',300,400),
      new Array('Photo 21','Singleton Garage.jpg',530,401),
      new Array('Photo 22','Singleton Library.jpg',534,400),
      new Array('Photo 23','Smith Field 1 Kitchen.jpg',534,400),
      new Array('Photo 24','Smith_Field_2.jpg',534,400),
      new Array('Photo 25','Tina Foyer.jpg',300,400),
	  new Array('Photo 26','19BR Back Porch.jpg',491,400),
      new Array('Photo 27','19BR Cabinet Detail.jpg',268,400),
      new Array('Photo 28','19BR Dining.jpg',598,400),
      new Array('Photo 29','19BR Kitchen.jpg',549,400),
      new Array('Photo 30','19BR Mas Bath.jpg',268,400),
      new Array('Photo 31','30SF - Dining.jpg',219,400),
      new Array('Photo 32','30SF - Mas Bath.jpg',533,400),
      new Array('Photo 33','6 Steele Rd. - Front Door.jpg',268,400),
      new Array('Photo 34','6 Steele Rd. - Kitchen Cabinets.jpg',268,400),
      new Array('Photo 35','6WM - Fireplace.jpg',281,400),
	  new Array('Photo 36','57 SF - Dining.jpg',534,400),
      new Array('Photo 37','57 SF - Front Porch.jpg',305,400),
      new Array('Photo 38','57 SF - Mas Bed.jpg',300,400),
      new Array('Photo 39','57 SF - patio.jpg',534,400),
      new Array('Photo 40','57 SF - Sitting Room.jpg',300,400),
      new Array('Photo 41','57 SF - Stairway.jpg',300,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]);
}
