/********************************************************************************
Copyright (C) 1999 Thomas Brattli
This script is made by and copyrighted to Thomas Brattli at www.bratta.com
Visit for more great scripts. This may be used freely as long as this msg is intact!
I will also appriciate any links you could give me.
********************************************************************************/

//I have modified the copyrighted script so that I can fit it better to my understanding of my site.

//Default browsercheck, added to all scripts!
function checkBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}
bw=new checkBrowser()
/***************************************************************************************
Variables to set:
***************************************************************************************/
citations=new Array()
//Write your descriptions in here.
citations[0]="Homer. <em>The Iliad</em>. Trans. by Robert Fagles. III.3-7"
citations[1]="Kirk, G.S. <em>The Iliad: A Commentary Vol. I: Books 1-4</em> Cambridge: 1985 p.265"
citations[2]="Vergil. <em>Georgics</em>. Ed. by R.A.B. Mynors. Oxford: Clarendon Press. 1990 p.298"
citations[3]="Herodotus. <em>The Histories</em>. Trans. by A.D. Godley. 2.32; Loeb p.313"
citations[4]="Vergil. <em>Georgics</em>. IV.290-4"
citations[5]="Pliny. 4.11.44; Loeb p.151"
citations[6]="Meyboom, P.G.P. <em>The Nile Mosaic of Palestrina</em>.  Leiden: E.J. Brill, 1995. p.150."
citations[7]="Versluys, M.J. <em>Aegyptiaca Romana</em>. Leiden: Brill, 2002.  p.276"
citations[8]="Meyboom 152"
citations[9]="Versluys 294"
citations[10]="Versluys 283"
citations[11]="Pliny. <em>Natural Histories</em>. Trans.by H. Rackham. 6.22.70 &amp; 7.2.25; Loeb 391&amp;523"
citations[12]="Pliny 7.2.25-27; Loeb 523-525"
citations[13]="Pliny 6.35.188; Loeb 479"
citations[14]="Versluys 271"
citations[15]="Versluys 283"
citations[16]="Versluys 288"
citations[17]="Versluys 274"
//To have more descriptions just add to the array.

fromX=10 //How much from the actual mouse X should the description box appear?
fromY=-5////How much from the actual mouse Y should the description box appear?

//To set the font size, font type, border color or remove the border or whatever,
//change the clDescription class in the stylesheet.

//Makes crossbrowser object.
function makeObj(obj){                                                        
    this.css=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;
    this.wref=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj].document:0;        
this.writeIt=b_writeIt;                                                                                                                        
return this
}
function b_writeIt(text){if(bw.ns4){this.wref.write(text);this.wref.close()}
else this.wref.innerHTML=text}

//Capturing mousemove
var descx,descy;
function popmousemove(e){descx=bw.ns4?e.pageX:event.x; descy=bw.ns4?e.pageY:event.y}

//Initiates page
var isLoaded;
function popupInit(){
    oDesc=new makeObj('divDescription')
    if(bw.ns4)document.captureEvents(Event.MOUSEMOVE)
    document.onmousemove=popmousemove;
    isLoaded=true;
}
//Shows the citations
function popup(num){
    if(isLoaded){
oDesc.writeIt('<span class="clDescription">'+citations[num]+'</span>')
if(bw.ie5) descy=descy+document.body.scrollTop
oDesc.css.left=descx+fromX; oDesc.css.top=descy+fromY
oDesc.css.visibility='visible'
    }
}
//Hides it
function popout(num){
if(isLoaded) oDesc.css.visibility='hidden'
}

//initiates page on pageload.
onload=popupInit;