// per caricare la pagina nell'iframe
function vai(){
var s1 = document.URL;
var inizio=s1.indexOf('com')+4;
var pathlength=s1.length-inizio;
var path = s1.substr(inizio,pathlength);
//document.write(path);
var t1="";
var indexpath="";
for(var i=0;i<pathlength;i++){
	//document.write(t1);
	t1 = path.substr(i,1);
	if(t1=="/"){indexpath=indexpath+"../"}
}


if (location.href == top.location.href) { 
location.href = indexpath+"index.htm?pag="+path; /* nel caso in cui la pagina non sia aperta in un frame / iframe effettuo il redirect alla index contenete il codice dell'iframe */ 
}
}





function autofitIframe(id){
if (!window.opera && !document.mimeType && document.all && document.getElementById){
parent.document.getElementById(id).style.height=this.document.body.offsetHeight+"px";
}
else if(document.getElementById) {
parent.document.getElementById(id).style.height=this.document.body.scrollHeight+"px"
}
}




function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert("Spiacenti, le immagini sono coperte da copyright, se č interessato ad una foto puņ inviarmi una e-mail dalla sezione contatti, grazie.");
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
// End -->




function alcaricamento() {
vai();
autofitIframe('body');
right(e);
/*vai();*/
}
