
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 Portfolio','images/portfolio/small/','images/portfolio/medium/','images/portfolio/big/',
    new Array(
		new Array('','100_0862.jpg',532,400,''), 
		new Array('','100_0863.jpg',532,400,''), 
		new Array('','100_0865.jpg',300,400,''), 
		new Array('','portfolio_01.jpg',440,330,''), 
		new Array('','portfolio_02.jpg',440,330,''), 
		new Array('','portfolio_03.jpg',440,330,''), 
		new Array('','portfolio_04.jpg',440,330,''), 
		new Array('','portfolio_05.jpg',301,400,''), 
		new Array('','portfolio_06.jpg',440,330,''), 
		new Array('','portfolio_07.jpg',181,151,''), 
		new Array('','portfolio_08.jpg',180,151,''),
		new Array('','100_1260.jpg',500,375,''), 
		new Array('','100_1261.jpg',500,375,''), 
		new Array('','100_1273.jpg',500,375,''), 
		new Array('','100_1275.jpg',500,375,''), 
		new Array('','100_1278.jpg',500,375,''), 
		new Array('','100_1279.jpg',500,375,''), 
		new Array('','100_1284.jpg',500,375,''), 
		new Array('','100_1285.jpg',500,375,''), 	
		new Array('','100_1445.jpg',180,239,''),
		new Array('','100_1623.jpg',550,400,''), 
		new Array('','100_1621.jpg',550,400,''), 	
		new Array('','100_1618.jpg',550,400,'')

	),'Click on the images to view a larger display of our elegant colors, shapes and patterns.'
  )
)

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]);
}
