// HiTOC - A HIERARCHICAL TABLE OF CONTENTS GENERATOR
//
// Copyright © 2000 Alexei Kourbatov
// Version 3.12i - customized exclusively for Intel Corp.
//
// For help visit http://www.javascripter.net/hitoc-guide/ 

v4 =(parseInt(navigator.appVersion)>3)	?1:0
v5p=(parseInt(navigator.appVersion)>4)	?1:0
ns4=(navigator.appName=="Netscape"&& v4)?1:0
ie4=(navigator.appName!="Netscape"&& v4)?1:0
ns6=(navigator.appName=="Netscape"&&v5p)?1:0

function silentError() {return true}
if(parseInt(navigator.appVersion)>2) window.onerror=silentError

if(!self.iconPath)		iconPath="../hi-icons/"
if(!self.iconSize)		iconSize="width=17 height=15"
if(!self.iconStyle)		iconStyle=0
if(!self.plusMinus)		plusMinus="no"
if(!self.TOCFrame)		TOCFrame="self.left"
if(!self.pageFrame)		pageFrame="self.right"
if(!self.defaultTarget) 	defaultTarget="right"
if(!self.bgrImage)		bgrImage=""
if(!self.bgrColor)		bgrColor="#000088"
if(!self.txtColor)		txtColor="#CCFFFF"
if(!self.lnkColor)		lnkColor="#FFFFFF"
if(!self.hghColor)		hghColor="#FF9900"
if(!self.vlkColor)		vlkColor=lnkColor
if(!self.fontName)		fontName="Arial,Helvetica,Geneva"
if(!self.fontSize)		fontSize=10
if(!self.fontItalic)		fontItalic=0
if(!self.fontBold)		fontBold=0
if(!self.hideSubtopics)		hideSubtopics="collapse"
if(!self.showSubtopics)		showSubtopics="expand"
if(!self.showPage)		showPage="topic page"
if(!self.restoreSettings)	restoreSettings=0
if(!self.restoreTree)		restoreTree=0
if(!self.hlight)		hlight=0
if(!self.hlightIcon)		hlightIcon=0
if(!self.doCollapse)		doCollapse=0
if(!self.underlineLinks)	underlineLinks=0
if(!self.underlineAlinks)	underlineAlinks=0
if(!self.pointCurr)		pointCurr=0
if(!self.lineWrap)		lineWrap=0
if(!self.useCookie)		useCookie=0
if(null==self.hlightAlinks)	hlightAlinks=1
if(null==self.topLevel)		topLevel=1

if(topLevel && window!=top) top.location.replace(''+self.location)

var imax,j,n,altxt,docID,rootURL,trueRootURL,docURL,trueDocURL,testStr,pmOn
nowClosed=2;	prevPage=0;	curLevel=1;	spaceCode=-99999990
nowOpen=1;	nextPage=0;	buf="";		titleCode=-88888880
toShow=-1;	curPage=0;	addPath="";	i=0
nPages=0;	lvisPage=0;	DY=0;		wizardButtons=0
noIcons=9999;	curSel=-1;	cookiePage=0

var flashPage="flash.htm";

if(iconStyle==noIcons) iconStyle=0
if(plusMinus=="yes" || plusMinus==1 || pointCurr) lineWrap=0


// ARRAYS
txt =new Array(); levl=new Array(); tgt =new Array()
addr=new Array(); nxtp=new Array(); page=new Array()
stat=new Array(); nxtt=new Array(); pagetop=new Array()
wizButtonCode=new Array()
parentURLs=new Array()
visd=new Array()

/* */  LsnNames=new Array()
/* */  LsnNums=new Array()
/* */  TpcNums=new Array()
/* */  LastTpc=new Array()

