Please get. name +) if (browserVersion0) {doc. write (onClickJavaScript: clickOnFolder (+ this. id +)} doc. write ()} elsedoc. write (A) function outputFolderLink (){
If (this. hreference & this.tar get ){
Doc. write ("
If (browserVersion> 0 ){
Doc. write ("onClick = 'javascript: clickOnFolder (" + this. id + ")'")
}
Doc. write ("> ")
}
Else
Doc. write ("")
}
Function addChild (childNode ){
Selectfile [fEntries] = childNode. desc;
FEntries ++;
This. children [this. nChildren] = childNode;
This. nChildren ++;
Return (childNode );
}
Function folderSubEntries (){
Var I = 0;
Var se = this. nChildren;
For (I = 0; I <this. nChildren; I ++ ){
If (this. children [I]. children) // is a folder
Se = se + this. children [I]. subEntries ();
}
Return (se)
}
// Definition of class Item (a document or link inside a Folder)
Function Item (itemDescription, hreference, itemLink, itemImg, parentid) // Constructor
{
// Constant data
This. desc = itemDescription
This. link = itemLink
This. hreference = hreference;
This. id = index;
This. navObj = 0; // initialized in render ()
This. iconImg = 0; // initialized in render ()
// IconSrc Jun tumor Li Deng chulao solid tumor quite old Yi a liquor fishing robe Jun ga ba tumor Li and recommended le grade waste eggplant promotion (Gezhi)
This. iconSrc = itemImg;
// Methods
This. initialize = initializeItem;
This. createIndex = createEntryIndex;
This. hide = hideItem;
This. display = display;
This. renderOb = drawItem;
This. totalHeight = totalHeight;
This. parentid = parentid;
// Alert (this. parent );
}
Function hideItem (){
If (browserVersion = 1 ){
If (this. navObj. style. display = "none ")
Return;
This. navObj. style. display = "none"
}
Else {
If (this. navObj. visibility = "hiden ")
Return;
This. navObj. visibility = "hiden ";
}
}
Function initializeItem (level, lastNode, leftSide ){
This. createIndex ();
If (level> 0 ){
If (lastNode) {// the last 'Brother 'in the children array
This. renderOb (leftSide + "")
LeftSide = leftSide + ""
}
Else {
This. renderOb (leftSide + "")
LeftSide = leftSide + ""
}
}
Else
This. renderOb ("")
}
Function drawItem (leftSide ){
If (browserVersion = 2)
Doc. write (" ");
Doc. write ("
If (browserVersion = 1)
Doc. write ("ID = 'item" + this. id + "'style = 'position: block ;'");
Doc. write ("BORDER = 0 CELLSPACING = 0 CELLPADDING = 0> ");
Doc. write ("");
Doc. write (leftSide );
If (this. link! = "") Doc. write ("");
Doc. write ("doc. write (" SRC = '"+ this. iconSrc +" 'border = 0> ")
If (this. link! = "")
Doc. write ("");
Doc. write ("");
Doc. write ("");
If (USETEXTLINKS ){
If (this. link! = "")
Doc. write ("'+ this. desc + "");
Else
Doc. write (this. desc );
}
Else {
Doc. write (this. desc );
}
Doc. write ("");
Doc. write ("")
If (browserVersion = 2)
Doc. write (" ");
If (browserVersion = 1 ){
This. navObj = doc. all ["item" + this. id]
This. iconImg = doc. all ["itemIcon" + this. id]
}
Else if (browserVersion = 2 ){
This. navObj = doc. layers ["item" + this. id];
This. iconImg = this.navObj.doc ument. images ["itemIcon" + this. id];
Doc. yPos = doc. yPos + this. navObj. clip. height;
}
}
Function addposition (id, str1 ){
If (id> 0 ){
ClickedFolder = indexOfEntries [id];
Parentid = clickedFolder. parentid;
Parentname = indexOfEntries [parentid];
Pa = parentname. desc;
If (parentid = 0) str = pa + str1;
Else str = '->' + pa + str1;
Addposition (parentid, str );
}
}
Var str = "";
Function veiwFile (msg ){
Var typeLogo = typeof top. logo;
If (typeLogo = "undefined") return;
Var tpyeFrame = typeof top. logo. top1;
If (tpyeFrame = "undefined") return;
ObjDocument = top. logo. top1;
Var folderText = "";
If (msg = 0) folderText = selectfile [msg];
Else {
Str = '->' + selectfile [msg];
Addposition (msg, str );
FolderText = str;
}
ObjDocument.doc ument. open ();
ObjDocument.doc ument. write ('Current location: '+ folderText + "");
ObjDocument.doc ument. close ();
}
// Methods common to both objects (pseudo-inheritance)
Function display (){
If (browserVersion = 1)
This. navObj. style. display = "block ";
Else
This. navObj. visibility = "show ";
}
Function createEntryIndex (){
IndexOfEntries [nEntries] = this;
NEntries ++;
}
// Total height of subEntries open
Function totalHeight () {// used with browserVersion = 2
Var h = this. navObj. clip. height;
Var I = 0;
If (this. isOpen) {// is a folder and _ is _ open
For (I = 0; I <this. nChildren; I ++)
H = h + this. children [I]. totalHeight ();
}
Return h
}
// Events
Function clickOnFolder (folderId ){
Var clicked = indexOfEntries [folderId];
If (! Clicked. isOpen)
ClickOnNode (folderId );
If (clicked. isSelected)
Return;
}
Function clickOnNode (folderId ){
Var clickedFolder = 0;
Var state = 0;
ClickedFolder = indexOfEntries [folderId];
State = clickedFolder. isOpen;
If (! State ){
If(clickedfolder.targetshareclickedfolder.tar get. location = clickedFolder. hreference; // the related link page is displayed when you click folder.
VeiwFile (folderId );
}
ClickedFolder. setState (! State); // open <-> close
}
Function initializeDocument (){
If (doc. all)
BrowserVersion = 1; // IE4
Else if (doc. layers)
BrowserVersion = 2; // NS4
Else
BrowserVersion = 0; // other
FoldersTree. initialize (0, 1 ,"");
// FoldersTree. display ();
If (browserVersion> 0 ){
Doc. write (" ");
// Close the whole tree
ClickOnNode (0 );
// Open the root folder
ClickOnNode (0 );
}
}
// Auxiliary Functions for Folder-Treee backward compatibility
Function gFldr (description, hreference, parentid, target ){
Var des;
Index ++;
If (fEntries = 0 ){
Selectfile [fEntries] = description;
FEntries ++;
}
Des = description;
Folder = new Folder (des, hreference, parentid, target );
Return (folder );
}
Function gLnk (target, description, linkData, itemImg, parentid ){
FullLink = ""
If (target = 0 | target = ""){
If (linkData! = "")
FullLink = "'" + linkData + "'target = \" _ blank \ ""; // displayed in the new form
Else
FullLink = "";
}
If (target = 1 ){
If (linkData! = "")
FullLink = "'" + linkData + "'target = \" _ slef \ ""; // display it in the frame or form of the form
Else
FullLink = "";
}
Else if (target = 2 ){
If (linkData! = "")
FullLink = "'" + linkData + "'target = \" _ parent \ ""; // display it in the parent frame of the framework containing the form
Else
FullLink = "";
}
Else if (target = 3 ){
If (linkData! = "")
FullLink = "'" + linkData + "'target = \" _ top \ ""; // displayed in the top-level form
Else
FullLink = "";
}
Else {// alert (target );
If (linkData! = "")
FullLink = "'" + linkData + "'target =" + TARGET; // displayed in the target form
Else
FullLink = "";
}
Index ++; // current node number
LinkItem = new Item (description, linkData, fullLink, itemImg, parentid)
Return linkItem
}
Function insFldr (parentFolder, childFolder, target, hreference ){
Var child;
Var desc;
Parentid = parentFolder. id;
Child = gFldr (childFolder, hreference, parentid, target );
Return (parentFolder. addChild (child ));
}
Function insDoc (parentFolder, target, description, linkData, itemImg ){
Var document;
Var itemImg;
ItemImg = imageURL + "bu.gif ";
Var desc;
Parentid = parentFolder. id;
Document = gLnk (target, description, linkData, itemImg, parentid );
ParentFolder. addChild (document );
}
Function setObjDocument (msg ){
If (msg! = Null ){
ObjDocument = msg;
}
}
// Set the image path to expand or contract
Function setImageURL (msg ){
If (msg = null ){
ImageURL = "../leftfiles/images /";
} Else imageURL = msg;
}
// Set the hyperlink text color
Function setLinkColor (msg ){
LinkColor = msg;
}
Function setFloderColor (msg ){
FloderColor = msg;
}
// Global variables
USETEXTLINKS = 1;
IndexOfEntries = new Array;
NEntries = 0;
Index =-1; // Node ID
Doc = document;
BrowserVersion = 0;
SelectedFolder = 0;
Selectfile = new Array;
FEntries = 0;
Var objDocument, imageURL;
Var linkColor = "# 085dde ";
Var floderColor = "#292c08 ";
Var type1 = typeof top. logo;
If (type1 = "undefined "){
ObjDocument = null;
}
If (imageURL = null ){
SetImageURL (imageURL );
}