$.fn.zebraItems = function(item) {
	$(item, this).removeClass("even").removeClass("odd");
	$(item + ":nth-child(even)", this).addClass("even");
	$(item + "LI:nth-child(odd)", this).addClass("odd");
};

function toggleEditor(id) {
	if (!tinyMCE.get(id))
		tinyMCE.execCommand('mceAddControl', false, id);
	else
		tinyMCE.execCommand('mceRemoveControl', false, id);
}

function textarea() {
	var maximos = new Array();
	$("textarea").attr("maxlength",function(i) {
		if (maximos[i] = this.getAttribute('maxlength')) {
			$(this).keypress(function(event) {
				return ((event.which == 8)|| (event.which == 9) || (this.value.length < maximos[i]));
			})
		}
	});
}

