/*
 * cmcustom.js
 * $Id: cmcustom.txt 124371 2009-07-15 20:34:55Z etowb $
 * $Revision: 124371 $
 *
 * Version 4.1.0
 *
 * Coremetrics Tag v4.0, 8/7/2006
 * COPYRIGHT 1999-2011 COREMETRICS, INC. 
 * ALL RIGHTS RESERVED. U.S.PATENT PENDING
 *
 * The following functions aid in the creation of Coremetrics data tags.
 * Date			Imp. Eng.		Desc
 * 20110505		CRoberts		Initial release
 */


/*
 * 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 
 *
 * 
 */
function cmCreateProductviewTag(productID, productName, categoryID,attributes) {
	if (attributes){
		var cm_exAttr=new Array;
		cm_exAttr=attributes.split("-_-");
	}
	cmMakeTag(["tid","5","pi","PRODUCT: "+productName+" ("+productID+")","pr",productID,"pm",productName,"cg",categoryID,"pc","Y","cm_vc",cmExtractParameter("cm_vc",document.location.href),"cm_exAttr",cm_exAttr]);
}

function cmCreateRegistrationTag(customerID, customerEmail, customerCity,

    customerState, customerZIP, newsletterName, 

    subscribe, JdeShip, JdeBill, practiceType, 

    speciality, JdeDateBill, salesDiv, marketSeg, userAccDate, 

    JdeDateShip, attributes) {

    cmMakeTag(["tid","2","cd",customerID,"em",customerEmail,"ct",customerCity,"sa",customerState,"zp",customerZIP,"nl",newsletterName,"sd",subscribe,"rg1",salesDiv,"rg2",marketSeg,"rg3",userAccDate,"rg4",JdeDateShip,"rg11",JdeShip,"rg12",JdeBill,"rg13",practiceType,"rg14",speciality,"rg15",JdeDateBill,"cmAttributes",attributes]);

}


