ndotPanel.topReg = []
ndotPanel.howlong = 200
ndotPanel.slide = 500
ndotPanel.xxcyc = 8
function ndotPanel(id, dir, left, top, width, height, panellevel)
{
this.panellevel = panellevel 
this.ie = document.all ? 1 : 0
this.ns4 = document.layers ? 1 : 0
this.dom = document.getElementById ? 1 : 0
if (this.ie || this.ns4 || this.dom) {
this.id = id
this.dir = dir
this.whichway = dir == "left" || dir == "right" ? "h" : "v"
this.dirType = dir == "right" || dir == "down" ? "-" : "+"
this.dim = this.whichway == "h" ? width : height
this.waitTimer = false
this.slideTimer = false
this.open = false
this.over = false
this.startTime = 0
this.gRef = "ndotPanel_"+id
eval(this.gRef+"=this")
ndotPanel.topReg[id] = this
var d = document
var strCSS = '<style type="text/css">';
strCSS += '#' + this.id + 'Container { visibility:hidden; '
strCSS += 'left:' + left + 'px; '
strCSS += 'top:' + top + 'px; '
strCSS += 'overflow:hidden; z-index:8000; }'
strCSS += '#' + this.id + 'Container, #' + this.id + 'Content { position:absolute; '
strCSS += 'width:' + width + 'px; '
strCSS += 'height:' + height + 'px; '
strCSS += 'clip:rect(0 ' + width + ' ' + height + ' 0); '
strCSS += '}'
strCSS += '</style>'
d.write(strCSS)
this.load()
}
}
ndotPanel.prototype.load = function() {
var d = document
var lyrId1 = this.id + "Container"
var lyrId2 = this.id + "Content"
var obj1 = this.dom ? d.getElementById(lyrId1) : this.ie ? d.all[lyrId1] : d.layers[lyrId1]
if (obj1) var obj2 = this.ns4 ? obj1.layers[lyrId2] : this.ie ? d.all[lyrId2] : d.getElementById(lyrId2)
var temp
if (!obj1 || !obj2) window.setTimeout(this.gRef + ".load()", 100)
else {
this.container = obj1
this.panel = obj2
this.style = this.ns4 ? this.panel : this.panel.style
this.panelorigin = eval("0" + this.dirType + this.dim)
this.outPos = 0
this.bigG = (this.outPos - this.panelorigin) / ndotPanel.slide / ndotPanel.slide 
if (this.ns4) this.panel.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
this.panel.onmouseover = new Function("ndotPanel.revealPanel('" + this.id + "')")
this.panel.onmouseout = new Function("ndotPanel.hidePanel('" + this.id + "')")
this.endSlide()
}
}
ndotPanel.revealPanel = function(id)
{
var reg = ndotPanel.topReg
var obj = ndotPanel.topReg[id]
if (obj.container) {
obj.over = true
if (obj.waitTimer) { reg[id].waitTimer = window.clearTimeout(reg[id].waitTimer) }
if (!obj.open && !obj.slideTimer) reg[id].startSlide(true)
}
}
ndotPanel.hidePanel = function(id)
{
var obj = ndotPanel.topReg[id]
if (obj.container) {
if (obj.waitTimer) window.clearTimeout(obj.waitTimer)
obj.waitTimer = window.setTimeout("ndotPanel.hide('" + id + "')", ndotPanel.howlong);
}
}
ndotPanel.hide = function(id)
{
var obj = ndotPanel.topReg[id]
obj.over = false
if (obj.waitTimer) window.clearTimeout(obj.waitTimer)
obj.waitTimer = 0
if (obj.open && !obj.slideTimer) obj.startSlide(false)
}
ndotPanel.prototype.startSlide = function(open) {
this[open ? "onactivate" : "ondeactivate"]()
this.open = open
if (open) this.setVisibility(true)
this.startTime = (new Date()).getTime() 
this.slideTimer = window.setInterval(this.gRef + ".slide()", ndotPanel.xxcyc)
}
ndotPanel.prototype.slide = function() {
var elapsed = (new Date()).getTime() - this.startTime
if (elapsed > ndotPanel.slide) this.endSlide()
else {
var d = Math.round(Math.pow(ndotPanel.slide-elapsed, 2) * this.bigG)
if (this.open && this.dirType == "-") d = -d
else if (this.open && this.dirType == "+") d = -d
else if (!this.open && this.dirType == "-") d = -this.dim + d
else d = this.dim + d
this.moveTo(d)
}
}
ndotPanel.prototype.endSlide = function() {
this.slideTimer = window.clearTimeout(this.slideTimer)
this.moveTo(this.open ? this.outPos : this.panelorigin)
if (!this.open) this.setVisibility(false)
if ((this.open && !this.over) || (!this.open && this.over)) {
this.startSlide(this.over)
}
}
ndotPanel.prototype.setVisibility = function(breveal) { 
var s = this.ns4 ? this.container : this.container.style
s.visibility = breveal ? "visible" : "hidden"
}
ndotPanel.prototype.moveTo = function(p) { 
this.style[this.whichway == "h" ? "left" : "top"] = this.ns4 ? p : p + "px"
}
ndotPanel.prototype.getPos = function(c) {
return parseInt(this.style[c])
}
ndotPanel.prototype.onactivate = function() { }
ndotPanel.prototype.ondeactivate = function() { }