function CM_WEBCOMPONENT_VIDEOINTERFACE_MODELEMAIL(strName) {
	var me = this;
	this.strName = strName;
	this.objFrom = null;
	this.objEmailHttpRequest = new DHL.NET.HTTPREQUEST();
	this.objErrorContainer = document.getElementById("errorContainer"+this.strName);
	this.intTimeoutId = null;

	CM_WEBCOMPONENT_VIDEOINTERFACE_MODELEMAIL.prototype.setForm = function setForm() {
		this.objForm = objForm;
	}

	CM_WEBCOMPONENT_VIDEOINTERFACE_MODELEMAIL.prototype.onSend = function onSend(objForm) {
		if(!this.blnChanging	) {
			var objUrlReportEmail = new DHL.NET.URL.getCurrent();
			this.objErrorContainer.style.display = "none";

			objForm["email"].value = objForm["email"].value.replace(/\r\n|\n|\t/gi, ",");
			var arrEmail = DHL.NET.EMAIL.parseMultiEmail(objForm["email"].value);
			if(
				arrEmail &&
				arrEmail.length
			) {
				//Validate Email Liste
				strAttributes = 
					"frmName=" + this.strName + "&" +
					"subject=" + objForm["subject"].value + "&" +
					"fromEmail=" + objForm["email"].value + "&" + 
					"message=" + objForm["message"].value;

				this.objEmailHttpRequest.open('POST', objUrlReportEmail, true);
				this.objEmailHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
				this.objEmailHttpRequest.setRequestHeader('Content-length', strAttributes.length);
				this.objEmailHttpRequest.setRequestHeader('Connection', 'close');
				this.objEmailHttpRequest.onreadystatechange(function() {
					me.onSendEmailStateChange();
				});
				this.objEmailHttpRequest.send(strAttributes);

				this.objForm = objForm;
				if(this.objForm["send"]) {
					this.objForm["send"].disabled = true;
				}
			}
			else {
				this.objErrorContainer.innerHTML = "Please enter a valid email.";
				this.objErrorContainer.style.display = "block";
			}
		}
	}

	CM_WEBCOMPONENT_VIDEOINTERFACE_MODELEMAIL.prototype.onSendCountDown = function onSendCountDown(intCurrentSecond) {
		if(intCurrentSecond <= 0) {
			me.objForm["send"].value = "Send";
			me.objForm["send"].disabled = false;
			clearInterval(me.intTimeoutId);
			me.intTimeoutId = null;
		}
		else {
			me.objForm["send"].value = "Send (" + intCurrentSecond + ")";
			setTimeout(function () {
				me.onSendCountDown(--intCurrentSecond);
			}, 1000);
		}
	}

	CM_WEBCOMPONENT_VIDEOINTERFACE_MODELEMAIL.prototype.onSendEmailStateChange = function onSendEmailStateChange() {
		objEmailHttpRequest = me.objEmailHttpRequest;

		if(objEmailHttpRequest.getReadyState() == 4	&& objEmailHttpRequest.getStatus() == 200) {
			if(objEmailHttpRequest.getResponseText()){
				me.blnChanging = false;
				if(objEmailHttpRequest.getResponseText() == 'ok') {
					me.intTimeoutId = setTimeout(function() {
						me.onSendCountDown(29)
					}, 1000);
					alert('Your email has been sent succesfully.');
					me.objForm["email"].value = "";
					me.objForm["subject"].value = "";
					me.objForm["message"].value = "";
				}
			}
		}
	}

}