function fillArrays() {
 var n=0,curLsn=-1,curTpc=0;
 for(i=0;i<imax;i++) {
  visd[i]=(i==0?1:0)
  j=i+1
  while(j<imax && !txt[j]) j++
  nxtp[i]=j
  nxtt[i]=j
  if(stat[i]%10!=0) {
   j=nxtp[i]
   while(j<imax && levl[j]>levl[i]) {j++}
   nxtt[i]=j
  }

/* */ if(txt[i] && levl[i]==1) {
/* */   curLsn++
/* */   LsnNames[curLsn]=txt[i]
/* */   curTpc=0
/* */ }

  if(addr[i]!="" && tgt[i]==defaultTarget) {
   if(n==0 || n>0 && cutAnchor(addr[i])!=page[n-1] ) {
    page[n]=cutAnchor(addr[i])
    pagetop[n]=i

/* */ if(txt[i] && levl[i]>1) curTpc++
/* */ LsnNums[n]=curLsn
/* */ TpcNums[n]=curTpc
/* */ j=n
/* */ while(j>=0 && LsnNums[j]==curLsn) {LastTpc[j]=curTpc; j--}

    n++
   }
  }
 }
 nPages=n
}

// TREE DEFINITION FUNCTIONS

function Group(gs) {
 j=i-1; while(j>0 && !txt[j]) j--
 stat[j]=10*iconStyle+gs
 curLevel++
}

function endGroup() {curLevel--; if(curLevel<1) curLevel=1}

function item(itemTitle,itemURL,itemTarget) {
 levl[i]=curLevel
 stat[i]=10*iconStyle
 addr[i]=addPath+itemURL
 if(isExtLink(itemURL) || !itemURL) addr[i]=itemURL
 txt[i]=itemTitle
 if(itemTarget!=null) tgt[i]=itemTarget
 else tgt[i] = isExtLink(addr[i]) ? "_top" : defaultTarget
 i++
}

function itemFlash(itemTitle,itemURL,itemTarget) {
 levl[i]=curLevel
 stat[i]=10*iconStyle
 addr[i]=addPath+itemURL
// if(isExtLink(itemURL) || !itemURL) addr[i]=itemURL
 txt[i]=itemTitle
 if(itemTarget!=null) tgt[i]=itemTarget
 else tgt[i] = isExtLink(addr[i]) ? "_top" : defaultTarget
 i++
}

function vspace(pix) {
 levl[i]=curLevel
 stat[i]=spaceCode
 addr[i]=''
 txt[i]=pix
 tgt[i]=defaultTarget
 i++
}

function title(par) {
 levl[i]=curLevel
 stat[i]=titleCode
 addr[i]=''
 txt[i]=par
 tgt[i]=defaultTarget
 i++
}

// URL ANALYSIS FUNCTIONS

function findRootURL() {
 trueRootURL=regularize(""+self.location)
 testURL=trueRootURL.substring(0,trueRootURL.lastIndexOf("/"))
 var k=0
 while(testURL.lastIndexOf('/')>8) {
  parentURLs[k]=testURL+'/'
  testURL=testURL.substring(0,testURL.lastIndexOf("/"))
  k++
 } 
 parentURLs[k]=testURL+'/'
 trueRootURL=parentURLs[0]
 rootURL=trueRootURL.toLowerCase()
}

function isExtLink(theURL) {
 var tStr=(""+theURL).substring(0,6)
 return (tStr=="http:/" || tStr=="https:" || tStr=="ftp://")
}

function cutAnchor(inStr) {
 var outStr=""+inStr, k=outStr.indexOf("#")
 if(k>-1) outStr=outStr.substring(0,k)
 return outStr
}

function cutQuery(inStr) {
 var outStr=""+inStr, k=outStr.indexOf("?")
 if(k>-1) outStr=outStr.substring(0,k)
 return outStr
}

function regularize(theURL) {
 theURL=cutQuery(cutAnchor(theURL))
 for(j=0;j<theURL.length;j++) {
  if(theURL.charAt(j)=="\\") theURL=theURL.substring(0,j)+"/"+theURL.substring(j+1,theURL.length)
 }
 return theURL
}

