
//add arrays for the database
arrAppointment = new Array();

//generic varibles
var i=0;

// start of database
// AppID, AppDate, AppTime, SubectShort, SubjectLong, POCOrg, POCName, POCNumber, LocationBuilding, LocationRoom, FreeForm Text, URL


arrAppointment[i++]= new addtoAppointment("01094734350.0000007753", "1097080200", "1097080200", "2004-10-06", "12:30", "2004&#47;10&#47;06", "12&#58;30", "", "", "UC Santa Cruz", "Yishi Jin", "", "Wellman", "11th floor Conf&#46; room", "Joshua Kaplan", "Department of Molecular Biology", "", "empty", "0", "0");
arrAppointment[i++]= new addtoAppointment("01094734488.0000010101", "1100107800", "1100107800", "2004-11-10", "12:30", "2004&#47;11&#47;10", "12&#58;30", "Ed Chapman", "", "University of Wisconsin", "Ed Chapman", "", "Wellman", "11th floor Conf&#46; room", "Joshua Kaplan", "Department of Molecular Biology", "", "empty", "0", "0");


// End of Database

    // this funciton will bubble sort the arrAppointment into decending order, based on the AppDate_AppTime field
    var storage;
    var blnSwap = false;
    do {
        blnSwap = false;
        for (var intCount=0; intCount < (arrAppointment.length -1); intCount++) {
            if (arrAppointment[intCount].AppEpochTime > arrAppointment[intCount +1].AppEpochTime) {
                storage = arrAppointment[intCount];
                arrAppointment[intCount] = arrAppointment[intCount +1];
                arrAppointment[intCount +1] = storage;
                blnSwap = true;
                } // end if
            } // next intCount
        } while (blnSwap) // loop

