function Folder(folderDescription, hreference,parentid,target) {
//constant data;
this.desc = folderDescription;
this.parentid=parentid;
this.hreference = hreference;
this.target=target;
this.id = index;
this.navObj = 0;
this.iconImg = 0;
this.nodeImg = 0;
this.isLastNode = 0;
// dynamic data
this.isRoot = true;
this.isOpen = true;
this.iconSrc=http://www.163design.net/p/b/imageURL+"ftv2folderopen.gif";
this.iconRoot =http://www.163design.net/p/b/imageURL+"ftv2folderopen.gif";
this.children = new Array;
this.nChildren = 0;
// methods
this.initialize = initializeFolder;
this.setState = setStateFolder;
this.addChild = addChild;
this.createIndex = createEntryIndex;
this.hide = hideFolder;
this.display = display;
this.renderOb = drawFolder;
this.totalHeight = totalHeight;
this.subEntries = folderSubEntries;
this.outputLink = outputFolderLink;
}
function setStateFolder(isOpen) {
var subEntries;
var totalHeight;
var fIt = 0;
var i = 0;
if(isOpen == this.isOpen)
return;
if(browserVersion == 2) {
totalHeight = 0
for(i = 0; i < this.nChildren; i++)
totalHeight = totalHeight + this.children[i].navObj.clip.height;
subEntries = this.subEntries();
if(this.isOpen)
totalHeight = 0 - totalHeight;
for(fIt = this.id + subEntries + 1; fIt < nEntries; fIt++)
indexOfEntries[fIt].navObj.moveBy(0, totalHeight);
}
this.isOpen = isOpen;
propagateChangesInState(this);
}
function propagateChangesInState(folder) {
var i = 0;
if(folder.isOpen) {
if(folder.nodeImg) {
if(folder.isLastNode)
folder.nodeImg.src = imageURL+"ftv2mlastnode.gif";
else
folder.nodeImg.src = imageURL+"ftv2mnode.gif";
}
if(this.isRoot)
folder.iconImg.src = imageURL+"ftv2_mail.gif";
else
folder.iconImg.src = http://www.163design.net/p/b/imageURL+"ftv2folderopen.gif";
for(i = 0; i < folder.nChildr