1
Bugs and Issues / Her is the updated displayToc.js line 87
« on: October 19, 2010, 09:31:15 pm »
var tocRoot, tocBranch, tocSel, tocLoading, tocLastID, tableSel, tabHead, data, tocTab, tocInitRoot, tocMemToc, rFStatus, oldData, tableSelTable;
var initI;
var icon=new Array();
var preloadIcons=new Array(1,10,101,102,103,104,106,107,108,11,113,116,118,16,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,19,20,21,24,25,26,28,29,31,34,4,5,52,53,56,57,6,60,68,69,7,8,82,9,99);
var browser=browserCheck();
var content=0;
var Linkguid="";
function browserCheck() {
browser=navigator.userAgent.toLowerCase();
if (browser.indexOf('msie')!=-1) {
if(browser.substring(browser.indexOf('msie')+5,browser.indexOf('.',browser.indexOf('msie')))>6) return("ie7");
if(browser.substring(browser.indexOf('msie')+5,browser.indexOf('.',browser.indexOf('msie')))>5) return("ie6");
else return("ie_old");
}
else if (browser.indexOf('firefox')!=-1) return("ff");
else if (browser.indexOf('opera')!=-1) return("op");
else if (browser.indexOf('gecko')!=-1) return("ff");
}
function changeCSS(theClass,element,value,target) {
var cssRules;
target = eval(target+'.document.styleSheets');
if (browser=='ie6'||browser=='ie7') {
cssRules = 'rules';
} else if (browser=='ff'||browser=='op') {
cssRules = 'cssRules';
}
for (var S = 0; S < target.length; S++){
for (var R = 0; R < target[cssRules].length; R++) {
if (target[cssRules][R].selectorText == theClass) {
try {
target[cssRules][R].style[element] = value;
} catch(e) {}
}
}
}
}
function initItem(item) {
tableSel=null;
if (cont.document.getElementById('TableGroup')!=null) {
toggleItem(cont.document.getElementById('TableGroup').getElementsByTagName('li')[0].id.replace("Title",""));
}
}
function initLoad(src,toc,home) {
var qs=document.location.search.substring(1);
if (qs.substring(0,qs.indexOf('='))=='goto') {
var gotoPage = qs.substring(qs.indexOf('=')+1).split(':');
var fExt = home.substring(home.lastIndexOf('.'));
var home = "./EARoot/";
for (var i=0; i<gotoPage.length; i++) {
home += "EA"+gotoPage;
if (i!=gotoPage.length-1)
home += "/";
else
home += fExt;
}
}
content = document.createElement('div');
content.className = "IndexBody";
content.innerHTML=" <iframe src='"+toc+"' name='toc' id='tocIFrame' frameborder='0'></iframe>\n";
if (qs.substring(0,qs.indexOf('='))=='guid') {
Linkguid = qs.substring(qs.indexOf('=')+1).split('?guid=');
LoadGuidMap(OnReadyLoadGuidMap);
}
else{
// We don't have a guid in the address bar, so set the default homepage and continue
content.innerHTML+=" <iframe src='"+home+"' name='cont' id='contentIFrame' frameborder='0'></iframe>";
content.innerHTML+=" <div id=\"resizeFrames\"></div>";
// Pass in the guid of the home page or class.
initPreLoad(content);
}
}
function LoadGuidMap(ResponseFunc){
// Get the correct file
var FirstTwoHexDigits = new String(Linkguid);
FirstTwoHexDigits = FirstTwoHexDigits.slice(0,2);
var src = "js/data/guidmaps/"+"GuidMap"+FirstTwoHexDigits.toLowerCase()+".xml";
RequestPage(src,ResponseFunc);// Request the page passing in the filelocation and the response function.
}
function OnReadyLoadGuidMap(){
if (data.readyState == 4){
try{
var Home = GetPageAddressFromMapString(data.responseText);
//Set the home page.
content.innerHTML+=" <iframe src='"+Home+"' name='cont' id='contentIFrame' frameborder='0'></iframe>";
content.innerHTML+=" <div id=\"resizeFrames\"></div>";
//Make sure memory for the string is cleared. The browser should do this anyway but just in case.
Home=null;
// Continue loading the rest of the page.
initPreLoad(content);
}
catch(e){
return;
}
}
}
function GetPageAddressFromMapString(MapString)
{
var LG = new String(Linkguid);
var Page = new String(MapString);
LG = LG.toLowerCase(); //Make searching case insensitive.
Page = Page.toLowerCase();
var Pos1 = Page.search(LG); // Search the the guid in the string and return the position.
Page = Page.slice(Pos1);// Remove the top half of the string.
var Pos2 = Page.search("/"); //Search for the start of the web address.
var Pos3 = Page.search(";"); //Search for the end of the web address.
Page = Page.slice(Pos2+1,Pos3); // extract the web address.
// Leave the page address in the original case as Linux is case sensitive.
Pos1 = Page.search(".htm");
Page = Page.slice(0,Pos1);
Page = Page.toUpperCase();
Page = "EARoot/" + Page + ".htm"; // At the root back onto the page.
return Page;
}
function guidLink(guid,qs) {
guid = guid.substring(1,guid.length-1); //Remove the brakets
Linkguid = guid;
LoadGuidMap(OnReadyGuidLink);
}
function OnReadyGuidLink(){
if (data.readyState == 4){
try{
// Get the page location from the guid map.
var Page = GetPageAddressFromMapString(data.responseText);
cont.location = Page;
//Make sure memory fo
var initI;
var icon=new Array();
var preloadIcons=new Array(1,10,101,102,103,104,106,107,108,11,113,116,118,16,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,19,20,21,24,25,26,28,29,31,34,4,5,52,53,56,57,6,60,68,69,7,8,82,9,99);
var browser=browserCheck();
var content=0;
var Linkguid="";
function browserCheck() {
browser=navigator.userAgent.toLowerCase();
if (browser.indexOf('msie')!=-1) {
if(browser.substring(browser.indexOf('msie')+5,browser.indexOf('.',browser.indexOf('msie')))>6) return("ie7");
if(browser.substring(browser.indexOf('msie')+5,browser.indexOf('.',browser.indexOf('msie')))>5) return("ie6");
else return("ie_old");
}
else if (browser.indexOf('firefox')!=-1) return("ff");
else if (browser.indexOf('opera')!=-1) return("op");
else if (browser.indexOf('gecko')!=-1) return("ff");
}
function changeCSS(theClass,element,value,target) {
var cssRules;
target = eval(target+'.document.styleSheets');
if (browser=='ie6'||browser=='ie7') {
cssRules = 'rules';
} else if (browser=='ff'||browser=='op') {
cssRules = 'cssRules';
}
for (var S = 0; S < target.length; S++){
for (var R = 0; R < target
if (target
try {
target
} catch(e) {}
}
}
}
}
function initItem(item) {
tableSel=null;
if (cont.document.getElementById('TableGroup')!=null) {
toggleItem(cont.document.getElementById('TableGroup').getElementsByTagName('li')[0].id.replace("Title",""));
}
}
function initLoad(src,toc,home) {
var qs=document.location.search.substring(1);
if (qs.substring(0,qs.indexOf('='))=='goto') {
var gotoPage = qs.substring(qs.indexOf('=')+1).split(':');
var fExt = home.substring(home.lastIndexOf('.'));
var home = "./EARoot/";
for (var i=0; i<gotoPage.length; i++) {
home += "EA"+gotoPage;
if (i!=gotoPage.length-1)
home += "/";
else
home += fExt;
}
}
content = document.createElement('div');
content.className = "IndexBody";
content.innerHTML=" <iframe src='"+toc+"' name='toc' id='tocIFrame' frameborder='0'></iframe>\n";
if (qs.substring(0,qs.indexOf('='))=='guid') {
Linkguid = qs.substring(qs.indexOf('=')+1).split('?guid=');
LoadGuidMap(OnReadyLoadGuidMap);
}
else{
// We don't have a guid in the address bar, so set the default homepage and continue
content.innerHTML+=" <iframe src='"+home+"' name='cont' id='contentIFrame' frameborder='0'></iframe>";
content.innerHTML+=" <div id=\"resizeFrames\"></div>";
// Pass in the guid of the home page or class.
initPreLoad(content);
}
}
function LoadGuidMap(ResponseFunc){
// Get the correct file
var FirstTwoHexDigits = new String(Linkguid);
FirstTwoHexDigits = FirstTwoHexDigits.slice(0,2);
var src = "js/data/guidmaps/"+"GuidMap"+FirstTwoHexDigits.toLowerCase()+".xml";
RequestPage(src,ResponseFunc);// Request the page passing in the filelocation and the response function.
}
function OnReadyLoadGuidMap(){
if (data.readyState == 4){
try{
var Home = GetPageAddressFromMapString(data.responseText);
//Set the home page.
content.innerHTML+=" <iframe src='"+Home+"' name='cont' id='contentIFrame' frameborder='0'></iframe>";
content.innerHTML+=" <div id=\"resizeFrames\"></div>";
//Make sure memory for the string is cleared. The browser should do this anyway but just in case.
Home=null;
// Continue loading the rest of the page.
initPreLoad(content);
}
catch(e){
return;
}
}
}
function GetPageAddressFromMapString(MapString)
{
var LG = new String(Linkguid);
var Page = new String(MapString);
LG = LG.toLowerCase(); //Make searching case insensitive.
Page = Page.toLowerCase();
var Pos1 = Page.search(LG); // Search the the guid in the string and return the position.
Page = Page.slice(Pos1);// Remove the top half of the string.
var Pos2 = Page.search("/"); //Search for the start of the web address.
var Pos3 = Page.search(";"); //Search for the end of the web address.
Page = Page.slice(Pos2+1,Pos3); // extract the web address.
// Leave the page address in the original case as Linux is case sensitive.
Pos1 = Page.search(".htm");
Page = Page.slice(0,Pos1);
Page = Page.toUpperCase();
Page = "EARoot/" + Page + ".htm"; // At the root back onto the page.
return Page;
}
function guidLink(guid,qs) {
guid = guid.substring(1,guid.length-1); //Remove the brakets
Linkguid = guid;
LoadGuidMap(OnReadyGuidLink);
}
function OnReadyGuidLink(){
if (data.readyState == 4){
try{
// Get the page location from the guid map.
var Page = GetPageAddressFromMapString(data.responseText);
cont.location = Page;
//Make sure memory fo


