function toggleDisplay(showHideDiv, switchTextDiv) {
	var ele = document.getElementById(showHideDiv);
	var text = document.getElementById(switchTextDiv);
	if(ele.style.display == "block") {
    		ele.style.display = "none";
			text.innerHTML = "More &gt;";
  	}
	else {
		ele.style.display = "block";
		text.innerHTML = "Less &gt;";
	}
}
function toggleDisplayRead(showHideDiv, switchTextDiv) {
	var ele = document.getElementById(showHideDiv);
	var text = document.getElementById(switchTextDiv);
	if(ele.style.display == "block") {
    		ele.style.display = "none";
			text.innerHTML = "read more";
  	}
	else {
		ele.style.display = "block";
		text.innerHTML = "read less";
	}
}



function callcalendar(stryear,strmonth){
	
	if(window.XMLHttpRequest){ // Mozilla, Safari,... 
		ajaxRequest = 	new XMLHttpRequest(); 
	}else if(window.ActiveXObject){ // IE 
		ajaxRequest = 	new ActiveXObject("Microsoft.XMLHTTP"); 
	}
	ajaxRequest.onreadystatechange = returncalendar;
	var queryString = 	encodeURI('/includes/ajaxcalendar.asp?Month=' + strmonth + '&Year=' + stryear);	
	ajaxRequest.open("GET",queryString, true);
	ajaxRequest.send(null);	
}
function returncalendar(){
	if(ajaxRequest.readyState == 1){         	
		document.getElementById('calendarholder').innerHTML 	= 	'loading...';
	}
	
	if(ajaxRequest.readyState == 4){         	
		document.getElementById('calendarholder').innerHTML 	= 	ajaxRequest.responseText;
		jQuery(document).ready(function() {
			jQuery("a.anchorLink").anchorAnimate()
		});
		lightwindowInit();
	} 
}

function callevents(stryear,strmonth,strday){
	
	if(window.XMLHttpRequest){ // Mozilla, Safari,... 
		ajaxRequest = 	new XMLHttpRequest(); 
	}else if(window.ActiveXObject){ // IE 
		ajaxRequest = 	new ActiveXObject("Microsoft.XMLHTTP"); 
	}
	ajaxRequest.onreadystatechange = returnevents;
	var queryString = 	encodeURI('/includes/ajaxevents.asp?Month=' + strmonth + '&Year=' + stryear + '&Day=' + strday);	
	ajaxRequest.open("GET",queryString, true);
	ajaxRequest.send(null);	
}
function returnevents(){
	if(ajaxRequest.readyState == 1){         	
		document.getElementById('eventsholder').innerHTML 	= 	'loading...';
	}
	
	if(ajaxRequest.readyState == 4){         	
		document.getElementById('eventsholder').innerHTML 	= 	ajaxRequest.responseText;
	    lightwindowInit();
	} 
}


// BLOG CALENEDAR FUNCTIONS

function callblogcalendar(stryear,strmonth,groupID){
	
	if(window.XMLHttpRequest){ // Mozilla, Safari,... 
		ajaxRequest = 	new XMLHttpRequest(); 
	}else if(window.ActiveXObject){ // IE 
		ajaxRequest = 	new ActiveXObject("Microsoft.XMLHTTP"); 
	}
	ajaxRequest.onreadystatechange = returnblogcalendar;
	var queryString = 	encodeURI('/includes/ajaxblogcalendar.asp?Month=' + strmonth + '&Year=' + stryear + '&groupID=' + groupID);	
	ajaxRequest.open("GET",queryString, true);
	ajaxRequest.send(null);
	
}
function returnblogcalendar(){
	if(ajaxRequest.readyState == 1){         	
		document.getElementById('calendarholder').innerHTML 	= 	'loading...';
	}
	
	if(ajaxRequest.readyState == 4){         	
		document.getElementById('calendarholder').innerHTML 	= 	ajaxRequest.responseText;
	} 
}

function callblog(stryear,strmonth,strday,groupID){
	
	if(window.XMLHttpRequest){ // Mozilla, Safari,... 
		ajaxRequest = 	new XMLHttpRequest(); 
	}else if(window.ActiveXObject){ // IE 
		ajaxRequest = 	new ActiveXObject("Microsoft.XMLHTTP"); 
	}
	ajaxRequest.onreadystatechange = returnblog;
	var queryString = 	encodeURI('/includes/ajaxblog.asp?Month=' + strmonth + '&Year=' + stryear + '&Day=' + strday + '&groupID=' + groupID);	
	ajaxRequest.open("GET",queryString, true);
	ajaxRequest.send(null);
	
}
function returnblog(){
	if(ajaxRequest.readyState == 1){         	
		document.getElementById('blogholder').innerHTML 	= 	'loading...';
	}
	
	if(ajaxRequest.readyState == 4){         	
		document.getElementById('blogholder').innerHTML 	= 	ajaxRequest.responseText;
	} 
}
