<script>
// start included member getParms.inc
const str = top.location.search;
indexOption = "default";
if (str.toLowerCase().includes("index=chapter")) 
{
    indexOption='chapter';
}
if (str.toLowerCase().includes("watermark=no")) 
{
    setTimeout(clearBG,1000);
}
if (str.toLowerCase().includes("smoothscroll=no")) 
{
    setTimeout(clearScroll,1000);
}
function clearBG()
{
    document.body.style.backgroundImage = 'none';
}
function clearScroll()
{
    document.documentElement.style.scrollBehavior = 'auto';
}
</script>
<script>
function getidx() 
{
    mainName='MAGEC'+self.location.pathname.substr(0,self.location.pathname.indexOf('_'));
    idxName=self.location.pathname.replace('main','idx');
    //alert('mainName='+mainName+', idxName='+idxName); // debug

    parent.document.title = mainName.toUpperCase();
    if   (parent.IDX.location.pathname == idxName)
    {
        // leave the sidebar alone, it is OK
    //    alert(parent.IDX.location.pathname)
    }
    else 
    {
        if((parent.IDX.location.pathname == "/DOC/masteridx.htm")
         && (indexOption != 'chapter') ) 
        {
        //    alert(parent.IDX.location.pathname)
            // leave the sidebar alone, it is OK
        }
        else
        {
            parent.IDX.location.pathname = idxName;
        }
    }
    window.parent.TAB.document.getElementById('DUMBFORM').style.visibility='visible';
}
</script>
<style>
  #goBackBtn {
    position: fixed;
    //bottom: 20px;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background-color: #003366;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  }
  #goBackBtn:hover {
    background-color: #00509e;
  }
</style>

<script> 
function goBackOne()
{
     window.history.back();
}
</script>