/* //:::::::::::   NAVAID  :::::::::::\\
                  by Micah Goulart

	This script can be used as long as this
	disclaimer is left untouched.
	For bug reports or custom scripts, email me at:
	micahgoulart@mailbr.com.br
	
	IMPORTANT!!
		This script requires the dynObj.js source file.
		Download it at members.xoom.com/micahgoulart/dynObj.js

   //:::::::::::   copyright 1999   :::::::::::\\	*/


var offsetX = offsetY = tocOffsetY = tocOffsetX = 0
var tocX = tocY = 0
var visible = false
var position = "side"

writeCSS(css("navLayer", 0,0,null,null,null,"hidden"))

function build(html)
{	document.write('\n<DIV ID="navLayer">', html, '</DIV>',toc.div)
	document.close()	}

function initNav()
{	nav = new dynObj("navLayer")
	nav.css.cursor = "hand"

	toc.activate()
	if (NS) nav.event.captureEvents(Event.MOUSEDOWN)
	nav.event.onmouseover = function(){clearTimeout(hideTimer);toc.obj.moveTo(tocX,tocY);toc.obj.show()}
	nav.event.onmouseout = function(){hideTimer=setTimeout("toc.obj.hide()",100)}
	toc.obj.event.onmouseover = function(){clearTimeout(hideTimer);hideTimer=null}
	toc.obj.event.onmouseout = function(){hideTimer=setTimeout("toc.obj.hide()",100)}
	toc.obj.event.onselectstart = function(){return false;}
	startInterval()
	if (IE4) nav.setSize(nav.doc.images[0].width, nav.doc.images[0].height)
	nav.show()
	if (IE) document.body.onunload = stopInterval	}
	
function startInterval()
{	tocTimer = setInterval("scroll()", 8)
	scroll()	}

function stopInterval()
{	clearInterval(tocTimer);
	tocTimer = null; }

window.onblur = stopInterval
window.onfocus = startInterval
hideTimer = null
prevY = false

function scroll()
{	navX = (IE) ? document.body.scrollLeft : pageXOffset;
	navY = (IE) ? document.body.scrollTop : pageYOffset;
	if (prevY)
	{	if (prevY > navY)
			if (prevY - navY < 50) return
		if (prevY < navY)
			if (navY - prevY < 50) return	}
	
	nav.moveTo(navX + offsetX, navY + offsetY)
	tocX = nav.left
	tocY = nav.top + tocOffsetY
	if (position == "bottom") tocY += nav.h
	else tocX += nav.w + tocOffsetX
	prevY = navY 	}
	
