String.prototype.contains=function()
{
for(var i=0;i<arguments.length;i++)
if(this.indexOf(arguments[i])!=-1)return true;
return false;
};
String.prototype.trimRight=function(){var r=/^([\w\W]*)(\b\s*)$/;if(r.test(this))
return this.replace(r,"$1");else return r;};
String.prototype.trimLeft=function(){var r=/^(\s*)(\b[\w\W]*)$/;if(r.test(this))
return this.replace(r,"$2");else return r;};
String.prototype.trimAll=function(){var r=/^(\s*)$/;var s=this;if(r.test(s)){s=s.replace(r,'');if(s.length==0)return s;};r=/^(\s*)([\W\w]*)(\b\s*$)/;if(r.test(s)){s=s.replace(r,'$2');};return s;};
String.prototype.cleanSpace=function(){return this.replace(/\s/g,"");};
String.prototype.addElement=function(value)
{
if(this=="")
return value;var a=this.split(" ");
if(a.contains(value))
return String(this);a.push(value);return a.join(" ");
};
String.prototype.removeElement=function(value)
{
if(this=="")
return "";
var a=this.split(" ");
if(!a.contains(value))
return String(this);
var b=[];
for(var i=0;i<a.length;i++)
if(a[i]!=value)
b.push(a[i]);
return b.join(" ");
};
String.prototype.toFirstUp=function()
{
return this.charAt(0).toUpperCase()+this.substring(1,this.length);
};
String.prototype.basename=function()
{
var v=this.lastIndexOf("/");
return v==-1?this:this.substring(v+1,this.length);
};
Array.prototype.init=function()
{
var a=arguments.length==1?arguments[0]:arguments;
for(var i=0;i<a.length;i+=2)
{
this[a[i]]=a[i+1];
};
};
Array.prototype.merge=function(data,mergehasprio)
{
for(var prop in data)
if(data[prop]!=this[prop]&&(mergehasprio||typeof this[prop]=="undefined"||this[prop]==null))
this[prop]=data[prop];
};
Array.prototype.combine=function(data)
{
for(var i=0;i<data.length;i++)
this[this.length]=data[i];
};
Array.prototype.clear=function()
{
while(this.length>0)this.pop();
};
Array.prototype.mapKeys=function()
{
var c=new Array();
for(var i=0;i<this.length;i++)
{
var p=this[i].split(":");
if(typeof p[0]!="undefined")c[p[0]]=p[1];
};
return c;
};
Array.prototype.unmapKeys=function()
{
var c=new Array();
var i=0;
for(attr in this)
{var t=typeof this[attr];
if(t!="string"&&t!="number"&&t!="boolean")continue;
c[i]=attr+":"+this[attr];
i++;
};
return c;
};
Array.prototype.removeAll=function(value)
{
var j=0;
for(var i=0;i<this.length;i++)
{
if(this[i]!=value)
{
if(j!=i)this[j]=this[i];
j++;
};
};
for(var i=j;i<this.length;i++)
{
this.pop();
};
};

window.getScroll=function(what)
{
var i=what.toLowerCase();
var j=i.substring(0,1).toUpperCase()+i.substring(1,i.length);
var k=i=="left"?"X":"Y";
if(document.documentElement&&document.documentElement.scrollTop)
return(eval("document.documentElement.scroll"+j));
else if(document.body&&document.body.scrollTop)
return(eval("document.body.scroll"+j));
else if(window.pageYOffset)
return(eval("window.page"+k+"Offset"));
else if(window.scrollY)
return(eval("window.scroll"+k));
return 0;
};

window.getScrollLeft=function()
{
return window.getScroll("left");
};

window.getScrollTop=function()
{
return window.getScroll("top");
};

window.getViewport=function(what)
{
var i=what.toLowerCase();
var j=i.substring(0,1).toUpperCase()+i.substring(1,i.length);
if(document.width)
return(eval("document."+i));
else if(document.documentElement&&document.documentElement.clientHeight)
return(eval("document.documentElement.client"+j));
else if(document.body&&document.body.clientHeight)
return(eval("document.body.client"+j));
else if(window.innerWidth)
return(eval("window.inner"+j));
return 0;
};

window.getViewportWidth=function()
{
return window.getViewport("width");
};

window.getViewportHeight=function()
{
return window.getViewport("height");
};
if(!nxValid(window.getSelection))
{

window.getSelection=function()
{
return document.selection?document.selection.createRange().text:"";
};
};

var __client__={cache:new nxHash(),evalProp:function(prop){var v=eval("navigator."+prop);
return(v==null||typeof v=="undefined")?"":v.toLowerCase();
},getUserAgentString:function(){return this.cache.evalGet("userAgentString",__client__.evalProp,"userAgent");
},getPlatformString:function(){return this.cache.evalGet("platformString",__client__.evalProp,"platform");
},getProductString:function(){return this.cache.evalGet("productString",__client__.evalProp,"product");
},getProductSubString:function(){return this.cache.evalGet("productSubString",__client__.evalProp,"productSub");
},getVendorString:function(){return this.cache.evalGet("vendorString",__client__.evalProp,"vendor");
},getVendorSubString:function(){return this.cache.evalGet("vendorSubString",__client__.evalProp,"vendorSub");
},getAppVersionString:function()
{
return this.cache.evalGet("appVersionString",__client__.evalProp,"appVersion");
},getAppMinorVersionString:function()
{
return this.cache.evalGet("appMinorVersionString",__client__.evalProp,"appMinorVersion");
},getLanguageString:function()
{
return this.cache.evalGet("language",__client__.evalProp,"language");},getSystemLanguageString:function()
{
return this.cache.evalGet("systemLanguage",__client__.evalProp,"systemLanguage");
}
};

__client__.evalPlatform=function()
{
var p=__client__.getPlatformString();
return p.contains("win")?"win":p.contains("mac")?"mac":p.contains("linux")?"linux":p.contains("bsd")?"bsd":"";};

__client__.getPlatform=function()
{
return this.cache.evalGet("platform",__client__.evalPlatform);
};

__client__.evalEngine=function()
{
var a=__client__.getUserAgentString();
var v=__client__.getVendorString();
var p=__client__.getProductString();
var l=__client__.getPlatform();
var e="";
if(v&&(v=="kde"||(v.contains("apple computer")&&a.contains("khtml"))))e="khtml";
else if(window.opera)e="opera";
else if(p=="gecko")e="gecko";
else if(document.all&&(l=="win"||l=="mac"))e="mshtml";
else if(document.layers)e="netscape";
return e;
};

__client__.evalMode=function()
{
return !nxValid(document.compatMode)?"quirks":document.compatMode=="CSS1Compat"?"standard":"quirks";
};

__client__.getEngine=function()
{
return this.cache.evalGet("engine",__client__.evalEngine);
};

__client__.getMode=function()
{
return this.cache.evalGet("mode",__client__.evalMode);
};

__client__.evalBoxModel=function()
{
var e=__client__.getEngine();
if(e!="mshtml"&&e!="opera")
return "content-box";
else return __client__.getMode()=="quirks"?"border-box":"content-box";
};

__client__.getBoxModel=function()
{
return this.cache.evalGet("boxmodel",__client__.evalBoxModel);
};

__client__.evalSystem=function()
{
var v=__client__.getPlatform();
var a=__client__.getUserAgentString();
var o="unknown";
switch(v)
{
case "win":
if(a.contains("windows 95","win95","win 95"))o="win95";
else if(a.contains("windows 98","win98","win 98"))o="win98";
else if(a.contains("windows me","winme","win me","win 9x 4.90"))o="winme";
else if(a.contains("windows nt 5.0","windows 2000"))o="win2k";
else if(a.contains("windows nt 5.1","windows xp"))o="winxp";
else if(a.contains("windows nt 5.2","windows 2003"))o="win2003";
return o;
case "mac":
if(a.contains("os x","os 10","msie 5.2"))o="os x";
else if(a.contains("powerpc","power pc"))o="power pc";
else if(a.contains("68k"))o="68k";
return o;
};
return v;
};

__client__.getSystem=function()
{
return this.cache.evalGet("system",__client__.evalSystem);
};

__client__.evalBrowserDetail_gecko=function()
{
var u=__client__.getUserAgentString();
var v=__client__.getVendorString();
var w=__client__.getVendorSubString();
var t=u.indexOf("rv:");
var ev=t!=-1?u.substring(t+3,t+6):"unknown";
var ed=__client__.getProductSubString();
var es=v!=""?v:"mozilla";var et=w!=""?w:ed;
return["Mozilla",ev,es,et,ed];
};

__client__.evalBrowserDetail_mshtml=function()
{
var a=__client__.getUserAgentString();
var t=a.indexOf("msie ");
var ev=a.substring(t+5,t+8);
var et="release";
var ed="";
try
{
t=__client__.getAppMinorVersionString().split(";");
for(var i=0;i<t.length;i++){if(t[i].contains("sp"))
{
et=t[i];
break;
};
};
}
catch(ex){};
return["Internet Explorer",ev,"Internet Explorer",et,ed];
};

