// 468x60 oND Text Link Banner
var ond_creative_id = "17539";  // !! 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 = "Run Windows on Mac: Easy, Fast, and Powerful!";
var ond_ad_content_text = "Parallels Desktop 5.0 for Mac – Dramatically improved 3D support for you to enjoy favorite Windows-only games!";
var ond_ad_image = "img/PD4M-53x53.gif";
var ond_ad_image_dim = 'width="53" height="53"';
var ond_ad_image_alt = 'alt="Parallels Desktop 5.0 for Mac"';
// 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 + '\'" width="468" height="58" cellpadding="0" cellspacing="0" style="border:1px solid #' + ond_border_color + '; cursor:pointer; background-color: #' + ond_back_color + ';"><tr>';
ond_ad_str += '<td width="65" height="58"><div align="center"><img src="' + ond_ad_image + '" ' + ond_ad_image_attr + ' style="border:none;" /></div></td>';
ond_ad_str += '<td width="411"><span style="font:bold 11px Arial, Helvetica, sans-serif; color:#' + ond_link_color + '; text-decoration:underline; ">' + ond_ad_hyper_text + '</span><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);
