/* Script by Mark Demeny, Watchfire, markd at watchfire dot com 
For customer support, go to https :// www . watchfire . com / securearea / login.aspx */

function wffEncode(input)
{
    output = escape(input);
    output = output.replace(/\./g, "_"); 
    return output; 
} 

var wfsPathInfo = location.pathname.substr(1).toLowerCase(); 
var wfbSetTag = false;                                       

wfbSetTag = true;

if (wfbSetTag)
{
    
    var wfaCategories = wfsPathInfo.split("/");
    var wfsFileName = wfaCategories[wfaCategories.length-1];
    var wfsUniqueID = wfsPathInfo;
    
    wfsDisplayName = wfsFileName;
    
    var wfsHierarchy = "";
    for (wfIndex=0; wfIndex < wfaCategories.length-1; wfIndex++)
    {
        wfsHierarchy = wfsHierarchy + wfaCategories[wfIndex]
        if (wfIndex < (wfaCategories.length-2))
        {
            wfsHierarchy = wfsHierarchy + ".";
        }
    }
    
    var wfsIval = "uniqueid=" + location.host + "/" + wfsUniqueID + "&dn=" + wfsDisplayName + "&hp=" + wffEncode(location.host) + "." + wfsHierarchy;

    document.write("<form name=wf_identityForm>");
    document.write("<input type=hidden name=\"na\" value=\"" + wfsIval + "\">");
    document.write("</form>");
    // alert("<!-- " + wfsIval + "-->");
}