
smallSizes = new Array(77,77);
mediumSizes = new Array(200,170);
pageName = 'portfolio.htm';
scriptName = 'portfolio.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('Our Company','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','company_01.jpg',345,256,''), 
		new Array('','company_02.jpg',346,256,''), 
		new Array('','company_03.jpg',346,260,''), 
		new Array('','company_04.jpg',346,258,''), 
		new Array('','company_05.jpg',342,249,''), 
		new Array('','company_06.jpg',346,259,''), 
		new Array('','company_07.jpg',346,260,''), 
		new Array('','company_08.jpg',344,257,''), 
		new Array('','company_09.jpg',343,258,''), 
		new Array('','company_10.jpg',345,259,''), 
		new Array('','company_11.jpg',346,258,''), 
		new Array('','company_12.jpg',344,257,''), 
		new Array('','company_13.jpg',344,258,''), 
		new Array('','company_14.jpg',347,260,'')	
    ),'Click on the images to view a larger display of our elegant colors, shapes and patterns.'
  ),
  new Array('Our Store','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','watergardens010.jpg',533,400,''), 
		new Array('','watergardens011_2.jpg',300,400,''), 
		new Array('','watergardens012_3.jpg',300,400,''),	
		new Array('','store_01.jpg',555,400,''), 
		new Array('','store_02.jpg',509,400,''), 
		new Array('','store_03.jpg',547,400,''), 
		new Array('','store_04.jpg',537,400,''), 
		new Array('','store_05.jpg',547,400,''), 
		new Array('','store_06.jpg',539,400,''), 
		new Array('','store_07.jpg',524,400,''), 
		new Array('','store_08.jpg',520,400,''), 
		new Array('','store_09.jpg',543,400,'')	
    ),'Click on the images to view a larger display of our elegant colors, shapes and patterns.'
  ),
  new Array('Project 1','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','prj1_01.jpg',276,169,''), 
		new Array('','prj1_02.jpg',270,194,''), 
		new Array('','prj1_03.jpg',303,400,'')	
    ),'Click on the images to view a larger display of our elegant colors, shapes and patterns. Please email your pictures to info@southburystoneandsupply we will be more than happy to display your pictures along with your name and number'
  ),
  new Array('Project 2','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','prj2_01.jpg',394,287,''), 
		new Array('','prj2_02.jpg',297,154,''), 
		new Array('','prj2_03.jpg',280,164,'')
    ),'Click on the images to view a larger display of our elegant colors, shapes and patterns. Please email your pictures to info@southburystoneandsupply we will be more than happy to display your pictures along with your name and number'
  ),
  new Array('Project 3','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','prj3_01.jpg',274,191,''), 
		new Array('','prj3_02.jpg',282,192,''), 
		new Array('','prj3_03.jpg',268,186,''), 
		new Array('','prj3_04.jpg',273,193,'')	
    ),'Click on the images to view a larger display of our elegant colors, shapes and patterns. Please email your pictures to info@southburystoneandsupply we will be more than happy to display your pictures along with your name and number'
  )
)

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 menu_portfolio() {
  var jp;
  document.write('<table border="0" cellspacing="0" cellpadding="0">');
  document.write('<tr><td>Choose a category:&nbsp;<select name="cat" class="select1" onChange="if (this.value.length!=0) window.location=this.value" style="font-size:9px;">');
  for (jp=0;jp<arImages.length;jp++) {
    document.write('<option value="'+pageName+'?section='+jp+'"'+((jp==section)?' selected':'')+'>'+arImages[jp][0]+'</option>');
  }  
  document.write('</select></td></tr>')
  document.write('</table>');
} 
  
function showImageMedium(number) {
  showImage('imagemedium',arImages[section][2]+arImages[section][4][number][1]);
  if (arImages[section][4][number][4]!='')
   showMessage('imagemediumname',arImages[section][4][number][4]);   
  else
   showMessage('imagemediumname','Photo '+Number(Number(number)+1));
}

function showImageBig(number) {
  showImagePopup(scriptName,section,number,arImages[section][4][number][2],
   arImages[section][4][number][3]);
}

