Btv.Templating.Register([{id:"ColorPicker",fnc:function($data){var $text = [];var _write = function(text) {$text.push((typeof text == "number")?text:(text||""));};with($data){ _write('\n');Main = function(o) {var $text = [];var _write = function(text) {$text.push((typeof text == "number")?text:(text||""));};_write('\n<div class=\"yui-skin-sam\">\n<div ');_write(o.Elem('PickerPanel'));_write(' class=\"yui-picker-panel\">\n<div class=\"hd\">Please choose a color:</div>\n<div class=\"bd\">\n<div ');_write(o.Elem('ColorPicker'));_write(' class=\"yui-picker\"></div>\n</div>\n<div class=\"ft\"></div>\n</div>\n</div>\n');;return($text.join(""));};_write('\n');
new (function(d, fncMain)
{
var oThis = Btv.Lang.Extend(this, Btv.Cst.BaseTemplate, arguments);
oThis.d = d;
var fncCallback;
var oCurrentColor;
function HandlerHide()
{
//oThis.dialog.hide();
}
function HandlerOK()
{
oThis.dialog.hide();
fncCallback(oCurrentColor);
}
function HandlerCancel()
{
oThis.dialog.hide();
}
function ColorChanged(o)
{
oCurrentColor = o.newValue;
}
function GetRequiredComponents()
{
// Instantiate and configure Loader:
var loader = new YAHOO.util.YUILoader({
require: ["container", "colorpicker"],
loadOptional: true,
onSuccess: Init,
timeout: 10000,
combine: true
});
loader.insert();
}
GetRequiredComponents()
function BuildUI()
{
var div = document.createElement('div');
div.className = 'yui-skin-sam';
div.innerHTML = fncMain(oThis);
Btv.UI.BodyElements.Add(div, Init);
}
BuildUI();
var i = 0;
function Init()
{
if (++i != 2) return;
oThis.dialog = new YAHOO.widget.Dialog(oThis.htIds['PickerPanel'], {
width: "500px",
visible: false,
constraintoviewport: true,
buttons: [{ text: "OK", handler: HandlerOK, isDefault: true },
{ text: "Cancel", handler: HandlerCancel}]
});
oThis.dialog.hideEvent.subscribe(HandlerHide);
oThis.dialog.renderEvent.subscribe(function()
{
if (!oThis.picker)
{
oThis.picker = new YAHOO.widget.ColorPicker(oThis.htIds['ColorPicker'], {
container: oThis.dialog,
images: {
PICKER_THUMB: "http://developer.yahoo.com/yui/examples/colorpicker/assets/picker_thumb.png",
HUE_THUMB: "http://developer.yahoo.com/yui/examples/colorpicker/assets/hue_thumb.png"
}
});
oThis.picker.on("rgbChange", ColorChanged);
}
});
oThis.dialog.render();
}
oThis.GetColor = function(el, fnc)
{
fncCallback = fnc;
oThis.dialog.cfg.setProperty('context', [el, 'tl', 'tr']);
oThis.dialog.show(true);
}
})($data, Main);
_write('\n');}return $text.join("");}},{id:"BrandColorPicker",fnc:function($data){var $text = [];var _write = function(text) {$text.push((typeof text == "number")?text:(text||""));};with($data){ _write('\n');Main = function(o) {var $text = [];var _write = function(text) {$text.push((typeof text == "number")?text:(text||""));};_write('\n<div>\n<div ');_write(o.Elem('swatch'));_write(' style=\"float:left; width:200px; height:16px; border:solid 1px #000000; text-align:center; cursor:pointer;\" onclick=\"');_write($R(o.ChangeColor));_write('()\">change</div>\n<div ');_write(o.Elem('spacer'));_write(' style=\"float:left; width:10px;\"></div>\n<div style=\"clear:both;\"></div>\n</div>\n');;return($text.join(""));};_write('\n');
new (function(d, fncMain)
{
var oThis = Btv.Lang.Extend(this, Btv.Cst.BaseTemplate, arguments);
oThis.d = d;
var s;
var strColor;
oThis.onChange = new YAHOO.util.CustomEvent("onChange");
oThis.GetHTML = function()
{
if (!s)
{
s = fncMain(oThis);
}
return(s);
}
oThis.ChangeColor = function()
{
function Hex(i)
{
var s = i.toString(16);
if (s.length == 1) s = '0' + s;
return(s);
}
function Changed(o)
{
if (o)
{
strColor = $F('#{0}{1}{2}', Hex(o[0]), Hex(o[1]), Hex(o[2]));
$(oThis.htIds['swatch']).style.backgroundColor = strColor;
oThis.onChange.fire();
}
}
d.colorPicker.GetColor($(oThis.htIds['spacer']), Changed)
}
oThis.GetColor = function()
{
return(strColor);
}
})($data, Main);
_write('\n');}return $text.join("");}},{id:"CategoryCastPicker",fnc:function($data){var $text = [];var _write = function(text) {$text.push((typeof text == "number")?text:(text||""));};with($data){ _write('\n');Main = function(o) {var $text = [];var _write = function(text) {$text.push((typeof text == "number")?text:(text||""));};_write('\n<div>\n<div ');_write(o.Elem('divCat'));_write(' style=\"float:left;\">\n<div ');_write(o.Elem('selectCat'));_write('><input type=\"radio\" ');_write(o.Elem('idRadCat'));_write(' name=');_write(o.strRadioName);_write(' value=\"cat\" onclick=\"');_write(o.strRadioSelected);_write('(this)\" />Select a show:</div>\n<div ');_write(o.Elem('divSelShow'));_write('></div>\n</div>\n<div ');_write(o.Elem('divOr'));_write(' style=\"margin:0px 30px; float:left;\">&nbsp;-&nbsp;OR&nbsp;-&nbsp;</div>\n<div ');_write(o.Elem('divCast'));_write(' style=\"float:left;\">\n<div ');_write(o.Elem('selectCast'));_write('><input type=\"radio\" ');_write(o.Elem('idRadCast'));_write(' name=');_write(o.strRadioName);_write(' value=\"cast\" onclick=\"');_write(o.strRadioSelected);_write('(this)\" />Select an actor:</div>\n<div ');_write(o.Elem('divSelActorShow'));_write('></div>\n<div ');_write(o.Elem('divSelActor'));_write('></div>\n</div>\n<div style=\"clear:both;\"></div>\n</div>\n');;return($text.join(""));};_write('\n');
new (function(d, fncMain)
{
var oThis = Btv.Lang.Extend(this, Btv.Cst.BaseTemplate, arguments);
oThis.d = d;
oThis.strRadioName = $I();
var aCategories;
var blnRadioSelected = false;
var blnCast;
var catID = '';
var castID = '';
oThis.SetMode = function(blnAllowCat, blnAllowCast)
{
if (arguments.length == 0) blnAllowCat = blnAllowCast = true;
if (blnAllowCat && blnAllowCast)
{
$(oThis.htIds['idRadCat']).checked = false;
$(oThis.htIds['idRadCast']).checked = false;
$(oThis.htIds['selectCat']).style.display = 'block';
$(oThis.htIds['selectCast']).style.display = 'block';
$(oThis.htIds['divCat']).style.display = 'block';
$(oThis.htIds['divOr']).style.display = 'block';
$(oThis.htIds['divCast']).style.display = 'block';
oThis.RadioSelected();
}
else if (blnAllowCat)
{
$(oThis.htIds['idRadCat']).checked = true;
$(oThis.htIds['idRadCast']).checked = false;
$(oThis.htIds['selectCat']).style.display = 'none';
$(oThis.htIds['selectCast']).style.display = 'none';
$(oThis.htIds['divCat']).style.display = 'block';
$(oThis.htIds['divOr']).style.display = 'none';
$(oThis.htIds['divCast']).style.display = 'none';
oThis.RadioSelected($(oThis.htIds['idRadCat']));
}
else if (blnAllowCast)
{
$(oThis.htIds['idRadCat']).checked = false;
$(oThis.htIds['idRadCast']).checked = true;
$(oThis.htIds['selectCat']).style.display = 'none';
$(oThis.htIds['selectCast']).style.display = 'none';
$(oThis.htIds['divCat']).style.display = 'none';
$(oThis.htIds['divOr']).style.display = 'none';
$(oThis.htIds['divCast']).style.display = 'block';
oThis.RadioSelected($(oThis.htIds['idRadCast']))
}
}
oThis.GetHTML = function()
{
return(fncMain(oThis));
}
oThis.GetData = function()
{
if (blnRadioSelected)
{
if (blnCast)
{
if (castID != '')
{
return({type:'cast', context:castID});
}
}
else
{
if (catID != '')
{
return({type:'cat', context:catID});
}
}
}
return(null);
}
oThis.RadioSelected = function(rad)
{
if (!rad)
{
blnRadioSelected = false;
}
else
{
blnRadioSelected = true;
blnCast = (rad.value == "cast");
}
var selCat = $(oThis.htIds['selShow']);
var selCast = $(oThis.htIds['selActor']);
var selCastCat = $(oThis.htIds['selActorShow']);
if (selCat) selCat.disabled = !blnRadioSelected || blnCast;
if (selCast) selCast.disabled = !blnRadioSelected || !blnCast;
if (selCastCat) selCastCat.disabled = !blnRadioSelected || !blnCast;
}
oThis.strRadioSelected = $R(oThis.RadioSelected);
function BuildSelect(strParentID, strID, aData, strValueProp, strTextProp, strFirstLabel, blnEnabled, strChangeFnc)
{
function F()
{
var a = [];
a.push($F(
'<select id="{2}" onchange="{0}(this)" {3}><option value="">{1}</option>', 
strChangeFnc, 
strFirstLabel, 
oThis.ID(strID), 
(blnEnabled ? '' : 'disabled="1"')
));
for (var i=0; i < aData.length; i++)
{
a.push('<option value="');
a.push(aData[i][strValueProp]);
a.push('">');
a.push(aData[i][strTextProp]);
a.push('</option>');
}
a.push('</select>');
$(oThis.htIds[strParentID]).innerHTML = a.join('');
}
YAHOO.util.Event.onAvailable(oThis.htIds[strParentID], F);
}
function GetSelectValue(sel)
{
for (var i=0; i < sel.options.length; i++)
{
if (sel.options[i].selected) return(sel.options[i].value);
}
return(null);
}
function CategoryChanged(sel)
{
catID = GetSelectValue(sel);
}
function CastCategoryChanged(sel)
{
function HaveCast(a)
{
BuildSelect('divSelActor', 'selActor', a, 'ID', 'Name', 'Select an actor', (blnRadioSelected && blnCast), strCastChanged);
}
castID = '';
oThis.DisposeElem('selActor');
var id = GetSelectValue(sel);
if (id != '')
{
d.fncGetCast(id, HaveCast);
}
else
{
BuildSelect('divSelActor', 'selActor', [], '', '', '', false, $R(Function.NoOp));
}
}
function CastChanged(sel)
{
castID = GetSelectValue(sel);
}
var strCastChanged = $R(CastChanged);
function Init()
{
function HaveCategories(a)
{
BuildSelect('divSelShow', 'selShow', a, 'ID', 'Title', 'Select a tv show/movie', (blnRadioSelected && !blnCast), $R(CategoryChanged));
BuildSelect('divSelActorShow', 'selActorShow', a, 'ID', 'Title', 'Select a tv show/movie featuring this actor', (blnRadioSelected && blnCast), $R(CastCategoryChanged));
BuildSelect('divSelActor', 'selActor', [], '', '', '', false, $R(Function.NoOp));
}
d.fncGetCategories(HaveCategories);
}
Init();
})($data, Main);
_write('\n');}return $text.join("");}},{id:"PhotoPreviewWidget",fnc:function($data){var $text = [];var _write = function(text) {$text.push((typeof text == "number")?text:(text||""));};with($data){ _write('\n');Main = function(o) {var $text = [];var _write = function(text) {$text.push((typeof text == "number")?text:(text||""));};_write('\n<div ');_write(o.Elem('wrap'));_write(' style=\"margin:auto; ');_write(o.Style());_write('\">\n<div ');_write(o.Elem('main'));_write(' class=\"brand-widget-border-color\" style=\"width:100%; height:100%; border-style:solid; ');_write(o.Style());_write('\">');_write(o.InnerHTML());_write('</div>\n<div ');_write(o.Elem('thumbs'));_write(' style=\"position:relative; ');_write(o.Style());_write('\">\n'); for (var iR=0; iR < o.d.rows; iR++) { _write('\n'); for (var iC=0; iC < o.d.cols; iC++) { _write('\n<div ');_write(o.Elem('thumb.' + iR + '_' + iC, {row:iR, col:iC}));_write('class=\"brand-widget-border-color\" style=\"position:absolute; border-style:solid; ');_write(o.Style());_write('\">');_write(o.InnerHTML());_write('</div>\n'); } _write('\n'); } _write('\n</div>\n<div style=\"clear:both;\"></div>\n<div ');_write(o.Elem('divSeeMore'));_write(' style=\"');_write(o.Style());_write('; text-align:center;\"><a ');_write(o.Elem('lnkSeeMore'));_write('>');_write(o.InnerHTML());_write('</a></div>\n</div>\n');;return($text.join(""));};_write('\n');
var ui = new (function(d, fncMain)
{
var oThis = Btv.Lang.Extend(this, Btv.Cst.BaseTemplate, arguments);
oThis.d = d;
var oMainImageData;
var iCurrent = 0;
function CalcNumbers()
{
oThis.aImages = [];
oThis.iExtraWidth = Math.max(0, (d.borderHighlight - d.border));
oThis.iTotalWidth = d.width - (oThis.iExtraWidth * 2);
var iAvail = oThis.iTotalWidth - ((d.cols - 1) * d.margin) - (d.cols * d.border * 2);
var iHeight = Math.floor(iAvail / d.cols);
var iExtra = iAvail - (d.cols * iHeight);
var iWidth;
var iAdorn = d.margin + (2 * d.border);
oThis.oThumbsRC = [];
oThis.oThumbsIndex = [];
var iIndex = 0;
var blnContinue = true;
var blnSkip = false;
for (var iR=0; blnContinue && (iR < d.rows); iR++)
{
oThis.oThumbsRC[iR] = []; 
var iWidthsSoFar = 0;
for (var iC=0; blnContinue && (iC < d.cols); iC++)
{
if (iIndex >= d.images.length)
{
blnContinue = false;
var iLastRow = ((iC == 0) ? iR-1 : iR);
if ((iLastRow + 1) < d.rows)
{
blnSkip = true;
d.rows = iLastRow + 1;
CalcNumbers();
}
}
else
{
iWidth = iHeight + (((d.cols - iC) <= iExtra) ? 1 : 0);
oThis.oThumbsRC[iR][iC] = {
height: iHeight
,width: iWidth
,top: d.margin + (iR * (iAdorn + iHeight))
,left: (iC * iAdorn) + iWidthsSoFar
,index: iIndex++
,row:iR
,col:iC
};
iWidthsSoFar += iWidth;
oThis.oThumbsIndex.push(oThis.oThumbsRC[iR][iC]);
}
}
}
if (!blnSkip)
{
oThis.sizeSeeMore = {width:oThis.iTotalWidth , height:30};
oThis.sizeThumbsArea = {width:oThis.iTotalWidth , height: (d.rows * (iAdorn + iHeight))};
oThis.sizeWrap = {width:oThis.iTotalWidth , height: (oThis.iTotalWidth + oThis.sizeThumbsArea.height + d.border + oThis.sizeSeeMore.height + oThis.iExtraWidth)};
}
}
CalcNumbers();
oThis.GetHTML = function()
{
var s = fncMain(oThis);
return(s);
}
oThis.SetData = function()
{
}
function ChangeMainImage(i)
{
if (i == iCurrent) return;
var oOldThumb = oThis.oThumbsIndex[iCurrent];
var oNewThumb = oThis.oThumbsIndex[i];
iCurrent = i;
oThis.UpdateElement('thumb.' + oOldThumb.row + '_' + oOldThumb.col, oOldThumb);
oThis.UpdateElement('thumb.' + oNewThumb.row + '_' + oNewThumb.col, oNewThumb);
oMainImageData.src = Btv.UI.FixImage(d.images[i].Image);
oMainImageData.link.href = BuildGalleryLink(d.images[i].PhotoId);
oThis.imgMain.Update(oMainImageData);
}
var strChangeMainImage = $R(ChangeMainImage);
function BuildGalleryLink(pid)
{
pid = pid || -1;
var s = Btv.PhotoRater.BuildGalleryUrl(d.seeMore.type, d.seeMore.context, pid) + '&btvbp=' + d.seeMore.brandParam;
return(s);
}
oThis.ElementProps = function(id, scope, name, isInit, params, ht)
{
switch(scope)
{
case "wrap":
//Btv.Styles.SetSize(ht, oThis.sizeWrap);
ht.style.width = oThis.sizeWrap + 'px';
ht.style.padding = $F('{0}px {0}px 0px {0}px', oThis.iExtraWidth);
break;
case "main":
var iW = oThis.iTotalWidth - (2 * d.border);
ht.style['border-width'] = d.border + 'px';
ht.style.width = ht.style.height = iW + 'px';
var out = {};
oMainImageData = {
sizeBounds: { width: iW, height: iW }
, doCrop: true
, src: Btv.UI.FixImage(d.images[iCurrent].Image)
, oCropAnchor: { width: .5, height: .25 }
, link:{href:BuildGalleryLink(d.images[iCurrent].PhotoId), target:'_top'}
};
ht.innerHTML = oThis.RunTemplateSimple('ImagePlacement', oMainImageData, out);
oThis.imgMain = out.value;
break;
case "thumbs":
Btv.Styles.SetSize(ht, oThis.sizeThumbsArea);
break;
case "thumb":
var oThumb = oThis.oThumbsRC[params.row][params.col];
if (oThumb)
{
if (isInit)
{
Btv.Styles.SetSize(ht, oThumb);
ht.attr.onmouseover = $F('{0}({1})', strChangeMainImage, oThumb.index);
var out = {};
ht.innerHTML = oThis.RunTemplateSimple('ImagePlacement', 
{
sizeBounds: oThumb
, doCrop: true
, src: Btv.UI.FixImage(d.images[oThumb.index].Image)
, oCropAnchor: { width: .5, height: .25 }
, link:{href:BuildGalleryLink(d.images[oThumb.index].PhotoId), target:'_top'}
} 
,out);
oThis.aImages[oThumb.index] = out.value;
}
var blnCurrent = (oThumb.index == iCurrent);
ht.attr['class'] = blnCurrent ? ' brand-widget-border-color-highlight' : 'brand-widget-border-color';
var iPositionOffset = blnCurrent ? (d.border - d.borderHighlight) : 0;
ht.style.left = (oThumb.left + iPositionOffset) + 'px';
ht.style.top = (oThumb.top + iPositionOffset) + 'px';
ht.style['border-width'] = (blnCurrent ? d.borderHighlight : d.border) + 'px';
}
else
{
ht.style.display = 'none';
}
break;
case "divSeeMore":
ht.style['margin-top'] = d.margin + 'px';
//Btv.Styles.SetSize(ht, oThis.sizeSeeMore);
break;
case "lnkSeeMore":
ht.attr.href = BuildGalleryLink();
ht.attr.target = '_top';
ht.innerHTML = d.seeMore.text;
break;
}
}
})($data, Main);
_write('\n');_write(ui.GetHTML());_write('\n');}return $text.join("");}},{id:"Quiz.StatEmbed",fnc:function($data){var $text = [];var _write = function(text) {$text.push((typeof text == "number")?text:(text||""));};with($data){ _write('\n');Main = function(o) {var $text = [];var _write = function(text) {$text.push((typeof text == "number")?text:(text||""));};_write('\n<DIV class=\"show_page2_module_body\" style=\"MARGIN: 0px\">\n<TEXTAREA style=\"BORDER: #cccccc 1px solid; PADDING:0px; FONT-SIZE: 11px; MARGIN: 0px; OVERFLOW: hidden; WIDTH: 278px; HEIGHT: 75px\" onclick=\"this.select()\">');_write(TextAreaContents(o));_write('</TEXTAREA> \n</DIV>\n');;return($text.join(""));};_write('\n');TextAreaStyleContents = function(o) {var $text = [];var _write = function(text) {$text.push((typeof text == "number")?text:(text||""));};_write('<style type=\"text/css\">.btv_quiz_question{position:relative;font-size:14px;font-weight:bold;margin-top:7px;clear:both;}.btv_quiz_question img{margin-right:5px;}.creat_quiz_block .btv_quiz_question{width:340px;font-size:25px;}.btv_quiz_image{position:relative;width:380px;text-align:center;_margin-right:42px;}.btv_quiz_image_img{display:block;max-height:115px;max-width:199px;height:expression((this.height>120)?120:true);background-position:center center;background-repeat:no-repeat;margin:auto;}.btv_quiz_answers a{display:block;width:345px;font-size:14px;color:#000000!important;border-bottom:1px dashed #00a5e5;padding:4px 0px 4px 28px;background:url(\'http://www.buddytv.com/quiz/images/answer_image.jpg\')center left no-repeat;}.btv_quiz_answers a:hover{background:url(\'http://www.buddytv.com/quiz/images/answer_image_hover.jpg\')center left no-repeat;text-decoration:none;}.btv_quiz_answers{position:relative;width:376px;float:left;}.btv_closedquiz_answers{position:relative;width:455px;float:left;}.btv_closedquiz_answers a{display:block;width:630px;font-size:20px;color:#000000!important;border-bottom:1px dashed #00a5e5;padding:4px 0px 4px 28px;background:url(\'http://www.buddytv.com/quiz/images/answer_image.jpg\')center left no-repeat;}.btv_closedquiz_answers a:hover{background:url(\'http://www.buddytv.com/quiz/images/answer_image_hover.jpg\')center left no-repeat;text-decoration:none;}.btv_quiz_ad{');if(o.oStyles) {if(o.oStyles.FontFamily) {_write('font-family:');_write(o.oStyles.FontFamily);_write(';');}if(o.oStyles.FontFamily) {_write('background-color:');_write(o.oStyles.BackgroundColor);_write(';');}if(o.oStyles.DarkTextColor) {_write('color:');_write(o.oStyles.DarkTextColor);_write(';');}}_write('}.btv_quiz_ad .btv_quiz_question{font-size:15px;text-align:left!important;}.btv_quiz_ad .btv_quiz_question{text-align:left!important;margin-bottom:8px;width:270px;}.btv_quiz_ad .btv_quiz_answers a:hover{background-image:url(\'http://www.buddytv.com/quiz/images/answer_image_hover_small.jpg\');}.btv_quiz_ad .btv_quiz_answers a{font-size:13px;font-weight:bold;padding-left:17px;width:auto;border-bottom:none;background-image:url(\'http://www.buddytv.com/quiz/images/answer_image_small.jpg\');}.btv_quiz_ad .btv_quiz_answers{width:180px;text-align:left!important;}.btv_quiz_ad_left{width:180px!important;float:left!important;text-align:left!important;}.btv_quiz_ad_img,.btv_quiz_ad_img img{width:90px;float:right;display:block;}.btv_quiz_ad_left a img{display:none;}.btv_quiz_ad_img img{border:1px solid #999999;}</style>\n');;return($text.join(""));};_write('\n');TextAreaContents = function(o) {var $text = [];var _write = function(text) {$text.push((typeof text == "number")?text:(text||""));};_write(o.fncTextAreaStyleContents(o));_write('\n<div class=\"btv_quiz_ad\" style=\"width:300px;\">\n<div class=\"btv_quiz_question\">');_write(o.d.Text);_write('</div>\n<div class=\"btv_quiz_ad_img\"><img class=\"btv_quiz_image_img\" src=\"');_write(o.d.Media ? Btv.UI.FixImage(o.d.Media) : Btv.UI.CategoryImageSrc(o.d.CategoryScopeID, o.d.Image));_write('\" alt=\"');_write(o.d.MediaSource ? o.d.MediaSource : o.d.CategoryTitle);_write('\" style=\"border-width:0px;\" /></div>\n<div class=\"btv_quiz_ad_left\">\n<div class=\"btv_quiz_answers\">\n');if(o.d.Answers instanceof Array) {for(var i=0; i<o.d.Answers.length; i++) {_write(' \n<a href=\"http://');_write(Btv.Url.GetHostName(document.location.href));_write('/quiz/quiz.aspx?category=');_write(o.d.CategoryID);_write('&csi=');_write(o.d.CategoryID ? -1 : o.d.CategoryScopeID);_write('&lastquestion=');_write(o.d.ID);_write('&firstquestion=');_write(o.d.ID);_write('&lastanswer=');_write(o.d.Answers[i].ID);_write('&points=100');_write(o.strBrandingParam ? ('&btvbp=' + o.strBrandingParam) : '');_write('\" rel=\"nofollow\">');_write(o.d.Answers[i].Text);_write('</a>\n');}} else {for(var i in o.d.Answers) {_write(' \n<a href=\"http://');_write(Btv.Url.GetHostName(document.location.href));_write('/quiz/quiz.aspx?category=');_write(o.d.CategoryID);_write('&csi=');_write(o.d.CategoryID ? -1 : o.d.CategoryScopeID);_write('&lastquestion=');_write(o.d.ID);_write('&firstquestion=');_write(o.d.ID);_write('&lastanswer=');_write(o.d.Answers[i].ID);_write('&points=100');_write(o.strBrandingParam ? ('&btvbp=' + o.strBrandingParam) : '');_write('\" rel=\"nofollow\">');_write(o.d.Answers[i].Text);_write('</a>\n');}}_write(' \n</div>\n</div>\n<div style=\"clear:both;\"></div>\n</div>\n');;return($text.join(""));};_write('\n');
new (function(d, fncMain, fncTextAreaContents, fncTextAreaStyleContents)
{
var oThis = Btv.Lang.Extend(this, Btv.Cst.BaseTemplate, arguments);
oThis.fncTextAreaStyleContents = fncTextAreaStyleContents;
oThis.GetTitle = function()
{
return("Embed this Question");
}
oThis.GetEmbedCode = function()
{
return(fncTextAreaContents(oThis));
}
oThis.Run = function()
{
return(fncMain(oThis));
}
oThis.SetData = function(oTriviaData, oStyles, strBrandingParam)
{
d = oThis.d = oTriviaData.NextQuestion;
oThis.strBrandingParam = strBrandingParam;
oThis.oStyles = oStyles;
}
})($data, Main, TextAreaContents, TextAreaStyleContents);
_write('\n');}return $text.join("");}}]);
