function contLetras(elemento, maximo) {
	var msg = elemento.value;
	elemento.value = msg.substr(0, maximo);
	
	var n = elemento.value.length;
	document.getElementById("nLetras").innerHTML = maximo - n;
}

function mudarEvento(evento) {
	var todosEventos = new Array();
	var id;
	todosEventos[0] = "autografos";
	todosEventos[1] = "palestra";
	
	for (i = 0; i < todosEventos.length; i++) {
		id = todosEventos[i];
		document.getElementById(id).style.display = "none";
	}
	
	document.getElementById(evento).style.display = "block";
}

function popUp(imgPath, height, width) {
	img = "popup.php?img=" + imgPath;
	window.open(imgPath, "", "height=" + height + ", width=" + width);
}
