var documento=null;
var HTMLfile;
var contenitore;
var alto;

ns4=(navigator.appName.indexOf("Netscape")>=0 && !document.getElementById)? 1 : 0;
ie4=(document.all && !document.getElementById)? 1 : 0;
ie5=(document.getElementById && document.all)? 1 : 0;
ns6=(document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? 1: 0;
w3c=(document.getElementById)? 1 : 0;
userAgent=navigator.userAgent;

function loadHTMLDocument(cbFun)
{
 if (window.XMLHttpRequest)
  {
  documento=new XMLHttpRequest()
  }
else if (window.ActiveXObject)
  {
  documento=new ActiveXObject("Microsoft.XMLHTTP")
  }
if (documento!=null)
  {
  documento.onreadystatechange=state_Change
  documento.open("GET",HTMLfile,true)
  documento.send(null)
  return true;
  }
 else
 	return false;
}

function state_Change() {
    if (documento.readyState == 4) {
        if (documento.status == 200) {
         readHTMLData(documento)
        } else {
            alert("Spiacenti è avvenuto un errore nel recupero dei dati dal documento:\n" + documento.statusText);
        }
    }
}

function readHTMLData(documento)
   {
   	var response = documento.responseText;
	contenitore.innerHTML=response;
   }
   
function read_html(file)
{	
	if(w3c) contenitore=top.document.getElementById("focus");
	if(ie4) contenitore=top.document.all["focus"];
	if(ns4) contenitore=top.document.layers["focus"];

	if(file=='')
		contenitore.innerHTML="";
	else
	{
	HTMLfile=file;
	
	if(ns4)
	{
		contenitore.document.open();
		contenitore.document.write("");
		contenitore.document.close();
	}
	else 
		contenitore.innerHTML="";
	
   if(!loadHTMLDocument(readHTMLData))
   {
	   if(ns4)
		{
			contenitore.document.open();
			contenitore.document.write("<div>Spiacenti il Vostro Browser non supporta la lettura di documenti esterni con Tecnologia AJAX</div>");
			contenitore.document.close();
		}
		else 
			contenitore.innerHTML="Spiacenti il Vostro Browser non supporta la lettura di documenti esterni con Tecnologia AJAX";
	}
	else
		return
	}	
 }
 function naviga(sezione, sottosezione)
{
	if(w3c) var livello=top.document.getElementById('naviga');
	if(ie4) var livello=top.document.all['naviga'];
	if(ns4) var livello=top.document.layers['naviga'];
	if(sottosezione!="")
		{
			switch(sezione)
			{
				case "Chioschi":
					livello.innerHTML="Home&nbsp;/&nbsp;<a href=\"../hardware/hardware.html\">Chioschi</a>&nbsp;/&nbsp;"+sottosezione;
				break;
				case "Mercati":
					livello.innerHTML="Home&nbsp;/&nbsp;<a href=\"../mercati/mercati.html\">Mercati</a>&nbsp;/&nbsp;"+sottosezione;
					break;
				case "Soluzioni":
					livello.innerHTML="Home&nbsp;/&nbsp;<a href=\"../soluzioni.html\">Soluzioni</a>&nbsp;/&nbsp;"+sottosezione;
					break;
				case "Digital Signage":
					livello.innerHTML="Home&nbsp;/&nbsp;<a href=\"../digital_signage/digital_signage.html\">Digital Signage</a>&nbsp;/&nbsp;"+sottosezione;
					break;
				case "Software":
					livello.innerHTML="Home&nbsp;/&nbsp;<a href=\"../software/software.html\">Software</a>&nbsp;/&nbsp;"+sottosezione;
				break;
				case "Servizi":
					livello.innerHTML="Home&nbsp;/&nbsp;<a href=\"../servizi/servizi.html\">Servizi</a>&nbsp;/&nbsp;"+sottosezione;
				break;
				case "Azienda":
					livello.innerHTML="Home&nbsp;/&nbsp;<a href=\"../azienda/azienda.html\">Azienda</a>&nbsp;/&nbsp;"+sottosezione;
				break;
			}
		}
	else
		livello.innerHTML="Home&nbsp;/&nbsp;"+sezione;
	}
 