// JavaScript Document
function AdTracker(id, special) {
	this._id = id;
	this._special = special;
	
	this._functionsURL = 'games/ads.php';
	this._sep = "==LOH==";
}
		
AdTracker.prototype.saveClick = function(ad_id) {
	var me = this;
	if (me._id != '') {
		var callback = function(xml){ 
			//alert(xml);
			if (parseInt(xml) != -1) {
				var points = parseInt($('#main_karma_points').html());
				$('#main_karma_points').html(points+5);
			}
			//me.handleResponse(xml, content);
		};
		var query = {
			ad_id : ad_id,
			type : 1,
			id : me._id, 
			special : me._special
		};
		var ajax = new Ajax(me._functionsURL,query,callback);
		ajax.send();
	}
};
