// ===================================================================
// ============= resize automatico pop up immagini =================== 
// ===================================================================
function resize_window(){
  var height=document.myimage.height+50;
  var width=document.myimage.width+20;
  window.resizeTo(width,height);
  var winwidth=(screen.availWidth/2)-(width/2);
  var winheight=(screen.availHeight/2)-(height/2);
  window.moveTo(winwidth,winheight);
}

// ===================================================================
// ========================= apertura pop up =========================
// =================================================================== 
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
// ===================================================================
// ====================== apertura pop up upload =====================
// =================================================================== 
 
function fOpenUploadFile(campo) {
  
	 var swidth = 620;
	 var sheight = 376;
	 var stop = 20;
	 var sleft = 30;
	 	 
	 var settings = "height=" + sheight + ",width=" + swidth + ",scrollbars=yes,resizable=yes";
	
   newwindow = window.open("uploadfile.asp?campo="+campo, "_blank", settings)

	 newwindow.opener = window
}

// ===================================================================
// ===================== blocco del tasto destro =====================
// =================================================================== 

function mouseDown(e) {
 if (parseInt(navigator.appVersion)>3) {
  var clickType=1;
  if (navigator.appName=="Netscape") clickType=e.which;
  else clickType=event.button;
  if (clickType!=1) {
   alert ('Right mouse button is disabled.')
   return false;
  }
 }
 return true;
}
if (parseInt(navigator.appVersion)>3) {
 document.onmousedown = mouseDown;
 if (navigator.appName=="Netscape") 
  document.captureEvents(Event.MOUSEDOWN);
}