function AddCss()
{   
   var spos = document.URL.lastIndexOf("/");
   if (spos != -1)
   {
      var pagePart = document.URL.substring(0,spos);
      var dpos = pagePart.lastIndexOf("_"); // SET DASH OR UNDERSCORE BASED ON STORE'S SETTING
      if (dpos != -1)
      {
         var v = pagePart.substring(dpos+1);
   
         var cssFile;
         if (v==="p")
            cssFile = "custom_product";
         else if (v==="s")
            cssFile = "custom_search";
         else if (v==="a")
            cssFile = "custom_articles";
 
         document.write('<link rel="stylesheet" href="/v/vspfiles/assets/custom_css/'+cssFile+'.css" type="text/css">');
      }
   }
}


function AddCss2()
{
	var sPath = window.location.pathname;
	var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);

	var cssFile2;
	if (sPage === "ProductDetails.asp") 
	   cssFile2 = "custom_product";
	
	else if (sPage === "ShoppingCart.asp") 
	   cssFile2 = "custom_cart";
	
	else if (sPage === "shoppingcart.asp") 
	   cssFile2 = "custom_cart";
	
	else if (sPage === "one-page-checkout.asp") 
	   cssFile2 = "custom_checkout";
	
	else if (sPage === "orders.asp") 
	   cssFile2 = "custom_orders";
	
	else if (sPage === "orderdetails.asp") 
	   cssFile2 = "custom_orderdetails";
	
	else if (sPage === "SearchResults.asp") 
	   cssFile2 = "custom_search";
	
	else if (sPage === "PhotoDetails.asp") 
	   cssFile2 = "custom_photodetails";
	
	else if (sPage === "Receipt.asp") 
	   cssFile2 = "custom_receipt";
	
	else if (sPage === "") 
	   cssFile2 = "custom_home";
	
	else if (sPage === "default.asp") 
	   cssFile2 = "custom_home";
	
	else if (sPage === "Default.asp") 
	   cssFile2 = "custom_home";
	
	else if (sPage === "help.asp") 
	   cssFile2 = "custom_help";
	
	else if (sPage === "help_answer.asp") 
	   cssFile2 = "custom_help_answer";
	
	else if (sPage === "Articles.asp") 
	   cssFile2 = "custom_articles";
	
	else if (sPage === "articles.asp") 
	   cssFile2 = "custom_articles";
	
	else if (sPage === "aboutus.asp") 
	   cssFile2 = "custom_aboutus";
	
	else if (sPage === "login.asp") 
	   cssFile2 = "custom_login";
	
	else if (sPage === "login_sendpass.asp") 
	   cssFile2 = "custom_password";
	
	else if (sPage === "returns.asp") 
	   cssFile2 = "custom_returns";
	
	else if (sPage === "AccountSettings.asp") 
	   cssFile2 = "custom_accountsettings";
	   
	else if (sPage === "myaccount.asp") 
	   cssFile2 = "custom_myaccount";  	   
	
	else if (sPage === "MyAccount_ApplyGift.asp") 
	   cssFile2 = "custom_applygift";  	   
	
	else if (sPage === "WishList.asp") 
	   cssFile2 = "custom_wishlist";  	   
	
	document.write('<link rel="stylesheet" href="/v/vspfiles/assets/custom_css/'+cssFile2+'.css" type="text/css">');
}

AddCss();
AddCss2();