__client__.evalBrowserDetail_opera=function()
{
var t=navigator.userAgent.toLowerCase();
var ev=t.substring(t.indexOf("opera")+6,t.length);t=ev.indexOf(" ");
if(t!=-1)
{
ev=ev.substring(0,t);
};
t=ev.indexOf(".");
t=ev.substring(0,t);
return["Opera",ev,"Opera","",""];
};

__client__.evalBrowserDetail_khtml=function()
{
var a=__client__.getUserAgentString();
if(a.contains("konqueror"))
{
et="Konqueror";t=a.indexOf("konqueror");
ev=a.substring(t+10,t+13);
}
else if(a.contains("apple"))
{
et="Safari";
t=a.indexOf("safari");
ev=a.substring(t+7,t+8)+"."+a.substring(t+8,t+9);
};
return[et,ev,et,ev,""];
};

__client__.evalBrowser=function()
{
var e=__client__.getEngine();
var f=eval("__client__.evalBrowserDetail_"+e);
return typeof f=="function"?f():[];
};

__client__.getBrowser=function()
{
return this.cache.evalGet("browser",__client__.evalBrowser)[0];
};

__client__.getBrowserVersion=function()
{
return this.cache.evalGet("browser",__client__.evalBrowser)[1];
};

__client__.getBrowserMajorVersion=function()
{
return this.cache.evalGet("browser",__client__.evalBrowser)[1].charAt(0);
};

__client__.getBrowserMinorVersion=function()
{
return this.cache.evalGet("browser",__client__.evalBrowser)[1].charAt(2);
};

__client__.getProductName=function()
{
return this.cache.evalGet("browser",__client__.evalBrowser)[2];
};

__client__.getProductVersion=function()
{
return this.cache.evalGet("browser",__client__.evalBrowser)[3];
};

__client__.getProductDate=function()
{
return this.cache.evalGet("browser",__client__.evalBrowser)[4];
};

__client__.evalActivexTest=function(classId)
{
result=false;
document.write('<script language=vbscript\>\n on error resume next \n result=IsObject(CreateObject("'+classId+'"))\n</script\>\n');
return result;
};

__client__.evalFlashDetail_activex=function(m)
{
for(var i=m;i>0;i--)
if(__client__.evalActivexTest("ShockwaveFlash.ShockwaveFlash."+i))
return i;
return 0;
};

__client__.evalFlashDetail_plugin=function(m)
{
var o=navigator.plugins["Shockwave Flash"];
if(typeof o!="object")return 0;
for(var i=m;i>0;i--)
if(o.description.indexOf(i+".")!=-1)
return i;
return 0;
};

__client__.evalFlash=function()
{
var e=__client__.getEngine()=="mshtml"?"activex":"plugin";
var f=eval("__client__.evalFlashDetail_"+e);
return typeof f=="function"?f(7):0;
};

__client__.getFlash=function()
{
return this.cache.evalGet("flash",__client__.evalFlash)==0?false:true;
};

__client__.getFlashVersion=function()
{
return this.cache.evalGet("flash",__client__.evalFlash);
};

