// JavaScript Document
var xmlhttp;
function loadXMLDoc(mese,anno)
{
xmlhttp=null;
document.getElementById('Calendario').innerHTML="<div align=\"center\"><br /><br /><img src=\"images/loading.gif\" width=\"32\" height=\"32\" alt=\"Loading\" /><br /><br />Caricamento in corso...</div>";
if (window.XMLHttpRequest)
  {// code for Firefox, Opera, IE7, etc.
  xmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlhttp!=null)
  {
  xmlhttp.onreadystatechange=state_Change;
  
 
  xmlhttp.open("GET","ajax_calendar.asp?mese="+mese+"&anno="+anno,true);
  xmlhttp.send(null);
  }
else
  {
  alert("Il tuo browser non supporta XMLHTTP.");
  }
}

function state_Change()
{
if (xmlhttp.readyState==4)
  {// 4 = "loaded"
  if (xmlhttp.status==200)
    {// 200 = "OK"

				
    document.getElementById('Calendario').innerHTML=xmlhttp.responseText;
    }
  else
    {
    alert("Impossibile caricare i dati:" + xmlhttp.statusText);
    }
  }
}
function changeSty(classpassed){
	element=event.srcElement;
	//document.getElementById('buttonIMG').className=classpassed;
	element.className=classpassed;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}