variables;
	string passString;
	string fldRegOBP;
end;

dbfile dbRegOBP;
	field fldRegOBP;
	sync_pref none;
end;

function fxnOpenDatabases;
	open dbRegOBP, "regDBOBP";
end;

function fxnCloseDatabases;
	close dbRegOBP;
end;

function fxnPassPosition;
	lblPassPosition.display = string(bookmark, "###");
end;

function fxnReadPass;
	get_fields dbRegOBP;
	txtReg.display = fldRegOBP;
end;

function fxnSeekPass;
	seek_start dbRegOBP, 0;
	call fxnReadPass;
	call fxnPassPosition;
end;

function fxnClear;
	remove dbRegOBP;
	txtReg.display = "";
	lblReg.hidden = 1;
end;

function fxnSavePass;
	fldRegOBP = txtReg.display;
	insert dbRegOBP;
	call fxnSeekPass;
	hide frmReg;
	show frmOBPts;
end;

function fxnCheckPass;
	variables;
		numeric numVar;
	end;
	numVar = value(passString);
	if numVar = 92803;
	call fxnSavePass;
	else;
	lblReg.display = "Please try again.";
	lblReg.hidden = 0;
	end_if;
end;

function fxnCheckIt;
	variables;
		numeric numVar;
	end;
	passString = left(txtReg.display,3) + right(txtReg.display,2);
	numVar = value(passString);
	if numVar = 92803;
	hide frmReg;
	show frmOBPts;
	end_if;
end;

function fxnSubmit;
	passString = left(txtReg.display,3) + right(txtReg.display,2);
	call fxnCheckPass;
end;

function fxnNext;
	hide frmReg;
	show frmOBPts;
end;

function startup;
	call fxnOpenDatabases;
	call fxnSeekPass;
	call fxnCheckIt;
end;

function shutdown;
	call fxnCloseDatabases;
end;