function showQuote(el, qt)
{
	el.style.display = "none";
	qt = document.getElementById(qt);

	qt.style.display = "";
	
	var newHeight = qt.offsetHeight;
	qt.style.overflow = "hidden";
	qt.style.height = "1px";

	attributes = { height: {to: newHeight }};
	var anim = new YAHOO.util.Anim(qt, attributes, 1, YAHOO.util.Easing.easeOut);
	anim.duration = .5;
	anim.animate();
}

function autoIncreaseHeight(txt, event)
{
	var ctrl = false;
	var keyCode = event.keyCode;
	
	if(document.all)
		ctrl = event.ctrlKey
	else
		ctrl = event.ctrlKey
	
	if(ctrl)
	{
		if(keyCode == 40 && txt.rows < 20)
			txt.rows++;
		
		if(keyCode == 38 && txt.rows > 5)
			txt.rows--;
	}
}

function trimMaxLength(txt)
{
	var max = txt.attributes["maxLength"].value;
	if(txt.value.length > max)
		txt.value = txt.value.substring(0, max);
}

var lastKeyCount = -1;
function displayRemainingLength(txt, spanId)
{
	lastKeyCount++;
	if(lastKeyCount % 2 > 0)
		return
		
	var span = document.getElementById(spanId);
	var max = txt.attributes["maxLength"].value;
	span.innerHTML = max - txt.value.length;
}