var Events = function() {
}

//-------------------------------------------------------------------------------
Events.prototype.completionStatus = 0;
Events.prototype.getCompletionStatus = function () {return this.completionStatus;};
Events.prototype.setCompletionStatus = function (completionStatus) {this.completionStatus = completionStatus;};
//-------------------------------------------------------------------------------
Events.prototype.debugging = false;
Events.prototype.getDebugging = function () {return this.debugging;};
Events.prototype.setDebugging = function (debugging) {this.debugging = debugging; return 1;};
//-------------------------------------------------------------------------------
Events.prototype.eventsLog; 
Events.prototype.getLog = function () {return this.eventsLog;};
Events.prototype.setLog = function (eventsLog) {
 this.eventsLog = eventsLog;
 if(this.debugging && this.eventsLog) {this.eventsLog.println("Events: "+"eventsLog is running...");}; 
 return 1;
};


//-------------------------------------------------------------------------------
Events.prototype.addEventListener = function(element, event_, function_, feature) {
 if(this.getDebugging() && this.getLog()) {this.getLog().println("Events.addEventListener...");};
 
 if(typeof element == "string") {element = document.getElementById(element)};
 
 if(element && element.addEventListener) {
  element.addEventListener(event_, function_, feature);
 } else if (element && element.attachEvent) {
  eventIE = "on"+event_;
  element.attachEvent(eventIE, function_);
 }
}

