var s_account = null;

var Statistics = new function(){
	
	var _a = null;
	
	this.GetAccount = function(){
		if (_a == null && s_account != null && s_account.length > 0) {
			_a = s_gi(s_account);
		}
		return _a;
	}
	
	this.DistributorFinderSearch = function(){
		var _s = Statistics.GetAccount();
		if (_s != null) {
			_s.linkTrackEvents = "event6";
			_s.events = "event6";
			_s.tl(true, "o", "Distributor Finder Search");
		}
	}
	
	this.OpenCart = function(){
		var _s = Statistics.GetAccount();
		if (_s != null) {
			_s.linkTrackEvents = "scOpen";
			_s.events = "scOpen";
			_s.tl(true, "o", "Open cart");
		}
	}
	
	this.AddToCart = function(articleNumber, quantity){
		var _s = Statistics.GetAccount();
		if (_s != null) {
			_s.linkTrackEvents = "scAdd,products";
			_s.events = "scAdd";
			_s.products = ";" + articleNumber + "," + quantity;
			_s.tl(true, "o", "Add to cart");
		}
	}
	
	this.RemoveFromCart = function(articleNumber, quantity){
		var _s = Statistics.GetAccount();
		if (_s != null) {
			_s.linkTrackEvents = "scRemove,products";
			_s.events = "scRemove";
			_s.products = ";" + articleNumber + "," + quantity;
			_s.tl(true, "o", "Remove from cart");
		}
	}
}
