// 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=800;
			 //var height=600;
			 var width=arrayFotoBig[indicePopUp].width;
			 var height=arrayFotoBig[indicePopUp].height;
			 nameArray.shift();
			 nameArray.shift();
			 nameArray.shift();
			
       photo= nameArray.join('_');
			
			 window.open('/houses/getphoto/'+ photo,'','width='+width+',height='+height+',top=center,left=0,resizable=no,scrollbars=no,toolbar=no');
		 
			}
			
			function SelezionaFotoPopUp_AE(){
			
				 var photo='';
			 var nameArray =(arrayFotoPrinc[indicePopUp].src).split('_');
			 var width=800;
			 var height=600;
			 nameArray.shift();
			 nameArray.shift();
			 nameArray.shift();
			
       photo= nameArray.join('_');
				//window.open('zoom.aspx?tipoimm=affest&filename=' + (arrayFotoPrinc[indicePopUp].src).split('&filename=')[1] + '&height=' + altezza_vera + '&width=' + larghezza_vera,'','width=' + larghezza_vera +',height=' + altezza_vera + ',top=50,left=50,resizable=no,scrollbars=no,toolbar=no');
			 window.open('/houses/getphoto/'+ photo,'','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){
					return;
				}
				else{
					indiceAltreFoto=indiceAltreFoto + 1;
					window.document.dettaglio.txtAltreFoto.value= indiceAltreFoto+1 + " di " +  numPagAltreFoto;
					CambiaFoto(indiceAltreFoto);
				}
			}
			
			
			function AltreFotoPrec(){
			
				var j=0;
				
				if(indiceAltreFoto==0){
					return;
				}
				else{
					indiceAltreFoto=indiceAltreFoto - 1;
					window.document.dettaglio.txtAltreFoto.value= indiceAltreFoto+1 + " di " +  numPagAltreFoto;
					CambiaFoto(indiceAltreFoto);
				}
			}
			
		//-->
