
/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="biography.php" class="menu2">Biography</a>'
menu1[1]='<a href="bibliography.php" class="menu2">Bibliography</a>'
menu1[2]='<a href="news.php" class="menu2"><b>News and New Books</b></a>'
menu1[3]='<a href="prizesandawards.php" class="menu2">Prizes and Awards</a>'
menu1[4]='<a href="reviews.php" class="menu2">Reviews</a>'
menu1[5]='<a href="on_fantasy_fiction.php" class="menu2">On Fantasy Fiction</a>'
menu1[6]='<a href="links.php" class="menu2">Links</a>'


//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="book_heastwardho.php" class="menu2">Heastward Ho!</a>'
menu2[1]='<a href="book_vampirevoles.php" class="menu2">Vampire Voles</a>'
menu2[2]='<a href="book_gaslightgeezers.php" class="menu2">Gaslight Geezers</a>'
menu2[3]='<a href="book_shadow-hawk.php" class="menu2">Shadow-Hawk</a>'
menu2[4]='<a href="book_castlestorm.php" class="menu2">Castle Storm</a>'
menu2[5]='<a href="book_windjammerrun.php" class="menu2">Windjammer Run</a>'
menu2[6]='<a href="book_landofmists.php" class="menu2">Land of Mists</a>'
menu2[7]='<a href="book_thunderoak.php" class="menu2">Thunder Oak</a>'
menu2[8]='<a href="book_theprincelyflower.php" class="menu2">The Princely Flower</a>'
menu2[9]='<a href="book_amidsummersnightmare.php" class="menu2">A Midsummer&#8217;s<br>&nbsp;&nbsp;Nightmare</a>'
menu2[10]='<a href="book_theroofofvoyaging.php" class="menu2">The Roof of Voyaging</a>'
menu2[11]='<a href="book_houseoftribes.php" class="menu2">House of Tribes</a>'
menu2[12]='<a href="book_angel.php" class="menu2">Angel</a>'
menu2[13]='<a href="book_highlander.php" class="menu2">Highlander</a>'


//Contents for menu 3, and so on
var menu3=new Array()
menu3[0]='<a href="book_scarletsash.php" class="menu2"><b>Scarlet Sash</b></a>'
menu3[1]='<a href="book_kiwiwars.php" class="menu2">Kiwi Wars</a>'
menu3[2]='<a href="book_rogueofficer.php" class="menu2">Rogue Officer</a>'
menu3[3]='<a href="book_brothersoftheblade.php" class="menu2">Brothers of the Blade</a>'
menu3[4]='<a href="book_attackontheredan.php" class="menu2">Attack on the Redan</a>'
menu3[5]='<a href="book_thewintersoldiers.php" class="menu2">The Winter Soldiers</a>'
menu3[6]='<a href="book_soldiersinthemist.php" class="menu2">Soldiers in the Mist</a>'
menu3[7]='<a href="book_thevalleyofdeath.php" class="menu2">The Valley of Death</a>'
menu3[8]='<a href="book_thedevilsown.php" class="menu2">The Devil&#8217;s Own</a>'

//Contents for menu 4, and so on
var menu4=new Array()
menu4[0]='<a href="book_thehundredtoweredcity.php" class="menu2"><b>Hundred-towered City</b></a>'
menu4[1]='<a href="book_jigsaw.php" class="menu2">Jigsaw</a>'
menu4[2]='<a href="book_attica.php" class="menu2">Attica</a>'
menu4[3]='<a href="book_thesilverclaw.php" class="menu2">The Silver Claw</a>'
menu4[4]='<a href="book_boggartandfen.php" class="menu2">Boggart and Fen</a>'
menu4[5]='<a href="book_mallmocscastle.php" class="menu2">Mallmoc&#8217;s Castle</a>'
menu4[6]='<a href="book_spiggotsquest.php" class="menu2">Spiggot&#8217;s Quest</a>'
menu4[7]='<a href="book_nightdancer.php" class="menu2">Nightdancer</a>'
menu4[8]='<a href="book_monsterschool.php" class="menu2">Monster School</a>'
menu4[9]='<a href="book_soldiersson.php" class="menu2">Soldier&#8217;s Son</a>'
menu4[10]='<a href="book_heynewkid.php" class="menu2">Hey, New Kid!</a>'
menu4[11]='<a href="book_thelanternfox.php" class="menu2">The Lantern Fox</a>'
menu4[12]='<a href="book_heavenlyhostsvhellutd.php" class="menu2">Heavenly Hosts</a>'
menu4[13]='<a href="book_drummerboy.php" class="menu2">Drummer Boy</a>'
menu4[14]='<a href="book_thegargoyle.php" class="menu2">The Gargoyle</a>'
menu4[15]='<a href="book_thebrontegirls.php" class="menu2">The Brontė Girls</a>'
menu4[16]='<a href="book_thephantompiper.php" class="menu2">The Phantom Piper</a>'
menu4[17]='<a href="book_theelectrickid.php" class="menu2">The Electric Kid</a>'
menu4[18]='<a href="book_thedrowners.php" class="menu2">The Drowners</a>'

		
var menuwidth='165px' //default menu width
var menubgcolor='#193919'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.n < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu
