
var funcFalse=new Function("return false");
var funcTrue=new Function("return true");
var nxConstUndefined="undefined";
var nxConstFunction="function";
function nxValid(variable)
{
return variable!=null&&typeof variable!=nxConstUndefined;
};
if(!Function.prototype.apply)
{
Function.prototype.apply=function(o,a)
{
var r;if(!o)o={};o.___apply=this;
switch((a&&a.length)||0)
{
case 0:r=o.___apply();break;
case 1:r=o.___apply(a[0]);break;
case 2:r=o.___apply(a[0],a[1]);break;
case 3:r=o.___apply(a[0],a[1],a[2]);break;
case 4:r=o.___apply(a[0],a[1],a[2],a[3]);break;
case 5:r=o.___apply(a[0],a[1],a[2],a[3],a[4]);break;
case 6:r=o.___apply(a[0],a[1],a[2],a[3],a[4],a[5]);break;
default:
for(var i=0,s="";i<a.length;i++)
{
if(i!=0)
{
s+=",";}
s+="a["+i+"]";};
r=eval("o.___apply("+s+")");
};
o.__apply=null;
return r;
};
};
if(!Function.prototype.call)
{
Function.prototype.call=function(o)
{
var args=new Array(arguments.length-1);
for(var i=1;i<arguments.length;i++)
args[i-1]=arguments[i];
return this.apply(o,args);
};
};
if(!nxValid(Array.prototype.pop))
{Array.prototype.pop=function()
{
var l;
if(this.length>0)
{
l=this[this.length-1];this.length--;};
return l;
};
};
if(!nxValid(Array.prototype.push))
{
Array.prototype.push=function()
{
var c=this.length;
for(var i=0;i<arguments.length;i++)
this[c+i]=arguments[i];
return this.length;
};
};
if(!nxValid(Array.prototype.shift))
{Array.prototype.shift=function()
{var f=this[0];
for(var i=0;i<this.length-1;i++)
this[i]=this[i+1];
this.length--;
return f;
};
};
if(!nxValid(Array.prototype.unshift))
{Array.prototype.unshift=function(t)
{
for(i=this.length-1 ;i>=0;i--)
this[i+1]=this[i];
this[0]=t;
return this.length;
};
};
Array.prototype.indexOf=function(v)
{
for(var i=0;i<this.length;i++)

if(this[i]==v)return i;
return-1;};
Array.prototype.contains=function(v)
{
return this.indexOf(v)!=-1;
};
function nxHash(){this._data={};
};
nxHash.prototype.get=function(key)
{
try

{
return this._data[key];}
catch(ex)
{
alert("Error while getting:"+key+":"+ex);
};
};
nxHash.prototype.evalGet=function(key,func,p1,p2,p3,p4,p5)
{
if(this.contains(key))
{
return this.get(key);
};
return this.set(key,func(p1,p2,p3,p4,p5));
};
nxHash.prototype.set=function(key,value)
{
try
{
return this._data[key.toString()]=value;
}
catch(ex)
{
alert("Error while getting:"+key+"="+value+":"+ex);
};
};
nxHash.prototype.trySet=function(key,value)
{
if(this.contains(key))
{
return false;
};
this.set(key,value);
};
nxHash.prototype.del=function(key)
{
try
{
delete this._data[key];
}
catch(ex)
{
alert("Error while deleting:"+key+":"+ex);
};
};
nxHash.prototype.contains=function(key)
{
try
{
return typeof this._data[key]!=nxConstUndefined;
}
catch(ex)
{
alert("Cannot execute contains for key:"+key+":"+ex);
};
return false;
};
nxHash.prototype.keyList=function()
{
var a=[];
try

{
for(var key in this._data)
{
a.push(key);
};
}

catch(ex)
{
alert("Error while building key-list:"+ex);
};
return a;
};
var __settings__={data:{},set:function(object,key,value)
{
if(!nxValid(this.data[object]))

this.data[object]=new nxHash();
return this.data[object].set(key,value);
},trySet:function(object,key,value)
{
if(!nxValid(this.data[object]))
this.data[object]=new nxHash();
return this.data[object].trySet(key,value);},get:function(object,key)
{
if(!nxValid(this.data[object]))return;
return this.data[object].get(key);
},tryInit:function(object,config)
{
if(!nxValid(this.data[object]))
return;
var a=this.data[object].keyList();
for(var i=0;i<a.length;i++)
{config.trySet(a[i],this.data[object].get(a[i]));
};
}

};
var __core__={loaded:[],deps:[],info:[],prefix:"../src",undef:"undefined",htc:"htc",start:new Date().getTime(),devel:true,debug:true,debugjump:false,msgcount:0,lastmsg:new Date().getTime(),console:document.getElementById("nxDbg")!=null?document.getElementById("nxDbg"):document.body?document.body:document.createElement("div"),objects:["object","node","layer","formElement","select","checkbox","radio","radioGroup","button","toggle","intelliForm","selectable","selectableGroup","window","scroll","toolButton","toolBarButton","menu","menuButton","toolBar","form","inputField","thumbBrowser","splitPane","dragDropNode","tree"],childs:["hint","help","hover"],omitInit:["menu","menuButton"],setPrefix:function(path){this.prefix=path;},setBehavior:
function(node,name)
{
node.style.behavior="url("+this.prefix+"/"+this.htc+"/"+name+".htc)";},normalize:function(s,t)
{
if(typeof s==t)
{
return s;
}

else if(typeof s=="string")
{
if(s=="false")
return t=="number"?1:false;
else if(s=="true")
return t=="number"?0:true;
else if(t=="object"&&typeof s.split=="function")
return s.split(",");
else if(!isNaN(parseInt(s)))
return parseInt(s);}

else if(typeof s=="number"){if(t=="string")
return s.toString();
else if(t=="boolean")
return t==0;}
else if(typeof s=="object")
{
if(t=="string"&&s.length>0&&typeof s.join=="function")
return s.join(" ");
}

else if(typeof s=="boolean")
{
if(t=="string")
return s?"true":"false";};
return s;
},msg:function(txt,classname){if(!__core__.debug)
return;
if(this.lastmsg!=null&&(new Date().getTime()-this.lastmsg)>30){};
this.lastmsg=new Date().getTime();
var msg=txt+"["+(new Date().getTime()-this.start)+"]";
if(document.getElementById("nxDbg")!=null&&this.console!=document.getElementById("nxDbg"))
this.console=document.getElementById("nxDbg");
if(msg.indexOf(":")!=-1)
{
var pre=msg.substring(0,msg.indexOf(":"));
var text=msg.substring(msg.indexOf(":")+1,msg.length);
var pret=document.createElement("strong");
if(typeof classname=="string")
pret.className=classname;pret.appendChild(document.createTextNode(pre));
this.console.appendChild(pret);
this.console.appendChild(document.createTextNode(text));
this.console.appendChild(document.createElement("br"));
}

else
{
this.console.appendChild(document.createTextNode(msg));
this.console.appendChild(document.createElement("br"));
};
if(__core__.debugjump)
{
var ank=document.createElement("a");ank.name="ank_"+this.msgcount++;this.console.appendChild(ank);
window.location.hash=ank.name;
};
},split:function()
{
this.console.appendChild(document.createElement("hr"));
},error:function(txt)
{
this.msg(txt,"error");
},dev:function(txt)
{this.msg(txt,"devel");
},finishMsg:function()
{
if(__core__.devel==false)
return;
},key:function()
{
return Math.round(Math.random()*1000000);
},require:function(id)
{
if(!document.getElementById||!document.getElementsByTagName||!document.createElement)
return false;
for(var i=0;i<this.loaded.length;i++)

if(this.loaded[i]==id)
return true;
return this.loadFile(id);
},requireDeps:function(id)
{
if(typeof this.deps[id]!="object")return;
for(var i=0;i<this.deps[id].length;i++)
this.require(this.deps[id][i]);
},conf:function()
{
var a=[];
a.init(arguments);
return a;
},check:function()
{
for(var i=0,a=arguments,l=a.length;i<l;i++)

if(a[i]==null||typeof a[i]==__core__.undef)
return false;
return true;
},loadFile:function(id)
{
return;
var fileext=this.devel?".js.in":".js";
this.requireDeps(id);this.loaded[this.loaded.length]=id;
return document.write("<script type='text/javascript' src='"+this.prefix+"/"+id+fileext+"'></script>");
},fixPNG:function()
{
if(/MSIE(5\.5)|[6789]/.test(navigator.userAgent)&&navigator.platform=="Win32")
document.write("<style type='text/css'>img{behavior:url('"+this.prefix+"/htc/png.htc')}</style>");
},clearBehaviors:function()
{
try
{
var a=document.getElementsByTagName("*");
for(var i=0;i<a.length;i++)
{
a[i].style.behavior="";
};
}
catch(ex){};
}

};
with(__core__)
{
deps["client/basic"]=[];
deps["client/platform"]=["client/basic","extend/string"];
deps["client/system"]=["client/platform"];
deps["client/language"]=["client/basic","extend/string"];
deps["client/engine"]=["client/basic","client/platform"];
deps["client/browser"]=["client/engine","client/platform"];
deps["client/plugins"]=["client/engine"];
deps["core/event"]=["client/engine","extend/window"];
deps["core/registry"]=["core/node","extend/string"];
deps["core/scan"]=["core/registry","client/engine","extend/array","core/node"];
deps["core/depend"]=[];
deps["core/node"]=["client/engine"];
deps["core/image"]=["extend/array","core/node"];
deps["widgets/object"]=["core/cookie","core/depend"];
deps["widgets/node"]=["widgets/object","core/event"];
deps["widgets/intelliform"]=["widgets/object","client/engine"];
deps["widgets/layer"]=["widgets/node","client/browser"];
deps["widgets/formelement"]=["widgets/node"];
deps["widgets/select"]=["widgets/formelement"];
deps["widgets/checkbox"]=["widgets/formelement"];
deps["widgets/radiogroup"]=["widgets/object"];
deps["widgets/radio"]=["widgets/formelement","widgets/radiogroup"];
deps["widgets/button"]=["widgets/formelement","core/image"];
deps["widgets/toggle"]=["widgets/button"];
deps["widgets/selectable"]=["widgets/node"];
deps["widgets/selectablegroup"]=["widgets/node"];
deps["widgets/hover"]=["core/image","core/event"];
deps["widgets/hint"]=["core/event","widgets/layer","extend/window"];
deps["widgets/window"]=["widgets/layer","core/event","widgets/node","widgets/scroll"];
deps["widgets/scroll"]=["core/event","widgets/node"];
deps["widgets/help"]=["widgets/window","core/event","extend/window"];
deps["widgets/toolbar"]=["widgets/node"];
deps["widgets/toolbutton"]=["widgets/button","widgets/hint"];
deps["widgets/toolbarbutton"]=["widgets/toolbutton","widgets/toolbar","client/engine","client/platform"];
deps["widgets/menu"]=["widgets/layer"];
deps["widgets/menubutton"]=["widgets/toolbutton"];
deps["widgets/inputfield"]=["widgets/formelement","core/validate"];
deps["widgets/thumbbrowser"]=["widgets/node"];
deps["widgets/splitpane"]=["widgets/node"];
deps["widgets/dragdropnode"]=["widgets/node","widgets/layer","core/dragdrop"];
deps["widgets/tree"]=["widgets/node","widgets/dragdropnode"];
};
if(document.all&&!window.opera)
{
window.attachEvent("onunload",function()
{
__core__.clearBehaviors();
}
);
};

__core__.devel=false; __core__.debug=false; __core__.setPrefix("/common/script/nxlib");
