unidlist := @DbLookup("":"NoCache";"";"itipsiblingLU";collection;3);
titlelist := @DbLookup("":"NoCache";"";"itipsiblingLU";collection;4);
activeimg := " <img border=\"0\" src=\"" + "/" + @WebDbName + "/threadmap_active.gif" + "\"> ";
inactiveimg := " <img border=\"0\" src=\"" + "/" + @WebDbName + "/threadmap_inactive.gif" + "\"> ";
@If(@IsError(unidlist);"";
@Do(
@For(n:=1; n<=@Elements(unidlist); n:=n+1;
@If(
@Text(unidlist[n])=@Text(@DocumentUniqueID);
linklist := linklist + activeimg + Title + "<br>";
linklist := linklist + inactiveimg + "<a class=\"htool\" href=\""+ "/" + @WebDbName + "/" + @Subset(@ViewTitle;-1) + "/" + @Text(unidlist[n]) + "?opendocument" + "\">" + @Text(titlelist[n]) + "</a><br>"
)
);
@If(
@Elements(unidlist)=1 ; "" ;
"[" + <br><label>Related Topics:</label><br>" + linklist + "]"
)
)
)