

function ismaxlengthTeaser(obj){
	checkTrimTeaser(obj);
	displayLengthTeaser(obj);
}
function checkTrimTeaser(obj) {
	var mlength=obj.attributes["MaxLengthTeaser"].value;
	if (obj.getAttribute && obj.value.length>mlength)
		obj.value=obj.value.substring(0,mlength)
		
}
function displayLengthTeaser(obj) {
    var mlength=obj.attributes["MaxLengthTeaser"].value;
    document.getElementById("dv_teaser").innerHTML = obj.value.length + '/' + mlength;
}

function ismaxlengthTitle(obj){
	checkTrimTitle(obj);
	displayLengthTitle(obj);
}
function checkTrimTitle(obj) {
	var mlength=obj.attributes["MaxLengthTitle"].value;
	if (obj.getAttribute && obj.value.length>mlength)
		obj.value=obj.value.substring(0,mlength)
		
}
function displayLengthTitle(obj) {
    var mlength=obj.attributes["MaxLengthTitle"].value;
    document.getElementById("dv_title").innerHTML = obj.value.length + '/' + mlength;
}




function ismaxlengthEventDescription(obj){
	checkTrimEventDescription(obj);
	displayLengthEventDescription(obj);
}
function checkTrimEventDescription(obj) {
	var mlength=obj.attributes["MaxLengthEventDescription"].value;
	if (obj.getAttribute && obj.value.length>mlength)
		obj.value=obj.value.substring(0,mlength)
		
}
function displayLengthEventDescription(obj) {
    var mlength=obj.attributes["MaxLengthEventDescription"].value;
    document.getElementById("dv_EventDescription").innerHTML = obj.value.length + '/' + mlength;
}

function ismaxlengthEventTitle(obj){
	checkTrimEventTitle(obj);
	displayLengthEventTitle(obj);
}
function checkTrimEventTitle(obj) {
	var mlength=obj.attributes["MaxLengthEventTitle"].value;
	if (obj.getAttribute && obj.value.length>mlength)
		obj.value=obj.value.substring(0,mlength)
		
}
function displayLengthEventTitle(obj) {
    var mlength=obj.attributes["MaxLengthEventTitle"].value;
    document.getElementById("dv_EventTitle").innerHTML = obj.value.length + '/' + mlength;
}