/* This notice must be untouched at all times.

wz_tooltip.js    v. 3.38

The latest version is available at
http://www.walterzorn.com
or http://www.devira.com
or http://www.walterzorn.de

Copyright (c) 2002-2005 Walter Zorn. All rights reserved.
Created 1. 12. 2002 by Walter Zorn (Web: http://www.walterzorn.com )
Last modified: 9. 12. 2005 ***

*** Shane Forsythe 3/6/2006 : Heavily modified to eliminate unneeded functionality and reduce filesize

LICENSE: LGPL

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License (LGPL) as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For more details on the GNU Lesser General Public License,
see http://www.gnu.org/copyleft/lesser.html
*/
var c_id = new Array("","Alachua","Baker","Bay","Bradford","Brevard","Broward","Calhoun","Charlotte","Citrus","Clay","Collier","Columbia","Miami-Dade","DeSoto","Dixie","Duval","Escambia","Flagler","Franklin","Gadsden","Gilchrist","Glades","Gulf","Hamilton","Hardee","Hendry","Hernando","Highlands","Hillsborough","Holmes","Indian River","Jackson","Jefferson","Lafayette","Lake","Lee","Leon","Levy","Liberty","Madison","Manatee","Marion","Martin","Monroe","Nassau","Okaloosa","Okeechobee","Orange","Osceola","Palm Beach","Pasco","Pinellas","Polk","Putnam","St. Johns","St. Lucie","Santa Rosa","Sarasota","Seminole","Sumter","Suwannee","Taylor","Union","Volusia","Wakulla","Walton","Washington");
var tt_tags = new Array("a","area","img");
var tt_obj = null,tt_objW = 0, tt_objH = 0,tt_objX = 0, tt_objY = 0,tt_offX = 0, tt_offY = 0,xlim = 0, ylim = 0,   
tt_sup = false,tt_sticky = false,tt_wait = false,tt_act = false,tt_sub = false,tt_u = "undefined",tt_mf = null,tt_tag = null;             
var tt_db = (document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body? document.body : null,
tt_n = navigator.userAgent.toLowerCase(),tt_nv = navigator.appVersion;
var tt_op = !!(window.opera && document.getElementById),tt_op6 = tt_op && !document.defaultView,tt_op7 = tt_op && !tt_op6,tt_ie = tt_n.indexOf("msie") != -1 && document.all && tt_db && !tt_op,tt_ie6 = tt_ie && parseFloat(tt_nv.substring(tt_nv.indexOf("MSIE")+5)) >= 5.5,tt_n4 = (document.layers && typeof document.classes != tt_u),tt_n6 = (!tt_op && document.defaultView && typeof document.defaultView.getComputedStyle != tt_u),tt_w3c = !tt_ie && !tt_n6 && !tt_op && document.getElementById;
function tt_Int(t_x){var t_y;return isNaN(t_y = parseInt(t_x))? 0 : t_y;}
function wzR(t_x, t_y){var t_ret = "",t_str = this,t_xI;while((t_xI = t_str.indexOf(t_x)) != -1){t_ret += t_str.substring(0, t_xI) + t_y;t_str = t_str.substring(t_xI + t_x.length);}return t_ret+t_str;}
String.prototype.wzR = wzR;
function tt_N4Tags(tagtyp, t_d, t_y)
{t_d = t_d || document;t_y = t_y || new Array();var t_x = (tagtyp=="a")? t_d.links : t_d.layers;for(var z = t_x.length; z--;) t_y[t_y.length] = t_x[z];	for(z = t_d.layers.length; z--;) t_y = tt_N4Tags(tagtyp, t_d.layers[z].document, t_y);return t_y;}
function tt_EvX(t_e)
{var t_y = tt_Int(t_e.pageX || t_e.clientX || 0)+tt_Int(tt_ie? tt_db.scrollLeft : 0)+tt_offX;if(t_y > xlim) t_y = xlim;	var t_scr = tt_Int(window.pageXOffset || (tt_db? tt_db.scrollLeft : 0) || 0);if(t_y < t_scr) t_y = t_scr;return t_y;}
function tt_EvY(t_e)
{
	var t_y = tt_Int(t_e.pageY || t_e.clientY || 0)+tt_Int(tt_ie? tt_db.scrollTop : 0);
	if(tt_sup) t_y -= (tt_objH + tt_offY - 15);else if(t_y > ylim || !tt_sub && t_y > ylim-24){t_y -= (tt_objH + 5);tt_sub = false;}
	else{t_y += tt_offY;tt_sub = true;}
	return t_y;
}
function tt_RM(){if(document.onmousemove == tt_Move){if(!tt_mf && document.releaseEvents) document.releaseEvents(Event.MOUSEMOVE);document.onmousemove = tt_mf;}}

function tt_GetDiv(t_id){return(tt_n4? (document.layers[t_id] || null): tt_ie? (document.all[t_id] || null): (document.getElementById(t_id) || null));}
function tt_GetDivW(){return tt_Int(tt_n4? tt_obj.clip.width: (tt_obj.style.pixelWidth || tt_obj.offsetWidth));}
function tt_GetDivH(){return tt_Int(tt_n4? tt_obj.clip.height: (tt_obj.style.pixelHeight || tt_obj.offsetHeight));}
function tt_SetDivZ()
{var t_i = tt_obj.style || tt_obj;if(t_i){if(window.dd && dd.z)t_i.zIndex = Math.max(dd.z+1, t_i.zIndex);}}
function tt_SetDivPos(t_x, t_y){var t_i = tt_obj.style || tt_obj;var t_px = (tt_op6 || tt_n4)? '' : 'px';t_i.left = (tt_objX = t_x) + t_px;t_i.top = (tt_objY = t_y) + t_px;}
function tt_ShowDiv(t_x){if(tt_n4) tt_obj.visibility = t_x? 'show' : 'hide';else tt_obj.style.visibility = t_x? 'visible' : 'hidden';tt_act = t_x;}
function tt_OpDeHref(t_e)
{
	var t_tag;
	if(t_e)	{t_tag = t_e.target;
		while(t_tag)
		{
			if(t_tag.hasAttribute("href")){tt_tag = t_tag;tt_tag.t_href = tt_tag.getAttribute("href");tt_tag.removeAttribute("href");tt_tag.style.cursor = "hand";tt_tag.onmousedown = tt_OpReHref;tt_tag.stats = window.status;window.status = tt_tag.t_href;break;}
			t_tag = t_tag.parentElement;
		}
	}
}
function tt_OpReHref(){if(tt_tag){tt_tag.setAttribute("href", tt_tag.t_href);window.status = tt_tag.stats;tt_tag = null;}}
function tt_Show(t_e, id)
{
	var     t_id = "tooltip",t_sup= false,t_delay= 0,t_fix= "",t_left= false,t_offx=12,t_offy=15,t_sticky=false,t_temp=0;

   	document.county.src = image_url[id].src;
	tt_mf = document.onmousemove || null;
	if(window.dd && (window.DRAG && tt_mf == DRAG || window.RESIZE && tt_mf == RESIZE)) return;
	var t_sh, t_h;

	tt_obj = tt_GetDiv(t_id);
	if(tt_obj)
	{	
		tt_obj.innerHTML = c_id[id];
		t_e = t_e || window.event;
		tt_sub = !(tt_sup = t_sup);
		tt_sticky = t_sticky;
		tt_objW = tt_GetDivW();
		tt_objH = tt_GetDivH();
		tt_offX = t_left? -(tt_objW+t_offx) : t_offx;
		tt_offY = t_offy;
		if(tt_op7) tt_OpDeHref(t_e);
		if(tt_n4){if(tt_obj.document.layers.length){t_sh = tt_obj.document.layers[0];t_sh.clip.height = tt_objH - Math.round(t_sh.clip.width*1.3);}}
		else{
			t_sh = tt_GetDiv(t_id+'R');
			if(t_sh){t_h = tt_objH - tt_Int(t_sh.style.pixelTop || t_sh.style.top || 0);if(typeof t_sh.style.pixelHeight != tt_u) t_sh.style.pixelHeight = t_h;else t_sh.style.height = t_h+'px';}
		}

		xlim = tt_Int((tt_db && tt_db.clientWidth)? tt_db.clientWidth : window.innerWidth) +
			tt_Int(window.pageXOffset || (tt_db? tt_db.scrollLeft : 0) || 0) -
			tt_objW -
			(tt_n4? 21 : 0);
		ylim = tt_Int(window.innerHeight || tt_db.clientHeight) +
			tt_Int(window.pageYOffset || (tt_db? tt_db.scrollTop : 0) || 0) -
			tt_objH - tt_offY;

		tt_SetDivZ();
		tt_SetDivPos(tt_EvX(t_e), tt_EvY(t_e));

		var t_txt = 'tt_ShowDiv(\'true\');';
		window.tt_rdl = window.setTimeout(t_txt, t_delay);
		if(!t_fix){if(document.captureEvents) document.captureEvents(Event.MOUSEMOVE);document.onmousemove = tt_Move;}
	}
}
var tt_area = false;
function tt_Move(t_ev)
{
	if(!tt_obj) return;
	if(tt_n6 || tt_w3c){if(tt_wait) return;tt_wait = true;setTimeout('tt_wait = false;', 5);}
	var t_e = t_ev || window.event;
	tt_SetDivPos(tt_EvX(t_e), tt_EvY(t_e));
	if(tt_op6){if(tt_area && t_e.target.tagName != 'AREA') tt_Hide();else if(t_e.target.tagName == 'AREA') tt_area = true;}
}
function tt_Hide()
{
	if(window.tt_obj){if(window.tt_rdl) window.clearTimeout(tt_rdl);
		if(!tt_sticky || !tt_act)
		{
			if(window.tt_rtm) window.clearTimeout(tt_rtm);
			tt_ShowDiv(false);
			tt_SetDivPos(-tt_objW, -tt_objH);
			tt_obj = null;
			if(typeof window.tt_upFunc != tt_u) document.onmouseup = window.tt_upFunc;
		}
		tt_sticky = false;if(tt_op6 && tt_area) tt_area = false;tt_RM();if(tt_op7) tt_OpReHref();
	}
	s();
}
function tt_Init()
{
	if(!(tt_op || tt_n4 || tt_n6 || tt_ie || tt_w3c)) return;
	var htm = tt_n4? '<div style="position:absolute;"></div>' : '',	tags,t_tj,over,esc = 'return escape(';
	var i = tt_tags.length; while(i--)
	{
		tags = tt_ie? (document.all.tags(tt_tags[i]) || 1): document.getElementsByTagName? (document.getElementsByTagName(tt_tags[i]) || 1): (!tt_n4 && tt_tags[i]=="a")? document.links: 1;

		if(tt_n4 && (tt_tags[i] == "a" || tt_tags[i] == "layer")) tags = tt_N4Tags(tt_tags[i]);
		var j = tags.length; while(j--)
		{
			if(typeof (t_tj = tags[j]).onmouseover == "function" && t_tj.onmouseover.toString().indexOf(esc) != -1 && !tt_n6 || tt_n6 && (over = t_tj.getAttribute("onmouseover")) && over.indexOf(esc) != -1)
			{
				if(over) t_tj.onmouseover = new Function(over);
				var id = unescape(t_tj.onmouseover());
				t_tj.onmouseover = new Function('e','tt_Show(e,'+id+');');
				t_tj.onmouseout = tt_Hide;
				if(t_tj.alt) t_tj.alt = "";if(t_tj.title) t_tj.title = "";
			}
		}
	}

	if (document.images){image_url=new Array();var i=0;for(i=0;i<85;i++){image_url[i]=new Image();image_url[i].src="map/flcounty/"+i+".gif";}}
}

tt_Init();
