/*************************************************************************
  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 = 4;  
Tooltip.offY = 4;
Tooltip.followMouse = false;  // must be turned off for hover-tip

// tooltip content variables
var NY = '<strong>NEW YORK</strong><hr />The Strand Community Organization to Rehabilitate the Environment (S.C.O.R.E) 2001<br />Kingston Cares 2001<br /><a href="http://www.naswnys.org/about.htm">National Association of Social Workers -NYC chapter 2002</a>';
var CA = '<strong>CALIFORNIA</strong><hr />The Strand Community Organization to Rehabilitate the Environment (S.C.O.R.E) 2001<br />Kingston Cares 2001<br /><a href="http://www.naswnys.org/about.htm">National Association of Social Workers -NYC chapter 2002</a><br /><a href="http://www.acfya.org/">Alameda County Foster Youth Alliance</a><br /><a href="http://www.f2f.ca.gov/res/CAConnected.pdf">California Connected by 25 Initiative</a>';
var MN = '<strong>MINNESOTA</strong><hr /><a href="http://www.communityactionduluth.org/">Community Action of Duluth 2002</a><br /><a href="http://www.cashenn.org/">Community Action for Suburban Hennepin 2003</a><br /><a href="http://www.gmcc.org/foodshare/">Minnesota FoodShare, Minneapolis 2003</a><br /><a href="http://www.mnvac.org/">Minnesota Valley Action Council Manakato 2004</a><br /><a href="http://www.bbbscentralmn.org/">Big Brothers Big Sisters of Central MN & St. Cloud Crisis Nursery 2005<br /><a href="http://www.caprw.org/">Community Action Partnership of Ramsey and Washington Counties 2005</a>';
var KY = '<strong>KENTUCKY</strong><hr /><a href="http://www.louisvilleky.gov/CAP/">Louisville Metro Community Action Partnership (LMCAP) 2002</a>';
var MD = '<strong>MARYLAND</strong><hr />Montgomery County Community Action Agency/Community Action Board 2005';
var AR = '<strong>ARKANSAS</strong><hr /><a href="http://www.co.pulaski.ar.us/communityservices.shtml">Pulaski County Community Services 2003</a> ';


var WA = '<strong>WASHINGTON</strong><hr />Washington WAM National 2006<br /><a href="http://www.cacwhitman.com/">Community Action Center Pullman, WA 2003</a><br /><a href="http://www.cityofseattle.net/womenscommission/">Seattle Women\'s Commission 2003</a><br /><a href="http://www.lcsnw.org/">Lutheran Community Services 2005</a>';
var MO = '<strong>MISSOURI</strong><hr /><a href="http://www.eastmoaa.org/">East Missouri Action Agency 2003</a><br /><a href="http://www.wcmcaa.org/">West Central Missouri Community Action Agency</a><br />Appleton City, MO 2004';
var IA = '<strong>IOWA</strong><hr /><a href="http://www.udmo.com/">Upper Des Moines Opportunity, Inc., 2006 and 2005</a><br /><a href="http://www.micaonline.org/">Mid-Iowa Community Action, Inc. (MICA), 2005, 2006, Spring of 2007.</a>';
var MT = '<strong>MONTANA</strong><hr /><a href="http://www.weelempowers.org/">Working for Liberty and Economic Liberation, 2003</a>';
var OH = '<strong>OHIO</strong><hr /><a href="http://www.mpcollaborative.org/">Cleveland, Ohio Collaborative for Organizing Mt. Pleasant, 2004</a><br /><a href="http://yacdinc.org/default.aspx/">Young Adult Community Development, 2005 and 2006</a><br /><a href="http://www.my-cap.org/">Mahoning-Youngstown Community Action Partnership 2006</a>';


var OR = '<strong>OREGON</strong><hr /><a href="http://www.ourcommission.org/">Commission on Children, Families &amp; Community of Multnomah County, Oregon 2003</a><br /><a href="http://www.foodforlanecounty.org/News/index.html">FOOD for Lane County 2003</a><br />Social Services of Clackamas County 2003 </a>';
var FL = '<strong>FLORIDA</strong><hr /><a href="http://www.dcf.state.fl.us/programs.shtml">State of Florida, Department of Children & Families, Office of Family Safety</a><br /><a href="http://www.cby25.org/">Connected by 25 Florida Initiative3</a>';


var NJ = '<strong>NEW JERSEY<hr /><a href="http://www.okacaa.org/">Tri-County Community Action</a><br /><a href="http://www.forumsinstitute.org/index.html">Forum Institute for Public Policy</a> ';
var WI = '<strong>WISCONSIN</strong><hr /><a href="http://oldweb.uwp.edu/academic/womens.studies/">Women\'s Studies Program</a> ';

var WV = '<strong>WEST VIRGINIA</strong><hr /><a href="http://kanawhavalleycollective.org/">Kanawha Valley Collective 2005</a> ';

var CO = '<strong>COLORADO</strong><hr />Advocacy for La Plata 2005';
var KS = '<strong>KANSAS</strong><hr /><a href="http://www.mtcarmelrc.org/">Kansas City, Kansas Mount Carmel Redevelopment Corporation</a> ';


var msgTerms = 'The code is free for <a href="http://www.dyn-web.com/bus/terms.html#personal">personal use</a> but all other uses require purchase of a <a href="http://www.dyn-web.com/bus/purchase.html">license</a>.';


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);


