 
var tipo=null;
var tbl=null;
var xmlhttp=null;
var xmlhttp2=null;
var xmlhttp3=null;
var mouseUse=false;
var msXML="MSXML2.DOMDocument"  

function delAll(){
  root=xmlO.XMLDocument.documentElement.selectSingleNode("//root")
  nl=xmlO.XMLDocument.documentElement.selectNodes("//row")
  for (var i=0;i<nl.length;i++){
    art=nl.item(i).attributes.getNamedItem("a").value
    root.removeChild(nl.item(i))
    setDispo(art)
  }  
}

function delVoid(){
  root=xmlO.XMLDocument.documentElement.selectSingleNode("//root")
  sn=xmlO.XMLDocument.documentElement.selectSingleNode("//row[@a='']")
  if (sn!=null) root.removeChild(sn)
}

function loadXML(){
  root=xmlO.XMLDocument.documentElement.selectSingleNode("//root")
  oldChild = root.removeChild(root.childNodes.item(0))
}
function changePot(){
  potTo.value=pot.value
}
function changeGr(){
  grTo.value=gr.value
}
	


function element_top(el)
{
	var et = 0
	while (el)
	{
		et += el.offsetTop
		el = el.offsetParent
	}
	
	return et
}

function element_left(el)
{
	var et = 0
	while (el)
	{
		et += el.offsetLeft
		el = el.offsetParent
	}
	
	return et
}

function MouseOut2(e){
	for (i=0;i<e.childNodes.length;i++)
		e.childNodes(i).className= 'elenco';
}

function MouseOver2(e)
{
	for (i=0;i<e.childNodes.length;i++)
		e.childNodes(i).className= 'clsOver';
}




 function trim(s){

		//ltrim
		i=s.indexOf(" ")
		while (i==0)
		{
			s=s.substring(1)
			i=s.indexOf(" ")
		}
	  
		if (s=="") return s;
		//rtrim
	  
		i=s.lastIndexOf(" ")
		while (i==s.length-1 && i>=0)
		{
	     
			s=s.substring(0,i)
			i=s.lastIndexOf(" ")
		}
		return(s);
	} 
	
	function selPane(e){
		if (PS.ActivePane) PS.ActivePane.style.display='none';
		id='pan' + e.id
		PS.ActivePane=window.document.all.item(id);
		PS.ActivePane.style.display='block';
		if(e.parentElement.upCell){e.parentElement.upCell.className='clsTabTblCell';}
		e.parentElement.upCell = e;
		e.className="clsTabTblCellUp";
		event.cancelBubble = true;				
	}

