/* 
** RNAIK: created cmcustom.js for clientIDs: 90155156 and 90300399
*/
/*
 * 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, searchString, searchResults,attributes) {
	
	cmMakeTag(["tid","5","pi","PRODUCT: "+productName+" ("+productID+")","pr",productID,"pm",productName,"cg",categoryID,"se",searchString,"sr",searchResults,"pc","N","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
 * newsletterName	: required for Newsletters. The name of the Newsletter.
 * subscribe		: required for Newsletters. Either "Y" or "N"
 * country			: added customer country field
 * Customer Type	: added rg11 extra field "1"
 */
function cmCreateRegistrationTag(customerID, customerEmail, customerCity, customerState, customerZIP, newsletterName,subscribe, country, customerType, attributes) {
	
	cmMakeTag(["tid","2","cd",customerID,"em",customerEmail,"ct",customerCity,"sa",customerState,"zp",customerZIP,"nl",newsletterName,"sd",subscribe,"cy", country,"rg11",customerType,"cmAttributes",attributes]);
}
