
var arrTemp=self.location.href.split("?"); 
var picUrl = (arrTemp.length>0)?arrTemp[1]:""; 
var NS = (navigator.appName=="Netscape")?true:false; 

function FitPic() 
{ 
     iWidth = (NS)?window.innerWidth:document.body.clientWidth; 
     iHeight = (NS)?window.innerHeight:document.body.clientHeight; 
     iWidth = document.images[0].width - iWidth; 
     iHeight = document.images[0].height - iHeight; 
	 
	 
  //se il browser è explorer
	//  if(document.all)
 	//	iHeight= parseInt(iHeight+600);

  	  window.resizeBy(iWidth,iHeight);
	  // provo a rimpicciolire l'immagine
	  var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
	  
	  //se è chrome salto il resize perchè rompe
	  if (!is_chrome)
	  {
		  document.getElementById("immaginepopup").width=getWidthWindow();
		  document.getElementById("immaginepopup").height=getHeightWindow();
	  }
	  	 // alert(navigator.appCodeName);
   	  self.focus(); 
}
/*recupare la larghezza della finestra corrente**/
function getWidthWindow()
{
	if(document.layers) 
      return window.Width;
    
  	else if(document.all || document.getElementById) 
        return document.body.offsetWidth;
    
	else alert("non sono entrato");
	
}

/*recupare l'altezza della finestra corrente**/
function getHeightWindow()
{
	if(document.layers)     
      return window.Height;
    
  	else if(document.all  || document.getElementById) 
       return document.body.offsetHeight;
    
	
}

function apri(foto)
{
//	var finestra=window.open("../../../foto.php?foto="+foto+"","_","scrollbars=no, resizable=yes, width=400");
window.open( "foto.html?"+foto, "",  "resizable=1,left=0,top=0, location=no,status=no,HEIGHT=200,WIDTH=200");
	//OpenPopup(foto);
}

function apriProva()
{
//	var finestra=window.open("../../../foto.php?foto="+foto+"","_","scrollbars=no, resizable=yes, width=400");
window.open( "../../../prova.html", "",  "resizable=1,left=0,top=0,scrollbars=yes, HEIGHT=700,WIDTH=1024");
	//OpenPopup(foto);
}

function cryptEmail() {
   
   var str2 = "aldobiggi";
   var str3 = "hotmail";
   var str4 = "com";
   var str1 = "maiAAAlto:";
   location.href = str1.substr(0,3) + str1.substr(6,4) + str2 + "@" + str3 + "." + str4;
}

function cryptEmail2() {
   
   var str2 = "aldobiggi";
   var str3 = "biggimodamare";
   var str4 = "com";
   var str1 = "maiAAAlto:";
   location.href = str1.substr(0,3) + str1.substr(6,4) + str2 + "@" + str3 + "." + str4;
}

function popup()
{
	window.open("foreste.html","_","scrollbars=no, resizable=no, width=1124,height=710");
}


