function gaTracker(){
	_uacct = "UA-2507899-1";
	this.gaTracker = urchinTracker;
	
	this.codes = new ArrayList();
	
	this.addGACode=function(codeID,codeValue){
		if (this.getCodeByID(codeID) == null){
			this.codes.add(new keyValuePair(codeID,codeValue));
			return this.codes.size()-1;
		} else {
			return -1;
		}
	}
	
	this.removeGACode=function(codeID){
		for ( i = 0; i < this.codes.size(); i++){
			if (codeID==this.codes.get(i).getKey()){
				return this.codes.removeAtIdx(i);
			}
		}
		return null;
	}
	
	this.setCodeValue=function(codeID,codeValue){
		for (var i = 0; i < this.codes.size(); i++){
			if (codeID==this.codes.get(i).getKey()){
				this.codes.get(i).setValue(codeValue);
				return true;
			}
		}
		return false;
	}

	this.fireGACode=function(codeID,addParams){
		var codeToFire = this.getCodeByID(codeID);
		if (codeToFire != null){
			if(addParams){
				this.gaTracker(codeToFire + addParams);
				//alert('Fired code: ' + codeToFire + addParams);
			} else {
				this.gaTracker(codeToFire);
				//alert('Fired code: ' + codeToFire);
			}
		} else {
			//alert("GATracker could not find/fire code: " + codeID);
		}
	}
	
	this.getCodeByID=function(codeID){
		for (var i = 0; i < this.codes.size(); i++){
			if (codeID==this.codes.get(i).getKey()){
				return this.codes.get(i).getValue();
			}
		}
		return null;
	}
}

function keyValuePair(key,value){
	this.myKey=key;
	this.myValue=value;
	
	this.getKey=function(){
		return this.myKey;
	}
	
	this.setKey=function(val){
		this.myKey = val;
	}
	
	this.getValue=function(){
		return this.myValue
	}
	
	this.setValue=function(val){
		this.myValue = val;
	}
}