var User = Class.create();
User.prototype = {
	initialize : function(id) {
		this.id = id;
	}
};

var addClick;
			function addClick(EURL){                        
				var params = "EURL="+EURL;
			 	new Ajax.Request('/include/actions/add_click.asp', {parameters:params});	
				return true;
                    	};

var addView;
			function addView(TBL,PID,PTI,PGN,TYP){                        
				//this.TBL = TBL;
				//this.PID = PID;
				var params = "TBL="+TBL+"&PID="+PID+"&PTI="+PTI+"&PGN="+PGN+"&type="+TYP;
			 	new Ajax.Request('/include/actions/add_view.asp', {parameters:params});	
				return true;
                    	};

var LoggerLevels = { DEBUG : 0, INFO : 1, WARN : 2, FATAL : 3 };
var logger = {
	level : LoggerLevels.FATAL,
	console : 'console',
	debug : function(msg) {
		if (LoggerLevels.DEBUG >= this.level) {
			this.log("debug", msg);
		}
	},
	info : function(msg) {
		if (LoggerLevels.INFO >= this.level) {
			this.log("info", msg);
		}
	},
	warn : function(msg) {
		if (LoggerLevels.WARN >= this.level) {
			this.log("warn", msg);
		}
	},
	fatal : function(msg) {
		if (LoggerLevels.FATAL >= this.level) {
			this.log("fatal", msg);
		}
	},
	show : function() {
		Element.show($(this.console));
	},
	hide : function() {
		Element.hide($(this.console));
	},
	log : function(style, msg) {
		div = "<div class="+style+">"+msg+"<//div>";
		new Insertion.Top($(this.console), div);
	},
	report : function(msg) {
		// 1. try to submit via ajax
		//new Ajax.Request('debug.sv', {parameters:params});
		
		// 2. if this fails (use Try.these)...just popup an alert and ask them
		// to copy paste the report into an email client
	}
};


