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

function cmCreatePropertyviewTag(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]);
}

function cmCreateShopAction5Tag(productID, productName, productQuantity, productPrice, categoryID, currency, attributes, extraFields) {
  if ((typeof(cm_currencyCode) == "undefined") || (!cm_currencyCode)) {
    cm_currencyCode = "";
  }
    productPrice = productPrice.toString().replace(cmPricePattern, "");
  productID = productID.toString().replace(cmSpacePattern, "");
  var hashValue = "" + (attributes ? attributes + "|||" : "") + (extraFields ? "extra" + extraFields : "");
  cmAddShop(["pr",productID,"pm",productName,"qt",productQuantity,"bp",productPrice,"cg",categoryID,"cc",currency,"cmAttributes",attributes,"cmExtraFields",extraFields,"ha1",cm_hex_sha1(hashValue),"at","5","tid","4","pc","N"]);
}

function cmCreateShopAction9Tag(productID, productName, productQuantity, productPrice, customerID, orderID, orderTotal, categoryID, currency, attributes, extraFields) {
  if ((typeof(cm_currencyCode) == "undefined") || (!cm_currencyCode)) {
    cm_currencyCode = "";
  }
    productPrice = productPrice.toString().replace(cmPricePattern, "");
  orderTotal = orderTotal.toString().replace(cmPricePattern, "");
  productID = productID.toString().replace(cmSpacePattern, "");
  var hashValue = "" + (attributes ? attributes + "|||" : "") + (extraFields ? "extra" + extraFields : "");
  cmAddShop(["pr",productID,"pm",productName,"qt",productQuantity,"bp",productPrice,"cg",categoryID,"cc",currency,"cmAttributes",attributes,"cmExtraFields",extraFields,"ha1",cm_hex_sha1(hashValue),"cd",customerID,"on",orderID,"tr",orderTotal,"at","9","tid","4","pc","N"]);
}

function cmCreateOrderTag(orderID,orderTotal,orderShipping,customerID,customerCity,customerState,customerZIP,currency,attributes,extraFields) {
  if ((typeof(cm_currencyCode) == "undefined") || (!cm_currencyCode)) {
    cm_currencyCode = "";
  }
    orderShipping = orderShipping.toString().replace(cmPricePattern, "");
  orderTotal = orderTotal.toString().replace(cmPricePattern, "");  
  cmMakeTag(["tid","3","osk",cmCalcSKUString(),"on",orderID,"tr",orderTotal,"sg",orderShipping,"cd",customerID,"ct",customerCity,"sa",customerState,"zp",customerZIP,"cc",currency,"cmAttributes",attributes,"cmExtraFields",extraFields]);
}

function cmCreateRegistrationTag(customerID, customerEmail, customerCountry, customerCity, customerState, customerZIP, newsletterName, subscribe, MemberType, attributes) {
  cmMakeTag(["tid","2","cd",customerID,"em",customerEmail,"cy",customerCountry,"ct",customerCity,"sa",customerState,"zp",customerZIP,"nl",newsletterName,"sd",subscribe,"rg11",MemberType,"cmAttributes",attributes]);
}
