function scriptDebugger() {
	this.init = function() {
		var d_d = new Date();
		var d_t = d_d.getTime();
		this.last_time = d_t;
	}
	
	this.getTime = function() {
		
		var d_d = new Date();
		var d_t = d_d.getTime();
		this.time = d_t - this.last_time;
		this.last_time = d_t;
	}
	
	this.isDev = function() {
		var theLoc = document.location.href;
		this.DEBUG = 0;
		if(theLoc.match("localhost")) {
			this.DEBUG = 1;
		}
		return(this.DEBUG);
	}
	
	this.log = function(theStr) {
		if(this.isDev()) {
			try {
				//this.getTime();
				//if(this.time > 20) {
					//theStr = this.time+"::"+theStr;
					console.log(theStr);
				//}
			}
			catch(e) {
			
			}
		}
	}
	this.dir = function(theStr) {
		if(this.isDev()) {
			try {
				console.dir(theStr);
			}
			catch(e) {
			
			}
		}
	}
	this.group = function(theStr) {
		if(this.isDev()) {
			try {
				console.group(theStr);
			}
			catch(e) {
			
			}
		}
	}
	this.groupEnd = function() {
		if(this.isDev()) {
			try {
				console.groupEnd();
			}
			catch(e) {
			
			}
		}
	}
}
debugObj = new scriptDebugger();
debugObj.init();