function OrderObj(ofId) {
    this.aid = ofId;
    this.SpecDetails = {
        sid : app.OfferArr[ofId].sid,
        Title : app.OfferArr[ofId].Title,
        subTitle : app.OfferArr[ofId].subTitle,
        StartDate : app.OfferArr[ofId].StartDate,
        EndDate : app.OfferArr[ofId].EndDate,
        //Dates : app.OfferArr[ofId].Dates,
        FlightDesc : app.OfferArr[ofId].FlightDesc,
        //PeopleAtRoom : app.OfferArr[ofId].PeopleAtRoom,
        //SingleDesc : app.OfferArr[ofId].SinglePriceDesc,
        //SinglePrice : app.OfferArr[ofId].SinglePricePrice,
        Currency : app.OfferArr[ofId].Currency,
        Included : app.OfferArr[ofId].Included,
        NotIncluded : app.OfferArr[ofId].NotIncluded,
        Terms : app.OfferArr[ofId].Terms,
        TotalPrice : app.OfferArr[ofId].TotalPrice,
        TotalPeople : app.OfferArr[ofId].TotalPeople,
        Columns : app.OfferArr[ofId].Columns,               //array
        Prices : app.OfferArr[ofId].Prices,                 //array
        People : app.OfferArr[ofId].People,                 //array
        SelectedPeople : app.OfferArr[ofId].SelectedPeople  //array
    }
    this.PersonalDetails = {
        LastName : "",
        FirstName : "",
        Address : "",
        City : "",
        LandPhone : " ",
        CellPhone : " ",
        eMail : ""
    }
    this.ClubMember = true;
    this.PaymentMethod = "";
    this.PayCreditCard = {
        Number : "",
        Expiration : "/",
        OwnerID : ""
    }
    this.Ensurance = false;
    this.SendTicketsHome = false;
    this.tmpHTML = "";
    this.HTML = function() {
        htm = g('order_content').innerHTML;
        htm = htm.replace(/@VAR_LastName_@/g,this.PersonalDetails.LastName.replace(/ /g,"&nbsp;"));
        htm = htm.replace(/@VAR_FirstName_@/g,this.PersonalDetails.FirstName.replace(/ /g,"&nbsp;"));
        htm = htm.replace(/@VAR_Address_@/g,this.PersonalDetails.Address.replace(/ /g,"&nbsp;"));
        htm = htm.replace(/@VAR_City_@/g,this.PersonalDetails.City.replace(/ /g,"&nbsp;"));
        htm = htm.replace(/@VAR_LandPhone0_@/g,this.PersonalDetails.LandPhone.split(" ")[0]);
        htm = htm.replace(/@VAR_LandPhone1_@/g,this.PersonalDetails.LandPhone.split(" ")[1]);
        htm = htm.replace(/@VAR_CellPhone0_@/g,this.PersonalDetails.CellPhone.split(" ")[0]);
        htm = htm.replace(/@VAR_CellPhone1_@/g,this.PersonalDetails.CellPhone.split(" ")[1]);
        htm = htm.replace(/@VAR_eMail_@/g,this.PersonalDetails.eMail);
        htm = htm.replace(/@VAR_ofId_@/g,ofId);
        htm = htm.replace(/@VAR_ClubMember_@/g,this.ClubMember==true?"checked=\"checked\"":"");
        htm = htm.replace(/@VAR_Ensurance_@/g,this.Ensurance==true?"checked=\"checked\"":"");
        htm = htm.replace(/@VAR_SendTicketsHome_@/g,this.SendTicketsHome==true?"checked=\"checked\"":"");
        this.tmpHTML = g('order_content').innerHTML;
        g('order_content').innerHTML = "";
        return htm;
    }
}
