if (typeof(eProductPanelObject) == 'undefined') 
{
    eProductPanelObject = function(objectName, ajaxEventUID)
    {
    	this.attrChoice      = new eAttrChoiceObject(objectName + '__ajaxEventUID', ajaxEventUID);  
    	this.wishlistManager = new eWishlistManagerObject(objectName + '__ajaxEventUID', ajaxEventUID);  
    }
}
eProductPanelObject.prototype.addToCart = function(productId, quantity, productName)
{
	
	var reg = /^[0-9]*$/;
	if (!reg.test(quantity) || (quantity <= 0))
	{
	    alert('Please enter a valid quantity!');
	    return;
	}
	if(typeof(pageTracker) != 'undefined')
	{
		pageTracker._trackEvent('Products', 'Add To Cart', productName,quantity);
	}

	jQuery('#qty'+productId).val('');
	this.attrChoice.setProductID(productId);
	this.attrChoice.setQuantity(quantity);
	this.attrChoice.getAttributes();
}