function upDir(s) {
 var j=0
 while(s.substring(3*j,3*j+3)=='../') {j++}
 return j
}

function fullPage(n) {
 var k=upDir(page[n])
 return (parentURLs[k]+page[n].substring(3*k))
}


// TREE PAGE GENERATION FUNCTIONS

function showTopics(k) {
 if(k>=0) { 
  if(stat[k]%10==nowOpen)	stat[k]++ 
  else if(stat[k]%10==nowClosed)stat[k]-- 
  if(doCollapse) {collapseAll(k); expandThis(k)}
  setUCT()
 }
 setTimeout("if("+TOCFrame+")renewTOC()",1)
}

setFont=""
endFont=""
function setFontTags() {
 if(fontItalic=="1"|| fontItalic=="yes") {setFont="<i>";endFont="</i>"}
 else {setFont=""; endFont=""}
 if(fontBold=="1"|| fontBold=="yes") {setFont="<b>"+setFont; endFont+="</b>"}
}

function renewTOC() {
 setFontTags()
 curSel=-1
 if(v4) {
  if(ns4 && self.TOCLayer) eval(TOCLayer+".src=''+"+TOCLayer+".src")
  else eval(TOCFrame+".location=''+"+TOCFrame+".location")
  return
 }
 i=0
 initBuf()
 
 while(true) {
  finished=setBuf(15000)
  eval(TOCFrame+".document.write(buf)"); buf=''
  if(finished) break
 }

 buf+=(lineWrap?'</table>':'</font></pre>')+'</BODY></HTML>'
 eval(TOCFrame+".document.write(buf)")
 eval(TOCFrame+".document.close()")
 return
}

bufTxt=''
LBR='\n'
function initBuf() {
 pmOn=(plusMinus=="yes"||plusMinus=="1")
 LBR=lineWrap?'\n':'<br>' 
 bufTxt=''
 buf='<BASE HREF="'+self.trueRootURL+'"></HEAD>\r\n'
 buf+='<BODY BGCOLOR="'+bgrColor
	+'" text="'+txtColor
	+'" link="'+lnkColor
	+'" alink="'+lnkColor
	+'" vlink="'+lnkColor
 if((''+bgrImage).indexOf('.')!=-1) buf+='" BACKGROUND="'+iconPath+bgrImage
 if(v4 && !hlight) buf+='" onLoad="setTimeout(\'scrollTo(0,parent.DY)\',1)"'
 if(lineWrap) {
  buf+='"><table width=97% border=0 cellspacing=0 cellpadding=0><tr>'
  for(var j=0;j<9;j++) buf+='<td width=8><img border=0 width=8 height=1 SRC="'+iconPath+'spacer.gif"></td>'
  buf+='<td width=80% colspan=2><img border=0 width=55 height=1 SRC="'+iconPath+'spacer.gif"></td></tr>'
 }
 else buf+='"><pre><font face="'+fontName+'" point-size='+fontSize+'>'
}

onClk="parent.focus()"
onClk1=""
if(ns4) onClk1="parent.DY=self.pageYOffset;parent.focus()"
if(ie4) onClk1="parent.DY=self.document.body.scrollTop;parent.focus()"

