var req;
function navigate(month,year) { var url = "/units/calendar.php?month="+month+"&year="+year; if(window.XMLHttpRequest) { req = new XMLHttpRequest(); } else if(window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); } req.open("GET", url, true); req.onreadystatechange = callback; req.send(null); }
function select_day(day,month,year) { var url = "/units/calendar.php?day="+day+"&month="+month+"&year="+year; if(window.XMLHttpRequest) { req = new XMLHttpRequest(); } else if(window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); } req.open("GET",url,true); req.onreadystatechange = callback_day; req.send(null); }
function callback() {obj = document.getElementById("calendar");if(req.readyState == 4) {if(req.status == 200) {response = req.responseText;obj.innerHTML = response;}}}
function callback_day() {if(req.readyState == 4) {if(req.status == 200) {window.location.reload(true);}}}
function fade(amt) {if(amt <= 100) {setFade(amt);amt += 10;setTimeout("fade("+amt+")", 5);}}
function setFade(amt) {obj = document.getElementById("calendar");amt = (amt == 100)?99.999:amt;if(obj == null) return;	obj.style.filter = "alpha(opacity:"+amt+")";obj.style.KHTMLOpacity = amt/100;obj.style.MozOpacity = amt/100;obj.style.opacity = amt/100;}
