function flip (arr) {
        var tmp = new Array();
        L = arr.length;
        for (i=0; i<arr.length; i++) {
                tmp.push(arr[L-1]);
                L = L-1;
        }
        return tmp;
}
temp = new Array(5, 10, 15, 20, 25, 30, 35, 40);
temp = flip(temp);
trace (temp);