/*************************************************************************
  This code is from Dynamic Web Coding at dyn-web.com
  Copyright 2003-5 by Sharon Paine 
  See Terms of Use at www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

// adjust horizontal and vertical offsets here
// (distance from mouseover event which activates tooltip)
Tooltip.offX = 2;  
Tooltip.offY = 2;
Tooltip.followMouse = false;  // must be turned off for hover-tip

// tooltip content variables
var msgMay15 = '<font color="#000000"><b><span class="h4">October 25th<p><span class="main">Sarit Ariam advocate "Getting the services your child needs" Parent Talk<br /><a href="10252010.pdf">Download Flyer Here</a>';

var msgMay2223 = '<font color="#000000"><b><span class="h4">October 26th<p><span class="main">Sppoky Sweet Treats Class<br /><a href="Spooky_Sweet_Treats.pdf">Download Flyer Here</a>';

var msgAuth = '<h1>Secure Internet Transactions</h1><p>You can contribute to Child Development Institute online with confidence. We have partnered with Authorize.Net, a leading payment gateway since 1996, to offer safe and secure credit card and electronic check transactions for our customers.</p><p>The Authorize.Net Payment Gateway manages the complex routing of sensitive customer information through the credit card and electronic check processing networks (see an <a href="http://www.authorize.net/resources/howitworksdiagram/" target=_blank>online payments diagram</a>). The company adheres to strict industry standards for payment processing, including:</p><ul><li><p>128-bit Secure Sockets Layer (SSL) technology for secure Internet Protocol (IP) transactions.</p></li><li><p>Industry leading encryption hardware and software methods and security protocols to protect customer information.</p></li><li><p>Compliance with the Payment Card Industry (PCI) Data Security Standard.</p></li></ul><p>For additional information regarding the privacy of your sensitive cardholder data, please read the <a href="http://www.authorize.net/company/privacy/" target=_blank>Authorize.Net Privacy Policy</a>.</p><p>Child Development Institute is registered with the Authorize.Net Verified Merchant Seal program.</p>';

var msgTerms = '<center><img src="creditcard_code.gif"></center>';

var msgTips = '<center><font color="#697EB0"><b>Child Development Institute is a designated 501(c)(3) organization by the IRS.<p>Contributions are tax deductible according to IRS regulations.<p>All donor information, including names, beneficiaries, gift amounts, etc. is kept strictly confidential by Child Development Institute and its authorized staff unless permission is obtained from the donor to release the information.</font>';

function doTooltip(e, msg) {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.clearTimer();
  var tip = document.getElementById? document.getElementById(Tooltip.tipID): null;
  if ( tip && tip.onmouseout == null ) {
      tip.onmouseout = Tooltip.tipOutCheck;
      tip.onmouseover = Tooltip.clearTimer;
  }
  Tooltip.show(e, msg);
}

function hideTip() {
  if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
  Tooltip.timerId = setTimeout("Tooltip.hide()", 300);
}

Tooltip.tipOutCheck = function(e) {
  e = dw_event.DOMit(e);
  // is element moused into contained by tooltip?
  var toEl = e.relatedTarget? e.relatedTarget: e.toElement;
  if ( this != toEl && !contained(toEl, this) ) Tooltip.hide();
}

// returns true of oNode is contained by oCont (container)
function contained(oNode, oCont) {
  if (!oNode) return; // in case alt-tab away while hovering (prevent error)
  while ( oNode = oNode.parentNode ) if ( oNode == oCont ) return true;
  return false;
}

Tooltip.timerId = 0;
Tooltip.clearTimer = function() {
  if (Tooltip.timerId) { clearTimeout(Tooltip.timerId); Tooltip.timerId = 0; }
}

Tooltip.unHookHover = function () {
    var tip = document.getElementById? document.getElementById(Tooltip.tipID): null;
    if (tip) {
        tip.onmouseover = null; 
        tip.onmouseout = null;
        tip = null;
    }
}

dw_event.add(window, "unload", Tooltip.unHookHover, true);
