<!--

/*
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('1.jpg','Scissors-glasses with arms and case of horn, lenses are - 3.5 and - 4.5, last quarter 18th century, Deutsches Museum, Munich');
messages[1] = new Array('2.jpg','Large magnifier with a horn rim, 4.5 inch diameter, fits into a wooden case, dated 1823');
messages[2] = new Array('3.jpg','A neatly carved horn case, 1720-40');
messages[3] = new Array('4.jpg','Carved horn spectacles Ceylonese, 18th century, Faber-Timm book');
messages[4] = new Array('5.gif','Eyeglasses for strabismus, made of horn, very unusual');
messages[5] = new Array('6.jpg','Horn-framed magnifier, originally part of the Medici Collection, probably early 17th century, IMSS, Florence');
messages[6] = new Array('7.jpg','A pair of Masterpiece spectacles, fit into a case dated 1693, German National Museum');
messages[7] = new Array('8.jpg','Horn framed nose spectacles, Japanese, probably 18th century, Museo dell\'Occhiali');
messages[8] = new Array('9.jpg','Horn and brass case, with unusual style opening, 18th century, Medical History Institute, University of Bern');
messages[9] = new Array('10.jpg','Horn-framed two slit bridge spectacles in a paper mache case with a tooled leather covering, probably German, late 17th century, Galleria Guglielmo Tabacchi-Safilo Museum, Padua');
messages[10] = new Array('11.jpg','Double lorgnette with a horn frame fit into a horn case, early 19th century');
messages[11] = new Array('12.jpg','Monoyer ophthalmoscope in a horn case, Ferdinand Monoyer (1836-1912), dated 1864, produced by old Nachet and Sons in Paris, Vascellari Collection');
messages[12] = new Array('13.jpg','Horn-framed spectacles, double hinge sides, probably early 19th century Friedenwald-Romano Library, Wilmer Eye Institute, Baltimore');
messages[13] = new Array('14.jpg','Horn frame with brass sides, possibly home-made, circa 1800');
messages[14] = new Array('15.jpg','Scissors-glasses worn by Michael Lebby, circa 1800, BOA Museum Collection');
messages[15] = new Array('16.jpg','Long handled lorgnette, brass with oval lenses, decorated with golden stars, mid 19th century');
messages[16] = new Array('17.jpg','4 lens spectacles, light blue tint, horn frame and turnpin sides, circa 1825, Vascellari Collection');
messages[17] = new Array('18.jpg','Small Horn, brisé Cockade Fan (shown half folded), sticks carved in arrow pattern and extensively clouté with steel.   Guardstick handles end in large horn rings.  Frayed black ribbon joining sticks.  Single draw spyglass in pivot, c.1790, Kortland Collection');
messages[18] = new Array('19.jpg','White horn English bow spectacles, 4 slit bridge, grayish glass lenses, circa 1675');
messages[19] = new Array('20.jpg','Rectangular wood and horn case for bow spectacles, note the upper side features a carving of a mythological scene from the legend of Renaud and Armide (from the Crusades, circa 1100), early 18th century, unusual, Galleria Guglielmo Tabacchi-Safilo Museum, Padua');
messages[20] = new Array('21.jpg','Horn framed magnifier, at least several inches across, circa 1800');
messages[21] = new Array('22.jpg','Steel framed Martins Margins, double hinge sides, circa 1800, horn inserts.');
messages[22] = new Array('23.jpg','Horn single piece lorgnette, early 19th century');
messages[23] = new Array('24.jpg','Folding lorgnette, early 19th century, BOA Museum');
messages[24] = new Array('25.jpg','Horn framed magnifier, trefoil handle, 3 1/2 inch diameter, Science Museum, London');
messages[25] = new Array('26.jpg','Rivet spectacles, medium brown thin horn, permission by the Superintendancy for Archeologica of Tuscany, University of Florence');
messages[26] = new Array('27.jpg','Blond horn monocle with a natural rayskin covered case, high minus lens, 3 inch diameter, Italian or French, circa 1720, Vascellari Collection');
messages[27] = new Array('28.jpg','Folding nose spectacles, style of Martins Margins, with light horn frame and dark horn inserts, original paper mache pull-off case, circa 1765');
messages[28] = new Array('29.jpg','Ox horn spectacles, carved pattern at the nosebridge symbolizes herbs of eternal youth, Seoul National University Medical School Museum, South Korea');
messages[29] = new Array('30.jpg','Horn spectacles, South Indian, late 17th century, Faber-Timm book');
messages[30] = new Array('31.jpg','Very rare Japanese, likely early 18th century');
messages[31] = new Array('32.jpg','Round frame, horn with brass and steel sides, turnpin, after 1800');
messages[32] = new Array('33.jpg','Scissors-glasses, totally pale horn including the pear-shaped case, probably made in Nuremburg, Germany, third quarter 18th century, Galleria Guglielmo Tabacchi-Safilo Museum, Padua');
messages[33] = new Array('34.jpg','Three magnifiers, light horn, various shapes of the cases, circa 1800');
messages[34] = new Array('35.jpg','Light horn spectacles with double hinge sides, probably early 19th century');
messages[35] = new Array('36.jpg','Horn front with probably dark tortoiseshell double hinge sides, cloth');
messages[36] = new Array('37.jpg','Single large magnifier with horn frame and handle with two circles, BOA Museum');
messages[37] = new Array('38.jpg','Horn frame and steel non-folding bridge, in a replica case, c.1725');
messages[38] = new Array('39.jpg','Pierced horn brisé fan.  Decorated with three rows of small, hand-painted flowers.   Single draw spyglass in pivot.  French, 1800-1820.');
messages[39] = new Array('40.jpg','Oriental spectacles with double-hinged folding sides and Japanese endings, circa 1890');
messages[40] = new Array('41.jpg','Temple spectacles in horn, late 18th century');
messages[41] = new Array('42.jpg','Simple oval Adam’s style folding lorgnette which fits into a horn case, early 19th century');
messages[42] = new Array('43.jpg','Reproduction of rivet spectacles, circa 1350, TYPE 2');
messages[43] = new Array('44.jpg','Early horn long arm magnifier fits into a horn case, circa 1750');
messages[44] = new Array('45.jpg','Light brown horn framed nose spectacles, with pivoted bow bridge, late 17th century, Vascellari Collection');
messages[45] = new Array('46.jpg','Thought it looks like tortoiseshell and silver, this is the more unusual horn and nickel silver, turnpin sides, first half 19th century');
messages[46] = new Array('47.jpg','Solid horn pull-off case, circa 1800, extremely unusual');
messages[47] = new Array('48.jpg','Horn and brass eyeglasses, Chinese, folding, ear cords and forehead prop (nasal protrusion), circa 1830 but probably made over a period of decades 18th – 19th century');
messages[48] = new Array('49.jpg','Magnifier, desk top circular style, circa 1850');
messages[49] = new Array('50.jpg','Individual rectangular pieces of horn, several natural colors');
messages[50] = new Array('51.jpg','Solid silver and horn scissor-glasses, with oil paintings on both sides of the handle, French, hallmarked, circa 1790');
messages[51] = new Array('52.jpg','Horn reading glass, circa 1750');
messages[52] = new Array('53.jpg','Horn and steel bow-spring spectacles, circa 1730');
messages[53] = new Array('54.jpg','Round frame spectacles with double hinge sides, circa 1800');
messages[54] = new Array('55.jpg','Solid silver and horn lorgnette, the first style by George Adams, Sr, broad handle embossed with machine-turned decor, circa 1770');
messages[55] = new Array('56.jpg','Horn, brisé cockade Fan (shown half folded).   Sticks carved in a complex pattern with trefoils centrally and with small circles and toothed sections at tops, black decorations and clouté with steel.   Guardsticks and 4 outer sticks each side left as natural horn, 8 inner sticks painted yellow with alternate toothed portions left unpainted.  Single draw spyglass in pivot, c.1790.');
messages[56] = new Array('57.jpg','Carved folding round frame Japanese spectacles, fit in a pear-shaped case also made of horn, cica 1800 but may indeed be earlier, extremely unusual.');
messages[57] = new Array('58.jpg','Spectacles with wide side of solid horn, turnpin extensions, circa early 19th century, Deutsches Museum, quite unusual');
messages[58] = new Array('59.jpg','Pantoscopic spectacles with high hinges, circa 1865');
messages[59] = new Array('60.jpg','Horn magnifying mirror, with alternative diminishing lens, in the form of scissors glasses, circa 1820');
messages[60] = new Array('61.jpg','Japanese nose spectacles, horn and wood, 18th century, Optisches Museum, Jena');
messages[61] = new Array('62.jpg','Horn spectacles with a slit bridge and a crude wooden case, c. 1650');
messages[62] = new Array('63.jpg','Chinese nose spectacles with very dark tea crystal glass lenses, circa 1800, Museum of Vision, San Francisco');
messages[63] = new Array('64.jpg','Oval horn frame with steel turnpin sides, circa early 18th century, Ramstein Collection, Basel. Unusual');


////////////////////  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;
}

//-->