nxRegistryData=[];
var __registry__={autoid:0,data:[],add:function(data)
{
if(!document.getElementById||!document.getElementsByTagName||!document.createElement)
return false;
try
{
data=this.add_normalize(data);
}
catch(e)
{
__core__.error("Registry:There was an error in the param normalization:"+e);
return false;
};
try
{__settings__.tryInit("nx"+data.config.get("type").toFirstUp(),data.config);
}
catch(e)
{
__core__.error("Registry:Failed to import global Settings:"+e);
return false;
};
var pos=nxRegistryData.length;
for(var i=0;i<pos;i++){if(nxRegistryData[i].id==data.id)
{
return false;
};
};
data.init=0;var pos=nxRegistryData.length;nxRegistryData[pos]=data;
try
{
this.add_depend(data.config);
}
catch(e)
{
return __core__.error("Registry:There was an error while parsing depend flags:"+e);
};
data.status="precreate";
try{this.add_create(data);
}
catch(e)
{
return __core__.error("Registry:There was an error while creating/adding the object:"+e);
};
if(nxValid(data.object))
{
data.status="preinit";
data.object.initDone=false;
if(typeof data.object.preInit=="function")data.object.preInit(data);
if(__core__.omitInit.contains
(
data.config.get("type")))
{
this.runSubstituteInit(data);
}
else
{
this.runInit(data);
};
};
data.status="complete";
return data.object;},addNode:function(node)
{
if(!document.getElementById||!document.getElementsByTagName||!document.createElement)return false;
for(var i=0;i<nxRegistryData.length;i++)
if(nxRegistryData[i]["node"]==node)return false;
var data={};
data.node=node;
return this.add(data);
},addId:function(id)
{
if(!document.getElementById||!document.getElementsByTagName||!document.createElement)return false;
for(var i=0;i<nxRegistryData.length;i++)
if(nxRegistryData[i]["id"]==id)return false;
return this.addNode(document.getElementById(id));
},runSubstituteInit:function(data)
{
if(typeof data.object.substituteInit=="function")data.object.substituteInit(data);
},runInit:function(data)
{
data.object.initDone=true;
if(typeof data.object.objectInit=="function") data.object.objectInit(data);
if(typeof data.object.postInit=="function") data.object.postInit(data);
if(typeof data.object.getNode=="function") data.object.getNode().regid=data.config.get("id");
},checkInit:function(id)
{
var data=this.getData(id);
if(!nxValid(data))
__core__.error("Registry:Malformed data to checkInit");
if(!data.object.initDone){this.runInit(data);
}
else {};
},add_create:function(data)
{
var config=data.config;
var type=config.get("type");
if(__core__.objects.contains(type))data.object=eval("new nx"+type.toFirstUp()+"()");
else if(__core__.childs.contains(type))eval("nx"+type.toFirstUp()+".add(data.config,data.node)");
else throw("Missing object type:'"+type+"'");
},add_normalize:function(data)
{
if(data.node==null||typeof data.node=="undefined")
{
if(data.id!=null&&typeof data.id=="string")
{
data.node=document.getElementById(data.id);
};
};
if(typeof data.node=="undefined"){}
else if(typeof data.config=="undefined")
{
data.config=__node__.readConfig(data.node);
};
if(typeof data.config!="object")
throw("Config data missing");
if(typeof data.id!="string"||data.id=="")
{
if(data.config.get("id")!=null&&data.config.get("id")!="")
{
data.id=data.config.get("id");
}
else if(data.node!=null&&data.node!="undefined"&&data.node.getAttribute("id")!=null&&data.node.getAttribute("id")!="")
{
data.id=data.node.getAttribute("id");
}
else {data.id="auto_"+this.autoid++;};
};
if(typeof data.id!="string"||data.id=="")
throw("ID is missing");
if(data.node)
{
data.node.regid=data.id;
};
if(!nxValid(data.type))
{
data.type=data.config.get("type");
}
else if(!nxValid(data.config.get("type")))
{
data.config.set("type",data.type);
};
if(typeof data.type=="undefined")
throw("Type is missing");
data.config.set("id",data.id);
return data;
},add_depend:function(config)
{
var type=config.get("type");
var id1=config.get("id");
if(!(__core__.objects.contains(type)&&typeof config.get("targetId")!="undefined"))
return;
var id2=config.get("targetId");
var depconf_a={};
depconf_a.id1=id2;
depconf_a.id2=id1;d
epconf_a.prio=id1;
depconf_a.prop1=config.get("targetProp")!=null?config.get("targetProp"):config.get("prop");
depconf_a.prop2=config.get("prop");
if(config.get("values")!=null&&config.get("targetValues")!=null)
{
depconf_a.values=[config.get("targetValues").split(","),config.get("values").split(",")];
if(config.get("defaultTargetValue")!=null)
{
depconf_a.values.push(config.get("defaultTargetValue"));
};
};
__depend__.add(depconf_a);var depconf_b={};
depconf_b.id1=id1;
depconf_b.id2=id2;
depconf_b.prio=id1;
depconf_b.prop1=config.get("prop");
depconf_b.prop2=config.get("targetProp")!=null?config.get("targetProp"):config.get("prop");
if(config.get("values")!=null&&config.get("targetValues")!=null)
{
depconf_b.values=[config.get("values").split(","),config.get("targetValues").split(",")];
if(config.get("defaultValue")!=null)
{
depconf_b.values.push(config.get("defaultValue"));
};
};
__depend__.add(depconf_b);},get:function(id)
{
for(var i=0;i<nxRegistryData.length;i++)
if(nxRegistryData[i]["id"]==id)
return nxRegistryData[i]["object"];
return null;
},getByNode:function(node)
{
for(var i=0;i<nxRegistryData.length;i++)
if(nxRegistryData[i]["node"]==node)
return nxRegistryData[i]["object"];
return null;
},getData:function(id)
{
for(var i=0;i<nxRegistryData.length;i++)
if(nxRegistryData[i]["id"]==id)
return nxRegistryData[i];
return null;
},isStatus:function(id,name)
{
var o=this.getData(id);
return nxValid(o)&&o.status==name;
},isStatusComplete:function(id)
{
return this.isStatus(id,"complete");
},isStatusPreInit:function(id)
{
return this.isStatus(id,"preinit");
},getByNode:function(node)
{
for(var i=0;i<nxRegistryData.length;i++)
if(nxRegistryData[i]["node"]==node)
return nxRegistryData[i]["object"];
return null;
}
};

