Interim Monitoring of Group Sequential Trials Using Spending Functions for the Type I and Type II Error Probabilities