bsp;left = parseInt((doc.body.clientWidth-ldg.offsetWidth)/2);
}; ldg.innerHTML = "<div align=\"center\">Now Counting...</div>";
wnd.status = "NCC Counting...";
if (!this._fsoObj.FolderExists(folderpathStr)) {
this.countSingleFile(folderpathStr);
} else {
var cnt = 0;
function iterator(folderpathStr) {
var a = NCC._fsoObj.getFolder(folderpathStr);
var e = new Enumerator(a.files)
for (; !e.atEnd(); e.moveNext()) {
NCC.countSingleFile(e.item());
if (cnt++>=NCC._maxloop) return;
}
var f = new Enumerator(a.subFolders)
for (; !f.atEnd(); f.moveNext()) {
iterator(f.item());
if (cnt++>=NCC._maxloop) return;
}
}
iterator(folderpathStr);
}
ldg.innerHTML = "<div align=\"center\">NCC Count Completely.</div>"
wnd.status = "NCC Count Completely.";
wnd.setTimeout(function(){ldg.style.display = "none";},3000);
};
NCC.countSingleFile = function(filepathStr)
{
var x, a, f, e;
var ldg = doc.all("loading");
if (!this._fsoObj.FileExists(filepathStr)) return false;
f = this._fsoObj.GetFile(filepathStr);
if (this.chkFileExts(f.name))
{
var o = f.openAsTextStream(1);
if (o.atEndOfStream) { x = ""; } else { x = o.ReadAll(); }
x = x.replace(/(\n|\r)+/mg,"$1");
a = x.split("\n");
e = this.getFileExts(f.name);
this._bytes["total"] += x.length;
this._bytes[e] ? this._bytes[e]+=x.length : this._bytes[e]=x.length;
this._lines["total"] += a.length;
this._lines[e] ? this._lines[e]+=a.length : this._lines[e