
function fourcMouseOver(object) {
	var id = object.id;
	id = id.replace(/-link/, '');
	
	imageId = '#' + id + '-image';
	textId = '#' + id + '-text';
	
	$(imageId).show();
	$(textId).show();
}

function fourcMouseOut(object) {
	var id = object.id;
	id = id.replace(/-link/, '');
	
	imageId = '#' + id + '-image';
	textId = '#' + id + '-text';
	
	$(imageId).hide();
	$(textId).hide();
}

function setPageLinkClass() {
	// handles showing the dots for the current page
	var linkName = '#navigation-';
	var url = window.location.href;
	
	if(url.indexOf('index.php') != -1) {
		linkName += 'home';
	}
	else if(url.indexOf('about.php') != -1) {
		linkName += 'about';
	}
	else if(url.indexOf('apply.php') != -1) {
		linkName += 'apply';
	}
	else if(url.indexOf('courses.php') != -1) {
		linkName += 'courses';
	}
	else if(url.indexOf('faculty.php') != -1) {
		linkName += 'faculty';
	}
	
	$(linkName).addClass("current-page");
}

function clearTextField(field) {
	if (field.value == field.defaultValue) {
		field.value = '';
	}
}