//Author : lippolis Alessandro 30/04/2004
//this function allow to recover the element looked in the Browsers unusuals  
<!--
var abilitato=0;
function getElementId(doc,name)
{
  if (doc.getElementById)
  {
  	this.element = doc.getElementById(name);
	this.elementStyle = doc.getElementById(name).style;
  }
  else if (doc.all)
  {
	this.element = doc.all[name];
	this.elementStyle = doc.all[name].style;
  }
  else if (doc.layers)
  {
	this.element = getElementN4(doc,name);
	this.elementStyle = this.element;
  }
}

function getElementN4(obj,name)
{
	var x = obj.layers;
	var foundLayer;
	for (var i=0;i<x.length;i++)
	{
		if (x[i].id == name)
		 	foundLayer = x[i];
		else if (x[i].layers.length)
			var tmp = getElementN4(x[i],name);
		if (tmp) foundLayer = tmp;
	}
	return foundLayer;
}

function SetFocus(elementId)
{
	try
	{
		var e = new getElementId(document,elementId);
		e.element.focus();
	}
	catch(ex)
	{
	
	} 
}


function setPagerLinkTitle()
{
	var el = document.getElementById("pager");
 	if (el != null && typeof el != "undefined")
 	{
 		var ancor = el.all;
		for (i = 0 ; i< ancor.length ; i++)
		{
			if (typeof ancor[i].href != "undefined")
			{
				if (ancor[i].innerText.indexOf("Successiva") != -1)
				{
					ancor[i].title = "link alla pagina successiva";
				}
				if (ancor[i].innerText.indexOf("Precedente") != -1)
				{
					ancor[i].title = "link alla pagina precedente";
				}
			}
		}
    }
}
function setTitleLinkGrid(nameID)
{
	var el = document.getElementById(nameID);
 	if (el != null && typeof el != "undefined")
 	{
 		var ancor = el.all;
		for (i = 0 ; i< ancor.length ; i++)
		{
			if (typeof ancor[i].href != "undefined")
			{
					ancor[i].title =  ancor[i].innerText;
			}
		}
    }
}

function test()
{
	//analizza se il browser e' compatibile con Javascript
	browserName=navigator.appName.charAt(0);
	browserVer=parseInt(navigator.appVersion);
	if (browserName=="M" && browserVer >= 3) abilitato=1;
	if (browserName=="N" && browserVer >= 3) abilitato=2;
	if (browserName=="N" && browserVer >= 4) abilitato=3;
	if (browserName=="M" && browserVer >= 4) abilitato=4;
}


//-->

