<!--

/*
Image w/ description tooltip- By Dynamic Web Coding (www.dyn-web.com)
Copyright 2002 by Sharon Paine
Visit http://www.dynamicdrive.com for this script
*/

/* IMPORTANT: Put script after tooltip div or 
	 put tooltip div just before </BODY>. */

var dom = (document.getElementById) ? true : false;
var ns5 = ((navigator.userAgent.indexOf("Gecko")>-1) && dom) ? true: false;
var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
var ns4 = (document.layers && !dom) ? true : false;
var ie4 = (document.all && !dom) ? true : false;
var nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;

// resize fix for ns4
var origWidth, origHeight;
if (ns4) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

// avoid error of passing event object in older browsers
if (nodyn) { event = "nope" }

///////////////////////  CUSTOMIZE HERE   ////////////////////
// settings for tooltip 
// Do you want tip to move when mouse moves over link?
var tipFollowMouse= false;	
// Be sure to set tipWidth wide enough for widest image
var tipWidth= 432;
var offX= 20;	// how far from mouse to show tip
var offY= 60; 
var tipFontFamily= "arial, helvetica, verdana, sans-serif";
var tipFontSize= "8pt";
// set default text color and background color for tooltip here
// individual tooltips can have their own (set in messages arrays)
// but don't have to
var tipFontColor= "white";
var tipBgColor= "#669966"; 
var tipBorderColor= "#000080";
var tipBorderWidth= 2;
var tipBorderStyle= "ridge";
var tipPadding= 4;

