// JavaScript Document
//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="coverart/usorig.html" target="main">US Original</a>'
menu1[1]='<a href="coverart/usrecent.html" target="main">US Recent</a>'
menu1[2]='<a href="coverart/usshadows.html" target="main">US Shadows</a>'
menu1[3]='<a href="coverart/specialeditions.html" target="main">US Special Editions</a>'
menu1[4]='<a href="coverart/ukfaces.html" target="main">UK Faces</a>'
menu1[5]='<a href="coverart/ukorig.html" target="main">UK Original</a>'
menu1[6]='<a href="coverart/ukangel.html" target="main">UK Angel</a>'
menu1[7]='<a href="coverart/foreign.html" target="main">Foreign</a>'

var menu2=new Array()
menu2[0]='<a href="books/book1.html" target="main">Guilty Pleasures</a>'
menu2[1]='<a href="books/book2.html" target="main">The Laughing Corpse</a>'
menu2[2]='<a href="books/book3.html" target="main">Circus of the Damned</a>'
menu2[3]='<a href="books/book4.html" target="main">Lunatic Cafe</a>'
menu2[4]='<a href="books/book5.html" target="main">Bloody Bones</a>'
menu2[5]='<a href="books/book6.html" target="main">The Killing Dance</a>'
menu2[6]='<a href="books/book7.html" target="main">Burnt Offerings</a>'
menu2[7]='<a href="books/book8.html" target="main">Blue Moon</a>'
menu2[8]='<a href="books/book9.html" target="main">Obsidian Butterfly</a>'
menu2[9]='<a href="books/book10.html" target="main">Narcissus in Chains</a>'
menu2[10]='<a href="books/book11.html" target="main">Cerulean Sins</a>'
menu2[11]='<a href="books/book12.html" target="main">Incubus Dreams</a>'
menu2[12]='<a href="books/book14.html" target="main">Micah</a>'
menu2[13]='<a href="books/book13.html" target="main">Danse Macabre</a>'

var menu3=new Array()
menu3[0]='<a href="charactergallery/mastervampires.html" target="main">Master Vampires</a>'
menu3[1]='<a href="charactergallery/vampires.html" target="main">Vampires</a>'
menu3[2]='<a href="charactergallery/lycanthropes.html" target="main">Lycanthropes</a>'
menu3[3]='<a href="charactergallery/humans.html" target="main">Humans</a>'
menu3[4]='<a href="charactergallery/enemies.html" target="main">Enemies</a>'

var menu4=new Array()
menu4[0]='<a href="characterinformation/mastervampires.html" target="main"> Master Vampires</a>'
menu4[1]='<a href="characterinformation/vampires.html" target="main">Vampires</a>'
menu4[2]='<a href="characterinformation/lycanthropes.html" target="main">Lycanthropes</a>'
menu4[3]='<a href="characterinformation/opreternaturals.html" target="main">Other Preternaturals</a>'
menu4[4]='<a href="characterinformation/humans.html" target="main">Humans</a>'
menu4[5]='<a href="characterinformation/deceased.html" target="main">Deceased</a>'





var menuwidth='130px' //default menu width
var menubgcolor='#4F4F4F'  //menu bgcolor
var disappeardelay=0  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="no" //hide menu when user clicks within menu?

//No further editing 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.y < 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

