function createQCObject() { var req; if(window.XMLHttpRequest){ // Firefox, Safari, Opera... req = new XMLHttpRequest(); } else if(window.ActiveXObject) { // Internet Explorer 5+ req = new ActiveXObject("Microsoft.XMLHTTP"); } else { alert('Problem creating the XMLHttpRequest object'); } return req; } // Make the XMLHttpRequest object var http = createQCObject(); var ran_no=(Math.round((Math.random()*9999))); function displayQCalendar(m,y) { http.open('get', '/calendar/small/?month='+m+'&year='+y); http.onreadystatechange = function() { if (http.readyState == 4 && http.status == 200) { var response = http.responseText; if(response) { document.getElementById("calendar_box_").innerHTML = http.responseText; } } } http.send(null); } function displayBCalendar(m,y) { http.open('get', '/calendar/big/?month='+m+'&year='+y); http.onreadystatechange = function() { if (http.readyState == 4 && http.status == 200) { var response = http.responseText; if(response) { document.getElementById("big_calendar_box_").innerHTML = http.responseText; } } } http.send(null); } function cDisplay(y,m,d) { http.open('get', '/calendar/remote/?year='+y+'&month='+m+'&day='+d); http.onreadystatechange = function() { if (http.readyState == 4 && http.status == 200) { var response = http.responseText; if(response) { document.getElementById("calendar_text_box_").innerHTML = http.responseText; } } } http.send(null); } function bDisplay(id) { var newwindow = window.open('/calendar/details/?id='+id,'CalendarDisplay','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=300'); }