function setBuf(lenBuf) {
 while(i<imax) {
  nexti=(stat[i]%10==nowClosed)?nxtt[i]:nxtp[i]

  if(stat[i]==spaceCode) {
   if(lineWrap) buf+='<tr><td colspan=10>'
   buf+='<IMG border=0 width=1 height='+txt[i]+' SRC="'+iconPath+'spacer.gif">'+LBR
   if(lineWrap) buf+='</td></tr>'
   i=nexti
   continue
  }

  if(lineWrap) {
   if(levl[i]>1) buf+='<tr><td colspan='+(levl[i]-1)+' valign=baseline></td>'
   buf+='<td colspan=2 valign=baseline '+iconSize+'>'
  }

  if(wizardButtons!=0) {
   for(wbc=0;wbc<=wizardButtons;wbc++) {buf+=wizButtonCode[wbc]+((wbc!=wizardButtons)?(i):" ")}
  }

  if(pointCurr) buf+='<IMG name="p'+i+'" border=0 width=10 height=15 SRC="'+iconPath+'spacer.gif">'

  if(!lineWrap && levl[i]>1) {
   buf+='<font face=Arial,Helvetica,Geneva>'
   for(jbf=1;jbf<levl[i];jbf++) {buf+='&nbsp;&nbsp;&nbsp;'}
   buf+='</font>'
  }

  if(txt[i]!='') bufTxt+=';:'+i+':;'+txt[i]

  if(stat[i]==titleCode) {
   if(lineWrap) buf+='</td><td colspan='+(10-levl[i])+' valign=baseline><font face="'+fontName+'" point-size='+fontSize+'>'
   if(pmOn) buf+="<IMG border=0 width=12 height=15 SRC=\""+iconPath+"spacer.gif\">"
   buf+='<IMG border=0 '+iconSize+' SRC="'+iconPath+'spacer.gif">'+txt[i]+LBR
   if(lineWrap) buf+='</td></tr>'
   i=nexti
   continue
  }

  isOpen=(stat[i]%10==nowOpen)
  altxt=isOpen? hideSubtopics:showSubtopics
  icoOn=1

  if(stat[i]%10==0) {
   if(pmOn) buf+='<IMG border=0 width=12 height=15 SRC="'+iconPath+'spacer.gif">'
   buf+='<A onMouseOver="parent.movr('+i+',0);return true"'
	+' onMouseOut="parent.mout('+i+');return true"'
	+' onClick="parent.mout('+i+');parent.focus()"'
	+' HREF="'+addr[i]+'" target="'+tgt[i]+'">'
        //+' HREF='+flashPage+' target="'+tgt[i]+'">'
	+'<IMG name=i'+i+' alt="'+showPage+'" border=0 '+iconSize+' SRC="'+iconPath+((isExtLink(addr[i]))?"internet":stat[i])+'.gif">'
	+'</A>'
   
   // pass the flash file path
   top.parm_value = addr[i];
   
   if(lineWrap) buf+='</td><td width=90% colspan='+(10-levl[i])+' valign=baseline><font face="'+fontName+'" point-size='+fontSize+'>'
   +'<img border=0 width=1 height=15 SRC="'+iconPath+'spacer.gif">'

   buf+='<A '+(visd[i]==1?' class=vis ':'')
	+(ie4?' id=c'+i:'')
	+' onMouseOver="parent.movr('+i+',1);return true"'
	+' onMouseOut="parent.mout('+i+');return true"'
	+' onClick="parent.mout('+i+');parent.focus()"'
	+' HREF=\"'+addr[i]+'" target="'+tgt[i]+'">'
        //+' HREF='+flashPage+' target="'+tgt[i]+'">'
        
   // pass the flash file path
   //top.parm_value = addr[i];
   
   if(visd[i]==1) buf+='<font color="'+vlkColor+'">'+setFont+txt[i]+endFont+'</font></A>'
   else buf+=setFont+txt[i]+endFont+'</A>'
  }
  else {
   A_tag='<A '+(visd[i]==1?' class=vis ':' ')
	+' onMouseOver="parent.movr('+i+',0);return true" '
	+' onMouseOut="parent.mout('+i+');return true" '
	+' onClick="'+onClk1+'" HREF="javascript:parent.showTopics('+i+')">'
   buf+=A_tag
   if(pmOn) buf+='<IMG alt="'+altxt+'" border=0 width=12 height=15 SRC="'+iconPath+"s"+stat[i]%10+'.gif">'
   buf+='<IMG name=i'+i+' alt="'+altxt+'" border=0 '+iconSize+' SRC="'+iconPath+stat[i]+'.gif">'
   buf+='</A>'

   if(lineWrap) buf+='</td><td width=90% colspan='+(10-levl[i])+' valign=baseline><font face="'+fontName+'" point-size='+fontSize+'>'
   +'<img border=0 width=1 height=15 SRC="'+iconPath+'spacer.gif">'

   if(addr[i])
   buf+='<A '+(visd[i]==1?' class=vis ':'')
	+(ie4?' id=c'+i:'')
	+' onMouseOver="parent.movr('+i+',1);return true" '
	+' onMouseOut="parent.mout('+i+');return true" '
	+' onClick="'+onClk1+'" HREF="'+addr[i]+'" target="'+tgt[i]+'">'
   else if(!isOpen) buf+=A_tag
   if(visd[i]==1) buf+='<font color="'+vlkColor+'">'+setFont+txt[i]+endFont+'</font>'
   else buf+=setFont+txt[i]+endFont
   if(addr[i] || !isOpen) buf+='</A>'
  } 
  i=nexti
  buf+=LBR
  if(lineWrap) buf+='</font></td></tr>'
  if(lenBuf>100 && buf.length>lenBuf) return false
 } 
 if(!lineWrap && self.bufEnd) buf+=bufEnd
 return true
}

