﻿///To hide unnecessary usercontrols in asset cart
function funAssetCartDisplayHideControls()
{
    
  if(window.document.getElementById("ctl00_ctl00_BodyContent_TitleOptionsBottom1_spanAccessLegends")!= null)
  {
    window.document.getElementById("ctl00_ctl00_BodyContent_TitleOptionsBottom1_spanAccessLegends").style.display = "none";
  }
  if(window.document.getElementById("titleOptionsBottom")!= null)
  {
    window.document.getElementById("titleOptionsBottom").style.display = "none";
  }
  if(window.document.getElementById("divPagenation")!= null)
  {
    window.document.getElementById("divPagenation").style.display = "none";
  }  
  if(window.document.getElementById("cartControls") != null)
  {
    window.document.getElementById("cartControls").style.display = 'block';
  }
 
}


//To maintains view and sort option status in asset cart
function funViewandSortOptions()
{
    var lblAssetsInCart = window.document.getElementById("ctl00_ctl00_MainMenu1_lblAssetsInCart");
    var hdnAssetsInCart = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetsInCart");
    var pageName = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnPageName");
          
    if(window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnSortId").value == "sortID1")
    {
        window.document.getElementById("sortID1").className = "sortOptions_on";
        window.document.getElementById("sortID2").className = "sortOptions_off";
        if(window.document.getElementById("sortID3") != null)
        {
            window.document.getElementById("sortID3").className = "sortOptions_off";
        }
    }
    else if(window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnSortId").value == "sortID2")
    {
        window.document.getElementById("sortID1").className = "sortOptions_off";
        window.document.getElementById("sortID2").className = "sortOptions_on";
        if(window.document.getElementById("sortID3") != null)
        {
            window.document.getElementById("sortID3").className = "sortOptions_off";
        }
    } 
    else if(window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnSortId").value == "sortID3")
    {
        if(window.document.getElementById("sortID3") != null)
        {
            window.document.getElementById("sortID1").className = "sortOptions_off";
            window.document.getElementById("sortID2").className = "sortOptions_off";
            window.document.getElementById("sortID3").className = "sortOptions_on";
        }
    }
    
    if(window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnViewId").value == "viewID1")
    {
        window.document.getElementById("viewID1").className = "viewOptions_on";
        window.document.getElementById("viewID2").className = "viewOptions_off";
        window.document.getElementById("viewID3").className = "viewOptions_off";
    }
    else if(window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnViewId").value == "viewID2")
    {
        window.document.getElementById("viewID1").className = "viewOptions_off";
        window.document.getElementById("viewID2").className = "viewOptions_on";
        window.document.getElementById("viewID3").className = "viewOptions_off";
    } 
    else if(window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnViewId").value == "viewID3")
    {
        window.document.getElementById("viewID1").className = "viewOptions_off";
        window.document.getElementById("viewID2").className = "viewOptions_off";
        window.document.getElementById("viewID3").className = "viewOptions_on";
    }
    
    if(lblAssetsInCart != null && hdnAssetsInCart != null)
    {
        if(pageName && pageName.value == "BQAssetCart") {
            var strBQAssetCartCount = Trim(hdnAssetsInCart.value);
            window.document.getElementById("ctl00_ctl00_MainMenu1_lblBQAssetsInCart").innerHTML = (strBQAssetCartCount == "1") ? strBQAssetCartCount + " BQ Asset" : strBQAssetCartCount + " BQ Assets";
        }
        else
        {
            var strAssetCartCount = Trim(hdnAssetsInCart.value);
            lblAssetsInCart.innerHTML = (strAssetCartCount == "1") ? strAssetCartCount + " asset" : strAssetCartCount + " assets";
        }
    }
    
  
}

//To remove all the assets from the asset cart
function funEmptyAssetCart() {

    var pageName = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnPageName");
    if (pageName && pageName.value == "BQAssetCart") {
        funBuildConfirmationMsg("Are you sure you want to Empty Cart", "OK", "Cancel", "funEmptyAssetCart1()");
        toggleVis('saveSearchDialog');
    }
    else {
        if (window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetCartCatIds").value != "") {
            funBuildConfirmationMsg("Are you sure you want to Empty Cart", "OK", "Cancel", "funEmptyAssetCart1()");
            toggleVis('saveSearchDialog');

        }
    }
 }
function funEmptyAssetCart1()
{
    var pageName = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnPageName");
    var Mode = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnMode");
    
    if(Mode && pageName && (pageName.value == "AssetCart" || pageName.value == "BQAssetCart"))
    {
        Mode.value = "";
    }
    window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetCartCatIds").value = "";
    window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetCartMode").value = "emptyassetcart";
    window.document.forms[0].__VIEWSTATE.name= "";
    window.__doPostBack("ctl00_ctl00_BodyContent_updPanelMain","");
    toggleVis('saveSearchDialog');
}

//To remove selected asset from the asset cart
function funRemoveAssetFromCart(Id)
{
    funBuildConfirmationMsg("Are you sure you want to Remove Asset(s) from Cart", "OK", "Cancel", "funRemoveAssetFromCart1(\""+Id+"\")");
    toggleVis('saveSearchDialog');
}

function funRemoveAssetFromCart1(Id)
{
    var pageName = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnPageName");
    var Mode = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnMode");
    
    if(Mode && pageName && (pageName.value == "AssetCart" || pageName.value == "BQAssetCart"))
    {
        Mode.value = "";
    }
    toggleVis('saveSearchDialog');
    window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetCartMode").value = "removeassetfromcart";
    window.document.getElementById("hdnDeleteAssetId").value = Id;
    //Added to fix #715 issue
    var strTitleId = Id + ",";
    if (window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds")) {
        window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value.toLowerCase().replace(strTitleId.toString().toLowerCase(), "");
        window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value.toLowerCase().replace(Id.toString().toLowerCase(), "");
    }
    window.document.forms[0].__VIEWSTATE.name= "";
    window.__doPostBack("ctl00_ctl00_BodyContent_updPanelMain","");    
}

//To remove selected assets from the asset cart
function funRemoveSelectedAssetsFromCart()
{
    var divtitlesContainer = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_titlesContainer");
    if(window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value == "")
    {
        funBuildAlterMsg("Please select at least one asset to delete", "OK");
        toggleVis('saveSearchDialog');
    }
    else
    {
        if(divtitlesContainer && divtitlesContainer.innerHTML.indexOf('<b>There are no Assets in the List') != -1)
        {
            funBuildAlterMsg("Please select at least one asset to delete", "OK");
            toggleVis('saveSearchDialog');
        }
        else
        {
            funBuildConfirmationMsg("Are you sure you want to Remove Asset(s) from Cart", "OK", "Cancel", "funRemoveSelectedAssetsFromCart1()");
            toggleVis('saveSearchDialog');
        }
    }   
}

function funRemoveSelectedAssetsFromCart1()
{
    var pageName = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnPageName");
    var Mode = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnMode");
    
    if(Mode && pageName && (pageName.value == "AssetCart" || pageName.value == "BQAssetCart"))
    {
        Mode.value = "";
    }
    
    toggleVis('saveSearchDialog');
    window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetCartMode").value = "removeselectedassetsfromcart";
    window.document.forms[0].__VIEWSTATE.name= "";
    window.__doPostBack("ctl00_ctl00_BodyContent_updPanelMain","");
}

 //To check the left nav asset categories by default and to maintain checked asset categories status in asyn postbacks
 function funCheckAssetCartCategories()
 {
    
    var obj = window.document.getElementsByName("chkAssetCategories");
    var intCatCount = 0;
    for(var intCount=0; intCount<obj.length;intCount++)
    {
        if(window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetCartCatIds").value.indexOf(obj[intCount].id) != -1)
        {
            obj[intCount].checked = true;
            intCatCount = intCatCount + 1;
        }
    }
    
    var obj1 = window.document.getElementsByName("filter1000AssetCheckAll");
    if(obj1[0])
    {
        if(intCatCount == obj.length)
        {
            obj1[0].checked = true;
        }
        else
        {
            obj1[0].checked = false;
        }
    }
    
    if(window.document.getElementById("adrestrictionsall"))
    {
        var arrAssetFilter = ['aspectratio','filetype','adrestrictions'];
    }
    else
    {
        var arrAssetFilter = ['aspectratio','filetype'];
    }
    for(var intAssetFilterCount = 0; intAssetFilterCount < arrAssetFilter.length; intAssetFilterCount++)
    {
        var obj = window.document.getElementsByName(arrAssetFilter[intAssetFilterCount]);
        var hdnVariable = "";
        if(arrAssetFilter[intAssetFilterCount] == "aspectratio")
        {
            hdnVariable = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value;
        }
        else if(arrAssetFilter[intAssetFilterCount] == "filetype")
        {
            hdnVariable = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartFileType").value;
        }
        else if(arrAssetFilter[intAssetFilterCount] == "adrestrictions")
        {
            hdnVariable = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAdRestrictions").value;
        }
        var intCatCount = 0;
        for(var intCount=0; intCount<obj.length;intCount++)
        {
            if(hdnVariable.indexOf(obj[intCount].id) != -1)
            {
                obj[intCount].checked = true;
                intCatCount = intCatCount + 1;
            }
        }
        
        var obj1 = window.document.getElementsByName(arrAssetFilter[intAssetFilterCount] + "all");
        if(obj1[0])
        {
            if(intCatCount == obj.length)
            {
                obj1[0].checked = true;
            }
            else
            {
                obj1[0].checked = false;
            }
        }
    }
      // Styles all checkboxes
	$().cssFilterCheckbox();
 }
 //Function to build the details based on selected categories in LeftNav
function funGetSelectedAssetCartFilters(obj,Id,type)
{
    if(type == 'aspectratio')
    {
        if(obj.className == "filterUnchecked")
        {
            if(window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value.indexOf(Id) < 0)
            {
                window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value += Id + ",";
            }
        }
        else
        {
            window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value.replace(Id+",","");
            window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value.replace(Id,"");
            window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value.replace("allaspectratio,","");
            window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value.replace("allaspectratio","");
        }
    }
    if(type == 'filetype')
    {
        if(obj.className == "filterUnchecked")
        {
            if(window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartFileType").value.indexOf(Id) < 0)
            {
                window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartFileType").value += Id + ",";
            }
        }
        else
        {
            window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartFileType").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartFileType").value.replace(Id+",","");
            window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartFileType").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartFileType").value.replace(Id,"");
             window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartFileType").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartFileType").value.replace("allfiletype,","");
            window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartFileType").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartFileType").value.replace("allfiletype","");
        }
    }
    if(type == 'adrestrictions')
    {
        if(obj.className == "filterUnchecked")
        {
            if(window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value.indexOf(Id) < 0)
            {
                window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value += Id + ",";
            }
        }
        else
        {
            window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value.replace(Id+",","");
            window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value.replace(Id,"");
        }
    }
   
    /*Checkbox delay functionality*/
    clearTimeout(timer);    
    timer=window.setTimeout("funAssetsAsynSubmit()",2000);
}
//Description		: Adding/Removing all the CategoryIds to Hiddenvariable.
function funCheckAllAssetCartFilters(obj,Ids,type)
{
    if(type == 'aspectratio')
    {
      if(obj.className == "filterUnchecked")
      {
        window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value = "";
        window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value = Ids + ",allaspectratio,";
      }
      else
      {
        window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value = "";
      }
    }
    if(type == 'filetype')
    {
      if(obj.className == "filterUnchecked")
      {
        window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartFileType").value = "";
        window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartFileType").value = Ids + ",allfiletype,";
      }
      else
      {
        window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartFileType").value = "";
      }
    }
    if(type == 'adrestrictions')
    {
      if(obj.className == "filterUnchecked")
      {
        window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value = "";
        window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value = Ids + ",";
      }
      else
      {
        window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnCartAspectRatio").value = "";
      }
    }
  clearTimeout(timer);    
  timer=window.setTimeout("funAssetsAsynSubmit()",2000);
}
//Function to build the details based on selected categories in LeftNav
function funGetSelectedAssetCartCategories(obj,Id)
{
    if(obj.className == "filterUnchecked")
    {
        if(window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetCartCatIds").value.indexOf(Id) < 0)
        {
            window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetCartCatIds").value += Id + ",";
        }
    }
    else
    {
        window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetCartCatIds").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetCartCatIds").value.replace(Id+",","");
        window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetCartCatIds").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetCartCatIds").value.replace(Id,"");
    }
   
    /*Checkbox delay functionality*/
    clearTimeout(timer);    
    timer=window.setTimeout("funAssetsAsynSubmit()",2000);
}


///This function is used to maintain the category which selected or deselected in left nav of asset cart
function funCheckAllAssetCartCatOptions(obj,Ids)
{
  if(obj.className == "filterUnchecked")
  {
    window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetCartCatIds").value = "";
    window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetCartCatIds").value = Ids + ",";
  }
  else
  {
    window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetCartCatIds").value = "";
  }
  clearTimeout(timer);    
  timer=window.setTimeout("funAssetCartAsynSubmit()",2000);
}
 ///When an individual asset is checked or unchecked in the asset cart
 function funCheckAsssetsInCart(obj,Id)
{   
    if(obj.className == "cartUnchecked")
    {
       window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value += Id.toLowerCase() + ",";
    }
    else
    {
        window.document.getElementById("ctl00_ctl00_BodyContent_CartControls1_hdnAssetCartCheckAll").value = "N";
        var strTitleId = Id + ",";
        window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value.toLowerCase().replace(strTitleId.toString().toLowerCase(),"");
        window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value.toLowerCase().replace(Id.toString().toLowerCase(),"");
    }
 }
 
 ///When Check All/UnCheckAll is clicked in the asset cart
function funCheckAllAssetCart(obj)
{
   if(obj.className == "cartUnchecked")
    {
       window.document.getElementById("ctl00_ctl00_BodyContent_CartControls1_hdnAssetCartCheckAll").value = "Y";
       window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value = "";
       window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnTotAssetObjObjIds").value;
    }
    else
    {
        window.document.getElementById("ctl00_ctl00_BodyContent_CartControls1_hdnAssetCartCheckAll").value = "N";
        window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value  = "";
    }
 }
 
 ///when title level or category level check boxes are  checked
 function funCheckCatorTitlesInAssetCart(obj,Ids)
 {
    var objIds = Ids.split(',');
    if(obj.className == "cartUnchecked")
    {
       for(var intCount = 0; intCount<objIds.length; intCount++)
       {
           if(objIds[intCount]!= "" && window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value.toLowerCase().indexOf(objIds[intCount].toLowerCase()) == -1)
           {
            window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value += objIds[intCount].toLowerCase() + ",";
           }
       }
    }
    else
    {
        window.document.getElementById("ctl00_ctl00_BodyContent_CartControls1_hdnAssetCartCheckAll").value = "N";
       for(var intCount = 0; intCount<objIds.length; intCount++)
       {
           
           if(objIds[intCount]!= "" && window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value.toLowerCase().indexOf(objIds[intCount].toLowerCase()) != -1)
            {
                var strTitleId = objIds[intCount] + ",";
                window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value.toLowerCase().replace(strTitleId.toString().toLowerCase(),"");
                window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value = window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetIds").value.toLowerCase().replace(objIds[intCount].toLowerCase(),"");
            }
       }
    }
 }
 
 ///To remove assets at category level and title level
 function funRemoveAssetsAtCatandTitleLevel(cat,titleid)
 {
 window.document.getElementById("ctl00_ctl00_BodyContent_SubBodyContent_hdnAssetCartMode").value = "removecatortitlefromcart";
 window.document.getElementById("hdnDeleteAssetTitle").value = titleid;
 window.document.getElementById("hdnDeleteAssetCats").value = cat;
 window.document.forms[0].__VIEWSTATE.name= "";
 window.__doPostBack("ctl00_ctl00_BodyContent_updPanelMain","");    
 }
 

function funAssetCartAsynSubmit()
 {
     window.__doPostBack("ctl00_ctl00_BodyContent_updPanelMain","");
 }

 function funTrackRemovingAssetFromCart(WprTitleId, strTitleName, strTitleType, strVideoType, strAssetType, strAssetFormatType, strAssetName, strFileName, strFileSize) {
     funPBTrends(strTitleName, WprTitleId, strTitleType, strVideoType, "removeassetfromcart", strAssetType, strAssetFormatType, strAssetName, strFileName, strFileSize);
 }

function funTrackRemovingAssetFromBQCart(WprTitleId, strTitleName, strTitleType, strVideoType, strAssetType, strAssetFormatType, strAssetName, strFileName, strFileSize) {
    funPBTrends(strTitleName, WprTitleId, strTitleType, strVideoType, "removebqassetfrombqcart", strAssetType, strAssetFormatType, strAssetName, strFileName, strFileSize);
}