//Modified from:

/***********************************************
* 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='120px' //specify width of menu (in pixels)
var slidemenu_reveal='11px' //specify amount that menu should protrude initially
var slidemenu_top='100px'   //specify vertical offset of menu on page

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

if (ie4||ns6)
document.write('<div id="slidemenubar2" style="left:'+((parseInt(slidemenu_width)-parseInt(slidemenu_reveal))*-1)+'px; top:'+slidemenu_top+'; width:'+slidemenu_width+';" onmouseover="pull()" onmouseout="draw()">')
else if (ns4){
document.write('<style>\n#slidemenubar{\nwidth:'+slidemenu_width+';}\n<\/style>\n')
document.write('<layer id="slidemenubar" left="0" top="'+slidemenu_top+'" width="'+slidemenu_width+'" onmouseover="pull()" onmouseout="draw()" visibility="hide">')
}
document.write('<div class="sidebox">')

var sitems=new Array()

//siteitems[x]=["Item Text", "Optional URL associated with text", "title"]

sitems[0]=["2005", "/2005/", "Speedysnail 2005: There is no reason, there's just rhyme"]
sitems[1]=["About", "/2005/about.html", "What's that all about?"]
sitems[2]=["Contact", "/contact.html", "Contact me. Feed me back."]
sitems[3]=["Archives", "/archives.html", "1999 onwards"]
sitems[4]=["Detail", "/detail/", "Images in detail"]
sitems[5]=["Found", "/found/", "Things lost and found"]
sitems[6]=["Limericks", "/limericks/", "Definitely maybe"]
sitems[7]=["Cartoon Lounge", "/lounge/", "Upholstered in virtual vinyl"]
sitems[8]=["The Stand-Up", "/standup/", "Be counted"]
sitems[9]=["Pacific Politics", "/pacific/", "Academic papers"]
sitems[10]=["Rory Central", "/rory/", "Where things get personal"]
sitems[11]=["In Theory", "/theory/", "Academic papers"]
sitems[12]=["Outside", "/2005/outside.html", "Other sites"]
sitems[13]=["Feed", "/feed/", "Feed me, Seymour!"]

if (ie4||ns4||ns6){
for (i=0;i<sitems.length;i++){
if (sitems[i][1])
document.write('<a href="'+sitems[i][1]+'" class="menu" title="'+sitems[i][2]+'">')
document.write(sitems[i][0])
if (sitems[i][1])
document.write('</a>')
document.write('<br />\n')
}
}

function regenerate(){
window.location.reload()
}
function regenerate2(){
if (ns4){
document.slidemenubar.left=((parseInt(slidemenu_width)-parseInt(slidemenu_reveal))*-1)
document.slidemenubar.visibility="show"
setTimeout("window.onresize=regenerate",400)
}
}
window.onload=regenerate2

rightboundary=0
leftboundary=(parseInt(slidemenu_width)-parseInt(slidemenu_reveal))*-1

document.write('</div>')

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()",4)
}
function draw(){
clearInterval(pullit)
drawit=setInterval("drawengine()",4)
}
function pullengine(){
if ((ie4||ns6)&&parseInt(themenu.left)<rightboundary)
themenu.left=parseInt(themenu.left)+10+"px"
else if(ns4&&themenu.left<rightboundary)
themenu.left+=10
else if (window.pullit){
themenu.left=0
clearInterval(pullit)
}
}

function drawengine(){
if ((ie4||ns6)&&parseInt(themenu.left)>leftboundary)
themenu.left=parseInt(themenu.left)-10+"px"
else if(ns4&&themenu.left>leftboundary)
themenu.left-=10
else if (window.drawit){
themenu.left=leftboundary
clearInterval(drawit)
}
}

