// Fixes pages using black background templates
if ( PageName() == 'affiliate_signup.asp' ||
     PageName() == 'myaccount_affiliate.asp' ||
     PageName() == 'myaccount_affiliate_banners.asp' ||
     PageName() == 'kb_results.asp' ||
     PageName() == 'ticket.asp' ||      
     PageName() == 'ticket_list.asp')
document.write("\<style>#content_area td {background: #000000;}<\/style>");

// Fixes multi-child add to cart for black templates
if ( PageName() == 'productdetails.asp') document.write("\<style>.smalltext { color:#ffffff; background-color: #000000; }\n.productnamecolorSMALL { color: #ffffff; background-color: #000000; }\n.colors_background_main {background-color:#000000 ! important;}\n.colors_backgroundlight {background-color:#000000 ! important;}<\/style>");

//Fixes error messages on Ticket.asp
if ( PageName() == 'Ticket.asp')
document.write("\<style>#content_area > table > tbody > tr > td > table > tbody > tr > td > font > b {color: #ffffff ! important;}<\/style>");

// Fixes pages using black background templates if (PageName() == 'one-page-checkout.asp') {
    var list = document.getElementsByTagName("font");
    for (var i = 0; i < list.length; i++)       
        if (list[i].color == "#000000") {
            list[i].color = "white";
            break;
        }
