function PopUp(Destinazione,NomeFinestra,Width,Height,Ridimensionabile,scrollbars){var left=((window.screen.width-Width)/2) ; var top=((window.screen.height-Height)/2) ; NuovaPagina=window.open(Destinazione,NomeFinestra,"toolbar=no,location=no,menuBar=no,status=yes,width="+Width+"px,height="+Height+"px,scrollbars="+scrollbars+",resizable="+Ridimensionabile) ; NuovaPagina.moveTo(left,top) ; NuovaPagina.focus()}
//Inizio Eventi
function addEvent(obj,type,fn)
{
	if(obj.addEventListener)obj.addEventListener(type,fn,false)
	else if(obj.attachEvent)
	{
	obj["e"+type+fn]=fn;obj[type+fn]=function(){obj["e"+type+fn](window.event)}
	obj.attachEvent("on"+type,obj[type+fn])
	}
}
function removeEvent(obj,type,fn)
{
   if(obj.removeEventListener){obj.removeEventListener(type,fn,false)//NS
   }else if(obj.detachEvent){obj.detachEvent("on"+type,obj[type+fn]) ; obj[type+fn] = null ; obj["e"+type+fn] = null}//IE
}
//Fine Eventi

//Svuota i tag select da tutte le loro option
function SvuotaDDL(DDLObj)
{
	TotOp=DDLObj.options.length
	for(i=TotOp;i>=0;i--)
		{DDLObj.options[i]=null}
}
function GetObj(ObjID)
{
	return document.getElementById(ObjID)
}
function GetChilds(CurrentNode)
{
	Child=CurrentNode.childNodes
	TotElem=Child.length
	VetResult=new Array()
	contatore=0
	for(i2=0;i2<TotElem;i2++)
	{
		if(Child[i2].nodeName.indexOf('text')==-1)//Controllo x Firefox che ha i nodi text
		{
			VetResult[contatore]=Child[i2]
			contatore++	
		}
	}
	return VetResult
}
