
function test() {alert('Ok'); }

function changeimage(towhat,idSrc,idDst){
	if (document.images){document.images.targetimage.src=towhat.src;}
//	alert(document.images.targetimage.src);
	var Tx;	
	Tx=document.getElementById(idSrc).innerHTML;
	document.getElementById(idDst).innerHTML=Tx;	
}

function popUp(URL) {
	//alert('URL = "' + URL);
		var W = window.open(URL, '', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=560,height=420');
		}

<!-- The JavaScript Source!! http://javascript.internet.com -->
var pic = null
var finestra = null;


function CaricaFoto(img){
  foto1= new Image();
  foto1.src=(img);
  pic = img;
  Controlla(img);
}
function Controlla(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function viewFoto(img){
  largh=foto1.width+20;
  altez=foto1.height+80;
  stringa="width="+largh+",height="+altez;
//  finestra=window.open(img,'Galleria',stringa);	
  closePopImg()
  finestra=window.open('pimg.html','',stringa);	
}	 

function closePopImg(){    // close pop-up window if it is open 
  if (navigator.appName != "Microsoft Internet Explorer" 
      || parseInt(navigator.appVersion) >=4) //do not close if early IE
    if(finestra != null) if(!finestra.closed) finestra.close() 
  }


