/************* PAGINA links *************/

/*
 * Get the content of a page
 * 
 */
function getContent(method, page, args, func) {

  // Obtain an XMLHttpRequest instance
  var req = newXMLHttpRequest();

  // Set the handler function to receive callback notifications
  // from the request object
  var handlerFunction = getReadyStateHandler(req, func);
  req.onreadystatechange = handlerFunction;

  // Open an HTTP GET connection to the shopping cart servlet.
  // Third parameter specifies request is asynchronous.
  req.open(method, page, true);

  req.send(args);
}

function getCommenti()
{
  getContent("GET", "commenti.html", "", setCommenti);
}

function setCommenti(content)
{
  document.getElementById("contenuto").innerHTML=content;
}

function getSuggerimenti()
{
  getContent("GET", "suggerimenti.html", "", setSuggerimenti);
}

function setSuggerimenti(content)
{
  document.getElementById("contenuto").innerHTML=content;
}

function getContatti()
{
  getContent("GET", "contatti.html", "", setContatti);
}

function setContatti(content)
{
  document.getElementById("contenuto").innerHTML=content;
}

function getSiti()
{
  getContent("GET", "siti.shtm", "", setSiti);
}

function setSiti(content)
{
  document.getElementById("contenuto").innerHTML=content;
}





