﻿/* IMPORTANT: Put script after tooltip div or 
put tooltip div just before </BODY>. */

var dom = (document.getElementById) ? true : false;
var ns5 = (!document.all && dom || window.opera) ? true : false;
var ie5 = ((navigator.userAgent.indexOf("MSIE") > -1) && dom) ? true : false;
var ie4 = (document.all && !dom) ? true : false;
var nodyn = (!ns5 && !ie4 && !ie5 && !dom) ? true : false;

var origWidth, origHeight;

// 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 = true;
// Be sure to set tipWidth wide enough for widest image
var tipWidth = 0;
var offX = 10; // how far from mouse to show tip
var offY = 12;
var tipFontFamily = "Verdana, arial, helvetica, 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 = "#000000";
var tipBgColor = "#fff";
var tipBorderColor = "#fff";
var tipBorderWidth = 0;
var tipBorderStyle = "ridge";
var tipPadding = 0;

// 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('/images/munten/Large/geen.jpg', 'Europese munten collectie');
messages[1] = new Array('/images/munten/Large/Portugal-Europa-stermunten-collectie.jpg', 'Europese munten collectie');
messages[2] = new Array('/images/munten/Large/geen.jpg', 'Sterling Silver - Madame Curie &euro; 10,-');
messages[3] = new Array('/images/munten/Large/Wiener-Philharmoniker-2010-Zilver-Oostenrijk.png', 'Wiener Philharmoniker, de populairste Europese zilveren munt!');
messages[4] = new Array('/images/munten/Large/Olympische-Winterspelen-Vancouver-2010-Schaatsen.jpg', 'Vancouver Schaatsen');
messages[5] = new Array('/images/munten/Large/geen.jpg', 'Slovenie &euro;&nbsp;30,- munt - Zoran Music');
messages[6] = new Array('/images/munten/Large/Nederland-max-havelaar-zilveren-vijfje-2010.png', 'Max Havelaar herdenkingsmunt');
messages[7] = new Array('/images/munten/Large/Kookaburra-2010-zilver.png', 'Kookaburra munt');
messages[8] = new Array('/images/munten/Large/Nederlandse-BU-Set-2010.jpg', 'BU-Muntset 2010 Nederland');
messages[9] = new Array('/images/munten/Large/Gouden-Kangoeroe-Prestigeset-2010.jpg', 'Kangoeroe Prestigeset 2010');
messages[10] = new Array('/images/munten/Large/Nederland-max-havelaar-gouden-tientje-2010.png', 'Gouden tientje Max Havelaar 150 jaar');
messages[11] = new Array('/images/munten/Large/San-Marino-Eerste-Euro-Afslagen.jpg', 'Eerste Euro Afslagen: San Marino');
messages[12] = new Array('/images/munten/Large/geen.jpg', 'Spanje 2010 Voorzitterschap van de Europese Unie &euro;&nbsp;10,- Zilver Proof munt');
messages[13] = new Array('/images/munten/Large/geen.jpg', 'Frankrijk Madame Curie in Goud');
messages[14] = new Array('/images/munten/Large/Amsterdam-New-york-zilveren-vijftje-2009.png', 'Het ‘Manhattan Vijfje’, meest gewilde Euromunt!');
messages[15] = new Array('/images/munten/Large/Kleinste-gouden-munten-collectie.jpg', 'Kleinste gouden munt - Leonardo Da Vinci');
messages[16] = new Array('/images/munten/Large/Nederland-Vermeer-Vijf-Euro-herdenkingsmunt-2011.jpg', 'Vermeer Vijfje in zilver Proof');
messages[17] = new Array('/images/munten/Large/Maple-Leaf-2010-Canada.png', 'Zilveren Maple Leaf uit Canada');
messages[18] = new Array('/images/munten/Large/Amsterdam-New-york-gouden-tientje-2009.png', 'Manhattan &euro;&nbsp;10,- Goud proof');
messages[19] = new Array('/images/munten/Large/Japanvijfje-zilver-proof.png', 'Nederland - Japan &euro;&nbsp;5,- zilver proof');
messages[20] = new Array('/images/munten/Large/Nederland-Japan-gouden-tientje-2009.png', 'Gouden Japan Tientje.');
messages[21] = new Array('/images/munten/Large/Slowakije-2009-Stodola-eerste-zilveren-euro.jpg', 'Slowakije 2009 - Stodola eerste zilveren Euro');
messages[22] = new Array('/images/munten/Large/Nederland-proofset-2010.png', 'Nederlandse Proof muntset 2010');
messages[23] = new Array('/images/munten/Large/geen.jpg', 'Nederlandse Proofset 2009 incl. &euro;&nbsp;2,- EMU');
messages[24] = new Array('/images/munten/Large/geen.jpg', 'Olympische Gouden Munten');
messages[25] = new Array('/images/munten/Large/Olympische-Winterspelen-Vancouver-2010-Schaatsen.jpg', 'Olympische Winterspelen Vancouver 2010 Schaatsen');
messages[26] = new Array('/images/munten/Large/Euro-Muntset-Slowakije.png', 'Slowakije Euromuntset');
messages[27] = new Array('/images/munten/Large/geen.jpg', 'Japanse muntenset 2010');
messages[28] = new Array('/images/munten/Large/Groot-Brittannie-Jaarset-2010.png', 'Offici&euml;le Jaarset Groot-Brittanni&euml; 2010');
messages[29] = new Array('/images/munten/Large/US-Silver-Eagle-2010.png', 'U.S. Silver Eagle 2010 1Oz. ');
messages[30] = new Array('/images/munten/Large/Britannia-2010-zilver-Engeland.png', 'Britannia 2010 1Oz. zilver');
messages[31] = new Array('/images/munten/Large/Natura-Prestige-Set-The-Black-Rhinocerous.jpg', 'Natura- Prestige Set "The Black Rhinocerous"');
messages[32] = new Array('/images/munten/Large/Krugerrand-Prestige-Set-2010.jpg', 'Krugerrand Prestige Set 2010"');
messages[33] = new Array('/images/munten/Large/Half-Ounce-Zuid-Afrika-Krugerrand.png', 'Half Ounce Krugerrand 2010"');
messages[34] = new Array('/images/munten/Large/Maple-Leaf-2011-Canada.jpg', 'Zilveren Maple Leaf uit Canada');
messages[35] = new Array('/images/munten/Large/Luxe-houten-verzamelcassette.png', 'Luxe Houten Verzamelcassette');
messages[36] = new Array('/images/munten/Large/Belgie-gouden-Museummunt.png', 'Belgi&euml; Gouden Museummunt');
messages[37] = new Array('/images/munten/Large/San-Marino-Robert-Schumann.png', 'San Marino &euro;&nbsp;10,- Sterling Silver');
messages[38] = new Array('/images/munten/Large/Belgie-prins-Filip-100-euro-goud.png', 'Belgi&euml; &euro;&nbsp;100,- Goud');
messages[39] = new Array('/images/munten/Large/zweden-huwelijksmunt-Victoria-Daniel-zilver.png', 'Zweden Huwelijksmunt in zilver');
messages[40] = new Array('/images/munten/Large/zweden-huwelijksmunt-Victoria-Daniel-goud.png', 'Zweden Huwelijksmunt in Goud');
messages[41] = new Array('/images/munten/Large/Kazachstan-2010-Sneeuwluipaard-1Oz-puur-zilver.jpg', 'Kazachstan 2010 Sneeuwluipaard 1 Oz. Puur Zilveren Munt');
messages[42] = new Array('/images/munten/Large/China-2010-Panda-1Oz-puur-zilver.png', 'China 10 Yuan Panda 1 Oz. Puur Zilveren Munt');
messages[43] = new Array('/images/munten/Large/Vijf-Euro-Waterwerken-herdenkingsmunt-2010.jpg', 'Vijf Euro Nederland Waterland herdenkingsmunt 2010');
messages[44] = new Array('/images/munten/Large/Gouden-Tientje-Waterwerken-herdenkingsmunt-2010.jpg', 'Gouden Tientje Nederland Waterland herdenkingsmunt 2010');
messages[45] = new Array('/images/munten/Large/Euro-Muntset-Estland.jpg', 'Euro Muntset Estland 2011');
messages[46] = new Array('/images/munten/Large/Euro-Muntset-Estland.jpg', 'Euro Muntset Estland 2011');
messages[47] = new Array('/images/munten/Large/China-2011-Panda-1Oz-puur-zilver.jpg', 'China2011 - 10 Yuan Panda 1 Oz. Puur Zilveren Munt');
messages[48] = new Array('/images/munten/Large/Kookaburra-2011-puur-zilver-1Oz.jpg', 'Kookaburra 2011 munt - 1 Oz. Zilver ');
messages[49] = new Array('/images/munten/Large/Britannia-2011-1Oz-zilver-Engeland.jpg', 'De officiële Zilveren Britannia 2011 munt');
messages[50] = new Array('/images/munten/Large/Wiener-Philharmoniker-2011-zilveren-munt.jpg', 'Wiener Philharmoniker 2011 munt');
messages[51] = new Array('/images/munten/Large/Canada-Wolf-1Oz-puur-zilver.jpg', '1 Oz.Zilveren Wolf 2011 uit Canada');
messages[52] = new Array('leeg');
messages[53] = new Array('/images/munten/Large/US-Silver-Eagle-2011.jpg', 'U.S. Silver Eagle 2011 1Oz.');
messages[54] = new Array('/images/munten/Large/Groot-Brittannie-Jaarset-2011.jpg', 'Offici&euml;le B.U. Set Groot-Brittanni&euml; 2011');
messages[55] = new Array('/images/munten/Large/Proofset-Nederland-2011.jpg', 'Nederlandse Proofset 2011');
messages[56] = new Array('/images/munten/Large/buset-nederland-2011.jpg', 'Nederlandse B.U. Set 2011');
messages[57] = new Array('Leeg');
messages[58] = new Array('/images/munten/Large/Maple-Leaf-2011-Canada.jpg', 'Maple Leaf Set 2011');
messages[59] = new Array('/images/munten/Large/Frankrijk-Taj-Mahal-10-euro-zilver-proof.jpg', 'Frankrijk Taj Mahal 10 Euro zilver proof');
messages[60] = new Array('Leeg');
messages[61] = new Array('/images/munten/Large/Engeland-Catherine-en-William-huwelijksmunt-5-pond-zilver-proof.jpg', 'Huwelijksmunt Prins William en Catherine zilver proof');
messages[62] = new Array('/images/munten/Large/Engeland-Catherine-en-William-huwelijksmunt-5-pond-zilver-proof.jpg', 'Huwelijksmunt Prins William en Catherine Zilver proof Piedfort');
messages[63] = new Array('/images/munten/Large/Engeland-Catherine-en-William-huwelijksmunt-5-pond-zilver-proof.jpg', 'Huwelijksmunt Prins William en Catherine verzilverd');
messages[64] = new Array('/images/munten/Large/Nederland-Vermeer-Vijf-Euro-herdenkingsmunt-2011.jpg', 'Vermeer Vijfje in zilver Proof');
messages[65] = new Array('/images/munten/Large/Nederland-Vermeer-Tien-Euro-herdenkingsmunt-2011.jpg', 'Vermeer Tientje in goud Proof');
messages[66] = new Array('/images/munten/Large/Prestigeset-Nederland-2011.jpg', 'Prestigeset 2011 Nederland Schilderkunst');
messages[67] = new Array('/images/munten/Large/Frankrijk-2011-zilver-Les-Miserables.jpg', 'Les Miserables 10 euro zilver Proof');
messages[68] = new Array('/images/munten/Large/Frankrijk-2011-goud-Les-Miserables.jpg', 'Les Miserables 50 euro goud Proof');
messages[69] = new Array('/images/munten/Large/Aruba-2011-Koninklijk-bezoek-zilver-proof.jpg', 'Koninklijk bezoek aruba zilver proof');
messages[70] = new Array('Leeg');
messages[71] = new Array('/images/munten/Large/Kookaburra-2012-puur-zilver-1Oz.jpg', 'Kookaburra 2012 munt - 1 Oz. Zilver ');
messages[72] = new Array('/images/munten/Large/Engeland-2011-Britannia-half-ounce.jpg', 'Britannia 2011 1/2Oz. zilver');
messages[73] = new Array('/images/munten/Large/Groot-Brittannie-Jaarset-2012.jpg', 'Groot Brittannie Jaarset 2012');
messages[74] = new Array('/images/munten/Large/Wiener-Philharmoniker-2012-zilveren-munt.jpg', 'Oostenrijk Wiener Philharmoniker 2012 munt');

