
function Notification(note_id) {
	if (note_id != undefined) this.setId(note_id);
}

Notification.prototype._id;
Notification.prototype.getId = function() {
    return this._id;
}
Notification.prototype.setId = function(id) {
    this._id = id;
}

Notification.prototype._startpoint;
Notification.prototype.getStartpoint = function() {
    return this._startpoint;
}
Notification.prototype.setStartpoint = function(startpoint) {
    this._startpoint = startpoint;
}

Notification.prototype._endpoint;
Notification.prototype.getEndpoint = function() {
    return this._endpoint;
}
Notification.prototype.setEndpoint = function(endpoint) {
    this._endpoint = endpoint;
}

Notification.prototype._information;
Notification.prototype.getInformation = function() {
	if (this._information == undefined) this._information = "Markierung";
    return this._information;
}
Notification.prototype.setInformation = function(information) {
	if (information == undefined || information == "undefined") information = "Markierung";
    this._information = information;
}

Notification.prototype._type;
Notification.prototype.getType = function() {
	if (this._type == undefined) this.setType('marked');
    return this._type;
}
Notification.prototype.setType = function(type) {
    this._type = type;
}

Notification.prototype._autostart;
Notification.prototype.getAutostart = function() {
	if (this._autostart == undefined) this.setType(true);
    return this._autostart;
}
Notification.prototype.setAutostart = function(autostart) {
    this._autostart = autostart;
}

Notification.prototype.getDuration = function() {
    return this._endpoint - this._startpoint;
}

Notification.prototype.getUID = function() {
	if (!this.uid) {
		var newDate = new Date;
		this.uid = newDate.getTime();
	}
	return this.uid;
}

Notification.prototype.toString = function () {
	return "start="+this.getStartpoint()+"&end="+this.getEndpoint()+"&type="+this.getType()+"&autostart="+this.getAutostart()+"&info="+this.getInformation()+"";
}



Notification.prototype.sendToFlash = function() {
	var note_obj = {
			id: this.getId(),
			uid: this.getUID(),
			start: this.getStartpoint(),
			end: this.getEndpoint(),
			type: this.getType(),
			autostart:this.getAutostart(),
			information: this.getInformation()
		};
	getVoDPlayer().sendNotification(note_obj);
}
Notification.prototype.sendUserNoteToFlash = function() {
	var note_obj = {
			id: this.getId(),
			uid: this.getUID(),
			start: this.getStartpoint(),
			end: this.getEndpoint(),
			type: this.getType(),
			autostart:this.getAutostart(),
			information: this.getInformation()
		};
	getVoDPlayer().setupUserNote(note_obj);
}

