
<!--
/*
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 tip1 = '<img src="assets/bucks.gif" width="205" height="24" border="0"><br> <table align=left width="205" cellpadding=3 cellspacing=0 border=0><tr><td align=left BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000"> <table align=left width="205" border=0 cellpadding=0 cellspacing=0> <td align=left><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#8099B1">County Size:</B></font>  607 sq. miles<br>     &nbsp;&nbsp;<b><font color="#8099B1">Population:</B></font> 597,365 <br>       &nbsp;&nbsp;<b><font color="#8099B1">Density:</B></font> 984 people/sq. mile<br>       &nbsp;&nbsp;<b><font color="#8099B1">Average Sale Price:</B></font> $282,500</font><br></td></font><br>   </tr></table>';
//var tip0 = '<img src="assets//berks.gif" width="205" height="24" border="0"><br><table align=left width="205" align=left cellpadding=3 cellspacing=0 border=0><tr><td align=left BGCOLOR="#ffffff">Berks County is a county located Pennsylvania. Its county seat is Reading. Berks County is part of the Reading, PA metropolitan statistical area and as of 2005, is also considered part of the Philadelphia combined statistical area<br>     <img src="/assets/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br>       <table align=left width=100% border=0 cellpadding=0 cellspacing=0><tr>         <td align=left><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#739973">County Size:</B></font>  859 sq. miles<br>         &nbsp;&nbsp;<b><font color="#739973">Population:</B></font> 401,149 <br>           &nbsp;&nbsp;<b><font color="#739973">Density:</B></font> 435 people/sq. mile<br>           &nbsp;&nbsp;<b><font color="#739973">Average Sale Price:</B></font> $159,950</font></td>       </tr></table>';
var tip0 = '<img src="assets/berks.gif" width="205" height="24" border="0"><br><table align=left width="205" align=left cellpadding=3 cellspacing=0 border=0><tr><td align=left BGCOLOR="#ffffff"><table align=left width=100% border=0 cellpadding=0 cellspacing=0><tr>         <td align=left><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#739973">County Size:</B></font>  859 sq. miles<br>         &nbsp;&nbsp;<b><font color="#739973">Population:</B></font> 401,149 <br>           &nbsp;&nbsp;<b><font color="#739973">Density:</B></font> 435 people/sq. mile<br>           &nbsp;&nbsp;<b><font color="#739973">Average Sale Price:</B></font> $159,950</font></td>       </tr></table>';

//var tip3 = '<img src="assets//chester.gif" width="205" height="24" border="0"><br><table align=left width="205" cellpadding=3 cellspacing=0 border=0><tr><td align=left BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000">The county seat is West Chester. <br>   It is the highest-income county measured per capita and by median household income in Pennsylvania.<br>   Chester County is one of the three original counties of Pennsylvania created by William Penn in 1682. It is named for Cheshire, England. It is part of the Delaware Valley area, and is the only Delaware Valley county in Pennsylvania that does not border Philadelphia, though it is close<br>  <img src="/assets/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table align=left width=100% border=0 cellpadding=0 cellspacing=0><tr>     <td align=left><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#B1907B">County Size:</B></font>  607 sq. miles<br>      &nbsp;&nbsp;<b><font color="#B1907B">Population:</B></font> 433,501 <br>   &nbsp;&nbsp;<b><font color="#B1907B">Density:</B></font> 572 people/sq. mile<br>   &nbsp;&nbsp;<b><font color="#B1907B">Average Sale Price:</B></font> $362,728</font></td>   </tr></table>';
var tip3 = '<img src="assets/chester.gif" width="205" height="24" border="0"><br><table align=left width="205" cellpadding=3 cellspacing=0 border=0><tr><td align=left BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000"><table align=left width=100% border=0 cellpadding=0 cellspacing=0><tr>     <td align=left><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#B1907B">County Size:</B></font>  607 sq. miles<br>      &nbsp;&nbsp;<b><font color="#B1907B">Population:</B></font> 433,501 <br>   &nbsp;&nbsp;<b><font color="#B1907B">Density:</B></font> 572 people/sq. mile<br>   &nbsp;&nbsp;<b><font color="#B1907B">Average Sale Price:</B></font> $362,728</font></td>   </tr></table>';


//var tip2 = '<img src="assets/montgomery.gif" width="205" height="24" border="0"><br><table align=left width="205" cellpadding=3 cellspacing=0 border=0><tr><td align=left BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000">The county was created on September 10, 1784, out of land originally part of Philadelphia County. It is believed to have been either named in honor of Richard Montgomery, an American Revolutionary War general killed in 1775 while attempting to capture Quebec City, Canada, or for the Welsh county of Montgomeryshire (which was named after one of William the Conqueror\'s main counselors, Roger de Montgomerie), as it was part of the Welsh Tract -- an area of Pennsylvania settled by Quakers from Wales. It is the 20th wealthiest county in the country and was named the 9th Best Place to Raise a Family by Forbes.<br>   <img src="/assets/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table align=left width=100% border=0 cellpadding=0 cellspacing=0><tr>     <td align=left><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#B1A188">County Size:</B></font>  487 sq. miles<br>      &nbsp;&nbsp;<b><font color="#B1A188">Population:</B></font> 795,618 <br>       &nbsp;&nbsp;<b><font color="#B1A188">Density:</B></font> 1,551 people/sq. mile<br>       &nbsp;&nbsp;<b><font color="#B1A188">Average Sale Price:</B></font> $265,000</font></td>   </tr></table>';
var tip2 = '<img src="assets/montgomery.gif" width="205" height="24" border="0"><br><table align=left width="205" cellpadding=3 cellspacing=0 border=0><tr><td align=left BGCOLOR="#ffffff"><font size="1" face="arial" color="#000000"><table align=left width=100% border=0 cellpadding=0 cellspacing=0><tr>     <td align=left><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#B1A188">County Size:</B></font>  487 sq. miles<br>      &nbsp;&nbsp;<b><font color="#B1A188">Population:</B></font> 795,618 <br>       &nbsp;&nbsp;<b><font color="#B1A188">Density:</B></font> 1,551 people/sq. mile<br>       &nbsp;&nbsp;<b><font color="#B1A188">Average Sale Price:</B></font> $265,000</font></td>   </tr></table>';

//var tip4 = '<img src="assets/delaware.gif" width="205" height="24" border="0"><br><table align=left width="205" cellpadding=3 cellspacing=0 border=0><tr><td align=left BGCOLOR="#ffffff">  Delaware County (known colloquially as &quot;Delco&quot;) is located in Pennsylvania.  It is <br>   Delaware County was created on September 26, 1789, from part of Chester County and named for the Delaware River. Its county seat, since 1851, is Media. Chester City, prior to 1851, was the county seat of both Delaware County and, before that, of Chester County.<br>  <img src="/assets/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table align=left width=100% border=0 cellpadding=0 cellspacing=0><tr>     <td align=left><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#8888B1">County Size:</B></font>  191 sq. miles<br>          &nbsp;&nbsp;<b><font color="#8888B1">Population:</B></font> 550,864 <br>       &nbsp;&nbsp;<b><font color="#8888B1">Density:</B></font> 2,991 people/sq. mile<br>     &nbsp;&nbsp;<b><font color="#8888B1">Average Sale Price:</B></font> $261,053</font></td>   </tr></table>';
var tip4 = '<img src="assets/delaware.gif" width="205" height="24" border="0"><br><table align=left width="205" cellpadding=3 cellspacing=0 border=0><tr><td align=left BGCOLOR="#ffffff"><table align=left width=100% border=0 cellpadding=0 cellspacing=0><tr>     <td align=left><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#8888B1">County Size:</B></font>  191 sq. miles<br>          &nbsp;&nbsp;<b><font color="#8888B1">Population:</B></font> 550,864 <br>       &nbsp;&nbsp;<b><font color="#8888B1">Density:</B></font> 2,991 people/sq. mile<br>     &nbsp;&nbsp;<b><font color="#8888B1">Average Sale Price:</B></font> $261,053</font></td>   </tr></table>';

//var tip5 = '<img src="assets/philadelphia.gif" width="205" height="24" border="0"><br><table align=left width="205" cellpadding=3 cellspacing=0 border=0><tr><td align=left BGCOLOR="#ffffff">Philadelphia is the largest city in PA. and the sixth-most-populous city in the US.<br> A commercial, educational, and cultural center, the city was once the 2nd-largest in the British Empire (after London), and the social and geographical center of the original 13 American colonies.<br>Ben Franklin took a large role in Philadelphia\'s early rise to prominence. It was in this city that many of the ideas, and subsequent actions, gave birth to the American Revolution and American Independence, making Philadelphia a centerpiece of early American history. It was the most populous city of the young United States, and served as the nation\'s first capital during much of the Revolutionary War and after. Following the ratification of the U.S. Constitution, it was the temporary national capital from 1790 to 1800.<br> <img src="/assets/dotted-bar.gif" width="198" height="1" border="0"  vspace=6><br><table align=left width=100% border=0 cellpadding=0 cellspacing=0><tr>   <td align=left><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#B18099">County Size:</B></font>  143 sq. miles<br>   &nbsp;&nbsp;<b><font color="#B18099">Population:</B></font> 1,517,550 <br>     &nbsp;&nbsp;<b><font color="#B18099">Density:</B></font> 11,223 people/sq. mile<br>     &nbsp;&nbsp;<b><font color="#B18099">Average Sale Price:</B></font> $139,214</font></td> </tr></table>';
var tip5 = '<img src="assets/philadelphia.gif" width="205" height="24" border="0"><br><table align=left width="205" cellpadding=3 cellspacing=0 border=0><tr><td align=left BGCOLOR="#ffffff"><table align=left width=100% border=0 cellpadding=0 cellspacing=0><tr>   <td align=left><font face="verdana, arial" size="1">&nbsp;&nbsp;<b><font color="#B18099">County Size:</B></font>  143 sq. miles<br>   &nbsp;&nbsp;<b><font color="#B18099">Population:</B></font> 1,517,550 <br>     &nbsp;&nbsp;<b><font color="#B18099">Density:</B></font> 11,223 people/sq. mile<br>     &nbsp;&nbsp;<b><font color="#B18099">Average Sale Price:</B></font> $139,214</font></td> </tr></table>';


var rebate = '<div><table align=center width="205" cellpadding=0 cellspacing=0 border=0><tr><td><img src="public/images/rebate_def_top.jpg" width="205" height="24" border="0"></td></tr><tr><td align=left BGCOLOR="#ffffff">Rebate amount shown is approximate.  Actual rebate amount may vary.  Rebate is a function of the salesprice of the home, overall number of showings performed by SCR, and the percentage commission the selleris paying to SCR (rebate amount shown assumes seller is paying 3%, but actual % may vary). For more information about how the rebate program works, please visit the "Rebates" page of this website.</td></tr></table></div>';


var notloggedin = '<div><table align=center width="205" cellpadding=0 cellspacing=0 border=0><tr><td><img src="public/images/not_registered-tab.png" width="205" height="24" border="0"></td></tr><tr><td align=center BGCOLOR="#ffffff">To take advantage of our advanced real estate tools. <br> Register Now !<br>Only 3 short form fields away from accessing all of our tools!<br><img src="public/images/orange_dotted_line.png"><br>Click Login to my search center to register. <br> Quick and instant access.<font face="verdana,arial" size="1"></font></td></tr></table></div>';


////////////////////  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);
}


function doTooltip1(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;
}

//-->
