
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":"cristian-de-la-fuente.aspx","PhotoCount":56,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Cristian-de-la-Fuente.jpg","Term":"Cristian de la Fuente","ID":16949,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"kristi-yamaguchi.aspx","PhotoCount":53,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Kristi-Yamaguchi.jpg","Term":"Kristi Yamaguchi","ID":16950,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"adam-carolla.aspx","PhotoCount":125,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Adam-Carolla.jpg","Term":"Adam Carolla","ID":16951,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"monica-seles.aspx","PhotoCount":73,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Monica-Seles.jpg","Term":"Monica Seles","ID":16948,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"jason-taylor.aspx","PhotoCount":252,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Jason-Taylor.jpg","Term":"Jason Taylor","ID":16945,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"steve-guttenberg.aspx","PhotoCount":121,"Rank":1266,"ImageSrc":"/articles/dancing-with-the-stars/profile/Steve-Guttenberg.jpg","Term":"Steve Guttenberg","ID":16946,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"mario-1.aspx","PhotoCount":1360,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Mario.jpg","Term":"Mario","ID":16947,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"marissa-jaret-winokur.aspx","PhotoCount":187,"Rank":2174,"ImageSrc":"/articles/dancing-with-the-stars/profile/Marissa-Jaret-Winokur.jpg","Term":"Marissa Jaret Winokur","ID":16952,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"chelsie-hightower.aspx","PhotoCount":317,"Rank":2661,"ImageSrc":"/usrimages/usr23792/23792_952313be-fe6c-4c60-84fb-a9ba97d51091-23792-f6347f10-86ae-4ecc-b500-8cc0bc543e56-chelsie-dwts8.jpg","Term":"Chelsie Hightower","ID":20265,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"denise-richards.aspx","PhotoCount":261,"Rank":2166,"ImageSrc":"/usrimages/usr23792/23792_22c0190a-46bf-4e95-a175-49c003275125-23792-eeddda2f-822b-41f1-a8b7-9ced9c768849-denise-richards-dwts8.jpg","Term":"Denise Richards","ID":20912,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"steve-o.aspx","PhotoCount":175,"Rank":2302,"ImageSrc":"/usrimages/usr23792/23792_01d99c77-9430-42c2-8ee6-e936f920198c-23792-ec6e549a-da04-4ec0-af4e-e669119ee93c-steve-o-dwts8.jpg","Term":"Steve-O","ID":10000311,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"mya.aspx","PhotoCount":547,"Rank":395,"ImageSrc":"/articles/dancing-with-the-stars/profile/mya.jpg","Term":"Mya","ID":17903,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"penn-jillette-2.aspx","PhotoCount":81,"Rank":2512,"ImageSrc":"/articles/dancing-with-the-stars/profile/Penn-Jillette.jpg","Term":"Penn Jillette","ID":16953,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"fabian-sanchez.aspx","PhotoCount":83,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Fabian-Sanchez.jpg","Term":"Fabian Sanchez","ID":16955,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"louis-van-amstel.aspx","PhotoCount":153,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Louis-van-Amstel.jpg","Term":"Louis van Amstel","ID":16956,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"shannon-elizabeth.aspx","PhotoCount":624,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Shannon-Elizabeth.jpg","Term":"Shannon Elizabeth","ID":16944,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"helio-castroneves.aspx","PhotoCount":74,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Helio-Castroneves.jpg","Term":"Helio Castroneves","ID":10644,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"sabrina-bryan.aspx","PhotoCount":83,"Rank":1283,"ImageSrc":"/articles/dancing-with-the-stars/profile/Sabrina-Bryan.jpg","Term":"Sabrina Bryan","ID":10645,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"melanie-brown.aspx","PhotoCount":256,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Melanie-Brown.jpg","Term":"Melanie Brown","ID":10646,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"mark-cuban.aspx","PhotoCount":30,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Mark-Cuban.jpg","Term":"Mark Cuban","ID":10643,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"floyd-mayweather.aspx","PhotoCount":41,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Floyd-Mayweather.jpg","Term":"Floyd Mayweather","ID":10637,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"cameron-mathison-1.aspx","PhotoCount":75,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Cameron-Mathison.jpg","Term":"Cameron Mathison","ID":10638,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"josie-maran.aspx","PhotoCount":139,"Rank":2437,"ImageSrc":"/articles/dancing-with-the-stars/profile/Josie-Maran.jpg","Term":"Josie Maran","ID":10641,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"mark-ballas.aspx","PhotoCount":262,"Rank":2661,"ImageSrc":"/usrimages/usr23792/23792_629eaf09-cec1-49e4-8844-cb2e195c6d66-23792-7de235e9-7632-4efa-ad04-f6f98a9c886a-mark-dwts8.jpg","Term":"Mark Ballas","ID":10647,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"shanna-moakler.aspx","PhotoCount":169,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Shanna-Moakler.jpg","Term":"Shanna Moakler","ID":12230,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"mario-lopez.aspx","PhotoCount":86,"Rank":1725,"ImageSrc":"/articles/americas-best-dance-crew/profile/Mario-Lopez.jpg","Term":"Mario Lopez","ID":16222,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"priscilla-presley.aspx","PhotoCount":380,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Priscilla-Presley.jpg","Term":"Priscilla Presley","ID":16943,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"kim-kardashian.aspx","PhotoCount":706,"Rank":854,"ImageSrc":"/articles/profiles/Kim-Kardashian.jpg","Term":"Kim Kardashian","ID":12224,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"derek-hough.aspx","PhotoCount":325,"Rank":63,"ImageSrc":"/usrimages/usr23792/23792_faada1cf-7451-4bd7-bab1-a9edc6c93945-23792-aa23c883-18ca-4fdd-b7f2-d4c35eb4bc33-derek-dwts8.jpg","Term":"Derek Hough","ID":10649,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"anna-trebunskaya.aspx","PhotoCount":39,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Anna-Trebunskaya.jpg","Term":"Anna Trebunskaya","ID":10651,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"chuck-wicks.aspx","PhotoCount":293,"Rank":2661,"ImageSrc":"/usrimages/usr23792/23792_c572f076-502f-4d0b-9926-863693e721f4-23792-e00e8fa5-c6bd-4959-8534-1418534b3bfe-chuck-wicks-dwts8.jpg","Term":"Chuck Wicks","ID":10675,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"lance-bass.aspx","PhotoCount":736,"Rank":2661,"ImageSrc":"/articles/profiles/lance-bass.jpg","Term":"Lance Bass","ID":30000218,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"joanna-krupa.aspx","PhotoCount":14,"Rank":2581,"ImageSrc":"/articles/dancing-with-the-stars/profile/joanna-krupa.jpg","Term":"Joanna Krupa","ID":500000283,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"kathy-ireland.aspx","PhotoCount":15,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/kathy-ireland.jpg","Term":"Kathy Ireland","ID":500000569,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"macy-gray.aspx","PhotoCount":0,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/macy-gray.jpg","Term":"Macy Gray","ID":500000570,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"kelly-osbourne.aspx","PhotoCount":353,"Rank":1579,"ImageSrc":"/articles/dancing-with-the-stars/profile/kelly-osbourne.jpg","Term":"Kelly Osbourne","ID":40000602,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"gilles-marini.aspx","PhotoCount":206,"Rank":2661,"ImageSrc":"/usrimages/usr23792/23792_c792c090-94d9-416b-893a-df01e669726a-23792-ae2d7ad1-d85e-499b-ae45-964ce6d58629-gilles-marini-dwts8.jpg","Term":"Gilles Marini","ID":40000474,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"steve-wozniak.aspx","PhotoCount":168,"Rank":2661,"ImageSrc":"/usrimages/usr23792/23792_c5fabf3a-803d-4de7-a64a-c505f37651a7-23792-c35ce58e-aeee-48b6-bfc9-39c8f3f7fc50-steve-wozniak-dwts8.jpg","Term":"Steve Wozniak","ID":40000475,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"belinda-carlisle.aspx","PhotoCount":219,"Rank":2661,"ImageSrc":"/usrimages/usr23792/23792_a23f3556-919c-4819-8c81-c3aab8461658-23792-edbcde45-8e40-4452-bed2-e5a9bdb82cb1-belinda-carlisle-dwts8.jpg","Term":"Belinda Carlisle","ID":40000476,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"natalie-coughlin.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/natalie-coughlin.jpg","Term":"Natalie Coughlin","ID":500000571,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"mark-dacascos.aspx","PhotoCount":5,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/mark-dacascos.jpg","Term":"Mark Dacascos","ID":500000576,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"michael-irvin.aspx","PhotoCount":12,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/michael-irvin.jpg","Term":"Michael Irvin","ID":500000577,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"louie-vito.aspx","PhotoCount":29,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/louie-vito.jpg","Term":"Louie Vito","ID":500000578,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"tom-delay.aspx","PhotoCount":0,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/tom-delay.jpg","Term":"Tom DeLay","ID":500000575,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"melissa-joan-hart.aspx","PhotoCount":13,"Rank":1436,"ImageSrc":"/articles/dancing-with-the-stars/profile/melissa-joan-hart.jpg","Term":"Melissa Joan Hart","ID":500000572,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"donny-osmond.aspx","PhotoCount":8,"Rank":529,"ImageSrc":"/articles/dancing-with-the-stars/profile/donny-osmond.jpg","Term":"Donny Osmond","ID":500000573,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"ashley-hamilton.aspx","PhotoCount":26,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/ashley-hamilton.jpg","Term":"Ashley Hamilton","ID":500000574,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"shawn-johnson.aspx","PhotoCount":340,"Rank":1319,"ImageSrc":"/usrimages/usr23792/23792_a92a0c4f-68b1-4c9f-a5d4-c44f0c3ce022-23792-5984166e-048d-4a30-a91c-c1f70d546872-shawn-johnson-dwts8.jpg","Term":"Shawn Johnson","ID":40000473,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"cloris-leachman.aspx","PhotoCount":125,"Rank":1694,"ImageSrc":"/articles/profiles/cloris-leachman.jpg","Term":"Cloris Leachman","ID":30000223,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"misty-may-treanor.aspx","PhotoCount":8,"Rank":2661,"ImageSrc":"/articles/profiles/misty-may-treanor.jpg","Term":"Misty May-Treanor","ID":30000224,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"cody-linley.aspx","PhotoCount":146,"Rank":1856,"ImageSrc":"/articles/profiles/cody-linley.jpg","Term":"Cody Linley","ID":30000225,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"maurice-greene.aspx","PhotoCount":53,"Rank":2661,"ImageSrc":"/articles/profiles/maurice-greene.jpg","Term":"Maurice Greene","ID":30000222,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"toni-braxton.aspx","PhotoCount":356,"Rank":2661,"ImageSrc":"/articles/profiles/toni-braxton.jpg","Term":"Toni Braxton","ID":30000219,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"brooke-burke.aspx","PhotoCount":39,"Rank":2661,"ImageSrc":"/articles/profiles/brooke-burke.jpg","Term":"Brooke Burke","ID":30000220,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"rocco-dispirito.aspx","PhotoCount":125,"Rank":2661,"ImageSrc":"/articles/profiles/rocco-dispirito.jpg","Term":"Rocco DiSpirito","ID":30000221,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"ted-mcginley.aspx","PhotoCount":80,"Rank":2661,"ImageSrc":"/articles/profiles/ted-mcginley.jpg","Term":"Ted McGinley","ID":30000226,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"lil-kim.aspx","PhotoCount":259,"Rank":2661,"ImageSrc":"/usrimages/usr23792/23792_b9d9dafb-cf86-43a8-b1c3-6e4b212ff919-23792-de789b75-a81d-4713-b79d-831ff86d720e-lil-kim-dwts8.jpg","Term":"Lil' Kim","ID":40000470,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"nancy-odell.aspx","PhotoCount":55,"Rank":2661,"ImageSrc":"/usrimages/usr23792/23792_f0438d26-b89f-4fb7-98c5-b4ca48e313b8-23792-72221b7d-4e9a-4ca9-9613-3435575a58f6-nancy-odell-dwts8.jpg","Term":"Nancy O'Dell","ID":40000471,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"lawrence-taylor.aspx","PhotoCount":217,"Rank":1318,"ImageSrc":"/usrimages/usr23792/23792_65348654-f93e-429a-990e-89751b21f780-23792-82ab68ed-166f-4337-87b5-eebdff671f3d-lawrence-taylor-dwts8.jpg","Term":"Lawrence Taylor","ID":40000472,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"melissa-bachelor13.aspx","PhotoCount":560,"Rank":1024,"ImageSrc":"/usrimages/usr23792/23792_90b2d69e-2aaf-4ca1-836d-b63217239e49-23792-meliss--b-ch--.jpg","Term":"Melissa Rycroft","ID":40000263,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"warren-sapp.aspx","PhotoCount":168,"Rank":2546,"ImageSrc":"/articles/profiles/warren-sapp.jpg","Term":"Warren Sapp","ID":30000227,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"corky-ballas.aspx","PhotoCount":22,"Rank":2661,"ImageSrc":"/articles/profiles/corky-ballas.jpg","Term":"Corky Ballas","ID":30000228,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"inna-brayer.aspx","PhotoCount":10,"Rank":2661,"ImageSrc":"/articles/profiles/inna-brayer.jpg","Term":"Inna Brayer","ID":30000229,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"wayne-newton.aspx","PhotoCount":96,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Wayne-Newton.jpg","Term":"Wayne Newton","ID":10636,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"kym-johnson.aspx","PhotoCount":236,"Rank":1184,"ImageSrc":"/usrimages/usr23792/23792_d37f42c1-ca30-41f8-9cd8-37cc8d10f45a-23792-1132ddd4-5b04-4565-a948-1ea8cf660546-kym-dwts8.jpg","Term":"Kym Johnson","ID":5012,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"julianne-hough.aspx","PhotoCount":436,"Rank":912,"ImageSrc":"/usrimages/usr23792/23792_e2581ba9-7f4a-4c87-83fd-a9429e8269d3-23792-dace3164-4952-4726-baee-4bfa78a42981-julianne-dwts8.jpg","Term":"Julianne Hough","ID":5013,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"elena-grinenko.aspx","PhotoCount":11,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Elena-Grinenko.jpg","Term":"Elena Grinenko","ID":5014,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"alec-mazo.aspx","PhotoCount":67,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Alec-Mazo.jpg","Term":"Alec Mazo","ID":5011,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"karina-smirnoff.aspx","PhotoCount":359,"Rank":2066,"ImageSrc":"/usrimages/usr23792/23792_cfe038e3-f2d6-4141-8a2c-fbda1721ca7e-23792-a7434c55-aaa8-47a9-b24f-73cb56230abd-karina-dwts8.jpg","Term":"Karina Smirnoff","ID":5008,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"edyta-sliwinska.aspx","PhotoCount":251,"Rank":915,"ImageSrc":"/usrimages/usr23792/23792_d7a07522-9a15-4ad3-b562-c2f741f69976-23792-ce2f812d-506b-4504-b32e-90c4566b17f4-edyta-dwts8.jpg","Term":"Edyta Sliwinska","ID":5009,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"jonathan-roberts.aspx","PhotoCount":106,"Rank":2661,"ImageSrc":"/usrimages/usr23792/23792_971f15f6-bf7a-49f6-96f3-e413b9b4a492-23792-b9ba90f7-c039-40a2-8d4d-853e68c0d98f-jonathan-dwts8.jpg","Term":"Jonathan Roberts","ID":5010,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"brian-fortuna.aspx","PhotoCount":54,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Brian-Fortuna.jpg","Term":"Brian Fortuna","ID":5015,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"heather-mills.aspx","PhotoCount":84,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Heather-Mills.jpg","Term":"Heather Mills","ID":5021,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"paulina-porizkova.aspx","PhotoCount":51,"Rank":1909,"ImageSrc":"/articles/dancing-with-the-stars/profile/Paulina-Porizkova.jpg","Term":"Paulina Porizkova","ID":5022,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"joey-fatone.aspx","PhotoCount":51,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Joey-Fatone.jpg","Term":"Joey Fatone","ID":5023,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"john-ratzenberger.aspx","PhotoCount":21,"Rank":779,"ImageSrc":"/articles/dancing-with-the-stars/profile/John-Ratzenberger.jpg","Term":"John Ratzenberger","ID":5020,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"tony-dovolani.aspx","PhotoCount":326,"Rank":2661,"ImageSrc":"/usrimages/usr23792/23792_274c68b9-9317-46d3-a47f-70457f6abfb7-23792-2c7ace85-d3f6-4776-abcb-4a3a1d12d472-tony-dwts8.jpg","Term":"Tony Dovolani","ID":5016,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"maksim-chmerkovskiy.aspx","PhotoCount":283,"Rank":2661,"ImageSrc":"/usrimages/usr23792/23792_16d51fec-6e59-4519-9f32-5525ae9ace4a-23792-42b5e0aa-39dc-45a9-9e87-63ba0e1c6049-maks-dwts8.jpg","Term":"Maksim Chmerkovskiy","ID":5017,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"cheryl-burke.aspx","PhotoCount":304,"Rank":1183,"ImageSrc":"/usrimages/usr23792/23792_28a88fc6-059b-4d75-9ff8-6ceb1dc7ef5b-23792-879e4ccc-8903-4309-9ade-110739ad70ed-cheryl-dwts8.jpg","Term":"Cheryl Burke","ID":5018,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"holly-madison.aspx","PhotoCount":445,"Rank":1616,"ImageSrc":"/articles/the-girls-next-door/profile/Holly-Madison.jpg","Term":"Holly Madison","ID":4525,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"jerry-springer.aspx","PhotoCount":250,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Jerry-Springer.jpg","Term":"Jerry Springer","ID":396,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"vivica-a-fox.aspx","PhotoCount":632,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Vivica-A-Fox.jpg","Term":"Vivica A. Fox","ID":397,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"harry-hamlin.aspx","PhotoCount":352,"Rank":887,"ImageSrc":"/articles/harpers-island/profile/harrryhamlin.jpg","Term":"Harry Hamlin","ID":398,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"sara-evans.aspx","PhotoCount":113,"Rank":1620,"ImageSrc":"/articles/dancing-with-the-stars/profile/Sara-Evans.jpg","Term":"Sara Evans","ID":395,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"chuck-liddell.aspx","PhotoCount":157,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/chuck-liddell.jpg","Term":"Chuck Liddell","ID":112,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"emmitt-smith.aspx","PhotoCount":38,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Emmitt-Smith.jpg","Term":"Emmitt Smith","ID":391,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"tucker-carlson.aspx","PhotoCount":7,"Rank":2464,"ImageSrc":"/articles/dancing-with-the-stars/profile/Tucker-Carlson.jpg","Term":"Tucker Carlson","ID":392,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"joey-lawrence.aspx","PhotoCount":100,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Joey-Lawrence.jpg","Term":"Joey Lawrence","ID":399,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"monique-coleman.aspx","PhotoCount":93,"Rank":1467,"ImageSrc":"/articles/high-school-musical/profile/Monique-Coleman.jpg","Term":"Monique Coleman","ID":3203,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"aaron-carter.aspx","PhotoCount":121,"Rank":268,"ImageSrc":"/articles/dancing-with-the-stars/profile/aaron-carter.jpg","Term":"Aaron Carter","ID":3215,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"marlee-matlin.aspx","PhotoCount":109,"Rank":2661,"ImageSrc":"/articles/the-l-word/profile/Marlee-Matlin.jpg","Term":"Marlee Matlin","ID":3897,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"billy-ray-cyrus.aspx","PhotoCount":108,"Rank":1120,"ImageSrc":"/articles/hannah-montana/profile/Billy-Ray-Cyrus.jpg","Term":"Billy Ray Cyrus","ID":3069,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"willa-ford.aspx","PhotoCount":186,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Willa-Ford.jpg","Term":"Willa Ford","ID":401,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"dmitry-chaplin.aspx","PhotoCount":112,"Rank":1153,"ImageSrc":"/usrimages/usr23792/23792_a558dfa4-1fad-45f8-8e96-783bf29787d8-23792-939f920c-2ec7-4584-b5ce-abfc035449be-dmitry-dwts8.jpg","Term":"Dmitry Chaplin","ID":1554,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"debi-mazar.aspx","PhotoCount":148,"Rank":1972,"ImageSrc":"/articles/dancing-with-the-stars/profile/debi-mazar.jpg","Term":"Debi Mazar","ID":3031,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"apolo-anton-ohno.aspx","PhotoCount":39,"Rank":1492,"ImageSrc":"/articles/dancing-with-the-stars/profile/Apolo-Anton-Ohno.jpg","Term":"Apolo Anton Ohno","ID":5024,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"kelly-monaco.aspx","PhotoCount":245,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Kelly-Monaco.jpg","Term":"Kelly Monaco","ID":5187,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"david-allen-grier.aspx","PhotoCount":241,"Rank":1797,"ImageSrc":"/usrimages/usr23792/23792_5565dee6-4faa-4d0e-b287-7664c6089af3-23792-edaa3305-e51d-436e-8b59-07a749a7ca6d-david-alan-grier-dwts8.jpg","Term":"David Alan Grier","ID":6258,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"jeffrey-ross.aspx","PhotoCount":55,"Rank":1910,"ImageSrc":"/articles/profiles/Jeffrey-Ross.jpg","Term":"Jeffrey Ross","ID":6394,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"john-ohurley.aspx","PhotoCount":39,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/John-OHurley.jpg","Term":"John O'Hurley","ID":5186,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"evander-holyfield.aspx","PhotoCount":78,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Evander-Holyfield.jpg","Term":"Evander Holyfield","ID":5181,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"rachel-hunter.aspx","PhotoCount":43,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Rachel-Hunter.jpg","Term":"Rachel Hunter","ID":5182,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"joey-mcintyre.aspx","PhotoCount":95,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Joey-McIntyre.jpg","Term":"Joey McIntyre","ID":5184,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"ty-murray.aspx","PhotoCount":262,"Rank":2100,"ImageSrc":"/usrimages/usr23792/23792_bb4e1f8b-caf7-4a63-bfac-7e41c2d09732-23792-9415a80b-63a7-4c14-8deb-6947ebec3a42-ty-murray-dwts8.jpg","Term":"Ty Murray","ID":6670,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"jane-seymour.aspx","PhotoCount":100,"Rank":1412,"ImageSrc":"/articles/dancing-with-the-stars/profile/Jane-Seymour.jpg","Term":"Jane Seymour","ID":10632,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"albert-reed.aspx","PhotoCount":18,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Albert-Reed.jpg","Term":"Albert Reed","ID":10633,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"marie-osmond.aspx","PhotoCount":58,"Rank":838,"ImageSrc":"/articles/dancing-with-the-stars/profile/Marie-Osmond.jpg","Term":"Marie Osmond","ID":10634,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"jennie-garth.aspx","PhotoCount":116,"Rank":864,"ImageSrc":"/articles/what-i-like-about-you/profile/Jennie-Garth.jpg","Term":"Jennie Garth","ID":8102,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"jewel.aspx","PhotoCount":65,"Rank":2661,"ImageSrc":"/usrimages/usr23792/23792_8aa46933-fb54-4b00-adca-7b041682e1ef-23792-9feaac0f-652d-447d-9745-2d8a586bf729-jewel-dwts8.jpg","Term":"Jewel","ID":6673,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"lacey-schwimmer.aspx","PhotoCount":214,"Rank":2103,"ImageSrc":"/usrimages/usr23792/23792_1461810e-e188-4e00-8f41-22b34da9a80f-23792-1a329140-dd77-455b-99f5-6435fa24906e-lacey-dwts8.jpg","Term":"Lacey Schwimmer","ID":7173,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"susan-lucci.aspx","PhotoCount":48,"Rank":2661,"ImageSrc":"/articles/profiles/Susan-Lucci.jpg","Term":"Susan Lucci","ID":8042,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"trista-rehn.aspx","PhotoCount":31,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Trista-Rehn.jpg","Term":"Trista Rehn Sutter","ID":5180,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"ian-ziering.aspx","PhotoCount":7,"Rank":80,"ImageSrc":"/articles/dancing-with-the-stars/profile/Ian-Ziering.jpg","Term":"Ian Ziering","ID":5029,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"drew-lachey.aspx","PhotoCount":77,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Drew-Lachey.jpg","Term":"Drew Lachey","ID":5170,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"jerry-rice.aspx","PhotoCount":36,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Jerry-Rice.jpg","Term":"Jerry Rice","ID":5171,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"laila-ali.aspx","PhotoCount":45,"Rank":1745,"ImageSrc":"/articles/dancing-with-the-stars/profile/Laila-Ali.jpg","Term":"Laila Ali","ID":5028,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"clyde-drexler.aspx","PhotoCount":35,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Clyde-Drexler.jpg","Term":"Clyde Drexler","ID":5025,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"shandi-finnessey.aspx","PhotoCount":52,"Rank":1405,"ImageSrc":"/articles/dancing-with-the-stars/profile/Shandi-Finnessey.jpg","Term":"Shandi Finnessey","ID":5026,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"leeza-gibbons.aspx","PhotoCount":77,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Leeza-Gibbons.jpg","Term":"Leeza Gibbons","ID":5027,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"stacy-keibler.aspx","PhotoCount":45,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Stacy-Keibler.jpg","Term":"Stacy Keibler","ID":5172,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"kenny-mayne.aspx","PhotoCount":2,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Kenny-Mayne.jpg","Term":"Kenny Mayne","ID":5177,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"tatum-oneal-2.aspx","PhotoCount":62,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Tatum-ONeal.jpg","Term":"Tatum O'Neal","ID":5178,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"giselle-fernandez.aspx","PhotoCount":27,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Giselle-Fernandez.jpg","Term":"Giselle Fernandez","ID":5179,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"master-p.aspx","PhotoCount":1,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Master-P.jpg","Term":"Master P","ID":5176,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"lisa-rinna.aspx","PhotoCount":141,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Lisa-Rinna.jpg","Term":"Lisa Rinna","ID":5173,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"george-hamilton.aspx","PhotoCount":51,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/George-Hamilton.jpg","Term":"George Hamilton","ID":5174,"RelatedID":337,"Scope":0,"MaxCount":3},{"Url":"tia-carrere.aspx","PhotoCount":112,"Rank":2661,"ImageSrc":"/articles/dancing-with-the-stars/profile/Tia-Carrere.jpg","Term":"Tia Carrere","ID":5175,"RelatedID":337,"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();
})();
