isNav = true;
if (navigator.appName.indexOf("Microsoft") != -1) isNav = false;

hideAnchors=["top","bottom"];

function anchorLayer()
{
	thisPagePath=webroot+'/index.php'+previewControlString+'/page/'+thisPageID;
	anchorList='';
	for(i=0;i<document.anchors.length;i++) 
	{
		showAnchor=true;
		for(x=0;x<hideAnchors.length;x++) // show or hide this anchor?
		{
			if (hideAnchors[x]==document.anchors[i].name){showAnchor=false;}
		}
		if (showAnchor)
		{
			anchorText='';
			if (isNav){anchorText = document.anchors[i].text;}
			else {anchorText = document.anchors[i].innerText;}
			if ((anchorText == null) || (anchorText == '')) {anchorText = document.anchors[i].name};
			anchorList+='<a href="'+thisPagePath+'#'+document.anchors[i].name+'" onclick="a_menu(\'0\')"><nobr>'+anchorText+'</nobr></a><br>\n';
		}
	}
	a_menu(anchorList);
}

function a_menutext(anchorList)
{
	layerText='<table cellpadding="3" cellspacing="0" border="0" bgcolor="#ffffff"><tr align="left" valign="top"><td><table cellpadding="1" cellspacing="0" border="0" bgcolor="#ff6600"><tr align="left" valign="top"><td><table cellpadding="4" cellspacing="0" border="0" bgcolor="#ffffff"><tr align="left" valign="top" bgcolor="#ff6600"><td><font color="#ffffff"><b><nobr>I N D E X</nobr></b></font></td><td align="right"><a href="javascript:a_menu(\'0\')"><img src="'+pubimgroot+'/lrn/close.gif" width="11" height="11" border="0" alt="close"></a></td></tr>';
	layerText+='<tr><td>';
	layerText+=anchorList;
	layerText+='</td><td>&nbsp;</td></tr></table></td></tr></table></td></tr></table>';
}

function a_menu(anchorList)
{
	
	if (anchorList != 0)
	{
		a_menutext(anchorList);
		xx_position(5,-20);
		MM_setTextOfLayer('menuLayer','',layerText);
		MM_showHideLayers('menuLayer','','show');
	}
	else
	{
		MM_showHideLayers('menuLayer','','hide');
	}
}