
if (parent.frames.length != 0)
{
	var frameLink = "Hide Frames";
}
else
{
	var frameLink = "Show Frames";	
}

function toggleFrames()
{
	if (parent.frames.length != 0)
	{
		// eliminate frames
		top.location = self.location;
	}
	else
	{ 
		// load frames
		self.location="docsframe.html";
	}
}


function getLinkHref(linkType, linkName)
{
    // look at children of the head
    var head = document.getElementsByTagName("head").item(0);
    
    var curNode = head.firstChild;
    while (curNode)
    {
        if ((curNode.nodeName.toLowerCase() == "link") &&
            (curNode.getAttribute(linkType) == linkName))
        {
            return curNode.getAttribute("href");
        }
        curNode = curNode.nextSibling;
    }
    
    return "";
}

function goToNext()
{
    var nextDoc = getLinkHref("rel", "next");
    if (nextDoc.length > 0)
        window.location.href = nextDoc;
}

function goToPrev()
{
    var prevDoc = getLinkHref("rev", "prev");
    if (prevDoc.length > 0)
        window.location.href = prevDoc;
}

function styleCurPage()
{
    // look for a child of the "links" element with an href
    // equal to the current page
    var leafname = new RegExp("([^/]+?)(#.+)?$");
    var res = leafname.exec(document.location.href);
    var curFilename = res[1];
    var links = document.getElementById("links");
    if (links)
    {
        var curNode = links.firstChild;
        while (curNode)
        {
            if ((curNode.nodeName.toLowerCase() == "a") &&
                (curNode.getAttribute("href") == curFilename))
            {
                var curClass = curNode.getAttribute("class");
                if (curClass && curClass.length > 0)
                    curClass = curClass + " curpage";
                else
                    curClass = "curpage";
                   
                curNode.setAttribute("class", curClass);
                break;
            }
            curNode = curNode.nextSibling;
        }
    }
}

function onPageLoad()
{
    styleCurPage();
}
