/*
 * DON'T REMOVE THE FOLLOWING LICENSE
 *           INFORMATION!
 * ----------------------------------
 * Copyright by
 * Dennis Ritz
 * Author: Dennis Ritz
 * dennis.ritz@gmx.net
 * 2007-2008
 * ----------------------------------
 */
var DEBUG_LEVEL = 0;

function Log() {
	this.notice = function notice(p_msg) {
		if(DEBUG_LEVEL == 1 && CMgr.getMODEL() != null){
			var arr = new Array('<input type="button" style="margin:5px;float:right;width:150px;" onclick="CMgr.getMODEL().abortRetrieveInput();" value="Weiter"><div class="debug" style="margin:5px;">'+p_msg.replace(/\\r\\n|\\"|\\'/g,"")+'</div>','');
			CMgr.getMODEL().getRetrieveInputCb(arr);
		}
	}
	
	this.warning = function warning(p_msg) {
		if(DEBUG_LEVEL == 2 && CMgr.getMODEL() != null){
			var arr = new Array('<input type="button" style="margin:5px;float:right;width:150px;" onclick="CMgr.getMODEL().abortRetrieveInput();" value="Weiter"><div class="debug" style="margin:5px;">'+p_msg.replace(/\\r\\n|\\"|\\'/g,"")+'</div>','');
			CMgr.getMODEL().getRetrieveInputCb(arr);
		}
	}
	
	this.error = function error(p_msg) {
		if(DEBUG_LEVEL == 3 && CMgr.getMODEL() != null){
			var arr = new Array('<input type="button" style="margin:5px;float:right;width:150px;" onclick="CMgr.getMODEL().abortRetrieveInput();" value="Weiter"><div class="debug" style="margin:5px;">'+p_msg.replace(/\\r\\n|\\"|\\'/g,"")+'</div>','');
			CMgr.getMODEL().getRetrieveInputCb(arr);
		}
	}
}

var Log = new Log();