////////////////////  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
//		Set up mousemove capture if tipFollowMouse set true.
////////////////////////////////////////////////////////////
var tooltip, tipcss;
function initTip() {
    if (nodyn) return;
    tooltip = (ie4) ? document.all['tipDiv'] : (ie5 || ns5) ? document.getElementById('tipDiv') : null;
    tipcss = 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) {
        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 (ie4 || ie5 || ns5) {
        var tip = startStr + messages[num][0] + midStr + '<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) {
    standardbody = (document.compatMode == "CSS1Compat") ? document.documentElement : document.body //create reference to common "body" across doctypes
    mouseX = (ns5) ? evt.pageX : window.event.clientX + standardbody.scrollLeft;
    mouseY = (ns5) ? evt.pageY : window.event.clientY + standardbody.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) {
        standardbody = (document.compatMode == "CSS1Compat") ? document.documentElement : document.body
        mouseX = (ns5) ? evt.pageX : window.event.clientX + standardbody.scrollLeft;
        mouseY = (ns5) ? evt.pageY : window.event.clientY + standardbody.scrollTop;
    }
    // tooltip width and height
    var tpWd = (ie4 || ie5) ? tooltip.clientWidth : tooltip.offsetWidth;
    var tpHt = (ie4 || ie5) ? tooltip.clientHeight : tooltip.offsetHeight;
    // document area in view (subtract scrollbar width for ns)
    var winWd = (ns5) ? window.innerWidth - 20 + window.pageXOffset : standardbody.clientWidth + standardbody.scrollLeft;
    var winHt = (ns5) ? window.innerHeight - 20 + window.pageYOffset : standardbody.clientHeight + standardbody.scrollTop;
    // check mouse position against tip and window dimensions
    // and position the tooltip 
    if ((mouseX + offX + tpWd) > winWd)
        tipcss.left = mouseX - (tpWd + offX) + "px";
    else tipcss.left = mouseX + offX + "px";
    if ((mouseY + offY + tpHt) > winHt)
        tipcss.top = winHt - (tpHt + offY) + "px";
    else tipcss.top = mouseY + offY + "px";
    if (!tipFollowMouse) t1 = setTimeout("tipcss.visibility='visible'", 100);
}

function hideTip() {
    if (!tooltip) return;
    t2 = setTimeout("tipcss.visibility='hidden'", 100);
    tipOn = false;
}

document.write('<div id="tipDiv" style="position:absolute; visibility:hidden; z-index:100"></div>')

