private static string GetID(string strFileName)
{
if(strFileName == null) { Debug.Assert(false); return string.Empty; }
string str = strFileName;
if(str.Length == 0) return string.Empty;
char chFirst = str[0];
if((chFirst == 'B') || (chFirst == 'b'))
{
int pL = str.IndexOf('_');
int pR = str.LastIndexOf('.');
if((pL >= 0) && (pR > pL))
str = str.Substring(pL + 1, pR - pL - 1);
else if(pL >= 0)
str = str.Substring(pL + 1);
}
else str = UrlUtil.StripExtension(str);
return str.ToLowerInvariant();
}