function c_person (personId, photographerId, ownerId, firstname, surname, company, email, url, cameraId, wmWidth, wmHeight, wmXPos, wmYPos) { this.personId = this._personId = personId; this.photographerId = this._photographerId = photographerId; this.ownerId = this._ownerId = ownerId; this.firstname = this._firstname = firstname; this.surname = this._surname = surname; this.company = this._company = company; this.email = this._company = email; this.url = this._url = url; this.cameraId = this._cameraId = cameraId; this.wmWidth = this._wmWidth = wmWidth; this.wmHeight = this._wmHeight = wmHeight; this.wmXPos = this._wmXPos = wmXPos; this.wmYPos = this._wmYPos = wmYPos; this.personForm = null; this.connect = function (personForm) { this.personForm = personForm; } this.reset = function () { if (this.personId != -1) { this.personId = -1; this.photographerId = -1; this.ownerId = -1; this.firstname = ''; this.surname = ''; this.company = ''; this.email = ''; this.url = ''; this.cameraId = -1; this.wmWidth = ''; this.wmHeight = ''; this.wmXPos = ''; this.wmYPos = ''; if (this.personForm != null) this.personForm.updateForm (); } } this.update = function (p) { if (this.personId != p.personId) { this.personId = p.personId; this.photographerId = p.photographerId; this.ownerId = p.ownerId; this.firstname = p.firstname; this.surname = p.surname; this.company = p.company; this.email = p.email; this.url = p.url; this.cameraId = p.cameraId; this.wmWidth = p.wmWidth; this.wmHeight = p.wmHeight; this.wmXPos = p.wmXPos; this.wmYPos = p.wmYPos; if (this.personForm != null) this.personForm.updateForm (); } } }