// PRELOADING IMAGES

styleIsPage=new Array(1,1,0,0,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0)
if(document.images) {
 hLinkImg=new Image(); hLinkImg.src=iconPath+"shortcut.gif"
 lLinkImg=new Image(); lLinkImg.src=iconPath+"internet.gif"
 spcImg=new Image(); spcImg.src=iconPath+"spacer.gif"
 ptrImg=new Image(); ptrImg.src=iconPath+"pointer.gif"
 for(var k=0;k<=10;k++) {
  if(styleIsPage[k]) {
   eval('hPageImg'+k+'=new Image();hPageImg'+k+'.src="'+iconPath+'shortcut.gif"')
   eval('lPageImg'+k+'=new Image();lPageImg'+k+'.src="'+iconPath+'0.gif"')
  }
  else {
   eval('hPageImg'+k+'=new Image();hPageImg'+k+'.src="'+iconPath+'hibullet.gif"')
   eval('lPageImg'+k+'=new Image();lPageImg'+k+'.src="'+iconPath+(10*k)+'.gif"')
  } 
  eval('cPageImg=new Image();cPageImg.src="'+iconPath+'cur_page.gif"')
 }
}

// MOUSEOVER AND MOUSEOUT HANDLERS

function movr(i,isTextLink) {
 if(stat[i]%10==0 && i!=pagetop[curPage]) {
  self.status=txt[i]
  if(document.images && hlightAlinks && (ie4 || !self.TOCLayer) && eval(TOCFrame+'.document.i'+i)) {
   eval(TOCFrame+'.document.i'+i+'.src=(isExtLink(addr['+i+']) ? hLinkImg.src : hPageImg'+(Math.floor(stat[i]/10))+'.src)')
  }
 }
 else
  self.status = isTextLink ? txt[i] : ( (stat[i]%10==nowOpen) ? hideSubtopics:showSubtopics)
}

function mout(i) {
 if(document.images && hlightAlinks && stat[i]%10==0 && i!=pagetop[curPage] && eval(TOCFrame+'.document.i'+i)) {
  eval(TOCFrame+'.document.i'+i+'.src=(isExtLink(addr['+i+']) ? lLinkImg.src : lPageImg'+(Math.floor(stat[i]/10))+'.src)')
 }
 self.status=''
}

// PREV/NEXT NAVIGATION FUNCTIONS

