﻿function DateCalendar()
{

var currentTime = new Date()
var day = currentTime.getDate()

var dayString = day.toString();
var dateString = '04' + dayString + '11'

//alert(dateString);
//alert(typeof day);

if (day < 3 )
{
getCalendarInfo('060311');
}

else if (day == 3) 
{
getCalendarInfo('060311');
}

else if (day < 6) 
{
getCalendarInfo('060611');
}

else if (day == 6) 
{
getCalendarInfo('060611');
}

else if (day == 7 )
{
getCalendarInfo('060711');
}

else if (day == 8) 
{
getCalendarInfo('060811');
}

else if (day == 9) 
{
getCalendarInfo('060911');
}

else if (day < 13) 
{
getCalendarInfo('061311');
}

else if (day == 13) 
{
getCalendarInfo('061311');
}

else if (day == 14) 
{
getCalendarInfo('061411');
}

else if (day == 15) 
{
getCalendarInfo('061511');
}

else if (day < 17 )
{
getCalendarInfo('061711');
}

else if (day == 17) 
{
getCalendarInfo('061711');
}

else if (day < 20) 
{
getCalendarInfo('062011');
}

else if (day == 20) 
{
getCalendarInfo('062011');
}

else if (day == 21) 
{
getCalendarInfo('062111');
}

else if (day == 22) 
{
getCalendarInfo('062211');
}

else if (day == 23)
{
getCalendarInfo('062311');
}

else if (day == 24) 
{
getCalendarInfo('062411');
}

else if (day < 27) 
{
//alert('test');
getCalendarInfo('062711');
}

else if (day == 27) 
{
getCalendarInfo('062711');
}

else if (day == 28)
{
getCalendarInfo('062811');
}

else if (day == 29)
{
getCalendarInfo('062911');
}

else if (day == 30)
{
getCalendarInfo('063011');
}

else 
{
getCalendarInfo('063011');
}

}


function getCalendarInfo(EventPage)
	{  

	//===========================================
	// START If response has been sennt to XMLhttp fill the div id'ed as txtResults with the response
	//===========================================
	var xmlHttp;
		try
		{     xmlHttp=new XMLHttpRequest();    	}
		catch (e)
		    {    // Internet Explorer    
		    try
			{      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      }
		    catch (e)
				{
				try
				{        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");        }
				catch (e)
					{
					alert("Your browser does not support AJAX!");
					return false;
					}
				}
			}
	//===========================================
	// END If response has been sennt to XMLhttp fill the div id'ed as txtResults with the response
	//===========================================



	//===========================================
	// START XML FUNCTION SECTION that sets location DIV
	//===========================================
	xmlHttp.onreadystatechange=function()
	{
	if(xmlHttp.readyState==4)
		{
		document.getElementById("divResultsA1").innerHTML=xmlHttp.responseText;
		}
	}
	//===========================================
	// START XML FUNCTION SECTION that sets location DIV
	//===========================================



	//===========================================
	// START THE AJAX SECTION THAT CHANGES
	//===========================================
    var url="documents/" + EventPage + ".asp";
	
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);  
	//===========================================
	// END THE AJAX SECTION THAT CHANGES
	//===========================================

    }

//==================================================
		// END Function:
//==================================================
