/*
 * cmcustom.js 
 * $Id: cmcustom.js 138475 2010-02-05 18:49:51Z etowb $
 * $Revision: 138475 $
 *
 * Version 4.2.0
 *
 * Coremetrics Tag v4.0, 8/7/2006
 * COPYRIGHT 2011 IBM, INC. 
 * ALL RIGHTS RESERVED. U.S.PATENT PENDING
 *
 * The following functions aid in the creation of Coremetrics data tags.
 *
 */


// 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]);
}



// Creates a Registration tag and/or a Newsletter tag
//
// customerID           : required for Registration. ID of Customer to register.
// customerEmail        : required for Newsletters. Optional for Registration.
// customerCity         : optional. City of Customer that placed this order
// customerState        : optional. State of Customer that placed this order
// customerZIP          : optional. Zipcode of Customer that placed this order
function cmCreateRegistrationTag(customerID, customerEmail, customerCity, customerState, customerZIP, newsletterName, subscribe, gender, customerCountry, attributes) {
        cmMakeTag(["tid","2","cd",customerID,"em",customerEmail,"ct",customerCity,"sa",customerState,"zp",customerZIP,"nl",newsletterName, "sd", subscribe, "gd", gender,"cy",customerCountry,"cmAttributes",attributes]);
}


