// JavaScript Document


//***************************************************/
//***************************************************/
// class Debug
//				.debugOn()
//				.debugOff()
//				.$('text à afficher');
//***************************************************/
//***************************************************/
function Debug()
{
	var _debugOn = false;
	/////////////// methhodes ///////////
	
	this.debugOn = function(){
		this._debugOn = true;
	};
	
	this.debugOff = function(){
		this._debugOn = false;
	};

	this.$ = function (txt){
		if (this._debugOn)
			debug_affiche(txt);	
		else return false;
		return true;
	};
	
	this.$$ = function (nom,txt){
		if (this._debugOn)
			debug_affiche(nom + ' > '+ txt);	
		else return false;
		return true;
	};
	
	this.each = function (obj){
		if (this._debugOn){
			debug_affiche( '----------------------------------- for each  ----  '+ obj );	
			for (i in obj){
				debug_affiche( '     ' + i + ' :> '+ obj[i] );	
			}
			debug_affiche( '----------------------------------  end each  ----  ');	
				
		}else return false;
		return true;
	};
	
}

//--------------------------------------------
// methode class Debug
function debug_affiche(txt){
	//******//
	try{
	//if (typeof(console.log())=="function")
	console.log('debug ---->: ' + txt);
	}catch(e){
		
	
	}
	
	//interface.debug_affiche(txt);
}

//*********************************************
//*********************************************