PREFIX_GET="get";
TYPEOF_FUNCTION="function";
nxDependData=[];
var __depend__=
{
prep:function(c)
{
var i_ok=false;
var p_ok=false;
var r_ok=false;
if(__core__.check(c.id))
{
c.id1=c.id2=c.id;
i_ok=true;
delete c.id;
}
else if(__core__.check(c.id1)&&__core__.check(c.id2))
{
i_ok=true;
};
if(__core__.check(c.prop))
{
c.prop1=c.prop2=c.prop;
p_ok=true;
delete c.prop;
}
else if(__core__.check(c.prop1)&&__core__.check(c.prop2))
{
p_ok=true;
};
if(__core__.check(c.prio))
{
r_ok=true;
}
else
{
r_ok=true;
c.prio=c.id1;
};
if(!(i_ok&&p_ok&&r_ok))
throw("Ignore malformed depend request:"+i_ok+"::"+p_ok);
return c;
},add:function(c,noInit)
{
try
{
c=this.prep(c);
}
catch(e)
{
__core__.error("Depend:Error while preparing data:"+e);
return false;
};
nxDependData.push(c);
if(noInit!=true)
{
try
{
if(__registry__.isStatusComplete(c.id1)&&__registry__.isStatusPreInit(c.id2))
{
if(__registry__.get(c.id1).propertyInit[c.prop1]=="none")
{
try
{
this.add_postInit(c);
}
catch(e)
{
__core__.error("Depend:Failed to Run PostInit:"+e);
};
};
};
if(__registry__.isStatusComplete(c.id2)&&__registry__.isStatusPreInit(c.id1))
{
if(__registry__.get(c.id2).propertyInit[c.prop2]!="none" &&__registry__.get(c.id1).propertyInit[c.prop1]=="none")
{
try{this.add_postInit(c);
}
catch(e)
{
__core__.error("Depend:Failed to Run PostInit:"+e);
};
};
};
}
catch(e)
{
__core__.error("Depend:Failed to add Depend:"+e);
return false;
};
};
},add_postInit:function(c)
{
try
{
var value2=__registry__.get(c.id2)["get"+c.prop2.toFirstUp()](false);
if(typeof value2=="undefined")
{
__core__.error("Depend:Invalid value[2]");
return false;
};
var value1=this.transform(value2,c,[]);
if(typeof value1=="undefined")
{
__core__.error("Depend:Invalid value[1]!");
return false;
};
}
catch(e)
{
throw "Transformation:"+e;
};
try
{
__core__.dev("Exec:"+"set"+c.prop1.toFirstUp()
);
__registry__.get(c.id1)["set"+c.prop1.toFirstUp()](value1,[c.id2,c.prop2]);
}
catch(e)
{
throw "Execution:"+e;
};
},init:function(c)
{
var o=__registry__.get(c.id1);
if(!nxValid(o))return false;
return this.load(c.id1,c.prop1);
},load:function(id1,prop1)
{
var c;
var obj1=__registry__.get(id1);
var d=nxDependData;var l=d.length;
for(var i=0;i<l;i++){c=d[i];
if(c.id1!=id1||c.prop1!=prop1)
continue;if(c.prio!=id1)
{
continue;
};
var obj2=__registry__.get(c.id2);
if(!nxValid(obj2)){continue;};
if(typeof obj2[PREFIX_GET+c.prop2.toFirstUp()]!=TYPEOF_FUNCTION)
{
__core__.error("Depend:Missing Function:"+id1+":"+prop1);
__core__.error("Depend:Missing Function:"+c.id2+":"+c.prop2);
__core__.error("Depend:Missing Function:"+c.dynamic);};
var value2=obj2[PREFIX_GET+c.prop2.toFirstUp()]();
if(!nxValid(value2)){continue;};
var value1=this.transform(value2,c);
if(!nxValid(value1)){continue;};return[value1,[c.id2,c.prop2]];
};
},transform:function(v,c,tree)
{
if(typeof c.values=="object"&&c.values.length>=2)
{
if(c.values[0].length!=c.values[1].length)
{
__core__.error("Depend:Transformation with mapping failed!");
};
var p=c.values[1].indexOf(String(v));
if(p==-1)
{
if(c.values.length>=3){v=c.values[2];
}
else
{
return null;
};
}
else {v=c.values[0][p];};}
else if
(
typeof c.dynamic!="undefined")
{
var f=typeof c.dynamic=="function"?c.dynamic:typeof c.dynamic=="string"?eval(c.dynamic):null;
if(typeof f=="function")
v=f(v,tree);
else __core__.error("Depend:Undefined transformation function");
};
return v;
},handle:function(id2,prop2,value2,tree){var c,o,v;
for(var i=0;i<nxDependData.length;i++)
{
c=nxDependData[i];
if(c.id2!=id2||c.prop2!=prop2)
{
if(c.id1==id2&&c.prop1==prop2&&c.swap)
{
var d={};
d.id1=c.id2;
d.id2=c.id1;
d.prop1=c.prop2;
d.prop2=c.prop1;
d.dynamic=c.dynamic2;
c=d;
}
else {continue;};
};
var found=false;
for(var j=0;j<tree.length;j++)
{
if(tree[j][0]==c.id1&&tree[j][1]==c.prop1)
{
found=true;
break;
};
};
if(found)continue;
o=__registry__.get(c.id1);
if(!nxValid(o))continue;
if(!o.initDone)continue;
if(!o.hasProperty(c.prop1))
{
__core__.error("Depend:"+c.id1+" has no property:"+c.prop1);
return false;
};
v=value2;
v=this.transform(v,c,tree);
if(nxValid(v))eval("o.set"+c.prop1.toFirstUp()+"(v,tree)");
};
}
};

