////////////////////////////////
// scripts para el calendario //
////////////////////////////////
var url = "/php/calendario/cogecalendario.php";

function handleHttpResponse() {
        if (http.readyState == 4) {
        	if (http.responseText!='') {
        document.getElementById('contenedorcalendario').innerHTML=http.responseText;
		
			}
		 }
        }
        
function recarga(mes, anno, idcasa) {
	var myRandom=parseInt(Math.random()*99999999);  // para el cache
    http.open("GET", url + '?mes=' + mes + "&anno="+anno+"&idcasa=" + idcasa, true);
    http.onreadystatechange = handleHttpResponse;
    http.send(null);
		
}
        
        
function getHTTPObject() {
        var xmlhttp;
        /*@cc_on
         @if (@_jscript_version >= 5)
          try {
              xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
              } catch (e) {
              try {
                  xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                  } catch (E) {
                  xmlhttp = false;
                  }
              } 
         @else
          xmlhttp = false;
         @end @*/
        if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
         try {
           xmlhttp = new XMLHttpRequest();
           } catch (e) {
           xmlhttp = false;
           }
          }
          return xmlhttp;
        }

// inicializando
var http = getHTTPObject(); // Objeto HTTP para el ajax
