function mouseOver(){
	document.body.style.cursor = 'pointer';
}

function mouseOut(){
	document.body.style.cursor = 'default';
}

function mouseOverLoc(whichLoc){
	whichLoc.style.backgroundColor = '#140c28';
	whichLoc.style.color = '#fff';
	document.body.style.cursor = 'pointer';
}

function mouseOutLoc(whichLoc){
	whichLoc.style.backgroundColor = '#fff';
	whichLoc.style.color = '#301d62';
	document.body.style.cursor = 'default';
}

function eventMouseOver(thisRow){
	mouseOver();
	thisRow.style.backgroundColor = '#c0b6da';
	
	var detailTable = thisRow.firstChild.nextSibling.style.color = '#140c28';
	var detailTable = thisRow.firstChild.nextSibling.childNodes[2].style.color = '#301d62';
	
}

function eventMouseOut(thisRow){
	mouseOut();
	thisRow.style.backgroundColor = 'transparent';
	var detailTable = thisRow.firstChild.nextSibling.style.color = '#fff';
	var detailTable = thisRow.firstChild.nextSibling.childNodes[2].style.color = '#c0b6da';
}



function changeMapLocation(thisLocation){
	var newLocation = thisLocation;
	
	if(newLocation == 'Akron'){
		var coor = '41.0452, -81.5816' ;
		var dirLocation = '2500 Romig Rd. Akron, OH 44320';
	}else{
		var coor = '40.7779, -81.3872' ;
		var dirLocation = '1832 Cleveland Ave. SW Canton, OH 44707';
	}
	
	var tothislocation = document.directionsForm.from.value
	if(tothislocation != 'Enter Your Address'){
	setDirections(tothislocation, dirLocation, 'en');
	}
	
	document.getElementById('CantonAddress').style.display = 'none';
	document.getElementById('AkronAddress').style.display = 'none';

	//document.getElementById(newLocation+'Address').style.display = 'block';

	document.getElementById('setLocation').innerHTML = newLocation.substring(0,1).toUpperCase()+newLocation.substring(1);
	document.getElementById('toAddress').value = coor;
	
	setLocation(newLocation);
	
}


function getCalendar(button, cMonth, cYear){
	var year = cYear;
	 var month = cMonth;
	 
	 if(button == 'pY'){
		year--;
	 }
	 
	 if(button == 'pM'){
		 
		 if(month == 1){
			month = 12;
			year--;
		 }else{
			 month--;	 
		 }
	 }
	 
	 if(button == 'nM'){
		 if(month == 12){
			
			 month = 1;
			 year++;
		
		 }else{
		 
			 month++;
		 
		 }
			 
	 }
	 
	 if(button == 'nY'){
		
		 year++;
		 
	 }
	 
	 
	 //var printable = document.getElementById('printCal');
	 
	 
	 //printable.href = '/calpdf/pdfCreate.php?month='+month+'&year='+year;
	 
	 var url="/includes/calendar.php?month="+month+"&year="+year;
	 	 
	 try
		{
		// Firefox, Opera 8.0+, Safari
		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;
				}
			}
		}
		xmlHttp.onreadystatechange=placeCalendar;
		
		xmlHttp.open("GET",url,true);
		
		xmlHttp.send(null);

 }
 
 function placeCalendar(){
	
		if (xmlHttp.readyState==4)
		{// 4 = "loaded"
			if (xmlHttp.status==200)
			{// 200 = "OK"
				var lastCalendar = document.getElementById('calendar');
				var calendarContainer = document.getElementById('calendarContainer');
				calendarContainer.removeChild(lastCalendar);
				calendarContainer.innerHTML=xmlHttp.responseText;

			}
			else
			{
				alert("Problem retrieving data:" + xmlHttp.statusText);
			}
		}

	 
 }


function showEventDetails(theseDetails){
	
	var getDetails = document.getElementById('details'+theseDetails);
	
	return hs.htmlExpand(getDetails);
	
}

function calMouseOver(thisRow){
	mouseOver();
	thisRow.style.backgroundColor = '#c0b6da';	
}

function calMouseOut(thisRow){
	mouseOut();
	thisRow.style.backgroundColor = 'transparent';
}

function showCalDetails(theseDetails){
	
	var getDetails = document.getElementById('details'+theseDetails);
	
	hs.htmlExpand(getDetails);
	
}