// tooltip content goes here (image, description, optional bgColor, optional textcolor)
var messages = new Array();
// multi-dimensional arrays containing: 
// image and text for tooltip
// optional: bgColor and color to be sent to tooltip
messages[0] = new Array('01.jpg','From a 14th century choir book, Monastery St. Marco, Florence, 1929 World Congress');
messages[1] = new Array('02.jpg','Carlo Crivelli, St. Bernardinus of Sienna, 1477, 1929 World Congress');
messages[2] = new Array('03.jpg','Death of the Virgin, Martin Schongauer, 1492, Carl Zeiss Stiftung Catalogue');
messages[3] = new Array('04.jpg','St. Jerome by Lucas van Leyden, 1518, Carl Zeiss Stiftung Catalogue');
messages[4] = new Array('05.jpg','Pope Leo X with two Cardinals, Raphael, 1518');
messages[5] = new Array('06.jpg','Detail of Pope Leo\'s hands, Raphael, 1518');
messages[6] = new Array('07_small.jpg','<b><font color=black>Click</b></font> to go to the National Gallery Website');
messages[7] = new Array('08.jpg','Hugo de Provence, Tommaso de Modena, Treviso, with spectacles, 1352');
messages[8] = new Array('09.jpg','Nicholas of Rouen, Tommaso da Modena, Treviso, with a single reading glass, 1352');
messages[9] = new Array('10.jpg','Inside the Chapter House of the Dominican Monastery, Seminary Vescoville, Treviso');
messages[10] = new Array('11.jpg','Evangelist St. Paul in the initial D, a 1380 French Bible, Bibliotheque Nationale, Paris, Brillen, Rossi');
messages[11] = new Array('12.jpg','Holy Augustinus of the Master of Mondsee, 1490-1500, OG 4963, Oesterreichische Galerie Belvedere, Vienna, Austria');
messages[12] = new Array('13.jpg','Holy Augustinus of the Master of Grossgmain, 1498, OG 4859, Oesterreichische Galerie Belvedere, Vienna, Austria');
messages[13] = new Array('14.jpg','Death of the Virgin, Master of Heiligenkreutz, probably Bohemian, c. 1400, Tempera and oil with gold on wood, 66 x 53.3 cm. © The Cleveland Museum of Art, Gift of the Friends of The Cleveland Museum of Art in memory of John Long Severance, 1936.496 ');
messages[14] = new Array('15.jpg','Detail of  Death of the Virgin, Master of Heiligenkreutz, probably Bohemian, c. 1400, Tempera and oil with gold on wood, 66 x 53.3 cm. © The Cleveland Museum of Art, Gift of the Friends of The Cleveland Museum of Art in memory of John Long Severance, 1936.496 ');
messages[15] = new Array('16.jpg','The Vocation of Saint Matthew-Hendrick Terbrugghen, Dutch, Marly');
messages[16] = new Array('17.jpg','The Death of Mary, Niedersaechsische Landesgalerie, Hannover, Germany, c. 1418');
messages[17] = new Array('18.jpg','The predella in St Jacob\'s Church in Rothenburg ob der Tauber, 1466');
messages[18] = new Array('19.jpg','Circumcision of Jesus, Friedrich Herlin, Alter of St. Jacob\'s Church in Rothenburg ob der tauber, 1466');
messages[19] = new Array('20.jpg','Detail of  Circumcision of Jesus, Friedrich Herlin, Alter of St. Jacob\'s Church in Rothenburg ob der tauber, 1466');
messages[20] = new Array('21.jpg','St. Peter with spectacles, St. Jacobs Church, Friedrich Herlin, 1466');
messages[21] = new Array('22.jpg','Detail of St. Peter with spectacles, 1466');
messages[22] = new Array('23.jpg','Detail of St. Luke, behind the high alter in the church at Niederwildungen, Konrad von Soest, 1404');
messages[23] = new Array('24.jpg','Main Alter of the Church of St. Wolfgang, Austria, Michael Pacher, 1471-1481');
messages[24] = new Array('25.jpg','Detail from A Dying Mary, from the alter of the Church of St. Wolfgang, Pacher, 1471-1481');
messages[25] = new Array('26.jpg','Further detail of the alter of the Church of St Wolfgang, Pacher, this is either St. Luke or St. Mark');
messages[26] = new Array('27.jpg','Georges de La Tour St. Jerome Reading,  1621-23 Pierre Marly’s book ');
messages[27] = new Array('28.jpg','St. Jerome, Ghirlandaio, circa 1480, Church of the Ognisanti, Florence');
messages[28] = new Array('29.jpg','Taken in Kingmaker Attraction, Warwick Castle');
messages[29] = new Array('30.jpg','Also taken in Kingmaker Attraction, Warwick Castle');
messages[30] = new Array('31.jpg','Moses wearing rivet spectacles, Rembertus Renesche, 1447, Grosekerk, Deventer, The Netherlands (Situated on the south-wall of the high-choir of the church. To the right you see the Queen of Sheba looking out of a window.)');
messages[31] = new Array('32.jpg','Portable Alterpiece, Circle of Bartolome Bermjo, Spanish, c. last quarter 15th century, North Carolina Museum of Art, Raleigh, Purchased with funds from the State of North Carolina');
messages[32] = new Array('33.jpg','Portable Alterpiece, lower center panel: St. Jerome, Circle of Bartolome Bermjo, Spanish, c. last quarter 15th century, North Carolina Museum of Art, Raleigh, Purchased with funds from the State of North Carolina');
messages[33] = new Array('34.jpg','Detail of Portable Alterpiece, lower center panel: St. Jerome, Circle of Bartolome Bermjo, Spanish, c. last quarter 15th century, North Carolina Museum of Art, Raleigh, Purchased with funds from the State of North Carolina');
messages[34] = new Array('35_small.jpg','<b><font color=black>Click</b></font> to go to the Metropolitan Museum of Art Website');
messages[35] = new Array('36.jpg','St. Jerome, British Optical Association Museum');
messages[36] = new Array('37.jpg','St. Jerome in his Study, Joos Van Cleve, 16th century');
messages[37] = new Array('38.jpg','St. Jerome in His Study, after van Reymerswaele, possibly 16th century, BOA Museum');
messages[38] = new Array('39.jpg','Moses wearing Spectacles, from the Deutsche Bible (Cod. Pal.Germ.19) fol. 141 v, Universitatsbibliothek, Heidelberg, Germany');
messages[39] = new Array('40.jpg','Richard Mather (1596-1669) woodcut by John Foster c. 1670, courtesy American Antiquarian Society');
messages[40] = new Array('41.jpg','Dichter Vergil, Ludger tom Ring the Elder, c. 1530, Landesmuseum, Munich, Germany, (not a religious figure, but he was the most prominent poet of his time)');
messages[41] = new Array('42.jpg','Holy Abbess Ottilie with Reading Stones, Ludwig Konraiter, Stifsmuseum des Pramonst Near Innisbrook, Austria, 1485-1490');
messages[42] = new Array('43.jpg','From Madonna and Child with Canon George van der Paele, Jan van Eyck, 1436, Groeninge Museum, Bruges');
messages[43] = new Array('44.jpg','Detail of Madonna and Child with Canon George van der Paele, Jan van Eyck, 1436, Groeninge Museum, Bruges');
messages[44] = new Array('45.jpg','An Old Woman Praying, Nicolaes Maes, Dutch, 17th century, Worcester Art Museum');
messages[45] = new Array('46.jpg','Detail of An Old Woman Praying, Nicolaes Maes, Dutch, 17th century, Worcester Art Museum');
messages[46] = new Array('47.jpg','Detail from the scene of Mary’s death, from a larger polyptychon which has four scenes of the life of the Virgin Mary, by an unknown Austrian artist, 1439, the alter of Neuburger Cloister, Austria (an apostle is reading prayers. Note the frame construction showing tabs which, with thread tying the tabs together, would allow the frame to enclose and also hold the lenses.)');


////////////////////  END OF CUSTOMIZATION AREA  ///////////////////

// preload images that are to appear in tooltip
// from arrays above
if (document.images) {
	var theImgs = new Array();
	for (var i=0; i<messages.length; i++) {
  	theImgs[i] = new Image();
		theImgs[i].src = messages[i][0];
  }
}

