function SwapImage(id,action)
{
	var image = document.getElementById(id);
	if (action == 'over') {
		image.src = 'images/' + id + '_hover.gif';
	} else {
		image.src = 'images/' + id + '_normal.gif';
	}
}

function SwapImageSub(id,action)
{
	var image = document.getElementById(id);
	if (action == 'over') {
		image.src = '../images/' + id + '_hover.gif';
	} else {
		image.src = '../images/' + id + '_normal.gif';
	}
}

function ClearLogin(id)
{
	var input = document.getElementById(id);
	if (input.value == 'username')
	{
		input.value = '';
	} else if (input.id == 'password') {
		input.value = '';
		input.type = 'password';
	}
}

function FillLogin(id)
{
	var input = document.getElementById(id);
	if (input.value == '' && input.id == 'username')
	{
		input.value = 'username';
	} else if (input.value == '' && input.id == 'password') {
		input.type = 'text';
		input.value = 'password';
	}
}

function CheckForm()
{
	var first_name = document.getElementById('First_Name').value;
	var last_name = document.getElementById('Last_Name').value;
	var email_address = document.getElementById('Email_Address').value;
	
	if (first_name == '' || last_name == '' || email_address == '') {
		var message = 'The following fields must be entered to complete this form:\n';
		if (first_name == '') { message += 'First Name\n'; }
		if (last_name == '') { message += 'Last Name\n'; }
		if (email_address == '') { message += 'Email Address\n'; }
		alert(message);
	} else {
		alert("Form looks good!");
	}
}