// 180x150 oND Text Link Banner
var ond_creative_id = "18132";  // !! This sets the creative id in the js so that multiple banners can be used on a page.  You need to create an HTML link in oND first to get the creative id.

// Ad Content ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
var ond_ad_hyper_text = "BitDefender Antivirus 2008";
var ond_ad_content_text = "Protects your PC in real time from known viruses, spyware and other malware with hourly updates.";
var ond_ad_image = "http://atl.img.digitalriver.com/v2.0-img/operations/text-banners/BitDefender/Antivirus/img/bdlogo-53x53.png";
var ond_ad_image_dim = 'width="53" height="53"';
var ond_ad_image_alt = 'alt="BitDefender Antivirus 2008"';
// End Ad Content ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

var ond_ad_image_attr = ond_ad_image_dim + " " + ond_ad_image_alt; // image dims and alt attr together

// These lines extract the affiliate id from the url
var ond_url_array = ond_aff_link.split("/");
var ond_z_loc;
for (i = 0; i <= ond_url_array.length; i++) { if (ond_url_array[i] == "z") { ond_z_loc = i; } }
var ond_aff_id = ond_url_array[ond_z_loc + 2];
ond_aff_link = "http:\/\/send.onenetworkdirect.net\/z\/" + ond_creative_id + "\/" + ond_aff_id + "\/"  // Rebuild the affiliate link.

// check to see if custom colors are used in the banner code on the affiliate page
if (typeof ond_border_color == "undefined") { var ond_border_color = "CCCCCC"; }
if (typeof ond_back_color == "undefined") { var ond_back_color = "FFFFFF"; }
if (typeof ond_link_color == "undefined") { var ond_link_color = "0000FF"; }
if (typeof ond_text_color == "undefined") { var ond_text_color = "000000"; }

// build varialble with HTML for the banner
var ond_ad_str;
ond_ad_str = '<table onclick="javascript:window.location = \'' + ond_aff_link + '\'" cellpadding="0" cellspacing="0" width="180" height="148" style="border:1px solid #' + ond_border_color + '; cursor:pointer; background-color: #' + ond_back_color + ';"><tr>';
ond_ad_str += '<td height="148" align="center"><img src="' + ond_ad_image + '" ' + ond_ad_image_attr + ' style="border:none;" /><br />';
ond_ad_str += '<span style="font:bold 11px Arial, Helvetica, sans-serif; color:#' + ond_link_color + '; text-decoration:underline; ">' + ond_ad_hyper_text + '</span><br /> <span style="font:10px Arial, Helvetica, sans-serif; color:#' + ond_text_color + '; padding-right:10px; text-decoration:none;">&nbsp;&nbsp;' + ond_ad_content_text + '</span></td>';
ond_ad_str += '</tr></table>';

// write the HTML to the document
document.write(ond_ad_str);
