function switchimage(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("CandyWrapperLeft").innerHTML=xmlhttp.responseText;
		}
	}
	$stringthing = "ID=" +x;
	xmlhttp.open("GET","frontimageswap.php?ID="+x,true);
	xmlhttp.send();
}

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("ViewResults").innerHTML=xmlhttp.responseText;
		}
	}
	$stringthing = "ID=" +x;
	xmlhttp.open("GET","fronteventappearance.php?ID="+x,true);
	xmlhttp.send();
	document.getElementById('ViewResults').style.visibility = "visible";
	document.getElementById('ViewResults').style.marginTop = "10px";
	document.getElementById('ViewResults').style.height = "auto";
}

function closeupcomingeventsbox(){
	document.getElementById('ViewResults').style.visibility = "hidden";
	document.getElementById('ViewResults').style.marginTop = "0px";
	document.getElementById('ViewResults').style.height = "0px";
	
}
