#import "MoonPhaseAppDelegate.h"

@implementation MoonPhaseAppDelegate

@synthesize window;

- (void)applicationDidFinishLaunching:(UIApplication *)application {    
    webView.delegate = self;
    
    [webView stringByEvaluatingJavaScriptFromString:@"window.isIPhone = true;"];
    NSURL *appURL        = [NSURL fileURLWithPath:[[NSBundle mainBundle] 
        pathForResource:@"index" ofType:@"html" inDirectory:@"content"]];
    NSURLRequest *appReq = [NSURLRequest requestWithURL:appURL 
        cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20.0];
    [webView loadRequest:appReq];

    [window makeKeyAndVisible];
}

- (void)dealloc {
    [webView release];
    [window release];
    [super dealloc];
}

@end
