Index: cprs/trunk/CPRS-Chart/Orders/fOCSession.pas
===================================================================
--- cprs/trunk/CPRS-Chart/Orders/fOCSession.pas	(revision 456)
+++ cprs/trunk/CPRS-Chart/Orders/fOCSession.pas	(revision 829)
@@ -5,5 +5,5 @@
 uses
   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
-  fAutoSz, StdCtrls, ORFn, uConst, ORCtrls, ExtCtrls;
+  fAutoSz, StdCtrls, ORFn, uConst, ORCtrls, ExtCtrls, VA508AccessibilityManager;
 
 type
@@ -15,4 +15,6 @@
     cmdCancelOrder: TButton;
     cmdContinue: TButton;
+    btnReturn: TButton;
+    memNote: TMemo;
     procedure cmdCancelOrderClick(Sender: TObject);
     procedure cmdContinueClick(Sender: TObject);
@@ -26,15 +28,20 @@
     procedure txtJustifyKeyDown(Sender: TObject; var Key: Word;
       Shift: TShiftState);
+    procedure btnReturnClick(Sender: TObject);
+    procedure memNoteEnter(Sender: TObject);
   private
     FCritical: Boolean;
+    FCancelSignProcess : Boolean;
     FCheckList: TStringList;
     FOrderList: TStringList;
     procedure SetReqJustify;
+    procedure SetReturn(const Value: Boolean);
   public
     { Public declarations }
+    property CancelSignProcess : Boolean read FCancelSignProcess write SetReturn default false;
   end;
 
 procedure ExecuteReleaseOrderChecks(SelectList: TList);
-procedure ExecuteSessionOrderChecks(OrderList: TStringList);
+function ExecuteSessionOrderChecks(OrderList: TStringList) : Boolean;
 
 implementation
@@ -42,5 +49,5 @@
 {$R *.DFM}
 
-uses rOrders, uCore, rMisc;
+uses rOrders, uCore, rMisc, fFrame;
 
 type
@@ -84,14 +91,16 @@
       OrderIDList.Add(AnOrder.ID + '^^1');  // 3rd pce = 1 means releasing order
     end;
-    ExecuteSessionOrderChecks(OrderIDList);
-    for i := SelectList.Count - 1 downto 0 do
-    begin
-      AnOrder := TOrder(SelectList.Items[i]);
-      if OrderIDList.IndexOf(AnOrder.ID + '^^1') < 0 then
+    if ExecuteSessionOrderChecks(OrderIDList) then
+      for i := SelectList.Count - 1 downto 0 do
       begin
-        Changes.Remove(CH_ORD, AnOrder.ID);
-        SelectList.Delete(i);
-      end;
-    end;
+        AnOrder := TOrder(SelectList.Items[i]);
+        if OrderIDList.IndexOf(AnOrder.ID + '^^1') < 0 then
+        begin
+          Changes.Remove(CH_ORD, AnOrder.ID);
+          SelectList.Delete(i);
+        end;
+      end
+    else
+      SelectList.Clear;
   finally
     OrderIDList.Free;
@@ -99,5 +108,7 @@
 end;
 
-procedure ExecuteSessionOrderChecks(OrderList: TStringList);
+{Returns True if the Signature process should proceed.
+ Clears OrderList If False. }
+function ExecuteSessionOrderChecks(OrderList: TStringList) : Boolean;
 var
   i, j: Integer;
@@ -109,4 +120,5 @@
   x: string;
 begin
+  Result := True;
   CheckList := TStringList.Create;
   try
@@ -152,4 +164,10 @@
         if frmOCSession.Visible then frmOCSession.SetFocus;
         frmOCSession.ShowModal;
+        Result := not frmOCSession.CancelSignProcess;
+        if frmOCSession.CancelSignProcess then begin
+          OrderList.Clear;
+          if Assigned(frmFrame) then
+            frmFrame.SetActiveTab(CT_ORDERS);
+        end;
       finally
         with uCheckedOrders do for i := 0 to Count - 1 do TOCRec(Items[i]).Free;
@@ -176,4 +194,5 @@
   lblJustify.Visible := FCritical;
   txtJustify.Visible := FCritical;
+  memNote.Visible := FCritical;
 
 end;
@@ -234,6 +253,5 @@
                  if (Piece(OCRec.Checks[i], U, 2) = '1') then
                    begin
-                     if ColorToRGB(clWindowText) = ColorToRGB(clBlack) then
-                       Canvas.Font.Color := clBlue;
+                     Canvas.Font.Color := Get508CompliantColor(clBlue);
                      Canvas.Font.Style := [fsUnderline];
                    end
@@ -298,4 +316,5 @@
   inherited;
   SetFormPosition(Self); //Get Saved Position & Size of Form
+  FCancelSignProcess := False;
 end;
 
@@ -315,3 +334,21 @@
 end;
 
+procedure TfrmOCSession.btnReturnClick(Sender: TObject);
+begin
+  inherited;
+  FCancelSignProcess := True;
+  Close;
+end;
+
+procedure TfrmOCSession.SetReturn(const Value: Boolean);
+begin
+  FCancelSignProcess := Value;
+end;
+
+procedure TfrmOCSession.memNoteEnter(Sender: TObject);
+begin
+  inherited;
+  memNote.SelStart := 0;
+end;
+
 end.