var __node__={readConfig:function(n)
{
var v=n.getAttribute("nx");
var a=v!=null?v.split(";"):[];
var h=new nxHash();
var b;
for(var i=0;i<a.length;i++)
{
if(a[i]=="")continue;
b=a[i].split(":");
if(b.length!=2)
{
__core__.error("Node:Malformed config parameter[2]:"+a[i]);
break;
};
h.set(b[0],b[1]);
};
return h;
},prohibitSelect:function(node)
{
if(__client__.getEngine()=="gecko")
node.style.MozUserSelect="none";
else if(__client__.getEngine()=="mshtml")
node.onselectstart=funcFalse;
else node.style.userSelect="none";
},allowSelect:function(node)
{
if(__client__.getEngine()=="gecko") node.style.MozUserSelect="all";
else if(__client__.getEngine()=="mshtml")
node.onselectstart=null;
else node.style.userSelect="all";
},addEvent:function(n,e,a)
{
try{if(n.addEventListener)
n.addEventListener(e,a,false);
else if(n.attachEvent)
n.attachEvent("on"+e,a);
}
catch(e)
{
return __core__.error("Failed to add Event:"+n+"["+e+"]");
}
},addNodeEvent:function(n,i,e,a)
{
return __node__.addEvent(n,e,new Function("e","return __registry__.get('"+i+"')."+a+"(e)"));
},removeEvent:function(n,e,a)
{
if(n.removeEventListener) n.removeEventListener(e,a,false);
else if(n.detachEvent) n.detachEvent("on"+e,a);
},setStyle:function(node,prop,value,type)
{
var vtemp;
if(type=="px"||type=="%")
{
vtemp=parseInt(value);
if(isNaN(vtemp))
return false;
if(type=="%"&&(vtemp<0||vtemp>100))
return false;
value=String(vtemp+type);
};
if(typeof valid=="object"&&!valid.contains(value))
return false;
node.style[prop]=value;
return true;
},fastMove:function(node,x,y)
{
with(node.style)
{
top=parseInt(y)+"px";
left=parseInt(x)+"px";
};
},getStyle:function(node,prop,type)
{
var value=node.style[prop];
var vtemp;
if(type=="px"||type=="%")
{
value.replace(type,"");
vtemp=parseInt(value);
value=isNaN(vtemp)?"":vtemp;
};
return value;
},setClass:function(node,value)
{
node.className=String(value);
},getClass:function(node)
{
return node.className;},addClass:function(node,value)
{
var o=__node__.getClass(node);
if(o=="")
return __node__.setClass(node,value);
return __node__.setClass(node,o.addElement(value));
},removeClass:function(node,value)
{
var o=__node__.getClass(node);
if(o=="")return;
return __node__.setClass(node,o.removeElement(value));
},getOffsetX:function(node)
{
return this.getOffset(node,"Left");
},getOffsetY:function(node){return this.getOffset(node,"Top");
},getOffset:function(node,what)
{
var v=node["offset"+what];
var p=node.offsetParent;
return nxValid(p)?this.getOffset(p,what)+v:v;},getOffsetHeight:function(node)
{
return node.offsetHeight;
},getOffsetWidth:function(node)
{
return node.offsetWidth;
},fixBoxModel:function(node)
{
if(__client__.getEngine()=="mshtml" &&__client__.getBrowserMajorVersion()<6){node.style["box-sizing"]="content-box";
node.style.behavior="url("+__core__.prefix+"/htc/boxsizing.htc)";
}
},setHandCursor:function(node){node.style.cursor=__client__.getEngine()=="mshtml"?"hand":"pointer";},getChildNodeByPosition:function(node,pos){var a=node.childNodes;var j=0;for(var i=0;i<a.length;i++){if(a[i].nodeType==1){if(j==pos){return a[i];}
else {j++;};};};return null;},getFirstChild:function(node){return __node__.getChildNodeByPosition(node,0);},appendToBody:function(node,helper){if(__client__.getEngine()=="mshtml"&&(document.readyState=="loading"||document.readyState=="interactive"))
document.body.insertBefore(node,__node__.getFirstChild(document.body));else document.body.appendChild(node);},getArea:function(node){var a={};a.left=__node__.getOffsetX(node);a.width=__node__.getOffsetWidth(node);a.right=a.left+a.width;a.top=__node__.getOffsetY(node);a.height=__node__.getOffsetHeight(node);a.bottom=a.top+a.height;return a;},getAlpha:function(n){var c=__client__.getEngine();if(c=="mshtml")
return n.style.filter=parseInt(n.style.filter);else if(c=="gecko")
return Math.round(parseInt(n.style.MozOpacity)*100);else if(c=="khtml")
return Math.round(parseInt(n.style.KhtmlOpacity)*100);return Math.round(parseInt(n.style.opacity)*100);},setAlpha:function(n,value){var c=__client__.getEngine();var v=Math.round(value);var s="0."+v;if(c=="mshtml")
n.style.filter="alpha(opacity="+v+")";else if(c=="gecko")
n.style.MozOpacity=s;else if(c=="khtml")
n.style.KhtmlOpacity=s;n.style.opacity=s;},removeTextChilds:function(n){for(var j=n.childNodes.length-1;j>-1;j--){if(n.childNodes[j].nodeType!=1){n.removeChild(n.childNodes[j]);j--;};};}
};

