function pageOnLoad() {
	new Rollover('top-nav');
	if(document.getElementsByClassName('errorExplanation').length) { 
		new Effect.Highlight('errorExplanation');
	};
	if(document.getElementsByClassName('noticeExplanation').length) {
		new Effect.Highlight('noticeExplanation');
	};
	if($('header-login-form-username')) {
		disableInput($('header-login-form-username'), 'Username')
	};
	if($('header-login-form-password')) {
		disableInput($('header-login-form-password'), 'Password')
	};
}

function clearDefaultLoginValues() {
	if($('header-login-form-username').value == 'Username') {
		$('header-login-form-username').value = ''
	};
	if($('header-login-form-password').value == 'Password') {
		$('header-login-form-password').value = ''
	};
}

function enableInput(textField, defaultValue) {
	backgroundColor = '#ffffff';
	textColor = '#000000';
	textField.style.backgroundColor = backgroundColor;
	if (textField.value == defaultValue) {
		textField.style.color = textColor;
		textField.value = "";
	}
	if(defaultValue == 'Password') {
		textField.type = 'password';
	}
}
 
function disableInput(textField, defaultValue) {
	backgroundColor = '#ffffff';
	textColor = '#666666';
	textField.style.backgroundColor = backgroundColor;
	if (textField.value == "") {
		textField.style.color = textColor;
		textField.value = defaultValue;
	}
	if(textField.value == defaultValue) {
		textField.type = 'text';
	}
}