// set message in the the editor waiting popup
	function setMessage(_msg, _title){
		//LDF("setMessage");
		//LOGDEBUG(_msg);
		if (document){
			if (_msg) {
				var el = document.getElementById('loadingUserMsg');
				if (el) el.innerHTML="Loading: "+_msg;
			}
			if (_title) {
				var elTitle = document.getElementById('loadingUserMsgMain');
				if (elTitle) elTitle.innerHTML=_title;
			}
		}
		//LDB("setMessage");
	}
	/*
	 * 	Test if a fct or object is defined and not null
	 */
	function isValid(_var)
	{
		if (!_var) {
			// better to send an exception than just log the error (LOGERROR) as it could loop if there is a problem in the debug page
			throw new GeneralException("isValid _var not defined");
			return false;
		}
		var typeVar = typeof( _var );
		/* DOESN'T WORK IN IE6
		if ( type != "string") {
			alert("isValid _var not string var["+_var+"] type["+type+"]");
			LOGERROR("isValid _var not string var["+_var+"] type["+type+"]");
			return false;}
		*/
		try {
			var varSplit = _var.split(".");
			//LOGDEBUG("varSplit:"+varSplit);
			var currentObject = window;
			for (var i=0;i<varSplit.length;i++) {
				//LOGDEBUG("currentObject:"+currentObject);
				///LOGDEBUG("varSplit[i]:"+varSplit[i]);
				var type = typeof( currentObject[varSplit[i]] );
				//LOGDEBUG("type:"+type);
				if ( type =="undefined") {
					//alert("type ==\"undefined\" var["+_var+"]");
					return false;}
				if ( type =="unknown") {
					//alert("type ==\"unknown\" var["+_var+"]");
					return false;}
				if ( type =="null") {
					//alert("type ==\"null\" var["+_var+"]");
					return false;}
				currentObject = currentObject[varSplit[i]];
				if (currentObject == null)  {
					//alert("currentObject == null var["+_var+"]");
					return false;}
				//LOGDEBUG("currentObject:"+currentObject);
			}
			return true;
		}
		catch (e) {// better to send an exception than just log the error (LOGERROR) as it could loop if there is a problem in the debug page
			throw new GeneralException("isValid exception e["+e+"]");
			return false;
		}
	}