
// script per il cambio immagini da inserire nella gallery

/*

codice da inserire in pagina per l'immagine grande: 
 
<div id="divImmagine" class="ImgBordo">
<div id="divLoading" style="position: absolute; margin-top: 140px; margin-left: 220px; background-color: #FFFFFF; padding:5px;" class="DivLoadingNascosto"> loading... </div>
<img id="ImgGrande" src="/Images/dannunzio_img_<?php  echo $Picture_Num ?>.jpg" alt="<?php echo ($szLang == "it" ? "Hotels Firenze - Polihotels Villa D’Annunzio" : "Hotels Florence - Polihotels Villa D’Annunzio") ?>" border="0" width="488" height="329"></div>


codice da inserire nelle tumbnails come link per aprire l'immagine grande nel div creato in precedenza:

<a onclick="return showPic(this)" href="/Images/dannunzio_img_2.jpg"><img class="GalleryImgPic" src="/Images/dannunzio_thumb_2.gif" alt="<?php echo ($szLang == "it" ? "Hotels Firenze - Polihotels Villa D’Annunzio" : "Hotels Florence - Polihotels Villa D’Annunzio") ?>" border="0"></a>
<a onclick="return showPic(this)" href="/Images/dannunzio_img_3.jpg"><img class="GalleryImgPic" src="/Images/dannunzio_thumb_3.gif" alt="<?php echo ($szLang == "it" ? "Hotels Firenze - Polihotels Villa D’Annunzio" : "Hotels Florence - Polihotels Villa D’Annunzio") ?>" border="0"></a>
<a onclick="return showPic(this)" href="/Images/dannunzio_img_4.jpg"><img class="GalleryImgPic" src="/Images/dannunzio_thumb_4.gif" alt="<?php echo ($szLang == "it" ? "Hotels Firenze - Polihotels Villa D’Annunzio" : "Hotels Florence - Polihotels Villa D’Annunzio") ?>" border="0" width="60" height="45"></a>
									

*/


function showPic (whichpic) {
 if (document.getElementById) {

  document.getElementById('divLoading').className = "divLoadingVisibile";
  
  document.getElementById('ImgGrande').onload = function(){
  		document.getElementById('divLoading').className = "divLoadingNascosto";
  }
  document.getElementById('ImgGrande').src = whichpic.href;
  
  if (whichpic.title) {
   // document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
  } else {
   // document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
  }
  return false;
 } else {
  return true;
 }
}

