// JavaScript Document

<!--//
		
			var indicePopUp=0;
		
			function PopupPic(sPicURL) { 
				 window.open( "resize.htm?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200"); 
			}
			
		
			function SelezionaFotoPopUp(){
			 var photo='';
			 var nameArray =(arrayFotoPrinc[indicePopUp].src).split('_');
			 var width=arrayFotoBig[indicePopUp].width;
			 var height=arrayFotoBig[indicePopUp].height;
			 nameArray.shift();
			 nameArray.shift();
			 nameArray.shift();
       photo= nameArray.join('_');
			 window.open('/houses/getphotowm/'+ photo,'','width='+width+',height='+height+',top=center,left=0,resizable=no,scrollbars=no,toolbar=no');
		   //window.open(arrayFotoBig[indicePopUp].src,'','width='+width+',height='+height+',top=center,left=0,resizable=no,scrollbars=no,toolbar=no');
		
				
					}
			
			function CambiaFoto(indice){
		
				if((indice)<arrayFotoPrinc.length){
					document.images["iFotoPrincipale"].src= arrayFotoPrinc[indice].src;
					indicePopUp=indice;
				}	
			}
			
			function AltreFotoSucc(){
			
				var j=0;
				
				if((indiceAltreFoto+1)>=arrayFotoPrinc.length){
					alert("Ultima foto."); 
					return;
				}
				else{
					indiceAltreFoto=indiceAltreFoto + 1;
					//document.getElementById('txtAltreFoto').value= indiceAltreFoto+1 + " di " +  numPagAltreFoto;
					CambiaFoto(indiceAltreFoto);
				}
			}
			
			
			function AltreFotoPrec(){
			
				var j=0;
				
				if(indiceAltreFoto==0){
					alert("Prima foto."); 
					return;
				}
				else{
					indiceAltreFoto=indiceAltreFoto - 1;
					//document.getElementById('txtAltreFoto').value= indiceAltreFoto+1 + " di " +  numPagAltreFoto;
					CambiaFoto(indiceAltreFoto);
				}
			}
			
		//-->
