#import "HelpIntroObject.h"

@implementation HelpIntroObject

// Global Variable
NSString *fileName;

// awakeFromNib
// This is one of the last methods executed after the nib file is loaded.
// This is the BEST way I know how to initialize an object and jump into
// a method after the nib file was loaded.
- (void)awakeFromNib
{
    	fileName = [NSString stringWithCString:"Intro"];
    	[self LoadFile:NULL];
}


- (void)LoadFile:(id)sender
{

        NSString *thePath;
        NSBundle *thisBundle = [NSBundle bundleForClass:[self class]];

        if (thePath = [thisBundle pathForResource:fileName ofType:@"rtfd"])
                {
            [[TheScrollView documentView] setString:thePath];
            [[TheScrollView documentView] readRTFDFromFile:thePath];
            [TheWindow setTitle:fileName];
            [TheWindow orderFront:sender];
                }
}


- (void)Help1:(id)sender
{

    fileName = [NSString stringWithCString:"EnableSA"];
    [self LoadFile:self];
    
}

- (void)Help2:(id)sender
{

    fileName = [NSString stringWithCString:"sa"];
    [self LoadFile:self];
    
}

- (void)Help3:(id)sender
{

    fileName = [NSString stringWithCString:"Last"];
    [self LoadFile:self];
}

- (void)Help4:(id)sender
{

    fileName = [NSString stringWithCString:"LoginAccounting"];
    [self LoadFile:self];

}

- (void)Help5:(id)sender
{

    fileName = [NSString stringWithCString:"SearchBox"];
    [self LoadFile:self];
}

- (void)Help6:(id)sender
{

    fileName = [NSString stringWithCString:"lastcomm"];
    [self LoadFile:self];
}

- (void)Intro:(id)sender
{

    fileName = [NSString stringWithCString:"Intro"];
    [self LoadFile:self];
    
}

@end
