// Related items

var relatedStr = unescape(document.forms[0].RelatedItems.value);
var relatedList = relatedStr.split(';');

if (relatedList != "") {
document.write('<br><div class="sidetext" style="position: relative;left:5px;padding: 0px;width:138px;"><span class="intro">Related items</span><br><ul>');
for (var i = 0; i < relatedList.length; i ++)
 {
 if (i > 0){
 document.write('<li>... <a href="articleIDs/',getEnd(relatedList[i],'|'),'">');
 document.write(getFront(relatedList[i],'|'),'</a></li>');
}
else {
 document.write('<li><a href="articleIDs/',getEnd(relatedList[i],'|'),'">');
 document.write(getFront(relatedList[i],'|'),'</a></li>');
}

  }
document.write('</ul></div>');
}

// In this section

var thissectStr = unescape(document.forms[0].InThisSection.value);
var thissectList = thissectStr.split(';');

if (thissectList != "") {
document.write('<br><div class="sidetext" style="position: relative;left:5px;padding: 0px;width:138px;"><span class="intro">In this section</span><br><ul>');
// only display 5 items
if (thissectList.length > 6) {thissectList.length = 6}
for (var i = 0; i < thissectList.length; i ++) {
  document.write('<li><a href="articleIDs/',getEnd(thissectList[i],'|'),'">');
  document.write(getFront(thissectList[i],'|'),'</a></li>');
 }
if (thissectList.length > 5) {
document.write('<li><a href="index?open&type=Sections&cat=',document.forms[0].Section.value,'">More...</a></li>');
}
document.write('</ul></div>');
}

// Categories

var thiscatStr = unescape(document.forms[0].Categories.value);
var thiscatList = thiscatStr.split(';');
if (thiscatStr != "") {
 document.write('<br><div class="sidetext" style="position: relative;left:5px;padding: 0px;width:138px;"><span class="intro">Research topics</span><br><ul>');
 for (var i = 0; i < thiscatList.length; i ++) {
   nospacethiscatList = thiscatList[i].replace(/ /ig, "+");
   document.write('<li><a href="index?open&type=Keywords&cat=',nospacethiscatList,'&count=50">');
   document.write(thiscatList[i],'</a></li>');
  }
 document.write('</ul></div>'); 
}