function nxEvent(e){if(nxValid(e.nxevent)&&e.nxevent==true)return e;var ev={};e=e?e:window.event;if(!nxValid(e))return e;ev.nxevent=true;ev.event=e;ev.source=e;ev.detail=e.detail;ev.timeStamp=new Date();ev.currentTarget=e.currentTarget;ev.target=e.target!=null?e.target:e.srcElement;ev.type=e.type.toLowerCase();ev.keyCode=e.keyCode;ev.altKey=e.altKey;ev.ctrlKey=e.ctrlKey;ev.metaKey=e.metaKey;ev.shiftKey=e.shiftKey;if(__client__.getEngine()=="opera"){ev.button=e.button-1;}
else if(__client__.getEngine()=="mshtml"||__client__.getEngine()=="khtml"){if(e.button>=4){ev.button=1;}
else if(e.button>=2){ev.button=2;}
else if(nxValid(e.button)){ev.button=0;};}
else {ev.button=e.button;};ev.x=e.pageX?e.pageX:e.clientX?e.clientX+window.getScroll("left"):e.x?e.x:0;ev.y=e.pageY?e.pageY:e.clientY?e.clientY+window.getScroll("top"):e.y?e.y:0;return ev;};

var __cookie__={base:"data",days:365,splitter:"|",path:"/",maxstr:4000,maxarr:20,maxarrhard:20,set:function(name,value){if(name==null||typeof name=="undefined"||value==null||typeof value=="undefined"){__core__.stderr("Store cookie:"+name+"='"+value+"' impossible!");return false;};var c=this.get_sub().split(this.splitter);var n=[];for(var i=0;i<c.length;i++){if(c[i]=="")continue;var d=c[i].split(":");if(d[0]!=name)n.push(c[i]);};n.unshift(name+":"+value);d=n;var s="";var j=0;for(var i=0;i<d.length;i++){if(d[i]==null||typeof d[i]=="undefined")continue;if((s.length+d[i].length)>this.maxstr){this.create(this.base+this.norm_sub(j),s,this.days);s=d[i];j++;if(j>this.maxarr)break;}
else {if(s!="")s+=this.splitter;s+=d[i];};};if(s!=""&&j<=this.maxarr){this.create(this.base+this.norm_sub(j),s,this.days);j++;};for(var i=j;i<this.maxarrhard;i++)this.erase(this.base+this.norm_sub(i));return true;},get:function(name){return this.prep_sub()[name];},norm_sub:function(i){return String(i<10?"0"+i:i);},get_sub:function(){var s="";for(var i=0;i<this.maxarrhard;i++){var r=this.read(this.base+this.norm_sub(i));if(r)s+=r;};return s;},prep_sub:function(){return this.get_sub().split(this.splitter).mapKeys();},create:function(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires=";expires="+date.toGMTString();}
else {var expires="";};document.cookie=name+"="+value+expires+"; path="+this.path;},read:function(name){var ne=name+"=";var ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" ")
c=c.substring(1,c.length);if(c.indexOf(ne)==0)
return c.substring(ne.length,c.length);};return null;},erase:function(name){if(this.read(name)!=null)
this.create(name,"",-1);}
};

