		var vm = null;
		
		function init() {
			vm = new ValidationManager(customerItemNumberSettings, "default");
		}
		
		function retPasswd() {
		
			var theForm = document.getElementById("passwordForm");
			
			vm.whichValidatorFactory = "passwordRet";
			
			/* Only submit the form if it is valid. */
			if(vm.validateAllFields())
			{
				//document.forms["theForm"].submit();
				theForm.submit();
			}
		}
		
		function logon() {		

			var theForm = document.getElementById("logonForm");
			
			var removeMe = document.getElementById("removeMe");
			
			if(removeMe)
			{
				removeMe.parentNode.removeChild(removeMe);
			}
			
			// vm = new ValidationManager(validatorSettings, "default");
			if (vm==null)
				init();
							
			vm.whichValidatorFactory = "default";
		    
			theForm.setAttribute("name", "logonForm");
			theForm.setAttribute("action", "http://12.27.100.131/cgi-bin/Xebra?logon");
			
			// <input type="submit" value="Log On" name="loginButton" />
			// Create a fake "placeholder" submit button.
			var submitBtn = document.createElement("INPUT");
			submitBtn.setAttribute("type", "hidden");
			submitBtn.setAttribute("value", "Log On");
			submitBtn.setAttribute("name", "loginButton");
			submitBtn.setAttribute("id", "removeMe");
			
			theForm.appendChild(submitBtn);
			
			var email_addr_input = document.getElementById("userid");
			email_addr_input.setAttribute("name", "userid");
			
			var passwd_input = document.getElementById("password");
			
			passwd_input.setAttribute("name", "password");
			
			if(vm.validateAllFields()) 
			{
				theForm.submit();
			}
		}