// JavaScript Document

var G_CPTLIG_DEBUG = 0;


// DEBUG
function DBG_showInside(obj) {
	var ret= '';
	if (obj) {
		for (i in obj) {				
				if (obj[i]) {
					ret += '<br><b>'+String(i)+'</b>='+String(obj[i]);	
				} else {
					ret += '<br><b>'+String(i)+'</b>=null';		
				}
				
			
			
			
		}
	}
	return ret;
}

function DBG_alert(msg) {
	//var txt = $('zone_debug').get('text');
	//alert(txt);
	if (G_DEBUG) {
		
		$('zone_debug').set('html',$('zone_debug').innerHTML + "<br/>" +(G_CPTLIG_DEBUG++)+" : "+ msg);
		var scroll = $('zone_debug').getScrollSize();
		$('zone_debug').scrollTo(0,scroll.y);
	}
}


var DIVDBG;
function _debug(onoff) {
	
	G_DEBUG = onoff;
	
	if (onoff) {
		
		
		
		DIVDBG = new Element('div',{
			'class':'popDebug',
			'id':'contdebug'
		});
		
		
		var dbt = new Element('div',{
			'class':'popDebugSwitch',
			'html':'- DEBUG -',
			'id':'btdebug',
			'events':{
				'click':function() {
					//alert($('contdebug').getStyle('bottom'));
					if ($('contdebug').getStyle('bottom') == '0px') {
						$('contdebug').setStyle('bottom','-180px');
					} else {
						$('contdebug').setStyle('bottom','0px');
					}
				}
			}
		});
		
		var dtxt = new Element('div',{
			'class':'popDebugTxt',
			'html':'',
			'id':'zone_debug'
		});
		
		dbt.inject(DIVDBG);
		dtxt.inject(DIVDBG);
		DIVDBG.inject($(document.body));
		
		
	}



	
}



//G_COMBO_SEL_ID
