function scroll(laycx,laytx)
{
	if (ns4) {	
		texto = "document."+laycx+".document."+laytx+ ".clip.height";
		textt = "document."+laycx+".document."+laytx+ ".top";
		cax = eval("document."+laycx+ ".clip.height");
		caxt = eval("document."+laycx+ ".top");
	}
	if (ie4) {
		texto ="document.all."+laytx+ ".scrollHeight";
		textt =laytx+".style.top";
		cax = parseInt(eval(laycx+".style.height"));
		caxt = parseInt(eval(laycx+".style.top"));
	}
// definicao dos valores de altura da caixa externa e da caixa de texto
	tex = eval(texto);
	text = parseInt(eval(textt));
// tamanho da rolagem de tela
	scrl = tex - cax;
}

function desce()
{
	if (ns4) {	
			txt = document.cxtx.document.tx.top;
			if (txt > -scrl)
				{
				t = txt-2
				document.cxtx.document.tx.top=t
				}
		}
		else{
			txt = parseInt(tx.style.top);
			if (txt > -scrl)
				{
				t = txt-2
				eval("tx.style.top ="+ t)
				}
		}
	ty = setTimeout('desce()',40);
}



function sobe()
{
	if (ns4) {	
			txt = document.cxtx.document.tx.top;
			if (txt <0 )	{
				t = txt+2
				document.cxtx.document.tx.top=t
				}
		}
	else{
	text = parseInt(tx.style.top);
		if (text < 0)
		{
			t = text+2
			eval(tx.style.top =+ t)
		}
	}
	ty = setTimeout('sobe()',40);
} 
