//menu.js

<!--BEGIN SCRIPT

//Pop-it menu- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use

var linkset=new Array()
//SPECIFY MENU SETS AND THEIR LINKS. FOLLOW SYNTAX LAID OUT

linkset[0]=' <div class="menuitems"><a href="index.php">Home</a></div>'
linkset[0]+='<div class="menuitems"><a href="about.html">About Me</a></div>'
linkset[0]+='<div class="menuitems"><a href="coffee.html">Coffee And Writing</a></div>'
linkset[0]+='<div class="menuitems"><a href="prose.html">Prose</a></div>'
linkset[0]+='<div class="menuitems"><a href="poetry.html">Poetry</a></div>'
linkset[0]+='<div class="menuitems"><a href="articles.html">Articles</a></div>'
linkset[0]+='<div class="menuitems"><a href="midrash.html">Midrash</a></div>'
linkset[0]+='<div class="menuitems"><a href="art.html">Visual Art</a></div>'
linkset[0]+='<div class="menuitems"><a href="/genealogy/index.html">Genealogy</a></div>'
linkset[0]+='<div class="menuitems"><a href="resume.html">Resume</a></div>'
linkset[0]+='<div class="menuitems"><a href="reading.html">Road Show</a></div>'
linkset[0]+='<div class="menuitems"><a href="/cgi-bin/cutecast/cutecast.pl">Forums</a></div>'
linkset[0]+='<div class="menuitems"><a href="mailto:<hess@havecoffeewillwrite.com">e-mail</a></div>'

linkset[1]='<div class="menuitems"><a href="http://airamericaradio.com/" target=new>Air America</a></div>'
linkset[1]+='<div class="menuitems"><a href="http://www.aish.com/" target=new>Aish HaTorah</a></div>'
linkset[1]+='<div class="menuitems"><a href="http://www.beliefnet.com/index.html" target=new>Beliefnet</a></div>'
linkset[1]+='<div class="menuitems"><a href="http://www.cnn.com/" target=new>CNN</a></div>'
linkset[1]+='<div class="menuitems"><a href="http://www.ecocitycleveland.org/index.html" target=new>Eco City Cleveland</a></div>'
linkset[1]+='<div class="menuitems"><a href="http://prairiehome.publicradio.org/" target=new>Garrison Keillor</a></div>'
linkset[1]+='<div class="menuitems"><a href="http://www.randi.org/" target=new>James Randi</a></div>'
linkset[1]+='<div class="menuitems"><a href="http://www.salon.com/" target=new>Salon</a></div>'
linkset[1]+='<div class="menuitems"><a href="http://www.snopes.com/" target=new>Snopes</a></div>'
linkset[1]+='<div class="menuitems"><a href="http://www.wcpn.org/" target=new>WCPN 90.3</a></div>'
linkset[1]+='<div class="menuitems"><a href="mailto:webmaster@havecoffeewillwrite.com">Webmaster</a></div>'

linkset[2]='<div class="menuitems"><a href="http://www.buzzmachine.com/" target=new>BuzzMachine</a></div>'
linkset[2]+='<div class="menuitems"><a href="http://andrewsullivan.com/index.php" target=new>Daily Dish</a></div>'
linkset[2]+='<div class="menuitems"><a href="http://www.dailykos.com/" target=new>Daily KOS</a></div>'
linkset[2]+='<div class="menuitems"><a href="http://dangillmor.typepad.com/" target=new>Grassroots Journalism</a></div>'
linkset[2]+='<div class="menuitems"><a href="http://www.dailytroll.com/" target=new>I See Invisible People</a></div>'
linkset[2]+='<div class="menuitems"><a href="http://pharyngula.org/index" target=new>Pharyngula</a></div>'
linkset[2]+='<div class="menuitems"><a href="http://pikespeak.blogspot.com/" target=new>Pike Speak</a></div>'
linkset[2]+='<div class="menuitems"><a href="http://powerlineblog.com/" target=new>Power Line</a></div>'
linkset[2]+='<div class="menuitems"><a href="http://journalism.nyu.edu/pubzone/weblogs/pressthink/" target=new>Press Think</a></div>'
linkset[2]+='<div class="menuitems"><a href="http://www.swingstateproject.com/" target=new>Swing State Project</a></div>'

