// JavaScript For Calendar Plugin

var lastDate = null;
	var newlastDate = null;
	var newdateID = null;
	function displayDate(dateid){
		if(lastDate){
			document.getElementById(lastDate).style.display = "none";
			newlastDate = "cell-";
			newlastDate += lastDate;
			document.getElementById(newlastDate).style.backgroundColor = "#d9d6d8";
		} else {
			getElementByClass('the_event_today');
		}
		document.getElementById(dateid).style.display = "block";
		newdateID = "cell-";
		newdateID += dateid;
		document.getElementById(newdateID).style.backgroundColor = "#ffffff";
		lastDate = dateid;
	}
	
	var allHTMLTags = new Array();
	function getElementByClass(theClass) {
		
		//Create Array of All HTML Tags
		var allHTMLTags=document.getElementsByTagName("*");
		
		//Loop through all tags using a for loop
		for (i=0; i<allHTMLTags.length; i++) {
		
			//Get all tags with the specified class name.
			if (allHTMLTags[i].className==theClass) {
			
			//Place any code you want to apply to all
			//pages with the class specified.
			//In this example is to "display:none;" them
			//Making them all dissapear on the page.
			
			allHTMLTags[i].style.display='none';
			
			}
		}
	}
