var xmlhttp
var req;
var destinazioneTesto;
var acquista;
x = 20;
y = 70;
function setVisible(obj,acquistaInterno)
{		
	acquista=acquistaInterno;	
	oggettopopola = document.getElementById('colonna_contenitore_nazione');
	loadXMLDoc(oggettopopola);	
		
	obj = document.getElementById(obj);
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
}
function placeIt(obj)
{
	obj = document.getElementById(obj);
	if (document.documentElement)
	{
		theLeft = document.documentElement.scrollLeft;
		theTop = document.documentElement.scrollTop;
	}
	else if (document.body)
	{
		theLeft = document.body.scrollLeft;
		theTop = document.body.scrollTop;
	}
	theLeft += x;
	theTop += y;
	obj.style.left = theLeft + 'px' ;
	obj.style.top = theTop + 'px' ;
	//setTimeout("placeIt('layer1')",500);
}
//window.onscroll = setTimeout("placeIt('layer1')",500);

function loadXMLDoc(destinazione) {
		destinazioneTesto=destinazione;
		req = false;
	    // branch for native XMLHttpRequest object
	    if(window.XMLHttpRequest && !(window.ActiveXObject)) {
	    	try {
				req = new XMLHttpRequest();
	        } catch(e) {
				req = false;
	        }
	    // branch for IE/Windows ActiveX version
	    } else if(window.ActiveXObject) {
	       	try {
	        	req = new ActiveXObject("Msxml2.XMLHTTP");
	      	} catch(e) {
	        	try {
	          		req = new ActiveXObject("Microsoft.XMLHTTP");
	        	} catch(e) {
	          		req = false;
	        	}
			}
	    }
		if(req) {
			
			req.onreadystatechange = xmlhttpChange;
			indirizzo="carica_nazioni.asp?acquista="+acquista;	
			//indirizzo=indirizzo + "&nocache=" + Math.rnd();				
			req.open("GET", indirizzo, true);	
			req.send("");			
		}
	}
	
function xmlhttpChange()
	{
	// if xmlhttp shows "loaded"
	if (req.readyState==4)
	  {
	  //OK
	  if (req.status==200)
	    {	    	
	    	destinazioneTesto.innerHTML=req.responseText;				
	    }
	  else
	    {
	    alert("There was a problem retrieving the XML data:\n" +
	                req.statusText);
	    }
	  }
	}
		
