secid=['PINKAL','REDRIA','ORAN','YELLOWBOZE','WHITILL','VIRIDIA','GREENILL','SKYLY','BLUEFULL','PURPLENUM'];

function getid(Z)
	{
	N=gid('result');
	if(N.firstChild)
		{
		N.removeChild(N.firstChild);
		}
	CName=gtni('input',0).value;
	res=0;
	u=0;
	if(gtni('input',2).checked){Z=5;}
	else{if(CName.length>10){alert('Character names in Blue Burst are limited to 10 characters.');return}}
	for(i=0;i<CName.length;i++)
		{
		V=CName.charCodeAt(i);
		if(V>127)
				{
				u=2;
				if(window.location.toString().indexOf('debug')>0)
					{
					alert('CName['+i+']='+V+' (0x'+V.toString(16)+')');
					}
				}
		res+=V;
		}
	if(window.location.toString().indexOf('debug')>0)
		{
		if(u)
			{
			alert('Unicode Mode on. Offset (u) = +2. Check Hybrid...');
			for(i=0;i<CName.length;i++)
				{
				V=CName.charCodeAt(i)
				if(V<128)
					{
					alert('Hybrid mode on. Offset (u) = +7');
					u=7;
					break;
					}
				}
			}
		}
	res+=Z;
	res-=u;
	X=res.toString();
	Y=X.charAt(X.length-1);

	RES=ce('div');
	TEX=ctn('Your Section ID is: ');
	BID=ce('b');
	PAR=ce('p');
	IMG=ce('img');

	RES.appendChild(TEX);
	BID.appendChild(ctn(secid[Y]));
	RES.appendChild(BID);
	IMG.src='icon/'+Y+'.gif';
	IMG.setAttribute('alt','['+secid[Y]+']');
	PAR.appendChild(IMG);
	RES.appendChild(PAR);
	N.appendChild(RES);
	}

function lenfix(X)
	{
	N=gtni('span',0);
	S=gtni(N,'input',0).value;
	M=S.length;
	if(M>10){M=10;}
	O=S.substring(0,M);
	N.removeChild(N.lastChild);
	F=ce('input');
	V=(X)?'13':'10';
	F.setAttribute('size',V);
	F.setAttribute('maxlength',V);
	F.value=O;
	N.appendChild(F);
	}