window.onload = function() {
	x = document.getElementsByTagName("lj");
	for (i=0;i<x.length;i++) {
		if (x[i].getAttribute("user")) {
			ljuser = x[i].getAttribute("user");
			
			aInfo = document.createElement("a");
			aInfo.setAttribute("href","http://www.livejournal.com/userinfo.bml?user="+ljuser);

			imgIcon = document.createElement("img");
			imgIcon.setAttribute("src","http://stat.livejournal.com/img/userinfo.gif");
			imgIcon.setAttribute("style","height: 17px; width: 17px; vertical-align: bottom; border: 0px;");
			imgIcon.setAttribute("align","absmiddle");

			aLJ = document.createElement("a");
			aLJ.setAttribute("href","http://www.livejournal.com/users/"+ljuser+"/");
			aLJ.setAttribute("style","text-decoration: none;");

			bLJuser = document.createElement("b");

			ljNode = document.createTextNode(ljuser);

			bLJuser.appendChild(ljNode);
			aLJ.appendChild(bLJuser);
			aInfo.appendChild(imgIcon);
			
			x[i].parentNode.insertBefore(aInfo,x[i]);
			x[i].parentNode.insertBefore(aLJ,x[i]);
			x[i].parentNode.removeChild(x[i]);
		}
	}
}
