Trying to make a function to calculate 5 working days in future

Hello there, I am trying to write a function that I can pass a date to that will return the value of 5 working days in the future for a delivery.
I am going about this by creating a bunch of arrays like this

var weekArr:Array = new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", 
"Sun");
var monthDaysArr:Array = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
var monthDaysLeapArr:Array = new Array(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);

and then a big function with lots of if statements that starts like this:

var standardDeliv:Number= 7//number of days for delivery
function checkDeliv(day:String, date:Number, month:String, year:Number):Array{
 if([EMAIL="day!="]day!=[/EMAIL]Sat"|| day!="Sun" && date<=21)
 deliveryArr[0]=day;
 deliveryArr[1]=date+standardDeliv;
 deliveryArr[2]=month;
 deliveryArr[3]=year;
//lots of other if statements to handle other situations below
 }

I was wondering if I am going about this the right way or if there is a much simpler way of doing it. I’m not asking anyone to write the code for me (though feel free :)) I’m just after a bit of direction as to how a more experienced Actionscripter would set about this.

Cheers guys,

Hectors

BTW- I am getting the intial date from a PHP file on my server through LoadVars() and I have written the code above on a text editor without Flash so there may be some punctuation errors.

var future:Date = new Date(2006, 3, 27);

trace(getWorkingDays(future));
// returns date in month/day format in an array

function getWorkingDays(date:Date):Array {
    var i = 0;
    var days = new Array();
    trace(date.getDay());
    do {
        if (isWorkingDay((date.getDay()+i)%7)) {
            trace(date.getTime()+(86400000*i));
            var returnDate = new Date(date.getTime()+86400000*i);
            trace(returnDate);
            days.push((returnDate.getMonth()+1)+"/"+(returnDate.getDate()));
        }
        i++;
    } while (days.length != 5);
    return days;
}
function isWorkingDay(day:Number):Boolean {
    return (day == 6 || day == 0) ? false : true;
}

edit: I forgot one thing… months… just give me a second =)

edit2: done