document.write('<img width=534 height=385 src=\"Jan16-c.png\" usemap=\"#Jan16-c.png\" border=0><map name=\"Jan16-c.png\">');
document.write('<area href=\"/evp2007/Pres/Graphs/alabama.html\" onmouseover=\"return escape(tooltip(\'Alabama\',\'9\',\'37\',\'63\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'37\',\'63\',\'\'));\" shape=poly coords=\"291,240,319,240,328,280,302,280,302,283,291,282\">');
document.write('<area href=\"/evp2007/Pres/Graphs/alaska.html\" onmouseover=\"return escape(tooltip(\'Alaska\',\'3\',\'35\',\'62\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'35\',\'62\',\'\'));\" shape=poly coords=\"63,282,60,303,68,306,84,300,81,282,81,282\">');
document.write('<area href=\"/evp2007/Pres/Graphs/arizona.html\" onmouseover=\"return escape(tooltip(\'Arizona\',\'10\',\'45\',\'55\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'45\',\'55\',\'\'));\" shape=poly coords=\"106,177,109,174,134,179,134,225,106,215\">');
document.write('<area href=\"/evp2007/Pres/Graphs/arkansas.html\" onmouseover=\"return escape(tooltip(\'Arkansas\',\'6\',\'45\',\'54\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16422550\',\'Weak Republican\',\'\',\'45\',\'54\',\'\'));\" shape=poly coords=\"228,215,257,215,267,223,261,244,235,243\">');
document.write('<area href=\"/evp2007/Pres/Graphs/california.html\" onmouseover=\"return escape(tooltip(\'California\',\'55\',\'55\',\'44\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'4810990\',\'Strong Democrat\',\'\',\'55\',\'44\',\'\'));\" shape=poly coords=\"15,116,1,159,10,195,30,219,106,215,106,177,88,151,90,137\">');
document.write('<area href=\"/evp2007/Pres/Graphs/colorado.html\" onmouseover=\"return escape(tooltip(\'Colorado\',\'9\',\'47\',\'52\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16422550\',\'Weak Republican\',\'\',\'47\',\'52\',\'\'));\" shape=poly coords=\"136,148,134,179,172,183,172,148\">');
document.write('<area href=\"/evp2007/Pres/Graphs/connecticut.html\" onmouseover=\"return escape(tooltip(\'Connecticut\',\'7\',\'54\',\'44\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'4810990\',\'Strong Democrat\',\'\',\'54\',\'44\',\'\'));\" shape=poly coords=\"458,130,451,90,481,82,484,84,491,109\">');
document.write('<area href=\"/evp2007/Pres/Graphs/dc.html\" onmouseover=\"return escape(tooltip(\'D.C.\',\'3\',\'90\',\'9\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'4810990\',\'Strong Democrat\',\'\',\'90\',\'9\',\'\'));\" shape=poly coords=\"378,181,394,166,409,181,394,195\">');
document.write('<area href=\"/evp2007/Pres/Graphs/delaware.html\" onmouseover=\"return escape(tooltip(\'Delaware\',\'3\',\'53\',\'46\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'9939444\',\'Weak Democrat\',\'\',\'53\',\'46\',\'\'));\" shape=poly coords=\"431,202,447,202,450,194,430,174,419,157\">');
document.write('<area href=\"/evp2007/Pres/Graphs/florida.html\" onmouseover=\"return escape(tooltip(\'Florida\',\'27\',\'47\',\'52\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16422550\',\'Weak Republican\',\'\',\'47\',\'52\',\'\'));\" shape=poly coords=\"386,283,302,280,302,283,326,289,344,286,357,289,364,340,409,384,414,384,419,346\">');
document.write('<area href=\"/evp2007/Pres/Graphs/georgia.html\" onmouseover=\"return escape(tooltip(\'Georgia\',\'15\',\'41\',\'58\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'41\',\'58\',\'\'));\" shape=poly coords=\"320,240,353,240,387,277,385,283,328,280\">');
document.write('<area href=\"/evp2007/Pres/Graphs/hawaii.html\" onmouseover=\"return escape(tooltip(\'Hawaii\',\'4\',\'54\',\'45\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'9939444\',\'Weak Democrat\',\'\',\'54\',\'45\',\'\'));\" shape=poly coords=\"160,303,171,295,191,316,171,335\">');
document.write('<area href=\"/evp2007/Pres/Graphs/idaho.html\" onmouseover=\"return escape(tooltip(\'Idaho\',\'4\',\'30\',\'69\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'30\',\'69\',\'\'));\" shape=poly coords=\"110,111,102,139,126,145,129,130,122,127,120,113\">');
document.write('<area href=\"/evp2007/Pres/Graphs/illinois.html\" onmouseover=\"return escape(tooltip(\'Illinois\',\'21\',\'55\',\'45\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'4810990\',\'Strong Democrat\',\'\',\'55\',\'45\',\'\'));\" shape=poly coords=\"282,132,277,126,247,128,229,157,270,219,280,211,284,176,282,131\">');
document.write('<area href=\"/evp2007/Pres/Graphs/indiana.html\" onmouseover=\"return escape(tooltip(\'Indiana\',\'11\',\'39\',\'60\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'39\',\'60\',\'\'));\" shape=poly coords=\"282,132,301,129,312,189,300,203,281,211,284,184\">');
document.write('<area href=\"/evp2007/Pres/Graphs/iowa.html\" onmouseover=\"return escape(tooltip(\'Iowa\',\'7\',\'49\',\'50\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'weak_gop\',\'Barely Republican\',\'\',\'49\',\'50\',\'\'));\" shape=poly coords=\"194,135,243,126,246,127,229,157,201,156,194,141\">');
document.write('<area href=\"/evp2007/Pres/Graphs/kansas.html\" onmouseover=\"return escape(tooltip(\'Kansas\',\'6\',\'37\',\'62\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'37\',\'62\',\'\'));\" shape=poly coords=\"172,162,172,182,222,185,222,179,203,162\">');
document.write('<area href=\"/evp2007/Pres/Graphs/kentucky.html\" onmouseover=\"return escape(tooltip(\'Kentucky\',\'8\',\'40\',\'60\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'40\',\'60\',\'\'));\" shape=poly coords=\"271,220,280,211,301,203,312,188,337,192,343,201,331,215\">');
document.write('<area href=\"/evp2007/Pres/Graphs/louisiana.html\" onmouseover=\"return escape(tooltip(\'Louisiana\',\'9\',\'42\',\'57\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'42\',\'57\',\'\'));\" shape=poly coords=\"260,244,235,243,237,281,273,292,285,285,279,270,257,270,263,254\">');
document.write('<area href=\"/evp2007/Pres/Graphs/maine.html\" onmouseover=\"return escape(tooltip(\'Maine\',\'4\',\'53\',\'45\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'9939444\',\'Weak Democrat\',\'\',\'53\',\'45\',\'\'));\" shape=poly coords=\"463,17,466,4,474,2,487,23,475,47\">');
document.write('<area href=\"/evp2007/Pres/Graphs/maryland.html\" onmouseover=\"return escape(tooltip(\'Maryland\',\'10\',\'56\',\'43\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'4810990\',\'Strong Democrat\',\'\',\'56\',\'43\',\'\'));\" shape=poly coords=\"367,172,364,160,419,156,431,202,447,202,426,216,395,196,409,181,394,166,377,162\">');
document.write('<area href=\"/evp2007/Pres/Graphs/massachusetts.html\" onmouseover=\"return escape(tooltip(\'Massachusetts\',\'12\',\'62\',\'37\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'4810990\',\'Strong Democrat\',\'\',\'62\',\'37\',\'\'));\" shape=poly coords=\"442,58,452,58,475,48,531,94,514,94,507,81,481,82,451,90\">');
document.write('<area href=\"/evp2007/Pres/Graphs/michigan.html\" onmouseover=\"return escape(tooltip(\'Michigan\',\'17\',\'51\',\'48\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'9939444\',\'Barely Democrat\',\'\',\'51\',\'48\',\'\'));\" shape=poly coords=\"284,89,301,62,329,75,328,87,335,84,340,98,331,122,284,131,289,109\">');
document.write('<area href=\"/evp2007/Pres/Graphs/minnesota.html\" onmouseover=\"return escape(tooltip(\'Minnesota\',\'10\',\'51\',\'48\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'9939444\',\'Barely Democrat\',\'\',\'51\',\'48\',\'\'));\" shape=poly coords=\"188,112,237,83,232,112,244,126,195,135,193,125\">');
document.write('<area href=\"/evp2007/Pres/Graphs/mississippi.html\" onmouseover=\"return escape(tooltip(\'Mississippi\',\'6\',\'40\',\'60\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'40\',\'60\',\'\'));\" shape=poly coords=\"264,237,261,244,263,254,257,270,278,270,285,285,291,283,291,241\">');
document.write('<area href=\"/evp2007/Pres/Graphs/missouri.html\" onmouseover=\"return escape(tooltip(\'Missouri\',\'11\',\'46\',\'53\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16422550\',\'Weak Republican\',\'\',\'46\',\'53\',\'\'));\" shape=poly coords=\"230,157,201,157,222,179,227,215,257,215,267,222,270,220\">');
document.write('<area href=\"/evp2007/Pres/Graphs/montana.html\" onmouseover=\"return escape(tooltip(\'Montana\',\'3\',\'39\',\'59\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'39\',\'59\',\'\'));\" shape=poly coords=\"120,113,122,126,130,129,153,130,155,127,155,118\">');
document.write('<area href=\"/evp2007/Pres/Graphs/nebraska.html\" onmouseover=\"return escape(tooltip(\'Nebraska\',\'5\',\'32\',\'67\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'32\',\'67\',\'\'));\" shape=poly coords=\"153,140,153,148,172,148,172,161,203,162,194,140\">');
document.write('<area href=\"/evp2007/Pres/Graphs/nevada.html\" onmouseover=\"return escape(tooltip(\'Nevada\',\'5\',\'48\',\'51\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'weak_gop\',\'Barely Republican\',\'\',\'48\',\'51\',\'\'));\" shape=poly coords=\"90,137,88,151,106,178,109,174,112,142\">');
document.write('<area href=\"/evp2007/Pres/Graphs/new-hampshire.html\" onmouseover=\"return escape(tooltip(\'New Hampshire\',\'4\',\'50\',\'49\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'9939444\',\'Barely Democrat\',\'\',\'50\',\'49\',\'\'));\" shape=poly coords=\"454,22,463,17,475,48,450,57\">');
document.write('<area href=\"/evp2007/Pres/Graphs/new-jersey.html\" onmouseover=\"return escape(tooltip(\'New Jersey\',\'15\',\'53\',\'47\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'9939444\',\'Weak Democrat\',\'\',\'53\',\'47\',\'\'));\" shape=poly coords=\"419,113,456,130,462,169,450,194,430,173,420,156,426,146,419,136\">');
document.write('<area href=\"/evp2007/Pres/Graphs/new-mexico.html\" onmouseover=\"return escape(tooltip(\'New Mexico\',\'5\',\'49\',\'50\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'weak_gop\',\'Barely Republican\',\'\',\'49\',\'50\',\'\'));\" shape=poly coords=\"134,179,134,225,141,218,152,218,155,181\">');
document.write('<area href=\"/evp2007/Pres/Graphs/new-york.html\" onmouseover=\"return escape(tooltip(\'New York\',\'31\',\'58\',\'41\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'4810990\',\'Strong Democrat\',\'\',\'58\',\'41\',\'\'));\" shape=poly coords=\"353,109,369,81,393,73,402,38,434,29,451,91,457,130,418,113,408,100\">');
document.write('<area href=\"/evp2007/Pres/Graphs/north-carolina.html\" onmouseover=\"return escape(tooltip(\'North Carolina\',\'15\',\'44\',\'56\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'44\',\'56\',\'\'));\" shape=poly coords=\"330,239,357,217,426,216,428,236,412,250,379,235,353,240\">');
document.write('<area href=\"/evp2007/Pres/Graphs/north-dakota.html\" onmouseover=\"return escape(tooltip(\'North Dakota\',\'3\',\'36\',\'63\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'36\',\'63\',\'\'));\" shape=poly coords=\"155,118,155,128,192,126,188,112\">');
document.write('<area href=\"/evp2007/Pres/Graphs/ohio.html\" onmouseover=\"return escape(tooltip(\'Ohio\',\'20\',\'49\',\'51\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'weak_gop\',\'Barely Republican\',\'\',\'49\',\'51\',\'\'));\" shape=poly coords=\"351,111,330,123,301,129,312,189,337,192,360,160,352,112\">');
document.write('<area href=\"/evp2007/Pres/Graphs/oklahoma.html\" onmouseover=\"return escape(tooltip(\'Oklahoma\',\'7\',\'34\',\'66\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'34\',\'66\',\'\'));\" shape=poly coords=\"155,181,155,185,201,189,201,228,233,235,221,185\">');
document.write('<area href=\"/evp2007/Pres/Graphs/oregon.html\" onmouseover=\"return escape(tooltip(\'Oregon\',\'7\',\'52\',\'48\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'9939444\',\'Barely Democrat\',\'\',\'52\',\'48\',\'\'));\" shape=poly coords=\"17,110,15,115,102,140,106,122\">');
document.write('<area href=\"/evp2007/Pres/Graphs/pennsylvania.html\" onmouseover=\"return escape(tooltip(\'Pennsylvania\',\'21\',\'51\',\'49\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'9939444\',\'Barely Democrat\',\'\',\'51\',\'49\',\'\'));\" shape=poly coords=\"352,110,407,100,419,114,419,135,427,145,420,155,360,160\">');
document.write('<area href=\"/evp2007/Pres/Graphs/rhode-island.html\" onmouseover=\"return escape(tooltip(\'Rhode Island\',\'4\',\'60\',\'39\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'4810990\',\'Strong Democrat\',\'\',\'60\',\'39\',\'\'));\" shape=poly coords=\"482,83,507,80,515,95,491,109\">');
document.write('<area href=\"/evp2007/Pres/Graphs/south-carolina.html\" onmouseover=\"return escape(tooltip(\'South Carolina\',\'8\',\'41\',\'58\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'41\',\'58\',\'\'));\" shape=poly coords=\"353,240,379,235,412,251,387,277\">');
document.write('<area href=\"/evp2007/Pres/Graphs/south-dakota.html\" onmouseover=\"return escape(tooltip(\'South Dakota\',\'3\',\'38\',\'60\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'38\',\'60\',\'\'));\" shape=poly coords=\"155,128,153,130,153,140,194,140,193,126\">');
document.write('<area href=\"/evp2007/Pres/Graphs/tennessee.html\" onmouseover=\"return escape(tooltip(\'Tennessee\',\'11\',\'43\',\'57\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'43\',\'57\',\'\'));\" shape=poly coords=\"264,237,268,222,271,219,356,216,330,239,288,240\">');
document.write('<area href=\"/evp2007/Pres/Graphs/texas.html\" onmouseover=\"return escape(tooltip(\'Texas\',\'34\',\'38\',\'61\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'38\',\'61\',\'\'));\" shape=poly coords=\"155,185,201,189,201,229,233,235,237,281,228,284,224,295,190,246,174,259,141,218,152,218,155,185\">');
document.write('<area href=\"/evp2007/Pres/Graphs/utah.html\" onmouseover=\"return escape(tooltip(\'Utah\',\'5\',\'26\',\'71\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'26\',\'71\',\'\'));\" shape=poly coords=\"127,145,112,142,109,174,134,179,136,149,126,148\">');
document.write('<area href=\"/evp2007/Pres/Graphs/vermont.html\" onmouseover=\"return escape(tooltip(\'Vermont\',\'3\',\'59\',\'39\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'4810990\',\'Strong Democrat\',\'\',\'59\',\'39\',\'\'));\" shape=poly coords=\"434,29,453,23,450,58,442,58\">');
document.write('<area href=\"/evp2007/Pres/Graphs/virginia.html\" onmouseover=\"return escape(tooltip(\'Virginia\',\'13\',\'45\',\'54\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16422550\',\'Weak Republican\',\'\',\'45\',\'54\',\'\'));\" shape=poly coords=\"332,215,343,200,362,192,377,163,393,166,378,180,384,188,391,194,409,206,426,215\">');
document.write('<area href=\"/evp2007/Pres/Graphs/washington.html\" onmouseover=\"return escape(tooltip(\'Washington\',\'11\',\'53\',\'46\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'9939444\',\'Weak Democrat\',\'\',\'53\',\'46\',\'\'));\" shape=poly coords=\"21,85,17,110,106,122,110,111,44,89,41,94\">');
document.write('<area href=\"/evp2007/Pres/Graphs/west-virginia.html\" onmouseover=\"return escape(tooltip(\'West Virginia\',\'5\',\'43\',\'56\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'43\',\'56\',\'\'));\" shape=poly coords=\"338,191,359,160,363,160,367,171,376,164,362,192,343,201\">');
document.write('<area href=\"/evp2007/Pres/Graphs/wisconsin.html\" onmouseover=\"return escape(tooltip(\'Wisconsin\',\'10\',\'50\',\'49\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'9939444\',\'Barely Democrat\',\'\',\'50\',\'49\',\'\'));\" shape=poly coords=\"237,83,274,89,279,100,277,126,247,128,232,113\">');
document.write('<area href=\"/evp2007/Pres/Graphs/wyoming.html\" onmouseover=\"return escape(tooltip(\'Wyoming\',\'3\',\'29\',\'69\',\'\',\'Jan 01\',\'Election 2004\',\'\',\'16396850\',\'Strong Republican\',\'\',\'29\',\'69\',\'\'));\" shape=poly coords=\"129,129,127,148,153,148,152,130\">');
document.write('</map>');

/* This notice must be untouched at all times.

wz_tooltip.js    v. 3.26

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

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

Cross-browser tooltips working even in Opera 5 and 6,
as well as in NN 4, Gecko-Browsers, IE4+, Opera 7 and Konqueror.
No onmouseouts required.
Appearance of tooltips can be individually configured
via commands within the onmouseovers.

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.
*/

function tooltip(state,ev,kerry,bush,nader,pdate,source,filename,color,msg,kg,kerry2004,bush2004,nader2004)
{
	if (nader != '')
		return '<table width=100%><tr><td nowrap align=left><font size=4>'+state+' ('+ev+' EVs)</font><br><font size=2 color="'+color+'"><b>'+msg+'</b></font><br><font size=2><font color=blue>Kerry: '+kerry+'%</font><br><font color=red>Bush: '+bush+'%</font><br><font color=green>Nader: '+nader+'%</font><br><font size=1><i>Source: '+source+' ('+pdate+')</td><tr><td align=left style=\"border-top:solid;border-top-color#A83535;border-top-width:2px;border-top-color:#A83535;\" nowrap><font style:\"font-size:8px\">2004: Kerry: '+kerry2004+'%, Bush '+bush2004+'%, Nader '+nader2004+'%</font></td></table>';
	else
		return '<table width=100%><tr><td nowrap align=left><font size=4>'+state+' ('+ev+' EVs)</font><br><font size=2 color="'+color+'"><b>'+msg+'</b></font><br><font size=2><font color=blue>Kerry: '+kerry+'%</font><br><font color=red>Bush: '+bush+'%</font><br><font size=1><i>Source: '+source+' ('+pdate+')</td><tr><td align=left style=\"border-top:solid;border-top-color:black;border-top-width:2px;border-top-color:#A83535;\" nowrap><font style:\"font-size:8px\">2004: Kerry: '+kerry2004+'%, Bush '+bush2004+'%</font></td></table>';
	
}

var ttBgColor      = '#F9FDC4';
var ttBgImg        = '';           // path to background image;
var ttBorderColor  = '#A83535';
var ttBorderWidth  = 2;
var ttDelay        = 000;          // time span until tooltip shows up [milliseconds]
var ttFontColor    = '#000000';
var ttFontFace     = 'arial,helvetica,sans-serif';
var ttFontSize     = '9pt';
var ttFontWeight   = 'normal';     // alternative is 'bold';
var ttOffsetX      = 8;            // horizontal offset of left-top corner from mousepointer
var ttOffsetY      = 19;           // vertical offset                   "
var ttPadding      = 3;            // spacing between border and content
var ttShadowColor  = '';
var ttShadowWidth  = 0;
var ttTitleColor   = '#ffffff';    // color of caption text
var ttWidth        = 225;

var tt_tags = new Array('a','area','b','big','caption','center','code','dd','div','dl','dt','em','h1','h2','h3','h4','h5','h6','i','img','input','li','map','ol','p','pre','s','small','span','strike','strong','sub','sup','table','td','th','tr','tt','u','var','ul','layer');

var tt_obj,                // current tooltip
tt_objW = 0, tt_objH = 0,  // width and height of tt_obj
tt_objX = 0, tt_objY = 0,
tt_offX = 0, tt_offY = 0,
xlim = 0, ylim = 0,        // right and bottom borders of visible client area
tt_above = false,          // true if T_ABOVE cmd
tt_static = false,         // tt_obj static?
tt_sticky = false,         // tt_obj sticky?
tt_wait = false,
tt_vis = false,            // tooltip visibility flag
tt_dwn = false,            // true while tooltip below mousepointer
tt_u = 'undefined',
tt_inputs = new Array();   // drop-down-boxes to be hidden in IE


var tt_db = (document.compatMode && document.compatMode != 'BackCompat')? document.documentElement : document.body? document.body : null,
tt_n = navigator.userAgent.toLowerCase();

var tt_op = !!(window.opera && document.getElementById),
tt_op6 = tt_op && !document.defaultView,
tt_ie = tt_n.indexOf('msie') != -1 && document.all && tt_db && !tt_op,
tt_n4 = (document.layers && typeof document.classes != "undefined"),
tt_n6 = (!tt_op && document.defaultView && typeof document.defaultView.getComputedStyle != "undefined"),
tt_w3c = !tt_ie && !tt_n6 && !tt_op && document.getElementById;

tt_n = '';


function tt_Int(t_x)
{
	var t_y;
	return isNaN(t_y = parseInt(t_x))? 0 : t_y;
}


function wzReplace(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.wzReplace = wzReplace;


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 (var z = t_d.layers.length; z--;) t_y = tt_N4Tags(tagtyp, t_d.layers[z].document, t_y);
	return t_y;
}


function tt_GetSelects()
{
	if (!(tt_ie || tt_op6)) return;
	if (document.all)
	{
		var t_i = document.all.tags('select').length; while (t_i--) tt_inputs[t_i] = document.all.tags('select')[t_i];
		if (tt_op6) for (t_i = document.all.tags('input').length; t_i--;) tt_inputs[t_i] = document.all.tags('input')[t_i];
	}
	else if (document.getElementsByTagName)
	{
		var t_i = document.getElementsByTagName('select').length; while (t_i--) tt_inputs[t_i] = document.getElementsByTagName('select')[t_i];
		if (tt_op6) for (t_i = document.getElementsByTagName('input').length; t_i--;) tt_inputs[t_i] = document.getElementsByTagName('input')[t_i];
	}
	var t_i = tt_inputs.length; while (t_i--)
	{
		tt_inputs[t_i].x = 0;
		tt_inputs[t_i].y = 0;
		var t_o = tt_inputs[t_i];
		while (t_o)
		{
			tt_inputs[t_i].x += t_o.offsetLeft || 0;
			tt_inputs[t_i].y += t_o.offsetTop|| 0;
			t_o = t_o.offsetParent;
		}
	}
}


function tt_Htm(tt, t_id, txt)
{
	var t_bgc = (typeof tt.T_BGCOLOR != tt_u)? tt.T_BGCOLOR : ttBgColor,
	t_bgimg   = (typeof tt.T_BGIMG != tt_u)? tt.T_BGIMG : ttBgImg,
	t_bc      = (typeof tt.T_BORDERCOLOR != tt_u)? tt.T_BORDERCOLOR : ttBorderColor,
	t_bw      = (typeof tt.T_BORDERWIDTH != tt_u)? tt.T_BORDERWIDTH : ttBorderWidth,
	t_ff      = (typeof tt.T_FONTFACE != tt_u)? tt.T_FONTFACE : ttFontFace,
	t_fc      = (typeof tt.T_FONTCOLOR != tt_u)? tt.T_FONTCOLOR : ttFontColor,
	t_fsz     = (typeof tt.T_FONTSIZE != tt_u)? tt.T_FONTSIZE : ttFontSize,
	t_fwght   = (typeof tt.T_FONTWEIGHT != tt_u)? tt.T_FONTWEIGHT : ttFontWeight,
	t_padd    = (typeof tt.T_PADDING != tt_u)? tt.T_PADDING : ttPadding,
	t_shc     = (typeof tt.T_SHADOWCOLOR != tt_u)? tt.T_SHADOWCOLOR : (ttShadowColor || 0),
	t_shw     = (typeof tt.T_SHADOWWIDTH != tt_u)? tt.T_SHADOWWIDTH : (ttShadowWidth || 0),
	t_tit     = (typeof tt.T_TITLE != tt_u)? tt.T_TITLE : '',
	t_titc    = (typeof tt.T_TITLECOLOR != tt_u)? tt.T_TITLECOLOR : ttTitleColor,
	t_w       = (typeof tt.T_WIDTH != tt_u)? tt.T_WIDTH  : ttWidth;
	if (t_shc || t_shw)
	{
		t_shc = t_shc || '#cccccc';
		t_shw = t_shw || 3;
	}
	if (tt_n4 && (t_fsz == '10px' || t_fsz == '11px')) t_fsz = '12px';


	var t_y = '<div id="' + t_id + '" style="position:absolute;z-index:1010;';
	t_y += 'left:0px;top:0px;width:' + (t_w+t_shw) + 'px;visibility:' + (tt_n4? 'hide' : 'hidden') + ';">';
	t_y += '<table border="0" cellpadding="0" cellspacing="0"' + (t_bc? (' bgcolor="' + t_bc + '"') : '') + ' width="' + t_w + '">';
	if (t_tit)
	{
		t_y += '<tr><td style="padding-left:3px;"><font color="' + t_titc + '" face="' + t_ff + '" ';
		t_y += 'style="color:' + t_titc + ';font-family:' + t_ff + ';font-size:' + t_fsz + ';"><b>';
		t_y += t_tit + '<\/b><\/font><\/td><\/tr>';
	}
	t_y += '<tr><td><table border="0" cellpadding="' + t_padd + '" cellspacing="' + t_bw + '" width="100%">';
	t_y += '<tr><td' + (t_bgc? (' bgcolor="' + t_bgc + '"') : '') + (t_bgimg? ' background="' + t_bgimg + '"' : '');
	if (tt_n6) t_y += ' style="padding:' + t_padd + 'px;"';
	t_y += '><font color="' + t_fc + '" face="' + t_ff + '"';
	t_y += ' style="color:' + t_fc + ';font-family:' + t_ff + ';font-size:' + t_fsz + ';font-weight:' + t_fwght + ';">';
	if (t_fwght == 'bold') t_y += '<b>';
	t_y += txt;
	if (t_fwght == 'bold') t_y += '<\/b>';
	t_y += '<\/font><\/td><\/tr><\/table><\/td><\/tr><\/table>';
	if (t_shw)
	{
		var t_spct = Math.round(t_shw*1.3);
		if (tt_n4)
		{
			t_y += '<layer bgcolor="' + t_shc + '" left="' + t_w + '" top="' + t_spct + '" width="' + t_shw + '" height="0"><\/layer>';
			t_y += '<layer bgcolor="' + t_shc + '" left="' + t_spct + '" align="bottom" width="' + (t_w-t_spct) + '" height="' + t_shw + '"><\/layer>';
		}
		else
		{
			var t_opa = tt_n6? '-moz-opacity:0.85;' : tt_ie? 'filter:Alpha(opacity=85);' : '';
			t_y += '<div id="' + t_id + 'R" style="position:absolute;background:' + t_shc + ';left:' + t_w + 'px;top:' + t_spct + 'px;width:' + t_shw + 'px;height:1px;overflow:hidden;' + t_opa + '"><\/div>';
			t_y += '<div style="position:relative;background:' + t_shc + ';left:' + t_spct + 'px;top:0px;width:' + (t_w-t_spct) + 'px;height:' + t_shw + 'px;overflow:hidden;' + t_opa + '"><\/div>';
		}
	}
	t_y += '<\/div>';
	return t_y;
}


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 txt = unescape(t_tj.onmouseover());
				htm += tt_Htm(
					t_tj,
					'tOoLtIp'+i+''+j,
					txt.wzReplace('& ','&')
				);

				t_tj.onmouseover = new Function('e',
					'tt_Show(e,'+
					'"tOoLtIp' +i+''+j+ '",'+
					(typeof t_tj.T_ABOVE != tt_u) + ','+
					((typeof t_tj.T_DELAY != tt_u)? t_tj.T_DELAY : ttDelay) + ','+
					((typeof t_tj.T_FIX != tt_u)? '"'+t_tj.T_FIX+'"' : '""') + ','+
					(typeof t_tj.T_LEFT != tt_u) + ','+
					((typeof t_tj.T_OFFSETX != tt_u)? t_tj.T_OFFSETX : ttOffsetX) + ','+
					((typeof t_tj.T_OFFSETY != tt_u)? t_tj.T_OFFSETY : ttOffsetY) + ','+
					(typeof t_tj.T_STATIC != tt_u) + ','+
					(typeof t_tj.T_STICKY != tt_u) +
					');'
				);
				t_tj.onmouseout = tt_Hide;
			}
		}
	}
	document.write(htm);
}


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_above) t_y -= (tt_objH + tt_offY - (tt_op? 0x1f : 0xf));
	else if (t_y > ylim || !tt_dwn && t_y > ylim-0x18)
	{
		t_y -= (tt_objH + 5);
		tt_dwn = false;
	}
	else
	{
		t_y += tt_offY;
		tt_dwn = true;
	}
	return t_y;
}


function tt_ReleasMov()
{
	if (document.onmousemove == tt_Move)
	{
		if (document.releaseEvents) document.releaseEvents(Event.MOUSEMOVE);
		document.onmousemove = null;
	}
}


function tt_HideInput()
{
	if (!(tt_ie || tt_op6) || !tt_inputs) return;
	var t_o;
	var t_i = tt_inputs.length; while (t_i--)
	{
		t_o = tt_inputs[t_i];
		if (tt_vis && tt_objX+tt_objW > t_o.x && tt_objX < t_o.x+t_o.offsetWidth && tt_objY+tt_objH > t_o.y && tt_objY < t_o.y+t_o.offsetHeight)
			t_o.style.visibility = 'hidden';
		else t_o.style.visibility = 'visible';
	}
}


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_n4? tt_obj.clip.width
		: tt_obj.style.pixelWidth? tt_obj.style.pixelWidth
		: tt_obj.offsetWidth
	);
}


function tt_GetDivH()
{
	return (
		tt_n4? tt_obj.clip.height
		: tt_obj.style.pixelHeight? tt_obj.style.pixelHeight
		: tt_obj.offsetHeight
	);
}


// Compat with DragDrop Lib: Ensure z-index of tooltip is lifted beyond toplevel dragdrop element
function tt_SetDivZ()
{
	var t_i = tt_obj.style || tt_obj;
	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;
	tt_HideInput();
}


function tt_ShowDiv()
{
	if (tt_n4) tt_obj.visibility = 'show';
	else tt_obj.style.visibility = 'visible';
	tt_vis = true;
	tt_HideInput();
}


function tt_HideDiv()
{
	if (tt_n4) tt_obj.visibility = 'hide';
	else tt_obj.style.visibility = 'hidden';
	tt_vis = false;
	tt_HideInput();
}


function tt_Show(t_e, t_id, t_above, t_delay, t_fix, t_left, t_offx, t_offy, t_static, t_sticky)
{
	if (tt_obj) tt_Hide();
	var t_mf = document.onmousemove || null;
	if (window.dd && (window.DRAG && t_mf == DRAG || window.RESIZE && t_mf == RESIZE)) return;
	var t_uf = document.onmouseup || null;
	if (t_mf && t_uf) t_uf(t_e);

	tt_obj = tt_GetDiv(t_id);
	if (tt_obj)
	{
		tt_dwn = !(tt_above = t_above);
		tt_static = t_static;
		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_op) tt_offY += 0x15;

		if (tt_n4)
		{
			if (tt_obj.document.layers.length)
			{
				var t_sh = tt_obj.document.layers[0];
				t_sh.clip.height = tt_objH - Math.round(t_sh.clip.width*1.3);
			}
		}
		else
		{
			var t_sh = tt_GetDiv(t_id+'R');
			if (t_sh)
			{
				var 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';
			}
		}
		
		tt_GetSelects();


		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? 0x15 : 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();
		t_e = t_e || window.event;
		if (t_fix) tt_SetDivPos(tt_Int((t_fix = t_fix.split(','))[0]), tt_Int(t_fix[1]));
		else tt_SetDivPos(tt_EvX(t_e), tt_EvY(t_e));

		window.tt_rdl = window.setTimeout(
			'if (tt_sticky)'+
			'{'+
				'tt_ReleasMov();'+
				'window.tt_upFunc = document.onmouseup || null;'+
				'if (document.captureEvents) document.captureEvents(Event.MOUSEUP);'+
				'document.onmouseup = new Function("window.setTimeout(\'tt_Hide();\', 0xa);");'+
			'}'+
			'else if (tt_static) tt_ReleasMov();'+
			'tt_ShowDiv();',
			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_sticky && !tt_vis)
		{
			tt_HideDiv();
			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_ReleasMov();
		tt_HideInput();
	}
}


tt_Init();