linkset[3]='<div class="menuitems"><a href="http://www.brewedfreshdaily.com/" target=new>Brewed Fresh Daily</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://cleveland_diary.blogspot.com/" target=new>Calahan&#39s Diary</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://www.coolcleveland.com/index.php/Main/Current" target=new>Cool Cleveland</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://www.collisionbend.com/" target=new>Collision Bend</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://www.creativeink.blogspot.com/" target=new>Creative Ink</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://www.democracyguy.typepad.com/" target=new>Democracy Guy</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://heartatwork.blogspot.com/" target=new>Heart @ Work</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://modmonkey.typepad.com/weblog/" target=new>Monkey Blog</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://andifeelfine.blogspot.com/" target=new>ITEOTWAWKI</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://www.colettesgrave.blogspot.com/" target=new>On Colette&#39s Grave</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://www.organicmechanic.org/" target=new>Organic Mechanic</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://www.coolcleveland.com/index.php/Main/RoldoLink" target=new>Roldo Link</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://sardonicviews.blogspot.com/" target=new>Sardonic Views</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://www.siciliansoulfood.com/" target=new>Sicilian Soul Food</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://www.smallbusinesses.blogspot.com/" target=new>Small Business Trends</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://mbmatthews.blogspot.com/" target=new>Street Smarts</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://www.virtuallori.com/" target=new>Virtual Lori</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://wazopia.blogspot.com/" target=new>Wazopia</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://www.danwismar.com/" target=new>Wizblog</a></div>'
linkset[3]+='<div class="menuitems"><a href="http://www.workingwithwords.blogspot.com/" target=new>Working With Words</a></div>'

////No need to edit beyond here

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
var ns4=document.layers

function showmenu(e,which){

if (!document.all&&!document.getElementById&&!document.layers)
return

clearhidemenu()

menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : ""
menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj

if (ie4||ns6)
menuobj.innerHTML=which
else{
menuobj.document.write('<layer name=gui bgColor=#ffffff width=100 onmouseover="clearhidemenu()" onmouseout="hidemenu()">'+which+'</layer>')
menuobj.document.close()
}

menuobj.contentwidth=(ie4||ns6)? menuobj.offsetWidth : menuobj.document.gui.document.width
menuobj.contentheight=(ie4||ns6)? menuobj.offsetHeight : menuobj.document.gui.document.height
eventX=ie4? event.clientX : ns6? e.clientX : e.x
eventY=ie4? event.clientY : ns6? e.clientY : e.y

//Find out how close the mouse is to the corner of the window
var rightedge=ie4? document.body.clientWidth-eventX : window.innerWidth-eventX
var bottomedge=ie4? document.body.clientHeight-eventY : window.innerHeight-eventY

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<menuobj.contentwidth)
//move the horizontal position of the menu to the left by it's width
menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX-menuobj.contentwidth : ns6? window.pageXOffset+eventX-menuobj.contentwidth : eventX-menuobj.contentwidth
else
//position the horizontal position of the menu where the mouse was clicked
menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX : ns6? window.pageXOffset+eventX : eventX

//same concept with the vertical position
if (bottomedge<menuobj.contentheight)
menuobj.thestyle.top=ie4? document.body.scrollTop+eventY-menuobj.contentheight : ns6? window.pageYOffset+eventY-menuobj.contentheight : eventY-menuobj.contentheight
else
menuobj.thestyle.top=ie4? document.body.scrollTop+event.clientY : ns6? window.pageYOffset+eventY : eventY
menuobj.thestyle.visibility="visible"
return false
}

function contains_ns6(a, b) {
//Determines if 1 element in contained in another- by Brainjar.com
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function hidemenu(){
if (window.menuobj)
menuobj.thestyle.visibility=(ie4||ns6)? "hidden" : "hide"
}

function dynamichide(e){
if (ie4&&!menuobj.contains(e.toElement))
hidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
hidemenu()
}

function delayhidemenu(){
if (ie4||ns6||ns4)
delayhide=setTimeout("hidemenu()",500)
}

function clearhidemenu(){
if (window.delayhide)
clearTimeout(delayhide)
}

function highlightmenu(e,state){
if (document.all)
source_el=event.srcElement
else if (document.getElementById)
source_el=e.target
if (source_el.className=="menuitems"){
source_el.id=(state=="on")? "mouseoverstyle" : ""
}
else{
while(source_el.id!="popmenu"){
source_el=document.getElementById? source_el.parentNode : source_el.parentElement
if (source_el.className=="menuitems"){
source_el.id=(state=="on")? "mouseoverstyle" : ""
}
}
}
}

if (ie4||ns6)
document.onclick=hidemenu

//END-->
