
function buildDepth(iterations)
{
    var iterations=iterations-3;
    var depthStr="";
    for (i=0;i<iterations;i++)
    {
        depthStr=depthStr + "../";
    }
    return depthStr;
}

function buildBreadCrumbTrail()
{
    var constituentFolders = new Array();
    var currentURL = document.location.toString();
    constituentFolders=currentURL.split("/");
    var outputStr="";
    outputStr=outputStr + "<span class=uplinks>Up to: <a href='" + buildDepth((constituentFolders.length-3)+1) + "'>Homepage</a>";
    for (count=4;count<(constituentFolders.length-2);count++)
    {
        outputStr=outputStr + " -> <a href='" + buildDepth((constituentFolders.length-count)+1) + "'>" + constituentFolders[count] + "</a>";
    }
/*        outputStr=outputStr + "</span><p><h1 class=uplinks>Index of: " + constituentFolders[constituentFolders.length-2] + "</h1>";  */
        outputStr=outputStr + " -> " + constituentFolders[constituentFolders.length-2] + "</span>";

    document.write(outputStr);
}


function buildTitle()
{
    var constituentFolders = new Array();
    var currentURL = document.location.toString();
    constituentFolders=currentURL.split("/");
    var outputStr= "<title>Directory listing for: " + constituentFolders[constituentFolders.length-2] + "</title>";
    document.write(outputStr);
}