
smallSizes = new Array(50,50);
mediumSizes = new Array(251,170);
pageName = 'photosnatural.htm';
scriptName = 'photosnatural.js';
countX = 3;
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('Sonorastone','images/naturalgallery/small/','images/naturalgallery/big/','images/naturalgallery/popup/',
    new Array(
      new Array('','4DSC_0037a.jpg',598,400,'images/profile/naturalgallery/Sonorastone.gif','Sonorastone&reg; Pavers','Agua Caliente Casino & Spa, Rancho Mirage','Mortar Set','','Multiple Sizes','Wheat & Desert','Sonorastone&reg;'),
      new Array('','agua-caliente-final-084a.jpg',555,400,'images/profile/naturalgallery/Sonorastone.gif','Sonorastone&reg; Pavers','Agua Caliente Casino & Spa, Rancho Mirage','Mortar Set','','Multiple Sizes','Wheat & Desert','Sonorastone&reg;'),
      new Array('','DSC_0140a.jpg',598,400,'images/profile/naturalgallery/Sonorastone.gif','Sonorastone&reg; Pavers','Agua Caliente Casino & Spa, Rancho Mirage','Mortar Set','','Multiple Sizes','Wheat & Desert','Sonorastone&reg;'),
      new Array('','5DSC_0046a.jpg',598,400,'images/profile/naturalgallery/Sonorastone.gif','Sonorastone&reg; Pavers','Agua Caliente Casino & Spa, Rancho Mirage','Mortar Set','','Multiple Sizes','Wheat & Desert','Sonorastone&reg;'),
      new Array('','DSC_0168a.jpg',598,400,'images/profile/naturalgallery/Sonorastone.gif','Sonorastone&reg; Pavers','Agua Caliente Casino & Spa, Rancho Mirage','Mortar Set','','Multiple Sizes','Wheat','Sonorastone&reg;'),
      new Array('','agua-caliente-final-107a.jpg',533,400,'images/profile/naturalgallery/Sonorastone.gif','Sonorastone&reg; Pavers','Agua Caliente Casino & Spa, Rancho Mirage','Mortar Set','','Multiple Sizes','Wheat','Sonorastone&reg;'),

      new Array('','1.jpg',636,400),
      new Array('','2.jpg',587,400),
      new Array('','3.jpg',534,400),
      new Array('','4.jpg',534,400),
      new Array('','5.jpg',534,400),
      new Array('','6.jpg',534,400),
      new Array('','7.jpg',534,400),
      new Array('','8.jpg',627,400),
      new Array('','9.jpg',300,400),
      new Array('','10.jpg',534,400),
      new Array('','sps12.jpg',252,170,'','Sonorastone Pavers with Borderstone Edging','Private Residence, Simi Valley, California','Sand Set','','24" x 24"x 2" Paver, 4" x 4" x 20" Borderstone','Wheat','Slate Texture','Sonorastone with Borderstone as edging, creates this pool area entrance'),
      new Array('','sps7.jpg',251,170,'','Sonorastone Pavers','Private Residence, Palos Verdes, California','Sand Set','','24" x 24" x 2", 12" x 24" x 2", 12" x 12" x 2"','Desert','Slate Texture','So. California  residence using different sized Sonorastone pavers in a sandset application. Installation allows for distinctive grass borders'),
      new Array('','sps9.jpg',251,170,'','Sonorastone Pavers with Borderstone Edging','Private Residence, Simi Valley, California','Mortar Set','24" x 24" x 2" Paver, 4" x 4" x 20" Borderstone','Wheat','Slate Texture','This front walkway with 24" x 24" Sonorastone pavers, is elegantly trimmed with Borderstone'),
      new Array('','sps8.jpg',251,170,'','Sonorastone Pavers','Private Residence, Palos Verdes, California','Sand Set','','24" x 24" x 2", 12" x 24" x 2", 12" x 12" x 2"','Desert','Slate Texture','12" x 12", 12" x 24" and 24" x 24" Sonorastone pavers create a distinctive pattern'),
      new Array('','sps1.jpg',251,170,'','Sonorastone Pavers with Borderstone Edging','Private Residence, Paso Robles, California','Sand Set','','24" x 24" x 2", 12" x 24" x 2", 12" x 12" x 2" Pavers 4" x  4" x  20" Borderstone','Desert','Slate Texture','Stacked Borderstone creates a planting bed and trims the Sonorastone patio'),
      new Array('','sps10.jpg',251,170,'','Sonorastone Pavers, Borderstone Edging, with Classic Tread Step And Classic Riser Block','Private Residence, Simi Valley, California','Sand Set, Mortar Set','','24" x 24" x 2" Paver, 4" x 4" x 20" Borderstone 14" x 24" x 2&frac12;" Classic Tread Step 3" x 4" x 24" Classic Riser Blocks','Wheat, Almond','Slate Texture, Sandblasted','14" Classic Tread Step, mortared in place, with a Borderstone edging, handles this change in elevation'),
      new Array('','sps2.jpg',251,170,'','Sonorastone Pavers with Borderstone Edging','Private Residence, Paso Robles, California','Sand Set','','24" x 24" x 2", 12" x 24" x 2", 12" x 12" x 2" Pavers 4" x 4" x 20" Borderstone','Desert','Slate Texture','Stacked Borderstone creates a planting bed and trims the Sonorastone patio'),
      new Array('','sps11.jpg',251,170,'','Sonorastone Pavers, Borderstone Edging, Wall Cap Components, Classic Tread Step And Classic Riser Block','Private Residence, Simi Valley, California','Sand Set, Mortar Set','','24" x 24" x 2" Paver, 4" x 4" x 20" Borderstone 14" x 24" x 2&frac12;" Classic Tread Step 3" x 4" x 24" Classic Riser Blocks 16" x 24" x 2&frac12;" Straight and Radius Wall Cap','Wheat, Almond','Slate Texture, Sandblasted','Sonorastone pavers, combined with Classic Tread Steps and Classic Wall Cap Radiused pieces, come together in this picture perfect pool!')
    )
  )
)

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 showProfileNew(ind) {
  width = arImages[section][4][ind][2]+300;
  height = arImages[section][4][ind][3]+150;
  if (height<500) height = 500;
  win = window.open('profile_popup.htm?script='+scriptName+'&section='+section
	+'&ind='+ind,'_blank','width='+width+',height='
	+height+',left=17,top=17,statusbar=no,toolbar=no,scrollbars= never,navbar=no');
  win.focus();
}