
    // initialize a global linked list object
    var JSLog_JSLinkedList = null;

    // constructor for the JSLog object
    function JSLog(title) {
        JSLog_JSLinkedList = new JSLinkedList();
   
        this.title = title;
        this.log = JSLog_log;
        this.count = JSLog_getCount;
        this.show = JSLog_show;
    }
    
    // add the value passed to the log
    function JSLog_log(value, obj) {
        if (value == '') {
            alert("Please enter a value to " + 
                  "add to the log.");
        } else {
            JSLog_JSLinkedList.addLink(value);
        }
        if (this.obj == null) {
            this.obj = obj;
        }
    }

    // display the list of error to the user in a javascript:alert()
    function JSLog_show() {
        if (this.title != null) {
            alert(this.title + "\n\n" + JSLog_JSLinkedList.getText());
        } else {
            alert(JSLog_JSLinkedList.getText());
        }
        if (this.obj != null) {
            this.obj.focus();
        }
    }
 
    // return the number of errors logged
    function JSLog_getCount() {
        return JSLog_JSLinkedList.length();
    }
