/* Developer notes:
	* The name of this file is subject to change at any time.
	* Any javascript placed in this library should be sensitive to caching. Ecommerce etc..
	* This file should not be inserted manually into docuements.
*/

// CART REDIRECT
var strAddCartStatus = "Add to cart";
function doAddCartItems() {
	var arg = doAddCartItems.arguments;
	var argNum = arg.length;
	var strURL = arg[0];		// event
	var intIndex = 1;			// offering index
	for(i=2;i<argNum;i+=3) {	// cart items constructor
		strURL += "&offering." + intIndex + "=" + arg[i];							 // offering
		arg[i+1] != "" ? strURL += "&quantity." + intIndex + "=" + arg[i+1] : false; // quantity
		arg[i+2] != "" ? strURL += "&grouping." + intIndex + "=" + arg[i+2] : false; // grouping
		intIndex++;
	}
	arg[1] != "" ? strURL += "&product=" + arg[1] : false;	// product page param
	window.location = strURL;	// add items
	return false;
}