function epigraph_load()
{
	var req = new XMLHttpRequest();
	req.open('GET', '/epigraf/', true);
	req.onreadystatechange = function()
	{
		if (this.readyState==4 && this.status==200)
			document.getElementById('righttop').innerHTML = this.responseText;
	}
	req.send(null);
}

window.onload = function()
{
	epigraph_load();
}

function message_keyup(e, id, max)
{
	var ne = document.getElementById(id);
	var n = e.value.length;
	if (n <= max)
		ne.innerHTML = 'Осталось символов: '+(max-n);
	else
		ne.innerHTML = '<span style="color: #933">Слишком длинное сообщение!</span>';
}
