function logInError()
{
	var error = false;
	
	if (log_in_error == true) {
		var $error_dialog = $('<div></div>')
			.html('<span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 50px 0;"></span> Please ensure that you enter a valid User Name/Password. If you have forgotten this information you can request a reset or you can Register a new account.')
			.dialog({
				title: "Invalid User Name/Password",
				buttons: { "Ok": function() { $(this).dialog('close'); } },
				resizable: false,
				modal: true
			});
			
		error = true;
		return false;
	}//end if
	
	if (error) {
		return false;
	}//end if
	
	return true;
}//end logInError()

$(document).ready(function(){
	var $dialog = $('<div></div>')
		.html("<span class='ui-icon ui-icon-alert' style='float:left; margin:0 7px 50px 0;'></span> Please ensure that both User Name and Password fields have been completed before submitting!")
		.dialog({
			autoOpen: false,
			title: 'Login Error',
			buttons: { "Ok": function() { $(this).dialog('close'); } },
			resizable: false,
			modal: true
		});	

  	$("form").submit(function(){
		var error = false;
		
		if ($('#UserN').val().length == 0 || $('#PassW').val().length == 0) {
			$dialog.dialog('open');
			error = true;
			return false; 
		}//end if
			
		if (error) {
			return false;
		}//end if
		
		return true;
  	});
});
