//turn off form tracking 10043906
cm_SkipHandlerReg="F";

// BTOC-2203 - Extend Core MEtric Timeout to 25 seconds as Proforma Order Queueing take at least 15 seconds.
var cm_TimeoutSecs=25;

/* Custom Tag to capture data referring to the Refinement Options of an Onsite Search
 *
 * pageID               : required. Page ID of the page for which the refinement links 
 *                                                live on
 * categoryID     : optional. Category ID of the page for which the page
 *                                                links live on
 */
function cmCreateRefinementOptionsTag( pageID, categoryID, searchTerm, option1, option2, option3, option4, option5)
{
            if (pageID == null) {
                        pageID = cmGetDefaultPageID();
            }
            var cm = new _cm("tid", "7", "vn2", "e4.0");
            cm.li = 2;
            cm.ps1 = pageID;
            if (categoryID) {
                        cm.ps2 = categoryID;
            }
            cm.ps3 = searchTerm;
            cm.ps4 = option1;
            cm.ps5 = option2;
            cm.ps6 = option3;
            cm.ps7 = option4;
            cm.ps8 = option5;
        
			// if available, override the referrer with the frameset referrer
            if (parent.cm_ref != null) {
                        cm.rf = parent.cm_ref;
                        parent.cm_ref = document.URL;
            }
 
            // if parent had mmc variables and this is the first pageview, add mmc to this url
            if(parent.cm_set_mmc) {
                        cm.ul = document.location.href + 
                                                ((document.location.href.indexOf("?") < 0) ? "?" : "&") + 
                                                parent.cm_mmc_params; 
                        parent.cm_ref = cm.ul;
                        parent.cm_set_mmc = false;
            }
            cm.writeImg();
}

function cmCreateProductElementTag(elementID, elementCategory, productID, productCategoryID, elementLocation,attributes) {
	if (attributes){
		cm_exAttr=attributes.split("-_-");
	}
	cmMakeTag(["tid","15","eid",elementID,"ecat",elementCategory,"pflg","1","pid",productID,"pcat",productCategoryID,"eloc",elementLocation,"cm_exAttr",cm_exAttr]);
}
//setting pc=Y
// Creates a Productview Tag
// Also creates a Pageview Tag by setting pc="Y"
// Format of Page ID is "PRODUCT: <Product Name> (<Product ID>)"
//
// productID	: required. Product ID to set on this Productview tag
// productName	: required. Product Name to set on this Productview tag
// categoryID	: optional. Category ID to set on this Productview tag 
// searchString	: optional. Internal search string entered by user to reach this Product Detail page. Only usable if pc="Y".
// searchResults : optional.  Total numeric search results count. Only usable if pc="Y".
function cmCreateProductviewTag(productID, productName, categoryID, attributes, cm_vc) {
	cmMakeTag(["tid","5","pi",c1(cm_ClientID) ? c1(cm_ClientID) : "Product: " + productName + " (" + productID + ")","pr",productID,"pm",productName,"cg",categoryID,"pc","Y","cm_vc",cm_vc?cm_vc:cmExtractParameter("cm_vc",document.location.href),"cmAttributes",attributes]);
}
