
Function.NoOp = function(a) { return (a); }
if (!window.BtvOverlay) window.BtvOverlay = {};
(function(){
if (!BtvOverlay.Util) BtvOverlay.Util = {};
BtvOverlay.Util.ArrayToHash = function(a, fnc)
{
fnc = fnc || Function.NoOp;
var ht = {};
for (var i = 0; a && (i < a.length); i++) ht[fnc(a[i])] = true;
return (ht);
}
BtvOverlay.Util.ToLowerCase = function(s)
{
return(s.toLowerCase());
}
BtvOverlay.Util.ToUpperCase = function(s)
{
return(s.toUpperCase());
}
var re = new RegExp("[\\[\\]{}\\\\|().*+?\^\$]", "g");
BtvOverlay.Util.RegExpEscape = function(s)
{
return s.replace(re, "\\$&");
}
})();
BtvOverlay.Dom = new function()
{
var oThis = this;
oThis.Traverse = function(oNode, fnc, fncStop)
{
function Loop()
{
while (aNodesToSearch.length > 0)
{
if (iDelayIterations++ == 100)
{
iDelayIterations = 0;
window.setTimeout(Loop, 10);
fncStop(true);
return;
}
else
{
oNode = aNodesToSearch[aNodesToSearch.length-1];
if (oNode == aParentNodes[aParentNodes.length-1])
{
aParentNodes.pop();
aNodesToSearch.pop();
fnc(oNode, false);
}
else
{
if (!fnc(oNode, true) && oNode.childNodes.length)
{
aParentNodes.push(oNode);
for (var i = oNode.childNodes.length - 1; i >= 0; i--)
{
aNodesToSearch.push(oNode.childNodes[i]);
}
}
else
{
aNodesToSearch.pop();
fnc(oNode, false)
}
}
}
}
fncStop(false);
}
var iDelayIterations = 0;
var aNodesToSearch = oNode ? [oNode] : [];
var aParentNodes = [];
Loop();
}
oThis.FindNodes = function(oNode, aNodeTypes, oRules, fncCallback)
{
function Nodify(oNode, bln)
{
if (bln)
{
var iType = oNode.nodeType;
if (iInclude && htNodeTypes[iType]) aTextNodes.push(oNode);
if (iType != 1) return(true);
var id = oNode.getAttribute("id");
if (lookup[0] && lookup[0].ids[id]) return(true);
var strTagName = oNode.tagName;
if (lookup[0] && lookup[0].tags[strTagName]) return(true);
var strClasses = oNode.className;
if (lookup[0] && lookup[0].classes[strClasses]) return(true);
if (lookup[1] && (lookup[1].tags[strTagName] || lookup[1].ids[id] || lookup[1].classes[strClasses]))
{
aIncludeNodes.push(oNode);
iInclude++;
}
return(false);
}
else
{
if (aIncludeNodes.length && (aIncludeNodes[aIncludeNodes.length-1] == oNode))
{
aIncludeNodes.pop();
iInclude--;
}
}
}
function Stop(bln)
{
fncCallback(aTextNodes, bln);
aTextNodes = [];
}
function CreateLookup()
{
var lookup = [];
if (oRules.oExclude) lookup[0] = {
tags: ath(oRules.oExclude.aTags, BtvOverlay.Util.ToUpperCase)
,ids: ath(oRules.oExclude.aIds)
,classes: ath(oRules.oExclude.aClasses)
};
if (oRules.oInclude) lookup[1] = {
tags: ath(oRules.oInclude.aTags, BtvOverlay.Util.ToUpperCase)
,ids: ath(oRules.oInclude.aIds)
,classes: ath(oRules.oInclude.aClasses)
};
return(lookup);
}
oRules.aNodeTypes = aNodeTypes;
var iInclude = oRules.oInclude ? 0 : 1;
var ath = BtvOverlay.Util.ArrayToHash;
var htNodeTypes = BtvOverlay.Util.ArrayToHash(oRules.aNodeTypes);
var lookup = CreateLookup();
var aIncludeNodes = [];
var aTextNodes = [];
BtvOverlay.Dom.Traverse(oNode, Nodify, Stop);
}
};
BtvOverlay.Dom.Tokenizer = new function()
{
var oThis = this;
oThis.Run = function(oNode, astrKeywords, htTermsData, oRules, strTermColor, fnc)
{
function RunSet(aNodes, astrKeywords, fnc)
{
function BuildReplacement(oNode, strText, aMatches)
{
function InAnchor()
{
var o = oNode;
while (o.parentNode)
{
if (o.parentNode.tagName && (o.parentNode.tagName.toLowerCase() == "a")) return(true);
o = o.parentNode
}
return(false);
}
function Adorn(str)
{
var span = document.createElement("foo");
if (!span.addEventListener) span.style.position = "relative";
span.style.display = "inline";
span.style.textDecoration = "underline";
span.style.borderBottom = "solid 1px " + strTermColor;
if (!span.addEventListener) span.style.top = "1px";
span.style.cursor = "pointer";
span.style.zoom = 1;
fnc(span, str);
span.innerHTML = str;
return (span);
}
function CheckSpan(span)
{
var str = span.innerHTML;
span.innerHTML = '&nbsp;';
var iOneLineHeight = span.offsetHeight;
span.innerHTML = str;
var iEntireHeight = span.offsetHeight;
span._blnWrap = (iEntireHeight > (1.5 * iOneLineHeight));
}
function CreateIcon(str)
{
var img = document.createElement('img');
img.src = '/images/overlay-action.png';
img.style.borderWidth = '0px';
img.style.display = 'inline';
//img.style.verticalAlign = 'text-bottom';
img.style.padding = '1px 0px 0px 4px';
img.style.margin = '0px';
img.style.cursor = "pointer";
img.style.zoom = 1;
img.__blnOverlay = true;
fnc(img, str);
return(img);
}
if (!oNode.parentNode) return;
for (var i=0; i < oNode.parentNode.childNodes.length; i++)
{
if (oNode.parentNode.childNodes[i].__blnOverlay) return;
}
var iStart = 0;
for (var i = 0; i < aMatches.length; i++)
{
var strMatch = aMatches[i][0];
var strTerm = aMatches[i][1];
if (true)
{
var iPlainTextLength = aMatches[i].index + strMatch.indexOf(strTerm);
var textNode = document.createTextNode(strText.substring(iStart, iPlainTextLength));
oNode.parentNode.insertBefore(textNode, oNode);
var span = Adorn(strTerm);
oNode.parentNode.insertBefore(span, oNode);
CheckSpan(span);
iStart = iPlainTextLength + strTerm.length;
}
else
{
var iPlainTextLength = aMatches[i].index + strMatch.indexOf(strTerm) + strTerm.length;
var textNode = document.createTextNode(strText.substring(iStart, iPlainTextLength));
oNode.parentNode.insertBefore(textNode, oNode);
oNode.parentNode.insertBefore(CreateIcon(strTerm), oNode);
iStart = iPlainTextLength;
}
}
var textNode = document.createTextNode(strText.substring(iStart));
oNode.parentNode.insertBefore(textNode, oNode);
oNode.parentNode.removeChild(oNode);
}
function SortKeywords(s1, s2)
{
var i1 = s1.length;
var i2 = s2.length;
return((i1 < i2) ? 1 : ((i1 > i2) ? -1 : 0));
}
astrKeywords.sort(SortKeywords);
var aReKeywords = [];
for (var i=0; i < astrKeywords.length; i++)
{
aReKeywords.push(BtvOverlay.Util.RegExpEscape(astrKeywords[i]));
}
var reSearch = new RegExp("(?:^|[^0-9A-Za-z])(" + aReKeywords.join('|') + ")([^0-9A-Za-z]|$)", "g");
var aMatch;
var aMatches;
var strTerm;
for (var i = 0; i < aNodes.length; i++)
{
aMatches = null;
var str = aNodes[i].nodeValue;
while ((aMatch = reSearch.exec(str)) != null)
{
aMatches = aMatches || [];
strTerm = aMatch[1];
if (!htTermMatches[strTerm]) htTermMatches[strTerm] = 0;
if (!htTermsData[strTerm] || (htTermsData[strTerm].MaxCount <= 0) || (htTermMatches[strTerm] < htTermsData[strTerm].MaxCount))
{
htTermMatches[strTerm]++;
aMatches.push(aMatch);
}
if (aMatch[2]) reSearch.lastIndex -= 1;
}
if (aMatches) BuildReplacement(aNodes[i], str, aMatches);
}
}
function HaveNodes(aTextNodes, bln)
{
RunSet(aTextNodes, astrKeywords, fnc);
if (!bln)
{
var dtEnd = (new Date()).valueOf();
//alert(dtEnd - dtStart);
}
}
var dtStart = (new Date()).valueOf();
if (!oRules.oExclude) oRules.oExclude = {};
if (!oRules.oExclude.aTags) oRules.oExclude.aTags = [];
if (!oRules.oExclude.aClasses) oRules.oExclude.aClasses = [];
oRules.oExclude.aTags.push("script");
oRules.oExclude.aTags.push("foo");
oRules.oExclude.aTags.push("textarea");
oRules.oExclude.aClasses.push("nooverlay", "btv_orange_button", "article_page_title");
var htTermMatches = {};
var aTextNodes = BtvOverlay.Dom.FindNodes(oNode, [3], oRules, HaveNodes);
}
};
(function()
{
var oOverlayData = {"data":[{"Url":"rita-ghazal.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Rita-Ghazal.jpg","Term":"Rita Ghazal","ID":10000255,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"peyton-wright.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Peyton.jpg","Term":"Peyton Wright","ID":10000236,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"rosella-fratto.aspx","PhotoCount":1,"Rank":2346,"ImageSrc":"/articles/the-bachelor/profile/Rosella.jpg","Term":"Rosella Fratto","ID":10000263,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"robin-canfield.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Robin.jpg","Term":"Robin Canfield","ID":10000259,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"meri-barr.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Meri-Barr.jpg","Term":"Meri Barr","ID":10000183,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"melissa-buschel.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Melissa-Buschel.jpg","Term":"Melissa Buschel","ID":10000177,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"noelle-drake.aspx","PhotoCount":12,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Noelle.jpg","Term":"Noelle Drake","ID":10000225,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"michele-leavy.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Michele-Leavy.jpg","Term":"Michele Leavy","ID":10000187,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"stacey-elza.aspx","PhotoCount":2,"Rank":1831,"ImageSrc":"/articles/the-bachelor/profile/Stacey.jpg","Term":"Stacey Elza","ID":10000301,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"solisa-shoop.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Solisa-Shoop.jpg","Term":"Solisa Shoop","ID":10000297,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"susan-(bachelor-10).aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Susan_.jpg","Term":"Susan","ID":10000314,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"susan-(bachelor-11).aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Susan.jpg","Term":"Susan","ID":10000313,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"sarah-schnare.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Sarah-Schnare.jpg","Term":"Sarah Schnare","ID":10000280,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"sadie-murray.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Sadie-Murray.jpg","Term":"Sadie Murray","ID":10000271,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"sheena-stewart.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Sheena-Stewart.jpg","Term":"Sheena Stewart","ID":10000291,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"shayne-lamas.aspx","PhotoCount":49,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Shayne.jpg","Term":"Shayne Lamas","ID":10000289,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"mccarten-delaney.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/McCarten-Delaney.jpg","Term":"McCarten Delaney","ID":10000171,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"devon-1.aspx","PhotoCount":1,"Rank":2090,"ImageSrc":"/articles/the-bachelor/profile/Devon.jpg","Term":"Devon","ID":17579,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"denise.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Denise.jpg","Term":"Denise","ID":17578,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"erin-s.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Erin-S.jpg","Term":"Erin S.","ID":17581,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"erin-h.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Erin-H.jpg","Term":"Erin Harper","ID":17580,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"ashlee.aspx","PhotoCount":2,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Ashlee.jpg","Term":"Ashlee Williss","ID":17574,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"amy-1.aspx","PhotoCount":1,"Rank":2091,"ImageSrc":"/articles/the-bachelor/profile/Amy.jpg","Term":"Amy","ID":17573,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"chelsea-1.aspx","PhotoCount":4,"Rank":1698,"ImageSrc":"/articles/the-bachelor/profile/Chelsea.jpg","Term":"Chelsea Wanstrath","ID":17577,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"carri.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Carri.jpg","Term":"Carri Perrier","ID":17575,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"lisa-blank.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Lisa-Blank.jpg","Term":"Lisa Blank","ID":10000126,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"laura-morgan.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Laura-Morgan.jpg","Term":"Laura Morgan","ID":10000114,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"marshana-ritchie.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Marshana.jpg","Term":"Marshana Ritchie","ID":10000158,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"lori-langley.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Lori-Langley.jpg","Term":"Lori Langley","ID":10000133,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"kim-jackson.aspx","PhotoCount":1,"Rank":2532,"ImageSrc":"/articles/the-bachelor/profile/Kim-Jackson.jpg","Term":"Kim Jackson","ID":10000089,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"jason-3.aspx","PhotoCount":694,"Rank":2639,"ImageSrc":"/articles/the-bachelorette/profile/Jason-Mesnik.jpg","Term":"Jason Mesnick","ID":19399,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"kristy-katzmann.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Kristy-Katzmann.jpg","Term":"Kristy Katzmann","ID":10000103,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"kristine-heffelfinger.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Kristine.jpg","Term":"Kristine Heffelfinger","ID":10000100,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"natalie-bachelor13.aspx","PhotoCount":33,"Rank":1841,"ImageSrc":"/usrimages/usr23792/23792_8620c91c-eed2-40d8-9118-75e2c8cf9cda-23792-n-t-lie-b-ch--.jpg","Term":"Natalie Getz","ID":40000265,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"naomi-bachelor13.aspx","PhotoCount":116,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_b5aba1a0-9f53-4ef4-a941-cbd6f26903a1-1149891-a6f44382-9627-45e3-9e03-52559f282ac0-naomi-bach13.jpg","Term":"Naomi Crespo","ID":40000264,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"lisa-bachelor13.aspx","PhotoCount":0,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_afcdad27-c8e9-47e6-8370-e7d8992def6a-23792-lis--b-ch--.jpg","Term":"Lisa","ID":40000267,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"lauren-bachelor13.aspx","PhotoCount":7,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_e1c026f7-1e05-4835-8f8d-47226a14280f-23792-l-uren-b-ch--.jpg","Term":"Lauren","ID":40000266,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"nikki-bachelor13.aspx","PhotoCount":5,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_b88b8a7f-1121-41ed-ba25-104732aa93bf-23792-b8c451d3-c483-4456-ae0b-58bf6881a4fb-nikki-bach13.jpg","Term":"Nikki Kaapke","ID":40000261,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"nicole-bachelor13.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_8c43ead1-7c6b-4157-b6d9-6e596b7d0674-23792-nicole-b-ch--.jpg","Term":"Nicole","ID":40000260,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"melissa-bachelor13.aspx","PhotoCount":560,"Rank":1022,"ImageSrc":"/usrimages/usr23792/23792_90b2d69e-2aaf-4ca1-836d-b63217239e49-23792-meliss--b-ch--.jpg","Term":"Melissa Rycroft","ID":40000263,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"raquel-bachelor13.aspx","PhotoCount":9,"Rank":1673,"ImageSrc":"/usrimages/usr23792/23792_b2e33dcb-2239-4f14-8ac7-171df108fb7f-23792-r-quel-b-ch--.jpg","Term":"Raquel","ID":40000262,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"ann-bachelor13.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_cf1f0a7d-488b-4895-8640-ceacc5a7d0fb-23792-a-nn-b-ch--.jpg","Term":"Ann","ID":40000273,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"erica-bachelor13.aspx","PhotoCount":7,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_ff431e06-7cad-4167-a6fa-644b8a4b3645-23792-eric--b-ch--.jpg","Term":"Erica","ID":40000272,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"jacob-bachelorette5.aspx","PhotoCount":218,"Rank":2639,"ImageSrc":"/usrimages/usr-1/-1_228f2b61-8295-4a62-a217-1ae875273051-a-1-30e7cd8f-17ad-4e45-bd57-785280b1f7fd-jacob-bette5.jpg","Term":"Jake Pavelka","ID":40000805,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"dominique-bachelor13.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_9233ee8f-6508-4323-aa8b-d5a75d19a075-23792-dominique-b-ch--.jpg","Term":"Dominique","ID":40000274,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"jillian-harris.aspx","PhotoCount":1998,"Rank":1401,"ImageSrc":"/usrimages/usr23792/23792_0de42260-1f58-4a01-9e8e-0dc8cabf51cb-23792-jilli-n-b-ch--.jpg","Term":"Jillian Harris","ID":40000269,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"jackie-bachelor13.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_583f36bd-089f-4076-afbe-aa0dc4a230e7-23792-j-ckie-b-ch--.jpg","Term":"Jackie Hickey","ID":40000268,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"emily-bachelor13.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_675cd179-282d-4c48-8410-1fbf444b80e1-23792-emily-b-ch--.jpg","Term":"Emily","ID":40000271,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"julie-bachelor13.aspx","PhotoCount":1,"Rank":2519,"ImageSrc":"/usrimages/usr23792/23792_49bdd1e3-528f-4c8d-b3c2-6bf7c0b9124f-23792-julie-b-ch--.jpg","Term":"Julie","ID":40000270,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"sharon-bachelor13.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_8547e7f3-7520-4cc5-a7b4-7b3db29a8ce1-23792-sh-ron-b-ch--.jpg","Term":"Sharon Stabell","ID":40000259,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"tiffany-f-(bachelor-10).aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Tiffany-F.jpg","Term":"Tiffany F.","ID":10000338,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"tiffany-(bachelor-12).aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Tiffany.jpg","Term":"Tiffany","ID":10000336,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"shannon-bachelor13.aspx","PhotoCount":14,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_b2393d0c-ba79-46c9-8fff-313e0869d562-23792-sh-nnon-b-ch--.jpg","Term":"Shannon","ID":40000250,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"tina-wu.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Tina-Wu.jpg","Term":"Tina Wu","ID":10000340,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"tara-durr.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Tara-Durr.jpg","Term":"Tara Durr","ID":10000321,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"tamara-(bachelor-12).aspx","PhotoCount":1,"Rank":1801,"ImageSrc":"/articles/the-bachelor/profile/Tamara.jpg","Term":"Tamara","ID":10000317,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"tessa-horst.aspx","PhotoCount":14,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Tessa-Horst.jpg","Term":"Tessa Horst","ID":10000329,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"tauni-nessler.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Tauni-Nessler.jpg","Term":"Tauni Nessler","ID":10000324,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"shelby-bachelor13.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_248128e3-98a7-4e5c-a805-9a6039ab96d9-23792-shelby-b-ch--.jpg","Term":"Shelby","ID":40000256,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"treasure-bachelor13.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_07eeb1cb-0db4-438f-a500-293ba7932af4-23792-tre-sure-b-ch--.jpg","Term":"Treasure Morgan","ID":40000255,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"renee-bachelor13.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_41deb451-1d35-4274-8575-6f1d7d12a611-23792-a64ef7ff-8944-48c5-9d87-41a0e0b63cc2-renee-bach13.jpg","Term":"Renee","ID":40000258,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"stacia-bachelor13.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_77b76557-d18c-4cc9-b76e-289335f48575-23792-st-ci--b-ch--.jpg","Term":"Stacia","ID":40000257,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"molly-bachelor13.aspx","PhotoCount":417,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_5730f347-f77d-47b4-83ed-a0e9b98a6f9a-1149891-57bc3e6d-958c-4b9a-b920-e48c3bfe1d42-molly-bach13.jpg","Term":"Molly Malaney","ID":40000252,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"megan-bachelor13.aspx","PhotoCount":8,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_61708ff8-daac-463c-b28e-b80b1abbd7e4-23792-meg-n-b-ch--.jpg","Term":"Megan Parris","ID":40000251,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"stephanie-bachelor13.aspx","PhotoCount":38,"Rank":2350,"ImageSrc":"/usrimages/usr23792/23792_73a69ee5-5454-4ee0-9b8a-936207676e73-23792-steph-nie-b-ch--.jpg","Term":"Stephanie Hogan","ID":40000254,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"kari-bachelor13.aspx","PhotoCount":3,"Rank":2639,"ImageSrc":"/usrimages/usr23792/23792_5f1bd435-6462-43e9-af7f-e0f417b434c5-23792-k-ri-b-ch--.jpg","Term":"Kari Fajen","ID":40000253,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"amanda-r.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Amanda-R.jpg","Term":"Amanda Rantuccio","ID":17572,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"nicole-clary.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Nicole-Clary.jpg","Term":"Nicole Clary","ID":5518,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"stephanie-tipper.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Stephanie-Tipper.jpg","Term":"Stephanie Tipper","ID":5516,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"linda-malek.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Linda-Malek.jpg","Term":"Linda Malek","ID":5520,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"lindsay-jo.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Lindsay-Jo.jpg","Term":"Lindsay Jo","ID":5519,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"andy-baldwin.aspx","PhotoCount":77,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Andy-Baldwin.jpg","Term":"Andy Baldwin","ID":5283,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"brit.aspx","PhotoCount":1,"Rank":1467,"ImageSrc":"/articles/the-bachelor/profile/Brit.jpg","Term":"Brit","ID":1793,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"stephanie-w.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Stephanie-W.jpg","Term":"Stephanie Wilhite","ID":5515,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"tiffany-warren.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Tiffany-Warren.jpg","Term":"Tiffany Warren","ID":5511,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"danielle-v.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Danielle-V.jpg","Term":"Danielle V.","ID":5526,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"erin-parker.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Erin-Parker.jpg","Term":"Erin Parker","ID":5525,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"catherine-warren.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Catherine-Warren.jpg","Term":"Catherine Warren","ID":5528,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"danielle-imwalle.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Danielle-Imwalle.jpg","Term":"Danielle Imwalle","ID":5527,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"jessica-1.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Jessica.jpg","Term":"Jessica","ID":5522,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"kate-brockhouse.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Kate-Brockhouse.jpg","Term":"Kate Brockhouse","ID":5521,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"jackie.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Jackie.jpg","Term":"Jackie","ID":5524,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"jeanette-alvarez.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Jeanette-Alvarez.jpg","Term":"Jeanette Alvarez","ID":5523,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"cosetta.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Cosetta.jpg","Term":"Cosetta","ID":1720,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"ellen.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Ellen-DeMaio.jpg","Term":"Ellen DeMaio","ID":1401,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"desiree.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Desiree-Valentin.jpg","Term":"Desiree Valentin","ID":1400,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"erica.aspx","PhotoCount":8,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Erica-Rose.jpg","Term":"Erica Rose","ID":1403,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"elyse.aspx","PhotoCount":1,"Rank":2481,"ImageSrc":"/articles/the-bachelor/profile/Elyse-Greenebaum.jpg","Term":"Elyse Greenebaum","ID":1402,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"april.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/April.jpg","Term":"April","ID":1396,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"andrea-shirley.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Andrea-Shirley.jpg","Term":"Andrea Shirley","ID":1395,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"claudia.aspx","PhotoCount":1,"Rank":2002,"ImageSrc":"/articles/the-bachelor/profile/Claudia.jpg","Term":"Claudia","ID":1399,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"carissa.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Carissa-Illig.jpg","Term":"Carissa Illig","ID":1398,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"jessica.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Jessica_.jpg","Term":"Jessica_","ID":1409,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"jennifer-wilson.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Jennifer-Wilson.jpg","Term":"Jennifer Wilson","ID":1408,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"agnese.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Agnese.jpg","Term":"Agnese","ID":1719,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"renee-bachelor.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Renee_.jpg","Term":"Renee","ID":1414,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"heather.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Heather-Sneed.jpg","Term":"Heather Sneed","ID":1405,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"gina.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Gina.jpg","Term":"Gina","ID":1404,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"jeanette.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Jeanette-Pawula.jpg","Term":"Jeanette Pawula","ID":1407,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"jami.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Jami-Matzke.jpg","Term":"Jami Matzke","ID":1406,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"brad-womack.aspx","PhotoCount":23,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Brad-Womack.jpg","Term":"Brad Womack","ID":11034,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"bettina.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Bettina-Bell.jpg","Term":"Bettina Bell","ID":11033,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"matt-grant.aspx","PhotoCount":53,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Matt-Grant.jpg","Term":"Matt Grant","ID":17341,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"deanna-pappas.aspx","PhotoCount":75,"Rank":2639,"ImageSrc":"/articles/the-bachelorette/profile/DeAnna-Pappas.jpg","Term":"DeAnna Pappas","ID":16383,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"hillary.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Hillary-Reisinger.jpg","Term":"Hillary Reisinger","ID":11029,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"jade.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Jade-Beazley.jpg","Term":"Jade Beazley","ID":11028,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"erin-4.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Erin.jpg","Term":"Erin","ID":11031,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"estefania.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Estefania.jpg","Term":"Estefania","ID":11030,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"rebecca-3.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Rebecca.jpg","Term":"Rebecca","ID":17561,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"michelle-p.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Michelle-P.jpg","Term":"Michelle P.","ID":17559,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"amanda-p.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Amanda-P.jpg","Term":"Amanda Petterman","ID":17571,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"alyssa.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Alyssa.jpg","Term":"Alyssa","ID":17568,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"kelly-1.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Kelly.jpg","Term":"Kelly","ID":17554,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"holly.aspx","PhotoCount":2,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Holly.jpg","Term":"Holly Durst","ID":17553,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"michele-r.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Michele-R.jpg","Term":"Michele R.","ID":17557,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"lesley.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Lesley.jpg","Term":"Lesley Geyer","ID":17555,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"jenni.aspx","PhotoCount":1,"Rank":2137,"ImageSrc":"/articles/the-bachelor/profile/Jenni-Croft.jpg","Term":"Jenni Croft","ID":11027,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"alexis-young.aspx","PhotoCount":2,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Alexis-Young.jpg","Term":"Alexis Young","ID":5534,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"amanda-1.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Amanda.jpg","Term":"Amanda","ID":5533,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"sarah-2.aspx","PhotoCount":12,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Sarah.jpg","Term":"Sarah","ID":11012,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"lorenzo-borghese.aspx","PhotoCount":12,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Lorenzo-Borghese.jpg","Term":"Lorenzo Borghese","ID":5535,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"blakeney-rowe.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Blakeney-Rowe.jpg","Term":"Blakeney Rowe","ID":5530,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"candace-decost.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Candace-DeCost.jpg","Term":"Candace DeCost","ID":5529,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"amber-alch.aspx","PhotoCount":1,"Rank":1956,"ImageSrc":"/articles/the-bachelor/profile/Amber-Alchalabi.jpg","Term":"Amber Alchalabi","ID":5532,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"bevin-powers.aspx","PhotoCount":6,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Bevin-Powers.jpg","Term":"Bevin Powers","ID":5531,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"kim-1.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Kim.jpg","Term":"Kim","ID":11024,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"lindsey.aspx","PhotoCount":1,"Rank":2136,"ImageSrc":"/articles/the-bachelor/profile/Lindsey.jpg","Term":"Lindsey","ID":11021,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"jessica-kiss.aspx","PhotoCount":2,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Jessica-Kiss.jpg","Term":"Jessica Kiss","ID":11026,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"juli.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Juli.jpg","Term":"Juli","ID":11025,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"natalie-1.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Natalie.jpg","Term":"Natalie","ID":11014,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"rigina.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Rigina.jpg","Term":"Rigina","ID":11013,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"mallory-1.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Mallory.jpg","Term":"Mallory","ID":11019,"RelatedID":320,"Scope":0,"MaxCount":3},{"Url":"morgan-1.aspx","PhotoCount":1,"Rank":2639,"ImageSrc":"/articles/the-bachelor/profile/Morgan.jpg","Term":"Morgan","ID":11015,"RelatedID":320,"Scope":0,"MaxCount":3}]};
var oExcludeData = {"Ids":null,"Tags":["h2"],"Classes":["wiki-text"]};
var oIncludeData = {"Ids":null,"Tags":null,"Classes":["content-col"]};
var strTermColor = null || "#999999";
var strBaseUrl = '';
var oRules = {};
if (oExcludeData)
{
oRules.oExclude = {
aIds: oExcludeData.Ids || []
,aTags: oExcludeData.Tags || []
,aClasses: oExcludeData.Classes || []
};
}
if (oIncludeData)
{
oRules.oInclude = {
aIds: oIncludeData.Ids || []
,aTags: oIncludeData.Tags || []
,aClasses: oIncludeData.Classes || []
};
}
var afncCastOverlayBuilders = {};
afncCastOverlayBuilders[0] = function($data){var $text = [];var _write = function(text) {$text.push((typeof text == "number")?text:(text||""));};with($data){ _write('<div id=\"divHoverHandle');_write(Term);_write('\" style=\"width:285px;background:url(\'');_write(strBaseUrl);_write('/images/pop-shadow.png\');zoom:1;\">\n<div style=\"border:1px solid #666666; background:#eeeeee; font-size:11px;  padding:7px; position:relative;bottom:3px;right:3px;zoom:1;\">\n<a href=\"');_write(strBaseUrl);_write('/');_write(Url);_write('\"><img src=\"http://www.buddytv.com');_write(ImageSrc);_write('\" style=\"border:none;width:92px;float:left;margin-right:5px;\"/></a>\n<div style=\"float:right;width:165px;zoom:1;\">\n<div style=\"font-size:16px;font-weight:bold;margin:-2px 0px 5px 0px;zoom:1;\"><a href=\"');_write(strBaseUrl);_write('/');_write(Url);_write('\">');_write(Term);_write('</a></div>\n<div style=\"margin-bottom:2px;zoom:1;\">Today’s Ranking: ');_write(Rank);_write('</div>\n<div style=\"margin-bottom:3px;zoom:1;\"><a href=\"');_write(strBaseUrl);_write('/btvredir.aspx?ctxtypid=21&ctxid=');_write(ID);_write('&pid=21&pnum=-1\">View Photos</a></div>\n<div style=\"zoom:1;\"><a href=\"');_write(strBaseUrl);_write('/btvredir.aspx?ctxtypid=21&ctxid=');_write(ID);_write('&pid=28&pnum=-1\">Rate now &raquo;</a></div>\n</div>\n<div style=\"clear:both;\"></div>\n</div>\n</div>');}return $text.join("");};
afncCastOverlayBuilders[1] = function($data){var $text = [];var _write = function(text) {$text.push((typeof text == "number")?text:(text||""));};with($data){ _write('<div id=\"divHoverHandle');_write(Term);_write('\" style=\"width:285px;background:url(\'');_write(strBaseUrl);_write('/images/pop-shadow.png\'); zoom:1;\">\n<div style=\"border:1px solid #666666; background:#eeeeee; font-size:11px;  padding:7px; position:relative;bottom:3px;right:3px;zoom:1;\">\n<a href=\"');_write(strBaseUrl);_write('/');_write(Url);_write('\"><img src=\"http://www.buddytv.com');_write(ImageSrc);_write('\" style=\"border:none;width:92px;float:left;margin-right:5px;\"/></a>\n<div style=\"float:right;width:165px;zoom:1;\">\n<div style=\"font-size:16px;font-weight:bold;margin:-2px 0px 5px 0px;zoom:1;\"><a href=\"');_write(strBaseUrl);_write('/');_write(Url);_write('\">');_write(Term);_write('</a></div>\n<div style=\"margin-bottom:2px;zoom:1;\">Today’s Ranking: ');_write(Rank);_write('</div>\n<div style=\"margin-bottom:3px;zoom:1;\"><a href=\"');_write(strBaseUrl);_write('/btvredir.aspx?ctxtypid=-1000&ctxid=');_write(ID);_write('&pid=21&pnum=-1\">View Photos (');_write(PhotoCount);_write(')</a></div>\n<div style=\"margin-bottom:3px;zoom:1;\"><a href=\"');_write(strBaseUrl);_write('/btvredir.aspx?ctxtypid=-1000&ctxid=');_write(ID);_write('&pid=35&pnum=-1\">Play Trivia &raquo;</a></div>\n</div>\n<div style=\"clear:both;\"></div>\n</div>\n</div>');}return $text.join("");};
function Run()
{
function GiveElementLayout(el)
{
if (el && !el.hasLayout) el.style.zoom = 1;
}
function GetWindowPosition()
{
function f(p1, p2)
{
var iWin = window[p1] ? window[p1] : 0;
var iDocEl = document.documentElement ? document.documentElement[p2] : 0;
var iBody = document.body ? document.body[p2] : 0;
var i = iWin ? iWin : 0;
if (iDocEl && (!i || (i > iDocEl))) i = iDocEl;
return(iBody && (!i || (i > iBody)) ? iBody : i);
}
var iW = f('innerWidth', 'clientWidth');
var iH = f('innerHeight', 'clientHeight');
var iL = f('pageXOffset', 'scrollLeft');
var iT = f('pageYOffset', 'scrollTop');
return({t:iT, r:(iW + iL), b:(iH + iT), l:iL});
}
function GetElPosition(el)
{
var pt = GetAbsPos(el);
return({t:pt.y, r:(pt.x + el.offsetWidth), b:(pt.y + el.offsetHeight), l:pt.x});
}
function GetOverlayPlacementPoint(elContext, elOverlay)
{
var elPos = GetElPosition(elContext);
var wndPos = GetWindowPosition();
var iSpace = 10;
var posSpace = {t:(elPos.t - wndPos.t - iSpace), r:(wndPos.r - elPos.r - iSpace), b:(wndPos.b - elPos.b - iSpace), l:(elPos.l - wndPos.l - iSpace)};
var iW = elOverlay.offsetWidth;
var iH = elOverlay.offsetHeight;
var pt = {x:wndPos.l, y:wndPos.t};
if (posSpace.t >= iH)
{
pt.y = elPos.t - iH;
}
else if (posSpace.b >= iH)
{
pt.y = elPos.b;
}
if (posSpace.r >= iW)
{
pt.x = elPos.r;
}
else if (posSpace.l >= iW)
{
pt.x = elPos.l - iW;
}
//pt.y += 3;
return(pt);
}
function AdjustPlacementPoint(pt, elOverlay)
{
var iW = elOverlay.offsetWidth;
var iH = elOverlay.offsetHeight;
var posOverlay = {t:pt.y, r:(pt.x + iW), b:(pt.y + iH), l:pt.x};
var wndPos = GetWindowPosition();
var iSpace = 10;
var posSpace = {t:(posOverlay.t - wndPos.t - iSpace), r:(wndPos.r - posOverlay.r - iSpace), b:(wndPos.b - posOverlay.b - iSpace), l:(posOverlay.l - wndPos.l - iSpace)};
if (posSpace.r < 0)
{
pt.x += posSpace.r;
}
else if (posSpace.l < 0)
{
pt.x += (0 - posSpace.l);
}
if (posSpace.t < 0)
{
pt.y += (0 - posSpace.t);
}
else if (posSpace.b < 0)
{
pt.y += posSpace.b;
}
return(pt);
}
function GetAbsPos(element)
{
function F(el)
{ 
var pt = {x:0,y:0};
if (el)
{ 
GiveElementLayout(el); 
pt.x += el.offsetLeft;
pt.y += el.offsetTop; 
var elOffset = el.offsetParent;
var elParent = el.parentNode;
while (elOffset)
{
GiveElementLayout(elOffset);
pt.x += elOffset.offsetLeft; 
pt.y += elOffset.offsetTop; 
if ((document.body != elOffset) && (document.documentElement != elOffset))
{ 
pt.x -= elOffset.scrollLeft; 
pt.y -= elOffset.scrollTop; 
} 
if (false && blnFirefox)
{ 
while (elParent && (elOffset != elParent))
{ 
pt.x -= elParent.scrollLeft; 
pt.y -= elParent.scrollTop; 
elParent = elParent.parentNode; 
}
} 
elParent = elOffset.parentNode;
elOffset = elOffset.offsetParent; 
} 
} 
return pt; 
} 
var blnFirefox = !!element.addEventListener;
if (!blnFirefox)
{
F(element, blnFirefox);
}
return(F(element, blnFirefox));
}
function AddEvent(obj, type, fn)
{
if (obj.addEventListener)
{
obj.addEventListener(type, fn, false);
}
else if (obj.attachEvent)
{
obj["e" + type + fn] = fn;
obj[type + fn] = function() { obj["e" + type + fn](window.event); }
obj.attachEvent("on" + type, obj[type + fn]);
}
}
function GetOverlayNode(strTerm)
{
if (!htOverlays[strTerm])
{
var oData = htTermsData[strTerm];
var strOverlayHtml = afncCastOverlayBuilders[oData.Scope](oData);
var div = document.createElement("div");
div.innerHTML = strOverlayHtml;
htOverlays[strTerm] = div.childNodes[0];
}
return(htOverlays[strTerm]);
}
function ShowOverlay(oNode, strTerm, pt)
{
blnNeedEventHookup = !htOverlays[strTerm];
HideCurrentOverlay(true);
elCurrentOverlay = GetOverlayNode(strTerm);
divOverlay.appendChild(elCurrentOverlay);
document.body.appendChild(divOverlay);
if (blnNeedEventHookup)
{
var elHandler = document.getElementById("divHoverHandle" + strTerm);
AddEvent(elHandler, blnIsIE ? "mouseenter" : "mouseover", OverlayOver);
AddEvent(elHandler, blnIsIE ? "mouseleave" : "mouseout", CommonOut);
}
var oPoint = GetAbsPos(oNode);
var overlayPt = GetOverlayPlacementPoint(oNode, divOverlay);
if (oNode._blnWrap)
{
overlayPt.x = pt.x - divOverlay.offsetWidth;
AdjustPlacementPoint(overlayPt, divOverlay);
}
divOverlay.style.visibility = "hidden";
divOverlay.style.top = overlayPt.y + "px";
divOverlay.style.left = overlayPt.x + "px";
divOverlay.style.visibility = "visible";
}
function MouseCoordinates(evt)
{
if (blnIsIE)
{
var oPoint = GetAbsPos(evt.srcElement);
return({x:(evt.x + oPoint.x), y:(evt.y + oPoint.y)});
}
else
{
return({x:evt.pageX, y:evt.pageY});
}
}
function HideCurrentOverlay(bln)
{
function F()
{
if ((elCurrentOverlay) && (iCounter_local == iCounter) && (!iOverCount))
{
iOverCount = 0;
divOverlay.removeChild(elCurrentOverlay);
divOverlay.parentNode.removeChild(divOverlay);
elCurrentOverlay = null;
}
}
iCounter++;
var iCounter_local = iCounter;
if (bln)
{
iOverCount= 0;
F();
}
else
{
window.setTimeout(F, 400);
}
}
var iCounter = 0;
if (Btv && Btv.Ads)
{
//Btv.Ads.onChangeRequest.Attach(RunFromBody);
}
var elCurrentOverlay;
var htOverlays = {};
function HookupTerm(oNode, strTerm)
{
function Over(evt)
{
ShowOverlay(oNode, strTerm, MouseCoordinates(evt));
iOverCount++;
}
AddEvent(oNode, blnIsIE ? "mouseenter" : "mouseover", Over);
AddEvent(oNode, blnIsIE ? "mouseleave" : "mouseout", CommonOut);
AddEvent(oNode, "click", function(){HideCurrentOverlay(true);});
}
function OverlayOver()
{
iOverCount++;
}
function CommonOut()
{
iOverCount--;
HideCurrentOverlay();
}
var iOverCount = 0; 
var divOverlay = document.createElement('div');
divOverlay.style.position = "absolute";
divOverlay.style.zIndex = "9999";
var blnIsIE = !divOverlay.addEventListener;
var astrTerms = [];
var htTermsData = {};
function ProcessOverlayData()
{
for (var i=0; i < oOverlayData.data.length; i++)
{
if (!htTermsData[oOverlayData.data[i].Term])
{
astrTerms.push(oOverlayData.data[i].Term);
htTermsData[oOverlayData.data[i].Term] = oOverlayData.data[i];
oOverlayData.data[i].strBaseUrl = "";
}
}
}
ProcessOverlayData();
window["RunBtvTokenizer"] = function(el, oOverlayData_)
{
if (oOverlayData_)
{
oOverlayData.data = oOverlayData_;
ProcessOverlayData();
} 
if (el)
{
if (astrTerms.length > 0) BtvOverlay.Dom.Tokenizer.Run(el, astrTerms, htTermsData, oRules, strTermColor, HookupTerm);
blnPending = false;
}
else
{
Refresh();
}
}
function RunFromBody()
{
RunBtvTokenizer(document.body);
}
function TimedRun()
{
if (blnPending) RunFromBody();
}
function Refresh()
{
if (!blnPending)
{
blnPending = true;
window.setTimeout(TimedRun, 1000);
}
}
var blnPending = true;
if (true)
{
if (window["YAHOO"] && YAHOO.Btv && YAHOO.Btv.Runtime && YAHOO.Btv.Runtime.RegisterOnInit)
{
YAHOO.Btv.Runtime.RegisterOnInit(RunFromBody);
}
else
{
window.setTimeout(RunFromBody, 100);
}
} 
}
Run();
})();
