//
var TN_Widget = function() {
return {
//Options
newWindow : true,
linkText : "Tickets",
tixUrl : "https://www.ticketnetwork.com/tix/",
trackingParams : "",
custLink : true,
//depricated
kbid : "",
//Overwrittable functions
trackingLink :"",
CreateCustomUrl : function(row) {
return this.tixUrl + row[7] + "-tickets-"+ row[6] + ".aspx";
},
CreateEventRow : function(row, isAlt) {
return "
" +
row[3] +" "+"" +
row[4] + " "+"" +
row[5] + " | "+"" +
row[0] +" | " +
row[1] +" " +
row[2] +" | "+""+ this.linkText+ " |
";
},
AddCss: function(cssUrl) {
var fileref=document.createElement("link");
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", cssUrl);
document.getElementsByTagName("head")[0].appendChild(fileref);
},
CreateTable : function(eventData,kywrds,url) {
if(typeof(TN_SetWidgetOptions) == "function")
TN_SetWidgetOptions();
//for backwards compatability
if(this.kbid != "")
this.trackingParams = "?img=249&kbid="+this.kbid;
var newTable = [];
for(var cntr = 0; cntr < eventData.length; cntr++)
newTable.push(this.CreateEventRow(eventData[cntr], cntr % 2 == 1));
var objToAddTo;
if(objToAddTo = document.getElementById("tn_results_container")) {
objToAddTo.innerHTML = '' + newTable.join('') + '
';
} else
document.write('' + newTable.join('') + '
');
if(eventData.length >= 100 && kywrds != undefined) {
if(objToAddTo = document.getElementById("tn_results_container")) {
objToAddTo.innerHTML += '';
} else {
document.write("");
}
}
if(eventData.length > 0) {
document.getElementById("previewNote").style.display = "none";
}
}
};
}();
//BPW-TNSERV-02A
TN_Widget.CreateTable([['NASCAR Practice & Qualifying','Talladega Superspeedway','Talladega, AL','Friday','4/25/2025','TBD','6678473','NASCAR-Practice---Qualifying-4-25-2025'],['ARCA Menards Series Race','Talladega Superspeedway','Talladega, AL','Saturday','4/26/2025','12:30 PM','6736615','ARCA-Menards-Series-Race-4-26-2025'],['NASCAR Xfinity Series','Talladega Superspeedway','Talladega, AL','Saturday','4/26/2025','3:00 PM','6677023','NASCAR-Xfinity-Series-4-26-2025'],['NASCAR Cup Series','Talladega Superspeedway','Talladega, AL','Sunday','4/27/2025','2:00 PM','6676953','NASCAR-Cup-Series-4-27-2025'],['NASCAR Craftsman Truck Series','Talladega Superspeedway','Talladega, AL','Friday','10/17/2025','2:30 PM','6677091','NASCAR-Craftsman-Truck-Series-10-17-2025'],['NASCAR Xfinity Series','Talladega Superspeedway','Talladega, AL','Saturday','10/18/2025','3:00 PM','6677051','NASCAR-Xfinity-Series-10-18-2025'],['NASCAR Cup Series','Talladega Superspeedway','Talladega, AL','Sunday','10/19/2025','1:00 PM','6676981','NASCAR-Cup-Series-10-19-2025']],'Talladega SuperSpeedway','https://www.ticketnetwork.com/ticket/Talladega-SuperSpeedway-events.aspx');