// JavaScript Document

function prevfoto(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;
  win=window.open(img,"",stringa);
  //win.document.focus();
  
}
function openimg(objid){
   var cadena='img_manager.php?objid='+objid;	
   window.open(cadena,null,"height=400,width=660,status=yes,location=no,menubar=no,resizable=yes,scrollbars=yes,toolbar=no");
 } 

//Disable right mouse click Script
isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;

if (isIE||isNN)
{
 document.oncontextmenu=checkV;
}
else
{
 document.captureEvents(Event.MOUSEDOWN || Event.MOUSEUP);
 document.onmousedown=checkV;
} 

function checkV(e)
{
	if (isN4)
	 {
	if (e.which==2||e.which==3)
		{
		
		return false;
		}
	}
	else
	{
	
	return false;
	}
}