/***********************************************
* Sliding Menu Bar Script- © Dynamic Drive (www.dynamicdrive.com)
* Visit http://www.dynamicdrive.com/ for full source code
* This notice must stay intact for use
***********************************************/

var slidemenu_width='840px' //specify width of menu (in pixels)
var slidemenu_reveal='40px' //specify amount that menu should protrude initially
var slidemenu_top='300px'   //specify vertical offset of menu on page
var speed=30   //specify the speed of the slide

var ns4=document.layers?1:0
var ie4=document.all
var ns6=document.getElementById&&!document.all?1:0

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",100)
	}
}
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)+speed+"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)-speed+"px"
	else if(ns4&&themenu.right>rightboundary)
		themenu.right-=40
	else if (window.drawit){
		themenu.right=rightboundary
		clearInterval(drawit)
	}
}

