+ (void) displayAlertOk: (NSString *) title andMessage: (NSString *) message {
    [self displayAlert: title andMessage: message forStatus: FALSE withCaption: @"OK"];
}
 
+ (void) displayAlertError: (NSString *) title andMessage: (NSString *) message {
   [self displayAlert: title andMessage: message forStatus: TRUE withCaption: @"Close"];
}
 
– (void) displayAlert: (NSString *) title andMessage: (NSString *) message forStatus: (BOOL) status withCaption: (NSString *) caption {
    // open a alert with an OK
    UIAlertView *dialog = [[UIAlertViewalloc] init];
    [dialog setDelegate: self];
    [dialog setTitle: title];
    [dialog setMessage: message];
    [dialog addButtonWithTitle: caption];
 
 
   UILabel *theBody = [dialog valueForKey: @"_bodyTextLabel"];
   if (status) {
       [theBody setTextColor:[UIColor redColor]];
    }
 
   [dialog show];
   [dialog release];
 
}