//CONTINENE ANCHE LA RISOLUZIONE DEL BUG DI IE5.0 CON HREF="#"

function controllo_href(nome){
   /* var b = new BrowserInfo();
	if (b.name=="Netscape" ||(b.name=="Microsoft Internet Explorer" & eval(b.version.substring(22,25))==6)){
		findObj(nome).href="#";
	}*/
findObj(nome).style.cursor = 'cross';

}

function hand(img_id)
{
	document.getElementById('img_' + img_id).style.cursor = 'hand';
}

function mouseoversNormal(img_id)
{
	document.getElementById('img_' + img_id).style.cursor = "auto";
}


function findObj(theObj, theDoc)
{
  var p, i, foundObj;

  if(!theDoc) theDoc = document;
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {
    theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);
  }
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  for (i=0; !foundObj && i < theDoc.forms.length; i++)
    foundObj = theDoc.forms[i][theObj];
  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++)
    foundObj = findObj(theObj,theDoc.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  return foundObj;
}


function BrowserInfo()
{
  this.name = navigator.appName;
  this.codename = navigator.appCodeName;
  this.version = navigator.appVersion;
  this.platform = navigator.platform;
  this.javaEnabled = navigator.javaEnabled();
  this.screenWidth = screen.width;
  this.screenHeight = screen.height;
  this.appmino=navigator.appMinorVersion;
}


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("Usa i tasti di navigazione presenti nell'interfaccia");

return false;

}

return true;

}


function checkIt(evt) {
if (navigator.appName == 'Netscape'){
   var charCode=evt.which
}else{
   var charCode=event.keyCode;
}

if (charCode==8 && event.srcElement.tagName!="INPUT") {
    alert("Usa i tasti di navigazione presenti nell'interfaccia");
    return false;
}
if (charCode==116) {
   alert("Usa i tasti di navigazione presenti nell'interfaccia");
   event.keyCode = 0;
   event.cancelBubble = true;
   event.returnValue = false;
}


}
document.onmousedown=right;
document.onkeydown=checkIt;
