// ==UserScript==
// @name           FLiCA Login
// @namespace      http://www.flywithsteve.com/projects/scripts
// @description    A script to automatically log you into the FLiCA application for airline crewmembers.
// @include        http://www.flica.net/public/logon.html
// ==/UserScript==

// Set your username and password
var myEmpID, myEmpPass;
myEmpID = " --- USERNAME HERE --- ";
myEmpPass = " --- PASSWORD HERE --- ";

//add event listener to call my anonymous function after the page loads
window.addEventListener('load',
function() {
	// Set username and password.
	document.getElementsByName("UserId")[0].value = myEmpID;
	document.getElementsByName("Password")[0].value = myEmpPass;

	//And finally submit the form
	document.getElementsByName("OK")[0].click();
}, true);