refactoring common behavior to js object
I would recommend using a constructor function to create the objects:

function FolderData() {

    this.allAttachments_vector_counter = 0;
    this.allAttachments_vector = [];
    this.attachment_position_dict = {};
    this.extraDetails_dict = {};

}

FolderData.prototype = {

    constructor: FolderData,

    getAttachmentsPerPage: function (pageNum) {
        var result = this.allAttachments_vector.slice(
            global_vars.NUM_OF_ATTACH_PER_PAGE * (pageNum - 1), 
            global_vars.NUM_OF_ATTACH_PER_PAGE * (pageNum)
        );
        return result.length == 0 ? null : result;
    },

    getAttachmentsMarkupPerPage: function (pageNum) {
        var attachmentsMarkup = "";
        var attachments = this.getAttachmentsPerPage(pageNum);
        for (key in attachments) {
            attachmentsMarkup += attachments[key].attachment_markup + " ";
        }
        return (attachmentsMarkup == "") ? "No attachments to display" : attachmentsMarkup;
    },

    pushAttachment: function (attachment, position) {
        //not in dict yet
        if (this.attachment_position_dict[attachment.attachmentId] == undefined) {
            if (position ==  null) {
              position = this.allAttachments_vector_counter;
            }
            this.allAttachments_vector[position] = attachment;
            this.allAttachments_vector_counter++;
            this.attachment_position_dict[attachment.attachmentId] = position;
            //this.extraDetails_dict[attachment.attachmentId] = {};
        }   
    }

};


...

DS.data_per_folder[CurrentContextMgr.current.folder.attr('id')] = new FolderData();




The benefit of this, other than readability, is that you don't create a separate copy of every function property for each object. The functions are instead attached to the constructor's prototype, so there is only one instance of each function, and functions are shared by each constructed object instance.