function GetShowDrawingName(a){if(a.ShowDrawingName==null){return true}return a.ShowDrawingName}function GetDrawingPageUrl(a){if(a.DrawingPageUrl==null){return""}return a.DrawingPageUrl}function GetFullDrawingName(a){return a.DrawingName+" - "+a.LotteryName}function GetShowLotteryInformation(a){if(a.ShowLotteryInformation==null){return true}return a.ShowLotteryInformation}function GetLotteryInformationText(a){if(a.LotteryInformationText==null){return""}return a.LotteryInformationText}function GetJackpotText(a){if(a.JackpotText==null){return""}return a.JackpotText}function GetShowJackpotText(a){if(a.ShowJackpotText==null){return true}return a.ShowJackpotText}function GetShowNextDrawingTime(a){if(a.ShowNextDrawingTime==null){return false}return a.ShowNextDrawingTime}function GetNextDrawingTimeLabel(a){if(a.NextDrawingTimeLabel==null){return""}return a.NextDrawingTimeLabel}function GetNextDrawingTime(a){if(a.NextDrawingTime==null){return""}return a.NextDrawingTime}function GetIconSize(a){if(a.IconSize==null){return"Medium"}return a.IconSize}function GetIsWideIconFormat(a){if(a.IsWideIconFormat==null){return false}return a.IsWideIconFormat}function GetJackpotLabelText(a){if(a.JackpotLabelText==null){return""}return a.JackpotLabelText}function GetShowDrawingTime(a){if(a.ShowDrawingTime==null){return false}return a.ShowDrawingTime}function GetDrawingTime(a){if(a.DrawingTime==null){return""}return a.DrawingTime}function GetShowDrawCountDown(a){if(a.ShowDrawCountDown==null){return true}return a.ShowDrawCountDown}function GetDrawingTimeLabel(a){if(a.DrawingTimeLabel==null){return""}return a.DrawingTimeLabel}function GetCountDownControlDaysText(a){if(a.CountDownControlDaysText==null){return""}return a.CountDownControlDaysText}function GetCountDownControlCompletedText(a){if(a.CountDownControlCompletedText==null){return""}return a.CountDownControlCompletedText}function GetCountDownControlNotScheduledText(a){if(a.CountDownControlNotScheduledText==null){return""}return a.CountDownControlNotScheduledText}function GetCountDownControlPrefixText(a){if(a.CountDownControlPrefixText==null){return""}return a.CountDownControlPrefixText}function GetShowPayoutsLink(a){if(a.ShowPayoutsLink==null){return false}return a.ShowPayoutsLink}function GetShowPayoutsButton(a){if(a.ShowPayoutsButton==null){return false}return a.ShowPayoutsButton}function GetPayoutsPopupLink(a){return a.PayoutsPopupLink}function GetPayoutsPopupHeight(a){if(a.PayoutsPopupHeight==null){return 500}return a.PayoutsPopupHeight}function GetPayoutsPopupWidth(a){if(a.PayoutsPopupWidth==null){return 700}return a.PayoutsPopupWidth}function GetShowPurchaseTicketsLink(a){if(a.ShowPurchaseTicketsLink==null){return false}return a.ShowPurchaseTicketsLink}function GetTicketPopupHeight(a){if(a.TicketPopupHeight==null){return 750}return a.TicketPopupHeight}function GetTicketPopupWidth(a){if(a.TicketPopupWidth==null){return 600}return a.TicketPopupWidth}function GetTicketPopupLink(a){return a.TicketPopupLink}function GetGetATicketButton(a){return a.GetATicketButton}function GetCanPurchaseTickets(a){if(a.CanPurchaseTickets==null){return false}return a.CanPurchaseTickets}function InitializeDrawingDetailsIcon(j){var f=document.GlobalObjectControl.Args;var i="250px";var b="105px";if(j.IsWideIconFormat){i="240px";b="150px"}var h=f.NonLocalizedImageRootUrl+"/Lottery-"+j.LogoImageName+"-"+j.IconSize+".png";var c='<img id="_DrawingIconImage-'+j.DrawingId+'"  src="'+h+'"/>';var a=$("#DrawingDetailsIcon-"+j.SelectorId);if(j.Item!=null){a=j.Item}a.append('<div id="_DDIBP-'+j.SelectorId+'">');var e=$('<table id="_DDIMainTable-'+j.SelectorId+'">');if(j.LayoutType=="BackgroundImageTextOverlay"){var d=f.NonLocalizedImageRootUrl+"/DrawingDetailsIcon-"+j.LogoImageName+".gif";e.css("width",i);e.css("height",b);e.css("background-image","url("+d+")");e.css("background-repeat","no-repeat");e.css("cursor","pointer");e.css("border-collapse","collapse");e.css("padding-bottom","3px");e.css("margin","2px");e.css("margin-top","2px");if(GetCanPurchaseTickets(j)){if(j.ShouldEnablePurchaseTicketsVersion2){e.bind("click",{Args:j},function(k){ShowPurchaseTicketsPopup(k.data.Args)})}else{e.bind("click",{TicketPopupWidth:GetTicketPopupWidth(j),TicketPopupHeight:GetTicketPopupHeight(j),TicketPopupLink:GetTicketPopupLink(j)},function(k){LoadIFrame("TicketPopup",j.TicketPopupWidth,j.TicketPopupHeight,j.TicketPopupLink)})}}else{e.bind("click",{DrawingPageUrl:GetDrawingPageUrl(j)},function(k){window.location=k.data.DrawingPageUrl})}var g='<tr id="_IconRow-'+j.DrawingId+'">';g+='<td id="_IconCell-'+j.DrawingId+'" align="right" valign="bottom" style="vertical-align:bottom;width:'+i+";height:"+b+'">';g+=GenerateDrawingInformationText(j);g+="</td></tr>";e.append(g);e.append("</table>")}else{if(j.LayoutType=="Text"){e.css("margin","0px");if(j.DetailsOrientation=="Vertical"){var g='<tr id="IconRow-'+j.DrawingId+'">';g+='<td id="IconCell-'+j.DrawingId+'">';g+=c;g+="</td>";g+='<td id="DrawingInformationCell-'+j.DrawingId+'">';g+=GenerateDrawingInformationText(j);g+="</td></tr>";e.append(g);e.append("</table>")}else{var g='<tr id="IconRow-'+j.DrawingId+'">';g+='<td id="IconCell-'+j.DrawingId+'">';g+=c;g+="</td>";g+='<td id="DrawingInformationCell-'+j.DrawingId+'">';g+=GenerateDrawingInformationText(j);g+="</td></tr>";e.append(g);e.append("</table>")}}}a.append(e);a.append("</div>")}function GenerateDrawingInformationText(d){var e="";var c=GetShowPurchaseTicketsLink(d)&&GetCanPurchaseTickets(d);var h="";var o="";if(d.LayoutType=="Text"){h="DrawingDetailsIcon-LabelText";o="DrawingDetailsIcon-Text"}else{if(d.LayoutType=="BackgroundImageTextOverlay"){h="DrawingDetailsIcon-BackgroundOverlay";o=h}}e+='<table id="DrawingDetailsTable-'+d.DrawingId+'">';if(GetShowDrawingName(d)){var r=h;e+='<tr id="_DrawingNameRow-'+d.DrawingId+'">';e+='<td id="_DrawingNameCell-'+d.DrawingId+'" align="'+d.HorizontalTextAlignment+'">';var n="";if(d.EnableDrawingLinks){e+='<a id="_DrawingNameLink-'+d.DrawingId+'"  class="'+r+'" href="'+GetDrawingPageUrl(d)+'" '+n+">"+GetFullDrawingName(d)+"</a>"}else{e+='<span id="_DrawingNameLink-'+d.DrawingId+'"  class="'+r+'" href="'+GetDrawingPageUrl(d)+'" >'+GetFullDrawingName(d)+"</span>"}e+="</td>";e+="</tr>"}if(GetShowLotteryInformation(d)&&d.LotteryId!=-1){e+='<tr id="_LotteryInformationRow-'+d.DrawingId+'">';e+='<td id="_LotteryInformationCell-'+d.DrawingId+'" align="'+d.HorizontalTextAlignment+'">';e+='<span id="_LotteryInformationLabel-'+d.DrawingId+'" class="'+o+'">'+GetLotteryInformationText(d)+"</span>";e+="</td>";e+="</tr>"}if(GetShowJackpotText(d)){var f=o;var a=h;var p=GetJackpotLabelText(d)+"&nbsp;";var j='<span id="_JackpotLabel-'+d.DrawingId+'" class="'+f+'">'+p+"</span>";var m='<span id="_JackpotTextLabel-'+d.DrawingId+'" class="'+a+'">'+GetJackpotText(d)+"</span>";e+='<tr id="_JackpotRow-'+d.DrawingId+'">';e+='<td id="_JackpotCell-'+d.DrawingId+'" align="'+d.HorizontalTextAlignment+'">';if(d.LayoutType=="Text"){e+=j;e+=m}else{if(d.LayoutType=="BackgroundImageTextOverlay"){e+=j;if(!GetIsWideIconFormat(d)){e+='<div style="margin-top:5px" />'}e+=m}}e+="</td>";e+="</tr>"}if(GetShowNextDrawingTime(d)){var l=o;e+='<tr id="_NextDrawingTimeRow-'+d.DrawingId+'">';e+='<td id="_NextDrawingTimecell-'+d.DrawingId+'" align="'+d.HorizontalTextAlignment+'">';e+='<span id="_NextDrawingTimeLabel-'+d.DrawingId+'" class="'+l+'">'+GetNextDrawingTimeText(d)+"</span>";e+="</td>";e+="</tr>"}if(GetShowDrawingTime(d)){var q=o;e+='<tr id="_DrawingTimeRow-'+d.DrawingId+'">';e+='<td id="_DrawingTimeCell-'+d.DrawingId+'" align="'+d.HorizontalTextAlignment+'">';e+='<span id="_DrawingTimeLabel-'+d.DrawingId+' class="'+q+'">'+GetDrawingTimeLabel(d)+" </span>";var b="_DrawingTimeText-"+d.SelectorId;e+='<span id="'+b+'" class="'+q+'">'+GetDrawingTime(d)+" </span>";e+="</td>";e+="</tr>"}if(GetShowDrawCountDown(d)){var s=d.SecondsUntilNextDrawing;var k=new Date(GetNextDrawingTime(d));var g=new Date();g=new Date(g.setMinutes(g.getMinutes()+g.getTimezoneOffset()));var s=Math.ceil((k.getTime()-g.getTime())/1000);e+='<tr id="_DrawCountDownRowRow-'+d.DrawingId+'">';e+='<td id="_DrawCountDownRowCell-'+d.DrawingId+'" align="'+d.HorizontalTextAlignment+'" >';var i="CountDownControl-"+d.SelectorId;e+='<div id="'+i+'" class="'+h+'" style="height:25px"></div>';InitializeCountDownControl({SelectorId:i,Seconds:s,DaysText:GetCountDownControlDaysText(d),PrefixText:GetCountDownControlPrefixText(d)+" ",PrefixTextCSSClass:h,DisplayTextCSSClass:h,NotScheduledText:GetCountDownControlNotScheduledText(d),CompletedText:GetCountDownControlCompletedText(d)});e+="</td>";e+="</tr>"}if(GetShowPayoutsLink(d)){e+='<tr id="_ShowPayoutsRow-'+d.DrawingId+'">';e+='<td id="_ShowPayoutsCell-'+d.DrawingId+'" align="'+d.HorizontalTextAlignment+'">';e+='<img id="_ShowPayoutsImage" class="'+o+'" style="cursor:pointer" src="'+GetShowPayoutsButton(d)+'" onclick="{3}" />';e+="</td>";e+="</tr>";$("#_ShowPayoutsCell-"+d.DrawingId).live("click",{PayoutsPopupWidth:GetPayoutsPopupWidth(d),PayoutsPopupHeight:GetPayoutsPopupHeight(d),PayoutsPopupLink:GetPayoutsPopupLink(d)},function(t){LoadIFrame("PayoutsPopup",d.PayoutsPopupWidth,d.PayoutsPopupHeight,d.PayoutsPopupLink);$("#PayoutsPopup").topZIndex()})}if(c){e+='<tr id="_GetATicketRow-'+d.DrawingId+'">';e+='<td id="_GetATicketCell-'+d.DrawingId+'" align="'+d.HorizontalTextAlignment+'">';e+='<div id="_GetATicketImageLink-'+d.DrawingId+'" style="cursor:pointer';e+=";background-image:url("+GetGetATicketButton(d)+")";e+=';background-repeat:no-repeat;background-position:right;height:20px;width:110px;margin-right:5px; margin-bottom:3px">';e+="</div>";e+="</td>";e+="</tr>";if(d.ShouldEnablePurchaseTicketsVersion2){$("#_GetATicketImageLink-"+d.DrawingId).live("click",{Args:d},function(t){ShowPurchaseTicketsPopup(t.data.Args)})}else{$("#_GetATicketImageLink-"+d.DrawingId).live("click",{TicketPopupWidth:GetTicketPopupWidth(d),TicketPopupHeight:GetTicketPopupHeight(d),TicketPopupLink:GetTicketPopupLink(d)},function(t){LoadIFrame("TicketPopup",t.data.TicketPopupWidth,t.data.TicketPopupHeight,t.data.TicketPopupLink)})}}e+="</table>";return e};
