rem:   if (dirObj && siteIndex >= 0 && urlLen > siteUrlLen) dirObj.value = FormatDirForPublishing(docUrl.slice(siteUrlLen));  
context: function FindSiteIndexAndDocDir(publishSiteData, docUrl, dirObj){  if (dirObj)    dirObj.value = "";  if (!publishSiteData || !docUrl || GetScheme(docUrl) == "file")    return -1;  // Remove filename from docUrl  // (Check for terminal "/" so docUrl param can be a directory path)  if (docUrl.charAt(docUrl.length-1) != "/")  {    var lastSlash = docUrl.lastIndexOf("/");    docUrl = docUrl.slice(0, lastSlash+1);  }  var siteIndex = -1;  var siteUrlLen = 0;  var urlLen = docUrl.length;    for (var i = 0; i < publishSiteData.length; i++)  {    // Site publish or browse url needs to be contained in document URL,    //  but that may also have a directory after the site base URL    //  So we must examine all records to find the site URL that best    //    matches the document URL (XXX is this right?)    var len = GetMatchingPublishUrlLength(publishSiteData[i], docUrl);    if (len > siteUrlLen)    {      siteIndex = i;      siteUrlLen = len;    }  }  // Get directory name from the end of url  if (dirObj && siteIndex >= 0 && urlLen > siteUrlLen)    dirObj.value = FormatDirForPublishing(docUrl.slice(siteUrlLen));  return siteIndex;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/d91b053f419d4d0175bdb25deed21f7800ac5c27/publishprefs.js/buggy/editor/ui/composer/content/publishprefs.js