function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}
	/* PHOTOS GALLERY
			1. Image Source
			2. Alt
			3. big Image Link
	*/	
			
		
	var arr_ImageGallery = new Array();	
	var imax = 0;
	var imgPreviousActive = -1;
	
  
	function Preload() { // Images Preload
	if (document.images) { 

		preload_image_object = new Array();
		
		for(i=0; i<arr_ImageGallery.length; i++) {
			preload_image_object[i] = new Image();
			preload_image_object[i].src = arr_ImageGallery[i][0];
		}
	}

}

	function showPic(imageIndex){
	  document.getElementById('photo').src = arr_ImageGallery[imageIndex][0];
	  document.getElementById('photo').alt = arr_ImageGallery[imageIndex][1];
	  var chaine = '<a href="' + "javascript:showPic('" + imgPreviousActive + "')" + '">'+imgPreviousActive+'</a>';
          if (imgPreviousActive!=arr_ImageGallery.length-1) {
	    chaine = chaine + ' - ';
	  }
	  if (imgPreviousActive>-1) {
	    document.getElementById('li_photo_' + imgPreviousActive).innerHTML = chaine;
	  }
	  chaine = '<strong>'+imageIndex+'</strong>';
	  if (imageIndex!=arr_ImageGallery.length-1) {
	    chaine = chaine + ' - ';
	  }
	  document.getElementById('li_photo_' + imageIndex).innerHTML = chaine;
          imgPreviousActive = imageIndex;
	}


	addLoadEvent(Preload); // Images Preload
	addLoadEvent(function() {showPic(1)}); // Show Big Image 1