function countChars(submit){
	r = document.getElementById("EventRubrik");
	t = document.getElementById("EventText");
	cLeft = document.getElementById("charsLeft");
	numChars = r.value.length + t.value.length;
	maxChars = 160;
	cLeft.innerHTML = maxChars - numChars;
	
	if ((maxChars - numChars) < 0){
		if (submit == true){
			alert("För många tecken i rubrik och text! \nAnvänd max "+maxChars+" tecken");
		}
		cLeft.innerHTML = '<span class="error">'+(maxChars - numChars)+'</span>';
	//	t.value = t.value.substr(0,t.value.length-1);
		return false;
	}	else {
		
		//cLeft.innerHTML = numChars;
		return true;
	}
}