﻿
function include(xUrl,xId) 
{

  var xmlhttp = false;

  /*@cc_on @*/

  /*@if (@_jscript_version >= 5)

  // JScript gives us Conditional compilation, we can cope with old IE versions.
  // and security blocked creation of the objects.

  try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
   } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
   }

  /*@end @*/

  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
    xmlhttp = new XMLHttpRequest();
  }

  xmlhttp.open("GET", xUrl,true);
  xmlhttp.onreadystatechange=function() {

          if (xmlhttp.readyState==4) {
                document.getElementById(xId).innerHTML = xmlhttp.responseText;
          }
  }
  xmlhttp.send(null)

}

function getQueryVariable(variable) 
{ 
    query = window.location.search.substring(1); 
    vars = query.split("&"); 
    for (i = 0; i < vars.length; i++) 
    { 
        var pair = vars[i].split("="); 
        if (pair[0] == variable) 
            return pair[1]; 
    } 
    return "";
}

function go()
{
	monthselect = document.getElementById('month');
	yearselect = document.getElementById('year');

	monthindex = monthselect.selectedIndex;
	yearindex = yearselect.selectedIndex;

	selectedmonth = monthselect.options[monthindex].value;
	selectedyear = yearselect.options[yearindex].value;
	
	location.href = '/index.html?url=/cgi-bin/calendar.cgi%3fmonth%3d'+selectedmonth+'%26year%3d'+selectedyear;
}