
smallSizes = new Array(50,50);
mediumSizes = new Array(273,170);
pageName = 'deck.htm';
scriptName = 'deck.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('Dekstone','images/deck/small/','images/deck/big/','images/deck/popup/',
    new Array(
      new Array('','1Dekstone.jpg',613,401),
      new Array('','2Dekstone.jpg',603,400),
      new Array('','3Dekstone.jpg',603,400),
      new Array('','4Dekstone.jpg',603,400),
      new Array('','5Dekstone.jpg',534,400),
      new Array('','6Dekstone.jpg',534,400),
      new Array('','7Dekstone.jpg',534,400),
      new Array('','8Dekstone.jpg',534,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 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();
}
