/*
 * cmcustom.js
 * $Id: cmcustom.js 153071 2010-10-26 21:51:32Z stamkin$
 * $Revision: 153071 $
 *
 * Version 4.2.0
 *
 * Coremetrics Tag v4.0, 8/7/2006
 * COPYRIGHT 1999-2002 COREMETRICS, INC. 
 * ALL RIGHTS RESERVED. U.S.PATENT PENDING
 *
 * The following functions aid in the creation of Coremetrics data tags.
 * productview PC = Y, custom order parameter(priorityCode) and custom tag(cmCreateApplicationUsageTag)
 */







// 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]);
}





function cmCreateApplicationUsageTag(type, internalExternalFlag, field_2, field_3, field_4, field_5, field_6, field_7, field_8, field_9) {
	var cm=new _cm("tid", "7", "vn2", "e4.0"); 
	cm.li = type;
	cm.ps1 = internalExternalFlag;
	cm.ps2 = field_2;
	cm.ps3 = field_3;
	cm.ps4 = field_4;
	cm.ps5 = field_5;
	cm.ps6 = field_6;
	cm.ps7 = field_7;
	cm.ps8 = field_8;
	cm.ps9 = field_9;
	cm.writeImg();
}