// to layout image and text, 2-row table, image centered in top cell
// these go in var tip in doTooltip function
// startStr goes before image, midStr goes between image and text
var startStr = '<table width="' + tipWidth + '"><tr><td align="center" width="100%"><img src="';
var midStr = '" border="0"></td></tr><tr><td valign="top">';
var endStr = '</td></tr></table>';

////////////////////////////////////////////////////////////
//  initTip	- initialization for tooltip.
//		Global variables for tooltip. 
//		Set styles for all but ns4. 
//		Set up mousemove capture if tipFollowMouse set true.
////////////////////////////////////////////////////////////
var tooltip, tipcss;
function initTip() {
	if (nodyn) return;
	tooltip = (ns4)? document.tipDiv.document: (ie4)? document.all['tipDiv']: (ie5||ns5)? document.getElementById('tipDiv'): null;
	tipcss = (ns4)? document.tipDiv: tooltip.style;
	if (ie4||ie5||ns5) {	// ns4 would lose all this on rewrites
		tipcss.width = tipWidth+"px";
		tipcss.fontFamily = tipFontFamily;
		tipcss.fontSize = tipFontSize;
		tipcss.color = tipFontColor;
		tipcss.backgroundColor = tipBgColor;
		tipcss.borderColor = tipBorderColor;
		tipcss.borderWidth = tipBorderWidth+"px";
		tipcss.padding = tipPadding+"px";
		tipcss.borderStyle = tipBorderStyle;
	}
	if (tooltip&&tipFollowMouse) {
		if (ns4) document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove = trackMouse;
	}
}

window.onload = initTip;

/////////////////////////////////////////////////
//  doTooltip function
//			Assembles content for tooltip and writes 
//			it to tipDiv
/////////////////////////////////////////////////
var t1,t2;	// for setTimeouts
var tipOn = false;	// check if over tooltip link
function doTooltip(evt,num) {
	if (!tooltip) return;
	if (t1) clearTimeout(t1);	if (t2) clearTimeout(t2);
	tipOn = true;
	// set colors if included in messages array
	if (messages[num][2])	var curBgColor = messages[num][2];
	else curBgColor = tipBgColor;
	if (messages[num][3])	var curFontColor = messages[num][3];
	else curFontColor = tipFontColor;
	if (ns4) {
		var tip = '<table bgcolor="' + tipBorderColor + '" width="' + tipWidth + '" cellspacing="0" cellpadding="' + tipBorderWidth + '" border="0"><tr><td><table bgcolor="' + curBgColor + '"width="100%" cellspacing="0" cellpadding="' + tipPadding + '" border="0"><tr><td>'+ startStr + messages[num][0] + midStr + '<center>' + '<span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span>' + endStr + '</td></tr></table></td></tr></table>';
		tooltip.write(tip);
		tooltip.close();
	} else if (ie4||ie5||ns5) {
		var tip = startStr + messages[num][0] + midStr + '<center>' + '<span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span>' + endStr;
		tipcss.backgroundColor = curBgColor;
	 	tooltip.innerHTML = tip;
	}
	if (!tipFollowMouse) positionTip(evt);
	else t1=setTimeout("tipcss.visibility='visible'",100);
}

var mouseX, mouseY;
function trackMouse(evt) {
	mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
	mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.scrollTop;
	if (tipOn) positionTip(evt);
}

/////////////////////////////////////////////////////////////
//  positionTip function
//		If tipFollowMouse set false, so trackMouse function
//		not being used, get position of mouseover event.
//		Calculations use mouseover event position, 
//		offset amounts and tooltip width to position
//		tooltip within window.
/////////////////////////////////////////////////////////////
function positionTip(evt) {
	if (!tipFollowMouse) {
		mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
		mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.scrollTop;
	}
	// tooltip width and height
	var tpWd = (ns4)? tooltip.width: (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;
	var tpHt = (ns4)? tooltip.height: (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;
	// document area in view (subtract scrollbar width for ns)
	var winWd = (ns4||ns5)? window.innerWidth-20+window.pageXOffset: document.body.clientWidth+document.body.scrollLeft;
	var winHt = (ns4||ns5)? window.innerHeight-20+window.pageYOffset: document.body.clientHeight+document.body.scrollTop;
	// check mouse position against tip and window dimensions
	// and position the tooltip 
	if ((mouseX+offX+tpWd)>winWd) 
		tipcss.left = (ns4)? mouseX-(tpWd+offX): mouseX-(tpWd+offX)+"px";
	else tipcss.left = (ns4)? mouseX+offX: mouseX+offX+"px";
	if ((mouseY+offY+tpHt)>winHt) 
		tipcss.top = (ns4)? winHt-(tpHt+offY): winHt-(tpHt+offY)+"px";
	else tipcss.top = (ns4)? mouseY+offY: mouseY+offY+"px";
	if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);
}

function hideTip() {
	if (!tooltip) return;
	t2=setTimeout("tipcss.visibility='hidden'",100);
	tipOn = false;
}

//-->