function queryNum() {
 var k,pt
 if(eval(pageFrame+".document")) {
  trueDocURL=regularize(""+eval(pageFrame+".document.location"))
  docURL=trueDocURL.toLowerCase()
  for(var j=0;j<nPages;j++) {
   testStr=fullPage(j).toLowerCase()
   if(docURL.indexOf(testStr)!=-1) {
    if(curPage!=j) {
     lvisPage=curPage;
     pt=(lvisPage>=0)?pagetop[lvisPage]:0
     if(visd[pt]==0) {
      visd[pt]=1
      k=pt+1; while(nxtp[k]==nxtp[pt]) {visd[k]=1;k++}
      if(pt>0 && levl[pt-1]<levl[pt]) visd[pt-1]=1
      if(isVisible(pagetop[j])) {
        redrawTimerID=setTimeout("if("+TOCFrame+")self.renewTOC()",199)
      }
     }
    }
    curPage=j
    prevPage=j-1
    nextPage=j+1
    saveTree()
    if(prevPage<0) prevPage=curPage
    if(nextPage>=nPages) nextPage=curPage
    return
   }
  }
  curPage=-1
  prevPage=0
  nextPage=0
 }
 return
}

function showNext() {
 queryNum()
 if(curPage==-1) {eval(pageFrame+".history.back()");return}
 if(nextPage!=curPage) {
  if (visd[pagetop[curPage]]==0) {
   visd[pagetop[curPage]]=1
   if (vlkColor!=lnkColor && isVisible(pagetop[nextPage])) showTopics(-1)
  }
  eval(pageFrame+".location=fullPage(nextPage)")
 }
}

function showPrev() {
 queryNum()
 if(curPage==-1) {eval(pageFrame+".history.back()");return}
 if(prevPage!=curPage) {
  if (visd[pagetop[curPage]]==0) {
   visd[pagetop[curPage]]=1
   if (vlkColor!=lnkColor && isVisible(pagetop[prevPage])) showTopics(-1)
  }
  eval(pageFrame+".location=fullPage(prevPage)")
 }
}

// SYNCHRONIZATION FUNCTIONS

timerU=null
timerUactive=0
userChangesTree=0

function setUCT() {
 if(v4){
  userChangesTree=1
  if(timerUactive) clearTimeout(timerU)
  timerUactive=1
  timerU=setTimeout("userChangesTree=0;timerUactive=0",9999)
 }
}

function sync() {
 if(v4 && (hlight || hlightIcon) || pointCurr) {
  queryNum(); if(curPage>=0) selectItem(pagetop[curPage])
 }
 setTimeout("sync()",1599);
}

function selectItem(ci) {
 while(!txt[ci]) ci--
 while(ci>0 && addr[ci-1].indexOf(cutAnchor(addr[ci]))!=-1) ci--
 if(isExtLink(addr[ci])) return
 if(!eval(TOCFrame+".document")) return
 if(curSel!=ci && pointCurr && document.images) {
  if(eval(TOCFrame+'.document.p'+ci)) eval(TOCFrame+'.document.p'+ci+'.src=ptrImg.src')
  if(eval(TOCFrame+'.document.p'+curSel)) eval(TOCFrame+'.document.p'+curSel+'.src=spcImg.src')
 }
 if(curSel==ci) {
  if(!isVisible(ci)) curSel=-1
  if(ie4) return
  if(ns4 && txt[ci]==eval(TOCFrame+".document.getSelection()")) return
 }
 if(!isVisible(ci)) {
  if(userChangesTree) return
  showItem(ci)
  return;
 }
 if(hlight && ns4) {
  eval(TOCFrame+".find(txt[ci])")
  while(eval(TOCFrame+".find(txt[ci],0,1)")) {continue}
  offs=bufTxt.indexOf(txt[ci])
  while(bufTxt.lastIndexOf(';:'+ci+':;',offs)!=bufTxt.lastIndexOf(';:',offs)) {
   eval(TOCFrame+".find(txt[ci])")
   offs=bufTxt.indexOf(txt[ci],offs+1)
  }
 }
 if(hlight && ie4) {
  TRange=eval(TOCFrame+".document.body.createTextRange()")
  TRange.moveToElementText(eval(TOCFrame+".document.all['c"+ci+"']"))
  TRange.select()
 }
 if (hlightIcon && (ie4 || !self.TOCLayer)) {
  if(stat[curSel]%10==0	&& eval(TOCFrame+'.document.i'+curSel))	eval(TOCFrame+'.document.i'+curSel+'.src=(lPageImg'+(Math.floor(stat[curSel]/10))+'.src)')
  if(stat[ci]%10==0	&& eval(TOCFrame+'.document.i'+ci))	eval(TOCFrame+'.document.i'+ci+'.src=cPageImg.src')
 }
 curSel=ci;
}

