// 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++)        // search for border color
        if (list[i].color == "#000000") {
            list[i].color = "white";
            break;
        }
}

// to fix address validation background color
 
if ( PageName() == 'one-page-checkout.asp') {
document.write('<' + 'style type="text/css">td#content_area form table tbody tr td table tbody tr td table tbody tr td font li ul {background-color: #000000 ! important;}<' + '/style>');
}


//include on category page
if(PageName()=='searchresults.asp' ){
	document.write('<link rel="stylesheet" href="/v/vspfiles/templates/cubed/css/category.css" type="text/css" />');
}
//include on product page
if(PageName()=='productdetails.asp' ){
	document.write('<link rel="stylesheet" href="/v/vspfiles/templates/cubed/css/productdetails.css" type="text/css" />');
}
//include on shopping cart page
if(PageName()=='shoppingcart.asp' ){
	document.write('<link rel="stylesheet" href="/v/vspfiles/templates/cubed/css/shoppingcart.css" type="text/css" />');
}
//include on shopping cart page
if(PageName()=='one-page-checkout.asp' ){
	document.write('<link rel="stylesheet" href="/v/vspfiles/templates/cubed/css/onepagecheckout.css" type="text/css" />');
}

document.write('<link rel="stylesheet" href="/v/vspfiles/templates/cubed/css/softaddtocart.css" type="text/css" />');

function vCustomOnready(){
}
