// external menu  Document

var slidemenu_height='480px' //specify height of menu (in pixels throughout)
var slidemenu_width='140px' //specify width of menu
var slidemenu_reveal='20px' //specify amount that menu should protrude initially
var slidemenu_top='86px'   //specify vertical offset of menu on page
var slidemenu_url="menu.htm" //specify path to menu file

var ns4=document.layers?1:0
var ie4=document.all
var ns6=document.getElementById&&!document.all?1:0

if (ie4||ns6)
document.write('<iframe scrolling="no" frameborder="0" id="slidemenubar2" style="right:'+((parseInt(slidemenu_width)-parseInt(slidemenu_reveal))*-1)+'px; top:'+slidemenu_top+'; width:'+slidemenu_width+'; height:'+slidemenu_height+'" src="'+slidemenu_url+'"></iframe>')
else if (ns4){
document.write('<style>\n#slidemenubar{\nwidth:'+slidemenu_width+';}\n<\/style>\n')
document.write('<layer id="slidemenubar" right=0 top='+slidemenu_top+' width='+slidemenu_width+' height='+slidemenu_height+' onMouseover="pull()" onMouseout="draw()" src="'+slidemenu_url+'" visibility=hide></layer>')
}
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (ns4){
document.slidemenubar.right=((parseInt(slidemenu_width)-parseInt(slidemenu_reveal))*-1)
document.slidemenubar.visibility="show"
setTimeout("window.onresize=regenerate",400)
}
}

window.onload=regenerate2

leftboundary=0
rightboundary=(parseInt(slidemenu_width)-parseInt(slidemenu_reveal))*-1

if (ie4||ns6){
document.write('</div>')
themenu=(ns6)? document.getElementById("slidemenubar2").style : document.all.slidemenubar2.style
}
else if (ns4){
document.write('</layer>')
themenu=document.layers.slidemenubar
}

function pull(){
if (window.drawit)
clearInterval(drawit)
pullit=setInterval("pullengine()",10)
}
function draw(){
clearInterval(pullit)
drawit=setInterval("drawengine()",10)
}
function pullengine(){
if ((ie4||ns6)&&parseInt(themenu.right)<leftboundary)
themenu.right=parseInt(themenu.right)+10+"px"
else if(ns4&&themenu.right<leftboundary)
themenu.right+=10
else if (window.pullit){
themenu.right=0
clearInterval(pullit)
}
}

function drawengine(){
if ((ie4||ns6)&&parseInt(themenu.right)>rightboundary)
themenu.right=parseInt(themenu.right)-10+"px"
else if(ns4&&themenu.right>rightboundary)
themenu.right-=10
else if (window.drawit){
themenu.right=rightboundary
clearInterval(drawit)
}
}
