// oElem - reference to element to modify. Typically a Hn
// sCaption - New caption for the element
// bShow - boolean indicating whether or not the element should be made visible
function SetExpandableCaption(oElem, sCaption, bShow)
{
oElem.innerText = sCaption;
if (bShow) oElem.style.display = 'inline';
}
// Set the caption for the TOC menu, and fix up the href. IE4 only
function SetTOC()
{
var sProjectRoot1 = "/d3drm/";
var sProjectRoot2 = "\\d3drm\\";
if (typeof(AM_ICP_mnuToc) != 'object'){
alert('\n\n\nMessage 001 generated by common.js script module in function SetTOC() .\n\n\nTable of Contents menu is not properly set up.\nShow/Hide Contents menu was not detected.\n\n\n');
return;
}
// build a string for the 'Show Contents' case
var sPath = location.pathname;
var sMask = (location.href.indexOf('ttp://') > 0) ? sProjectRoot1 : sProjectRoot2;
if (sPath.lastIndexOf(sMask) < 0) // doc isn't located under proper project
{
AM_ICP_mnuToc.style.visibility = "hidden"; // in case the style sheet wasn't hooked up
alert('\n\n\nMessage 002 generated by common.js script module in function SetTOC() .\n\n\nCurrent project location does not match mask expected settings.\nCurrent project root settings:\n sProjectRoot1: "' + sProjectRoot1 + '"\n or\n sProjectRoot2: "' + sProjectRoot2 + '"\n\n\n');
return;
}
var iStart = sPath.lastIndexOf(sMask)+sMask.length;