/*
	Password is visible by default, but is hidden by password-cover using javascript.
	username will default to an empty string on focus if it's currently 'Username'
	username will default to 'Username' if it is left empty on blur
*/
$(document).ready(function() {
	
	$('#password').hide().blur(function() {
		if ($(this).val() == "") {
			$(this).hide();
				$('#password-cover').show();
		}
	});
	$('#password-cover').show().focus(function() {
		$(this).hide();
		$('#password').show().focus();
	});
	$('#username').focus(function() {
		if ($(this).val() == "Username") {
			$(this).val("");
		}
	}).blur(function() {
		if ($(this).val() == "") {
			$(this).val("Username");
		}
	});
});


function submitForm()
{
	$username = $('#username').val();
	$password = $('#password').val();
	
	if ($password == 'visitoraccess' && ($username > 1000 && $username <= 1100 ) )
	{
		window.location = 'http://www.fgsgroup.co.uk/portal/' + $username + '/filessent/index.php';
	}
	else
	{
		alert ('Please enter a valid username and password.');
	}
}