function cmfAjaxEveryWhereV1HtmlToDom(html){};function cmfcFunction(){};cmfcFunction.callUserFunction=function(name,params){if(params){var paramsStr='';var comma='';for(i in params){paramsStr+=comma+'params["'+i+'"]';comma=','}}if(typeof(name)=='string'){var s=name+'('+paramsStr+')';var result=eval(s)}else if(typeof(name)=='array'||typeof(name)=='object'){var s='name[0].'+name[1]+'('+paramsStr+')';var result=eval(s)}return result};function cmfcUrl(){};cmfcUrl.parse=function(str){var o=cmfcUrl.parse.options,m=o.parser[o.strictMode?"strict":"loose"].exec(str),uri={},i=14;while(i--){uri[o.key[i]]=m[i]||""}uri[o.q.name]={};uri[o.key[12]].replace(o.q.parser,function($0,$1,$2){if($1){uri[o.q.name][$1]=$2}});return uri};cmfcUrl.parse.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};cmfcUrl.encode=function(str){var histogram={},histogram_r={},code=0,tmp_arr=[];var ret=str.toString();var replacer=function(search,replace,str){var tmp_arr=[];tmp_arr=str.split(search);return tmp_arr.join(replace)};histogram['!']='%21';histogram['%20']='+';ret=encodeURIComponent(ret);for(search in histogram){replace=histogram[search];ret=replacer(search,replace,ret)}return ret.replace(/(\%([a-z0-9]{2}))/g,function(full,m1,m2){return"%"+m2.toUpperCase()});return ret};function cmfcArray(){};cmfcArray.merge=function(){this.is_int=function(mixed_var){if(typeof mixed_var!=='number'){return false}if(parseFloat(mixed_var)!=parseInt(mixed_var,10)){return false}return true};var args=Array.prototype.slice.call(arguments);var retObj={},k,j=0,i=0;var retArr;for(i=0,retArr=true;i<args.length;i++){if(!(args[i]instanceof Array)){retArr=false;break}}if(retArr){return args}var ct=0;for(i=0,ct=0;i<args.length;i++){if(args[i]instanceof Array){for(j=0;j<args[i].length;j++){retObj[ct++]=args[i][j]}}else{for(k in args[i]){if(this.is_int(k)){retObj[ct++]=args[i][k]}else{retObj[k]=args[i][k]}}}}return retObj};cmfcArray.mergeRecursive=function(arr1,arr2){var idx='';if((arr1&&(arr1 instanceof Array))&&(arr2&&(arr2 instanceof Array))){for(idx in arr2){arr1.push(arr2[idx])}}else if((arr1&&(arr1 instanceof Object))&&(arr2&&(arr2 instanceof Object))){for(idx in arr2){if(idx in arr1){if(typeof arr1[idx]=='object'&&typeof arr2=='object'){arr1[idx]=cmfcArray.merge(arr1[idx],arr2[idx])}else{arr1[idx]=arr2[idx]}}else{arr1[idx]=arr2[idx]}}}return arr1};function cmfcString(){};cmfcString.replaceVariables=function(replacements,text){for(key in replacements){value=replacements[key];text=text.replace(key,value)}return text};function cmfcHtml(){};cmfcHtml.uniqueId=(function(){var CHARS='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');return function(len,radix){var chars=CHARS,uuid=[],rnd=Math.random;radix=radix||chars.length;if(len){for(var i=0;i<len;i++)uuid[i]=chars[0|rnd()*radix]}else{var r;uuid[8]=uuid[13]=uuid[18]=uuid[23]='-';uuid[14]='4';for(var i=0;i<36;i++){if(!uuid[i]){r=0|rnd()*16;uuid[i]=chars[(i==19)?(r&0x3)|0x8:r&0xf]}}}return uuid.join('')}})();function cmfcClassesCore(){this.messagesValue=new Array();this.message;this.raiseError=function(message,code,mode,options,userinfo,error_class,skipmsg){if(this.messagesValue[code]&&!message){message=this.messagesValue[code]}if(userinfo&&typeof(userinfo)!='string'&&message){var replacements=new Array();for(key in userinfo){value=userinfo[key];replacements['%'+key+'%']=value}message=cmfcString.replaceVariables(replacements,message)}if(!message){message=' No error message defined!! '}return message};this.prepare=function(){};this.prepareOnLoad=function(){}};var cmfImplementObservable;(function(){var cmfcObservable={observers:new Array(),addObserver:function(event,observer,parameters){if(!this.observers[event]){this.observers[event]=new Array()}this.observers[event].push(observer)},removeObserver:function(event,observer){if(this.observers[event]){for(i in this.observers[event]){var observer=this.observers[event][i];if(typeof(observer)!='function'){if(this.observers[event]==observer){this.observers[event].splice(i)}}}}},prependObserver:function(event,observer,parameters){if(!this.observers[event]){this.observers[event]=new Array()}this.observers[event].unshift(observer)},hasObserver:function(event){if(this.observers[event]){for(i in this.observers[event]){var observer=this.observers[event][i];if(typeof(observer)!='function'){return true}}}else{return false}},notifyObservers:function(event,params){if(this.observers[event])for(i in this.observers[event]){var observer=this.observers[event][i];if(typeof(observer)!='function'){cmfcFunction.callUserFunction(observer,{'obj':this,'event':event,'params':params})}}}};cmfImplementObservable=function(subject){for(var p in cmfcObservable){subject[p]=cmfcObservable[p]}}})();var cmfcCommandable;(function(){var cmfcCommandable={commandHandlers:new Array(),addCommandHandler:function(cmd,commandHandler,parameters){if(!this.commandHandlers[cmd]){this.commandHandlers[cmd]=new Array()}this.commandHandlers[cmd].push(commandHandler)},removeCommandHandler:function(cmd,commandHandler){if(this.commandHandlers[cmd]){for(i in this.commandHandlers[cmd]){var commandHandler=this.commandHandlers[cmd][i];if(typeof(commandHandler)!='function'){if(this.commandHandlers[cmd]==commandHandler){this.commandHandlers[cmd].splice(i)}}}}},prependCommandHandler:function(cmd,commandHandler,parameters){if(!this.commandHandlers[cmd]){this.commandHandlers[cmd]=new Array()}this.commandHandlers[cmd].unshift(commandHandler)},hasCommandHandler:function(cmd){if(this.commandHandlers[cmd]){for(i in this.commandHandlers[cmd]){var commandHandler=this.commandHandlers[cmd][i];if(typeof(commandHandler)!='function'){return true}}}else{return false}},runCommand:function(cmd,params){if(this.commandHandlers[cmd])for(i in this.commandHandlers[cmd]){var commandHandler=this.commandHandlers[cmd][i];if(typeof(commandHandler)!='function'){return cmfcFunction.callUserFunction(commandHandler,{'obj':this,'cmd':cmd,'params':params})}}},runCommands:function(cmd,params){}};cmfImplementCommandable=function(subject){for(var p in cmfcCommandable){subject[p]=cmfcCommandable[p]}}})();
