
//Used by DevaSearch pages for the TOC and index navigation links.
var toc = '../SunONEActiverServerPages4TOC.html';
var index = '../SunONEActiverServerPages4IX.html';

function OpenTOC() {
parent.wptoc.location.replace(toc);
}

function OpenIndex() {
parent.wptoc.location.replace(index);
}

//Opens small browser window from top masthead navigation "version" link
function OpenVersion() {
version = window.open("version.html","version","height=275,width=530,scrollbars=yes,fullscreen=no,status=no,toolbar=no,menubar=no,location=no,resizable=yes,screenX=400,screenY=100");
version.focus();
}

//Opens reusable secondary browser window for all external URLs
function OpenWebLink(URL) {
web_window = window.open(URL,"web_window","height=400,width=700,scrollbars=yes,fullscreen=no,status=yes,toolbar=yes,menubar=yes,location=yes,resizable=yes,screenX=50,screenY=50");
web_window.focus();
}

// Sync TOC with topic
var browser = navigator.appName;
function syncContents(hash,link,max)
{
 // First scroll down to "chapter" heading unless you're in the first chapter, the index, or the search panel; or unless 
 // you're well into long chapter (to avoid bouncing the toc up and down too often when browsing):
 if ((parent.wpmain.location.pathname.indexOf('Introduction') == -1) && (max <= 18) && (parent.wptoc.location.pathname.indexOf('IX') == -1) && (parent.wptoc.location.pathname.indexOf('search') == -1)) {
   parent.wptoc.location.hash = hash;}

 // Then highlight link, but Netscape and IE continue to war against each other, so:
 if ((parent.wptoc.location.pathname.indexOf('IX')  == -1)&& (parent.wptoc.location.pathname.indexOf('search') == -1))
   {
   if (browser == "Netscape" && parseInt(navigator.appVersion) >= 5)
   {parent.wptoc.document.links[link].focus(); return true;}

   // And older NS is having none of it, hisses errors, gotta leave it behind:
   if (browser == "Netscape" && parseInt(navigator.appVersion) < 5)
   {return;}

   else {parent.wptoc.document.links(link).focus();}
   }
}