function nxEvent(e){if(nxValid(e.nxevent)&&e.nxevent==true)return e;var ev={};e=e?e:window.event;if(!nxValid(e))return e;ev.nxevent=true;ev.event=e;ev.source=e;ev.detail=e.detail;ev.timeStamp=new Date();ev.currentTarget=e.currentTarget;ev.target=e.target!=null?e.target:e.srcElement;ev.type=e.type.toLowerCase();ev.keyCode=e.keyCode;ev.altKey=e.altKey;ev.ctrlKey=e.ctrlKey;ev.metaKey=e.metaKey;ev.shiftKey=e.shiftKey;if(__client__.getEngine()=="opera"){ev.button=e.button-1;}
else if(__client__.getEngine()=="mshtml"||__client__.getEngine()=="khtml"){if(e.button>=4){ev.button=1;}
else if(e.button>=2){ev.button=2;}
else if(nxValid(e.button)){ev.button=0;};}
else {ev.button=e.button;};ev.x=e.pageX?e.pageX:e.clientX?e.clientX+window.getScroll("left"):e.x?e.x:0;ev.y=e.pageY?e.pageY:e.clientY?e.clientY+window.getScroll("top"):e.y?e.y:0;return ev;};

var nxImage={cache:[],list:[],parse:function(src){var d={};d.imageBaseName=src.basename();d.imagePath=src.replace(d.imageBaseName,"");d.imageExtension=d.imageBaseName.substring(d.imageBaseName.lastIndexOf(".")+1,d.imageBaseName.length);d.imageName=d.imageBaseName.substring(0,d.imageBaseName.lastIndexOf("."));return d;},preload:function(src){var p=this.cache.length;this.cache[p]=new Image();this.cache[p]=src;},register:function(){for(var i=0;i<arguments.length;i++){if(this.list.contains(arguments[i]))
return false;this.list.push(arguments[i]);this.preload(arguments[i]);};},load:function(){for(var i=0;i<this.list.length;i++)
this.preload(this.list[i]);}
};var iload=new Function("return nxImage.load()");__node__.addEvent(window,"load",iload);

var __scan__={cache:[],done:false,index:function(){var a=__client__.getEngine()=="mshtml"?document.all:document.getElementsByTagName("*");var n,c,v,t,p;for(var i=0;i<a.length;i++){n=a[i];v=n.getAttribute("nx");if(v==null||typeof v!="string"||v=="")
continue;c=__node__.readConfig(n);t=c.get("type");if(!nxValid(t)||!nxValid(c)){__core__.error("Scan:Undefined type in nx-Attribute");continue;};p=this.cache.length;this.cache[p]=[n,c,t];};this.done=true;},auto:function(){if(!document.getElementById||!document.getElementsByTagName||!document.createElement)
return false;if(!this.done)
this.index();for(var i=0;i<this.cache.length;i++)
__core__.require("widgets/"+this.cache[i][2].toLowerCase());__node__.addEvent(window,"load",function(){__scan__.init();});},readConfig:function(n){var v=n.getAttribute("nx");return v!=null?v.split(";").mapKeys():[];},init:function(){if(!this.done)
this.index();var foo=(new Date).valueOf();for(var i=0,c=this.cache,l=c.length,d;i<l;i++){d={};d.node=c[i][0];d.config=c[i][1];d.type=c[i][0];__registry__.add(d);};delete this.cache;this.done=false;}
};
