function CaricaFoto(img) { 
	foto1= new Image();
	foto1.src=(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+20;
	stringa="width="+largh+",height="+altez;
	finestra=window.open(img,"",stringa);
}

function PicDivShow(imgPath) {
    document.getElementById('picDivImg').src = imgPath;
    document.getElementById('picDiv').style.display = "";
}
function PicDivHide() {
	document.getElementById('picDivImg').src = 'images/load.gif';
	document.getElementById('picDiv').style.display = "none";
}
function UpdateMausPosition(e) {
	x = (document.all) ? window.event.x + document.body.scrollLeft : e.pageX;
	y = (document.all) ? window.event.y + document.body.scrollTop  : e.pageY;
	if (document.getElementById('picDiv') != null) {
		document.getElementById('picDiv').style.left = (x + 30) + "px";
		document.getElementById('picDiv').style.top 	= (y - 100) + "px";
	}
}
document.onmousemove = UpdateMausPosition;