function isVisible(ci) {return(bufTxt.indexOf(';:'+ci+':;')==-1?0:1)}
function showItem(ni) {collapseAll(ni);expandThis(ni);showTopics(-1)}
function clickPlus() {expandAll(99);showTopics(-1);setUCT()}
function clickMinus() {collapseAll(-1);showTopics(-1);setUCT()}
function collapseAll(ci) {for(var i=0;i<imax;i++) {if(stat[i]%10==nowOpen && i!=ci) stat[i]++}}
function expandAll  (lv) {for(var i=0;i<imax;i++) {if(stat[i]%10==nowClosed && levl[i]<lv) stat[i]--}}
function expandThis(ci) {
 var i=ci
 OL=levl[ci]
 while(i>=0) {
  CL=levl[i]
  if(CL<OL) {OL=CL; if(stat[i]%10==nowClosed && i!=ci) stat[i]--}
  if(CL==1) break
  i--; while(!txt[i]) i--
 }
}

// OPTIONAL COOKIE SUPPORT
var today =new Date()
var expire=new Date()
expire.setTime(today.getTime()+3600000*24*365)

oldCkie=''
newCkie=''

function saveTree() {
 newCkie='iWBT='+escape(
	 'cookiePage='+curPage+';visd=new Array('+visd+')'
	 )+ ";expires="+expire.toGMTString();
 if(newCkie!=oldCkie) {
  if(useCookie) self.document.cookie=newCkie
  oldCkie=newCkie
 }
}

function restoreFromCookie(par) {
 var theCookie=''+self.document.cookie
 var ind=theCookie.indexOf(par)
 if(ind==-1) return
 useCookie=1
 var ind1=theCookie.indexOf(';',ind)
 if(ind1==-1) ind1=theCookie.length
 var theCode=unescape(theCookie.substring(ind+par.length+1,ind1))
 eval(''+theCode)
}

// PRE-INITIALIZATION

findRootURL()

function makeTree() {
 imax=i
 fillArrays()
 restoreFromCookie('iWBT')
 setFontTags()
 var dRef=''

 var srch=(''+unescape(self.location.search)).substring(1)
 if(srch.length>0) {
  var k=upDir(srch)
  dRef=parentURLs[k]+srch.substring(3*k)
 }
 if(dRef!='' && pageFrame!="self" && pageFrame!="top") {
  for(n=1;n<nPages;n++) {
   if(dRef.toLowerCase()==fullPage(n).toLowerCase() && tgt[pagetop[n]]==defaultTarget) {
    setTimeout(pageFrame+".location=fullPage(n)",999)
    break
   }
  }
 }
}

// INITIALIZATION - AFTER FRAMESET LOADED

function init() {
 top.focus()
 if(v4) setTimeout("sync()",1599)
 if (!useCookie && self.is1stTimeHere) {
  if (confirm('For your convenience, this tutorial can use cookies to save your progress.'
		+'\nIf you choose to use this feature, no information will be sent from your computer.'+'\n\nClick \'OK\' to enable this feature, or \'Cancel\' to disable it.')) 
   useCookie=1
 }
}
