// JavaScript Document
var xmlhttp

function updateCalendar(calmth, calyr)
{
//show_progressbar('calendar');

xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var url="/includes/calendar/calendar.asp";
url=url+"?calmth="+calmth;
url=url+"&calyr="+calyr;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=calendarChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function calendarChanged()
{
if (xmlhttp.readyState==4)
{
replace_html("calendar", xmlhttp.responseText);
	
//    $(document).ready(function() {
//	  
//	  
//	  // initialize tooltip
//$("#calbody a[title]").tooltip({
// 
//   // tweak the position
//   offset: [10, 2],
// 
//   // use the "slide" effect
//   effect: 'slide'
// 
//// add dynamic plugin with optional configuration for bottom edge
//}).dynamic({ bottom: { direction: 'down', bounce: true } });
//
//	  
//    });

}
}


function updateCalendar2(calmth, calyr)
{
//show_progressbar('calendar');

xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var url="/includes/calendar/calendar2.asp";
url=url+"?calmth="+calmth;
url=url+"&calyr="+calyr;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=calendar2Changed;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function calendar2Changed()
{
if (xmlhttp.readyState==4)
{
replace_html("calendar2", xmlhttp.responseText);
	
//    $(document).ready(function() {
//	  
//	  
//	  // initialize tooltip
//$("#calbody a[title]").tooltip({
// 
//   // tweak the position
//   offset: [10, 2],
// 
//   // use the "slide" effect
//   effect: 'slide'
// 
//// add dynamic plugin with optional configuration for bottom edge
//}).dynamic({ bottom: { direction: 'down', bounce: true } });
//
//	  
//    });

}
}


function updateCalDesc(calyr, calmth, calday)
{
//show_progressbar('calendar');


xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var url="/includes/calendar/caldesc.asp";
url=url+"?calmth="+calmth;
url=url+"&calyr="+calyr;
url=url+"&calday="+calday;

url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=calendarDescChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function calendarDescChanged()
{
if (xmlhttp.readyState==4)
{
replace_html("caldesc", xmlhttp.responseText);
	
//    $(document).ready(function() {
//	  
//	  
//	  // initialize tooltip
//$("#calbody a[title]").tooltip({
// 
//   // tweak the position
//   offset: [10, 2],
// 
//   // use the "slide" effect
//   effect: 'slide'
// 
//// add dynamic plugin with optional configuration for bottom edge
//}).dynamic({ bottom: { direction: 'down', bounce: true } });
//
//	  
//    });

}
}




function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}

function replace_html(id, content) {
			document.getElementById(id).innerHTML = content;
		}



var progress_bar = new Image();
progress_bar.src = '/images/ajax-loader.gif';

function show_progressbar(id) {
			replace_html(id, '<div class="ajaxloading"><img src="/images/ajax-loader.gif" border="0" alt="Loading, please wait..." /></div>');
		}
