
function initialize()
{
	if(document.getElementById('ecc'))
		document.getElementById('ucc').innerHTML = decrypt(document.getElementById('ecc').value);
}
function decrypt(str)
{
	var offset;
	var nxtChr;
	var strAsc;
	var inx;
	
	strAsc = '';
	offset = parseInt(str.substring(0, 2), 16);
	
	for(inx = 0; inx < str.length/2 - 1; inx++)
	{
		nxtChr = str.substring(2*(inx + 1), 2*(inx + 1) + 2);
		nxtChr = parseInt(nxtChr, 16);
		nxtChr = nxtChr + offset;
		nxtChr = nxtChr % 26;
		nxtChr = nxtChr + 65;
		nxtChr = String.fromCharCode(nxtChr);
		strAsc = strAsc + nxtChr;
	}
	return(strAsc);
}
function textCounter(field, max)
{	var obj;

	if (field.value.length > max)
		field.value = field.value.substring(0, max);
}

