function showLayer(layer) {
	document.getElementById(layer).style.display = "";
}

function hideLayer(layer) {
	document.getElementById(layer).style.display = "none";
}

function openWindow(url,title) {
	window.open(url,title,"width=800,height=600,location=0,status=0,scrollbars=1");
}

function openSmallWindow(link,title) {
	window.open(link, title, 'width=400,height=200,toolbar=0,resizable=0');
}

function openMedWindow(link,title) {
	window.open(link, title, 'width=500,height=400,toolbar=0,resizable=0,scrollbars=0');
}

function refreshParent() {
	window.opener.location.reload();
	window.opener.scroll(0,0);
	window.close();
}

function addHours() {
	document.getElementById('hours').value = document.getElementById('self').value*1 + document.getElementById('group').value*1 + document.getElementById('com').value*1;
}

function checkAcademicHours() {
	if (document.getElementById('hours').value > 30) {
		document.getElementById('hours_mismatch').style.display = "";
		document.getElementById('hours_match').style.display = "none";
	
	} else {
	
		document.getElementById('hours_match').style.display = "";
		document.getElementById('hours_mismatch').style.display = "none";
	
	}
}

function checkLeadershipHours() {
	if (document.getElementById('hours').value > 20) {
	
		document.getElementById('hours_mismatch').style.display = "";
		document.getElementById('hours_match').style.display = "none";

	} else {
	
		document.getElementById('hours_match').style.display = "";
		document.getElementById('hours_mismatch').style.display = "none";	
	
	}
}

function checkCivicHours() {
	if (document.getElementById('hours').value > 20) {
	
		document.getElementById('hours_mismatch').style.display = "";
		document.getElementById('hours_match').style.display = "none";
	
	} else {
	
		document.getElementById('hours_match').style.display = "";
		document.getElementById('hours_mismatch').style.display = "none";	
	
	}
}

function checkOutofClassHours() {
	if (document.getElementById('hours').value > 30) {
	
		document.getElementById('hours_mismatch').style.display = "";
		document.getElementById('hours_match').style.display = "none";
	
	} else {
	
		document.getElementById('hours_match').style.display = "";
		document.getElementById('hours_mismatch').style.display = "none";	
	
	}
}

function checkWorkHours() {
	if (document.getElementById('hours').value > 20) {
	
		document.getElementById('hours_mismatch').style.display = "";
		document.getElementById('hours_match').style.display = "none";
	
	} else {
	
		document.getElementById('hours_match').style.display = "";
		document.getElementById('hours_mismatch').style.display = "none";		
	
	}
}

function copyFilePath() {
	document.getElementById('syllabus_text').value = document.getElementById('syllabus').value;
}

function copyUpload(to, from) {
	document.getElementById(to).value = document.getElementById(from).value;
}

function openChat(link,title) {
	window.open(link, title, 'width=270,height=320,toolbar=0,resizable=0,location=0');
}
