📄 index-ec.jsp
字号:
for (var i = 0; i <= this.count; i++) {
if (this.entry[i]) {
this.maxHeight += getDHTMLObjHeight(this.container + '.document', 'entryDIV' + i);
}
}
} else {
if ((this.lastPMClicked > 0) && theBrowser.mustMoveAfterLoad && this.autoScrolling) {
this.scrollTo(this.lastPMClicked);
}
}
}
function MenuDrawALevel(firstItem, indentStr, isVisible, theDoc) {
var currEntry = firstItem;
var padImg = "";
var aLine = "";
var theLevel = "";
var e = null;
while (currEntry > -1) {
e = this.entry[currEntry];
aLine = e.draw(indentStr);
if (theBrowser.hasDHTML) {
aLine = '<DIV ID="entryDIV' + currEntry + '" CLASS="menuItem">' + aLine + '</DIV>';
} else {
aLine += '<BR CLEAR="ALL">';
}
theBrowser.lineByLine = true;
if (theBrowser.lineByLine) {theDoc.writeln(aLine);} else {theLevel += aLine;}
if ((e.FirstChild > -1) && ((theBrowser.hasDHTML || (e.isopen && isVisible)))) {
padImg = (e.noOutlineImg) ? '' : this.imgStore.getTag((e.nextItem == -1) ? 'iconBlank' : 'iconLine', '', '');
theLevel += this.drawALevel(e.FirstChild, indentStr + padImg, (e.isopen && isVisible), theDoc);
}
currEntry = e.nextItem;
}
return theLevel;
}
function MenuRefresh() {
if (theBrowser.hasDHTML) {
if (!this.amBusy) {
this.refreshDHTML();
if (this.autoScrolling) {this.scrollTo(this.lastPMClicked);}
}
} else {
this.reload();
}
}
function MenuReload() {
if (!this.amBusy) {
this.amBusy = true;
var l = eval(this.container).location;
var rm = theBrowser.reloadMethod;
var newLoc = fixPath(l.pathname);
if (theBrowser.code == 'OP') {var d = new Date(); newLoc += '?' + d.getTime();}
if (this.autoScrolling && (this.lastPMClicked > 0) && !theBrowser.mustMoveAfterLoad) {
newLoc += "#joustEntry" + this.lastPMClicked;
}
if (rm == 'replace') {
l.replace(newLoc);
} else {
if (rm == 'reload') {
l.reload();
} else {
if (rm == 'timeout') {
setTimeout(this.container + ".location.href ='" + newLoc + "';", 100);
} else {
l.href = newLoc;
}
}
}
}
}
function MenuRefreshDHTML() {
var nextItemArray = new simpleArray;
var currEntry = this.firstEntry;
var level = (currEntry == -1) ? 0 : 1;
var isVisible = true;
var lastVisibleLevel = 1;
var co = eval(this.container);
var yPos = co.menuStart;
var d = this.container + '.document';
var e = null;var s = null;
while (level > 0) {
e = this.entry[currEntry];
s = getDHTMLObj(d, 'entryDIV' + currEntry);
if (isVisible) {
s.top = yPos;
s.visibility = 'visible';
yPos += getDHTMLObjHeight(d, 'entryDIV' + currEntry);
lastVisibleLevel = level;
} else {
s.visibility = 'hidden';
}
if (e.FirstChild > -1) {
isVisible = (e.isopen == true) && isVisible;
nextItemArray[level++] = e.nextItem;
currEntry = e.FirstChild;
} else {
if (e.nextItem != -1) {
currEntry = e.nextItem;
} else {
while (level > 0) {
if (nextItemArray[--level] != -1) {
currEntry = nextItemArray[level];
isVisible = (lastVisibleLevel >= level);
break;
}
}
}
}
}
this.maxHeight = yPos;
co.setMenuHeight(yPos);
}
function MenuScrollTo(entryNo) {
if (theBrowser.hasDHTML) {
var e = this.entry[entryNo];
if (!e) {return;}
var co = eval(this.container);
var d = this.container + '.document';
var srTop = getDHTMLObjTop(getDHTMLObj(d, 'entryDIV' + entryNo));
var srBot = (e.nextItem > 0) ? getDHTMLObjTop(getDHTMLObj(d, 'entryDIV' + e.nextItem)) : this.maxHeight;
if (theBrowser.code == 'MSIE') {
var curTop = co.document.body.scrollTop;
var curBot = curTop + co.document.body.clientHeight;
} else {
var curTop = co.pageYOffset;
var curBot = curTop + co.innerHeight;
}
if ((srBot > curBot) || (srTop < curTop)) {
var scrBy = srBot - curBot;
if (srTop < (curTop + scrBy)) {scrBy = srTop - curTop;}
co.setTimeout('self.scrollBy(0, ' + scrBy + ');', 100);
}
} else {
var l = eval(this.container).location.pathname + '#joustEntry' + entryNo;
setTimeout(this.container + '.location.href = "' + l + '";', 100);
}
}
function MenuItemClicked(entryNo, fromToggle) {
var r = true;
var e = this.entry[entryNo];
var w = this.contentWin();
var b = theBrowser;
this.selectEntry(entryNo);
if (this.wizardInstalled) {w.menuItemClicked(entryNo);}
if(e.onClickFunc) {e.onClick = e.onClickFunc;}
if(e.onClick) {var me=e;if(eval(e.onClick) == false) {r = false;}}
if (r) {
if (((this.toggleOnLink) && (e.FirstChild != -1) && !(fromToggle)) || e.noOutlineImg) {
if (b.hasDHTML) {
this.toggle(entryNo, true);
} else {
setTimeout(this.name + '.toggle(' + entryNo + ', true);', 100);
}
}
}
return (r) ? r : (e.url != '');
}
function MenuSelectEntry(entryNo) {
var e = this.entry[entryNo];
if (e) {
var oe = this.entry[this.selectedEntry];
if (oe) {oe.setSelected(false);}
this.selectedEntry = entryNo;
e.setSelected(true);
}
}
function MenuSetEntry(entryNo, state) {
var cl = ',' + entryNo + ',';
var e = this.entry[entryNo];
this.lastPMClicked = entryNo;
var mc = e.setIsOpen(state);
var p = e.parent;
while (p >= 0) {
cl += p + ',';
e = this.entry[p];
mc |= (e.setIsOpen(true));
p = e.parent;
}
if (this.modalFolders) {
for (var i = 0; i <= this.count; i++) {
e = this.entry[i];
if ((cl.indexOf(',' + i + ',') < 0) && e) {mc |= e.setIsOpen(false);}
}
}
return mc;
}
function MenuSetEntryByURL(theURL, state) {
var i = this.findEntry(theURL, 'url', 'right', 0);
return (i != -1) ? this.setEntry(i, state) : false;
}
function MenuSetAllChildren(state, parentID) {
var hasChanged = false;
var currEntry = (parentID > -1) ? this.entry[parentID].FirstChild : this.firstEntry;
while (currEntry > -1) {
var e = this.entry[currEntry];
hasChanged |= e.setIsOpen(state);
if (e.FirstChild > -1) {hasChanged |= this.setAllChildren(state, currEntry);}
currEntry = e.nextItem;
}
return hasChanged;
}
function MenuSetAll(state, parentID) {
if (theBrowser.version >= 4) {
if (parentID == 'undefined') {parentID = -1;}
} else {
if (parentID == null) {parentID = -1;}
}
var hasChanged = false;
if (parentID > -1) {hasChanged |= this.entry[parentID].setIsOpen(state);}
hasChanged |= this.setAllChildren(state, parentID);
if (hasChanged) {
this.lastPMClicked = this.firstEntry;
this.refresh();
}
}
function MenuOpenAll() {this.setAll(true, -1);}
function MenuCloseAll() {this.setAll(false, -1)}
function MenuFindEntry(srchVal, srchProp, matchType, start) {
if (srchVal == "") {return -1;}
if (!srchProp) {srchProp = "url";}
if (!matchType) {matchType = "exact";}
if (!start) {start = 0;}
if (srchProp == "URL") {srchProp = "url";}
if (srchProp == "title") {srchProp = "text";}
if (typeof(srchVal) != "string") {matchType = "exact";}
if ((matchType != "left") && (matchType != "right")) {matchType = "exact";}
var lm = srchVal.length;
for (var i = start; i <= this.count; i++) {
var e = this.entry[i];
if (e) {
var currVal = eval("e." + srchProp);
if (currVal == srchVal) {return i;}
if ((typeof(currVal) == "string") && (currVal != "")) {
var lc = currVal.length;
var l = Math.min(lm,lc);
if (matchType == "left") {
if (currVal.substring(1, l) == srchVal.substring(1, l)) {return i;}
} else {
if (matchType == "right") {
if (currVal.substring(lc-l, lc) == srchVal.substring(lm-l, lm)) {return i;}
}
}
}
}
}
return -1;
}
function MenuToggle(entryNo, fromClicked) {
var r = true;
var e = this.entry[entryNo];
if (e.onToggle) {var me=e;if(eval(e.onToggle) == false) {r = false;}}
if (r) {
var chg = this.setEntry(entryNo, e.isopen ^ 1);
if (this.linkOnExpand && e.isopen) {
if (e.url != '') {this.contentWin().location = e.url;}
if (!fromClicked) {this.itemClicked(entryNo, true);}
}
if (chg) {this.refresh();}
}
return false;
}
// Other functions
function DrawMenu(m) {
m.draw();
}
function browserInfo() {
this.code = 'unknown';
this.version = 0;
this.platform = 'Win';
var ua = navigator.userAgent;
var i = ua.indexOf('WebTV');
if (i >= 0) {
this.code = 'WebTV';
i += 6;
} else {
i = ua.indexOf('MSIE');
if (i >= 0) {
this.code = 'MSIE';
i += 5;
} else {
i = ua.indexOf('Opera');
if (i >= 0) {
this.code = 'OP';
i = ua.indexOf(') ') + 2;
} else {
i = ua.indexOf('Mozilla/');
if (i >= 0) {
this.code = 'NS';
i += 8;
}
}
}
}
this.version = parseFloat(ua.substring(i, i+4));
if (ua.indexOf('Mac') >= 0) {this.platform = 'Mac';}
if (ua.indexOf('OS/2') >= 0) {this.platform = 'OS/2';}
if (ua.indexOf('X11') >= 0) {this.platform = 'UNIX';}
var v = this.version;
var p = this.platform;
var NS = (this.code == 'NS');
var IE = (this.code == 'MSIE');
var WTV = (this.code == 'WebTV');
var OP = (this.code == 'OP');
var OP32up = (OP && (v >= 3.2));
var IE4up = (IE && (v >= 4));
var NS3up = (NS && (v >= 3));
this.IE = IE;
this.NS = NS;
this.canCache = NS3up || IE4up || OP32up || WTV;
this.canOnMouseOut = this.canCache;
this.canOnError = NS3up || IE4up || OP32up;
this.canJSVoid = !((NS && !NS3up) || (IE && !IE4up) || (OP && (v < 3.5)));
this.lineByLine = (v < 4);
this.mustMoveAfterLoad = NS3up || (IE4up && (p != 'Mac')) || WTV;
if (NS3up || IE4up || WTV) {
this.reloadMethod = 'replace';
} else {
this.reloadMethod = (NS && (v == 2.01) && (p != 'Win')) ? 'timeout' : 'href';
}
this.canFloat = NS || (IE && !((p == 'Mac') && (v >= 4) && (v < 5)));
this.hasDHTML = ((NS || IE) && (v >= 4)) && !(IE && (p == 'Mac') && (v < 4.5));
this.needLM = NS || (IE && (p == 'Mac') && (v >= 4.5));
this.DHTMLRange = IE ? '.all' : '';
this.DHTMLStyleObj = IE ? '.style' : '';
this.DHTMLDivHeight = IE ? '.offsetHeight' : '.clip.height';
}
function getWindow() {return (floatingMode) ? myOpener : self;}
//function getWindow() {myOpener : self;}
function setStatus(theText) {
var theWindow = getWindow();
if (theWindow) {
theWindow.status = theText;
if (!theBrowser.canOnMouseOut) {
clearTimeout(statusTimeout);
statusTimeout = setTimeout('clearStatus()', 5000);
}
}
return true;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -