
<!--
/*
This code is from Dynamic Web Coding 
www.dyn-web.com 
Copyright 2001 by Sharon Paine 
Permission granted to use this code as long as this 
entire notice is included.
*/

/* IMPORTANT: Put script after tooltip div or 
	 put tooltip div just before </BODY>. */

var dom = (document.getElementById) ? true : false;
var ns5 = ((navigator.userAgent.indexOf("Gecko")>-1) && dom) ? true: false;
var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
var ns4 = (document.layers && !dom) ? true : false;
var ie4 = (document.all && !dom) ? true : false;
var nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;

// resize fix for ns4
var origWidth, origHeight;
if (ns4) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

// avoid error of passing event object in older browsers
if (nodyn) event = "nope";

///////////////////////  CUSTOMIZE HERE   ////////////////////
// settings for tooltip 
// Do you want tip to move with mouse movement along link?
var tipFollowMouse	= false;	
var tipWidth 			 	= 205;
var offX					 	= 20;	// how far from mouse to show tip
var offY					 	= 3; 
var tipFontFamily 	= "arial, helvetica, sans-serif";
var tipFontSize			= "8pt";
var tipFontColor		= "#000000";
var tipBgColor 			= "#ffffff";
var tipBorderColor 	= "#666666";
var tipBorderWidth 	= 1;
var tipBorderStyle 	= "solid";
var tipPadding		 	= 1;

// preload images to be placed in tooltip
//var img1 = new Image(100,100);	// (width,height)
// img1.src = "your.gif";


// variables for tooltip content 
var tip0 = '<img src="http://www.housesinlexington.com/graphics/CONCORD.gif" width="205" height="24" border="0"><br><table width="205" cellpadding=3 cellspacing=0 border=0><tr><td BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000">Concord, founded in 1635, is well known for its historic battles during the Revolutionary War. Concord has an excellent school system and is home to many private schools. Concord is located 18 miles from Boston. It is bordered by Maynard, Acton, Carlisle, Bedford, Lincoln and Sudbury.<br><img src="http://www.housesinlexington.com/graphics/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#8099B1">Town Size:</B></font>  24.96 sq. miles<br>&nbsp;&nbsp;<b><font color="#8099B1">Population:</B></font>  16,993<br>&nbsp;&nbsp;<b><font color="#8099B1">Density:</B></font> 681 people/sq. mile<br>&nbsp;&nbsp;<b><font color="#8099B1">Average Sale Price:</B></font> $627,000</font></td></tr></table>'
var tip1 = '<img src="http://www.housesinlexington.com/graphics/CARLISLE.gif" width="205" height="24" border="0"><br><table width="205" cellpadding=3 cellspacing=0 border=0><tr><td BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000">Carlisle, founded in 1805, maintains a rich tradition in the preservation of open space, and maintains a small-town atmosphere. Carlisle is 26 miles from Boston. It is bordered by Concord, Acton, Westford, Chelmsford, Billerica and Bedford.<br><img src="http://www.housesinlexington.com/graphics/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#739973">Town Size:</B></font>  15.37 sq. miles<br>&nbsp;&nbsp;<b><font color="#739973">Population:</B></font>  4,717<br>&nbsp;&nbsp;<b><font color="#739973">Density:</B></font> 307 people/sq. mile<br>&nbsp;&nbsp;<b><font color="#739973">Average Sale Price:</B></font> $650,000</font></td></tr></table>'
var tip2 = '<img src="http://www.housesinlexington.com/graphics/BEDFORD.gif" width="205" height="24" border="0"><br><table width="205" cellpadding=3 cellspacing=0 border=0><tr><td BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000">Bedford was founded in 1729. Education is a top priority with the schools well known for scoring competitively by all standards. Bedford is located 15 miles from Boston. It is bordered by Billerica, Burlington, Lexington, Lincoln, Concord and Carlisle.<br><img src="http://www.housesinlexington.com/graphics/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#B1907B">Town Size:</B></font>  13.73 sq. miles<br>&nbsp;&nbsp;<b><font color="#B1907B">Population:</B></font>  12,595<br>&nbsp;&nbsp;<b><font color="#B1907B">Density:</B></font> 917 people/sq. mile<br>&nbsp;&nbsp;<b><font color="#B1907B">Average Sale Price:</B></font> $479,300</font></td></tr></table>'
var tip3 = '<img src="http://www.housesinlexington.com/graphics/LINCOLN.gif" width="205" height="24" border="0"><br><table width="205" cellpadding=3 cellspacing=0 border=0><tr><td BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000">Lincoln, founded in 1754, is a small, quiet, suburb with significant areas preserved against development.  Lincoln is located 13 miles from Boston. It is bordered by Sudbury, Concord, Bedford, Lexington, Waltham, Weston and Wayland.<br><img src="http://www.housesinlexington.com/graphics/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#B1A188">Town Size:</B></font>  14.56 sq. miles<br>&nbsp;&nbsp;<b><font color="#B1A188">Population:</B></font>  8,056<br>&nbsp;&nbsp;<b><font color="#B1A188">Density:</B></font> 553 people/sq. mile<br>&nbsp;&nbsp;<b><font color="#B1A188">Average Sale Price:</B></font> $710,000</font></td></tr></table>'
var tip4 = '<img src="http://www.housesinlexington.com/graphics/LEXINGTON.gif" width="205" height="24" border="0"><br><table width="205" cellpadding=3 cellspacing=0 border=0><tr><td BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000">Lexington, founded in 1713, prides itself on its excellent of school system, conservation lands, museums and libraries.  Lexington, the birthplace of the American Revolution, is located 11 miles from Boston. It is bordered by Lincoln, Bedford, Burlington, Woburn, Winchester, Arlington, Belmont and Waltham.<br><img src="http://www.housesinlexington.com/graphics/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#8888B1">Town Size:</B></font>  16.48 sq. miles<br>&nbsp;&nbsp;<b><font color="#8888B1">Population:</B></font>  30,355<br>&nbsp;&nbsp;<b><font color="#8888B1">Density:</B></font> 1,842 people/sq. mile<br>&nbsp;&nbsp;<b><font color="#8888B1">Average Sale Price:</B></font> $610,000</font></td></tr></table>'
var tip5 = '<img src="http://www.housesinlexington.com/graphics/BURLINGTON.gif" width="205" height="24" border="0"><br><table width="205" cellpadding=3 cellspacing=0 border=0><tr><td BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000">Burlington, founded in 1799, has easy access to highways and transportation. Burlington is located 13 miles from Boston. It is bordered by Bedford, Billerica, Wilmington, Woburn and Lexington.<br><img src="http://www.housesinlexington.com/graphics/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#B18099">Town Size:</B></font>  11.84 sq. miles<br>&nbsp;&nbsp;<b><font color="#B18099">Population:</B></font>  22,976<br>&nbsp;&nbsp;<b><font color="#B18099">Density:</B></font> 1,932 people/sq. mile<br>&nbsp;&nbsp;<b><font color="#B18099">Average Sale Price:</B></font> $362,300</font></td></tr></table>'
var tip6 = '<img src="http://www.housesinlexington.com/graphics/WOBURN.gif" width="205" height="24" border="0"><br><table width="205" cellpadding=3 cellspacing=0 border=0><tr><td BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000">Woburn, founded first as a town in 1642, was incorporated as a city in 1889. Woburn is located 10 miles from Boston. It is bordered by Wilmington, Reading, Stoneham, Winchester, Lexington and Burlington.<br><img src="http://www.housesinlexington.com/graphics/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#B19039">Town Size:</B></font>  12.86 sq. miles<br>&nbsp;&nbsp;<b><font color="#B19039">Population:</B></font>  37,528<br>&nbsp;&nbsp;<b><font color="#B19039">Density:</B></font> 2,897 people/sq. mile<br>&nbsp;&nbsp;<b><font color="#B19039">Average Sale Price:</B></font> 327,200</font></td></tr></table>'
var tip7 = '<img src="http://www.housesinlexington.com/graphics/WINCHESTER.gif" width="205" height="24" border="0"><br><table width="205" cellpadding=3 cellspacing=0 border=0><tr><td BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000">Winchester, founded in 1850, is a thriving residential community noted for its fine school system and charming town center. Winchester is located 8 miles from Boston. It is bordered Woburn, Stoneham, Medford, Arlington and Lexington.<br><img src="http://www.housesinlexington.com/graphics/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#B1A97B">Town Size:</B></font>  5.9 sq. miles<br>&nbsp;&nbsp;<b><font color="#B1A97B">Population:</B></font>  20,810<br>&nbsp;&nbsp;<b><font color="#B1A97B">Density:</B></font> 3,527 people/sq. mile<br>&nbsp;&nbsp;<b><font color="#B1A97B">Average Sale Price:</B></font> $599,000</font></td></tr></table>'
var tip8 = '<img src="http://www.housesinlexington.com/graphics/ARLINGTON.gif" width="205" height="24" border="0"><br><table width="205" cellpadding=3 cellspacing=0 border=0><tr><td BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000">Arlington, founded over 350 years ago, is proud of its excellent schools & recreation facilities. Arlington is a mere 6 miles west of Boston. It is bordered by Winchester, Medford, Somerville, Cambridge, Belmont and Lexington. <br><img src="http://www.housesinlexington.com/graphics/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#A96B73">Town Size:</B></font>  5.18 sq. miles<br>&nbsp;&nbsp;<b><font color="#A96B73">Population:</B></font>  42,389<br>&nbsp;&nbsp;<b><font color="#A96B73">Density:</B></font> 8,183 people/sq mile<br>&nbsp;&nbsp;<b><font color="#A96B73">Average Sale Price:</B></font> $457,500</font></td></tr></table>'
var tip9 = '<img src="http://www.housesinlexington.com/graphics/BELMONT.gif" width="205" height="24" border="0"><br><table width="205" cellpadding=3 cellspacing=0 border=0><tr><td BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000">Belmont, founded in 1630, is a pleasant, residential suburb. Belmont is located 7 miles from Boston. It is bordered by Lexington, Arlington, Cambridge, Watertown and Waltham.<br><img src="http://www.housesinlexington.com/graphics/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#9988B1">Town Size:</B></font>  4.59 sq. miles<br>&nbsp;&nbsp;<b><font color="#9988B1">Population:</B></font>  24,194<br>&nbsp;&nbsp;<b><font color="#9988B1">Density:</B></font> 5,271 people/sq. mile<br>&nbsp;&nbsp;<b><font color="#9988B1">Average Sale Price:</B></font> $600,800</font></td></tr></table>'
var tip10 = '<img src="http://www.housesinlexington.com/graphics/WALTHAM.gif" width="205" height="24" border="0"><br><table width="205" cellpadding=3 cellspacing=0 border=0><tr><td BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000">Waltham, founded in 1738 and as a city in 1884, is a metropolitan city proud of its aggressive revitalization program and open space facilities. Waltham is 9 miles west of Boston.  It is bordered by Lexington, Belmont, Watertown, Lincoln, Weston and Newton.<br><img src="http://www.housesinlexington.com/graphics/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#90A173">Town Size:</B></font>  12.41 sq. miles<br>&nbsp;&nbsp;<b><font color="#90A173">Population:</B></font>  59,226<br>&nbsp;&nbsp;<b><font color="#90A173">Density:</B></font> 4,772 people/sq. mile<br>&nbsp;&nbsp;<b><font color="#90A173">Average Sale Price:</B></font> $340,000</font></td></tr></table>'
var tip11 = '<img src="http://www.housesinlexington.com/graphics/SUDBURY.gif" width="205" height="24" border="0"><br><table width="205" cellpadding=3 cellspacing=0 border=0><tr><td BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000">Sudbury, founded in 1639, is known for its excellent schools and well-managed government. Sudbury is 20 miles west of Boston. It is bordered by Wayland, Framingham, Hudson, Maynard, Marlborough, Stow, Concord and Acton. <br><img src="http://www.housesinlexington.com/graphics/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#A988B1">Town Size:</B></font>  24.37 sq. miles<br>&nbsp;&nbsp;<b><font color="#A988B1">Population:</B></font>  16,841<br>&nbsp;&nbsp;<b><font color="#A988B1">Density:</B></font> 691 people/sq. mile<br>&nbsp;&nbsp;<b><font color="#A988B1">Average Sale Price:</B></font> $542,500</font></td></tr></table>'
var tip12 = '<img src="http://www.housesinlexington.com/graphics/ACTON.gif" width="205" height="24" border="0"><br><table width="205" cellpadding=3 cellspacing=0 border=0><tr><td BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000">Acton, founded in 1735 has retained much of its rural New England character and has a top ranked school system. Acton is 25 miles west of Boston.  Acton is bordered by Carlisle, Concord, Westford, Littleton, Sudbury, Maynard, Stow and Boxborough.<br><img src="http://www.housesinlexington.com/graphics/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#B18073">Town Size:</B></font>  20.06 sq. miles<br>&nbsp;&nbsp;<b><font color="#B18073">Population:</B></font>  20,331<br>&nbsp;&nbsp;<b><font color="#B18073">Density:</B></font> 1,014 people/sq. mile<br>&nbsp;&nbsp;<b><font color="#B18073">Average Sale Price:</B></font> $433,500</font></td></tr></table>'


////////////////////  END OF CUSTOMIZATION AREA  ///////////////////

////////////////////////////////////////////////////////////
//  initTip	- initialization for tooltip.
//		Global variables for tooltip. 
//		Set styles for all but ns4. 
//		Set up mousemove capture if tipFollowMouse set true.
////////////////////////////////////////////////////////////
var tooltip, tipcss;
function initTip() {
	if (nodyn) return;
	tooltip = (ns4)? document.tipDiv.document: (ie4)? document.all['tipDiv']: (ie5||ns5)? document.getElementById('tipDiv'): null;
	tipcss = (ns4)? document.tipDiv: 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) {
		if (ns4) document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove = trackMouse;
	}
}
window.onload = initTip;

/////////////////////////////////////////////////////////////
//  doTooltip function
//			Assembles content for tooltip and writes it to tipDiv.
//			Call positionTip function from here if tipFollowMouse
//			is set to false.
//////////////////////////////////////////////////////////////
var t1,t2;	// for setTimeouts
var tipOn = false;	// check if over tooltip link
function doTooltip(evt,txt) {
	if (!tooltip) return;
	if (t1) clearTimeout(t1);	if (t2) clearTimeout(t2);
	tipOn = true;
	if (ns4) {
		tip = '<table bgcolor="' + tipBorderColor + '" width="' + tipWidth + '" cellspacing="0" cellpadding="' + tipBorderWidth + '" border="0"><tr><td><table bgcolor="' + tipBgColor + '" width="100%" cellspacing="0" cellpadding="' + tipPadding + '" border="0"><tr><td><span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + tipFontColor + ';">' + txt  + '</span></td></tr></table></td></tr></table>';
		tooltip.write(tip);
		tooltip.close();
	} else if (ie4||ie5||ns5) {
		tip = txt;
	 	tooltip.innerHTML = tip;
	}
	if (!tipFollowMouse) positionTip(evt);
}

var mouseX, mouseY;
function trackMouse(evt) {
	mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
	mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.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) {
		mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
		mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.scrollTop;
	}
	// tooltip width and height
	var tpWd = (ns4)? tooltip.width: (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;
	var tpHt = (ns4)? tooltip.height: (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;
	// document area in view (subtract scrollbar width for ns)
	var winWd = (ns4||ns5)? window.innerWidth-20+window.pageXOffset: document.body.clientWidth+document.body.scrollLeft;
	var winHt = (ns4||ns5)? window.innerHeight+window.pageYOffset: document.body.clientHeight+document.body.scrollTop;
	// check mouse position against tip and window dimensions
	// and position the tooltip 
	if ((mouseX+offX+tpWd)>winWd) 
		tipcss.left = (ns4)? mouseX-(tpWd+offX): mouseX-(tpWd+offX)+"px";
	else tipcss.left = (ns4)? mouseX+offX: mouseX+offX+"px";
	if ((mouseY+offY+tpHt)>winHt) 
		tipcss.top = (ns4)? mouseY-(tpHt+offY): mouseY-(tpHt+offY)+"px";
	else tipcss.top = (ns4)? mouseY+offY: mouseY+offY+"px";
	t1=setTimeout("tipcss.visibility='visible'",100);
}

function hideTip() {
	if (!tooltip) return;
//	tipcss.visibility = "hidden";
	t2=setTimeout("tipcss.visibility='hidden'",100);
	tipOn = false;
}

//-->
