function openeventinformation(x){
	if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById("ShowEventDetails").innerHTML=xmlhttp.responseText;
		}
	}
	$stringthing = "ID=" +x;
	xmlhttp.open("GET","/Events/eventappearance.php?ID="+x,true);
	xmlhttp.send();
	document.getElementById('ShowEventDetails').style.visibility = "visible";
	document.getElementById('ShowEventDetails').style.marginTop = "10px";
	document.getElementById('ShowEventDetails').style.marginBottom = "10px";
	document.getElementById('ShowEventDetails').style.height = "auto";
}

function closeupcomingeventsbox(){
	document.getElementById('ShowEventDetails').style.visibility = "hidden";
	document.getElementById('ShowEventDetails').style.marginTop = "0px";
	document.getElementById('ShowEventDetails').style.marginBottom = "0px";
	document.getElementById('ShowEventDetails').style.height = "0px";
	
}

function switchmonthback(month, year){
	if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById("PageContent").innerHTML=xmlhttp.responseText;
		}
	}
	if (month == 1){
		month = 12;
		year--;
	}
	else{
		month--;
	}
	stringthing = "month=" + month + "&year=" + year;
	xmlhttp.open("GET","/Events/monthswap.php?"+stringthing,true);
	xmlhttp.send();
}

function switchmonthforward(month, year){
	if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById("PageContent").innerHTML=xmlhttp.responseText;
		}
	}
	if (month == 12){
		month = 1;
		year++;
	}
	else{
		month++;
	}
	stringthing = "month=" + month + "&year=" + year;
	xmlhttp.open("GET","/Events/monthswap.php?"+stringthing,true);
	xmlhttp.send();
}

function switchtotoday(month, year){
	if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	xmlhttp.onreadystatechange=function(){
		if (xmlhttp.readyState==4 && xmlhttp.status==200){
			document.getElementById("PageContent").innerHTML=xmlhttp.responseText;
		}
	}
	stringthing = "month=" + month + "&year=" + year;
	xmlhttp.open("GET","/Events/monthswap.php?"+stringthing,true);
	xmlhttp.send();
}

