if(typeof (nitobi)=="undefined"){
nitobi=function(){
};
}
if(false){
nitobi.lang=function(){
};
}
if(typeof (nitobi.lang)=="undefined"){
nitobi.lang={};
}
nitobi.lang.defineNs=function(_1){
var _2=_1.split(".");
var _3="";
var _4="";
for(var i=0;i<_2.length;i++){
_3+=_4+_2[i];
_4=".";
if(eval("typeof("+_3+")")=="undefined"){
eval(_3+"={}");
}
}
};
nitobi.lang.extend=function(_6,_7){
function inheritance(){
}
inheritance.prototype=_7.prototype;
_6.prototype=new inheritance();
_6.prototype.constructor=_6;
_6.baseConstructor=_7;
if(_7.base){
_7.prototype.base=_7.base;
}
_6.base=_7.prototype;
};
nitobi.lang.implement=function(_8,_9){
if(typeof (_9)=="undefined"||_9==null){
var _a="nitobi.lang.implement argument interface_ is null or undefined.  The most likely cause of this is that a js file has not been included, or has been included in the wrong order.";
nitobi.lang.throwError(_a);
}
for(var _b in _9.prototype){
if(typeof (_8.prototype[_b])=="undefined"||_8.prototype[_b]==null){
_8.prototype[_b]=_9.prototype[_b];
}
}
};
nitobi.lang.isDefined=function(a){
return (typeof (a)!="undefined");
};
nitobi.lang.getBool=function(a){
if(null==a){
return null;
}
if(typeof (a)=="boolean"){
return a;
}
return a.toLowerCase()=="true";
};
nitobi.lang.type={XMLNODE:0,HTMLNODE:1,ARRAY:2,XMLDOC:3};
nitobi.lang.typeOf=function(_e){
var t=typeof (_e);
if(t=="object"){
if(_e.blur){
return nitobi.lang.type.HTMLNODE;
}
if(_e.nodeName&&_e.nodeName.toLowerCase()==="#document"){
return nitobi.lang.type.XMLDOC;
}
if(_e.nodeName){
return nitobi.lang.type.XMLNODE;
}
if(_e instanceof Array){
return nitobi.lang.type.ARRAY;
}
}
return t;
};
nitobi.lang.toBool=function(_10,_11){
if(typeof (_11)!="undefined"){
if((typeof (_10)=="undefined")||(_10=="")||(_10==null)){
_10=_11;
}
}
_10=_10.toString()||"";
_10=_10.toUpperCase();
if((_10=="Y")||(_10=="1")||(_10=="TRUE")){
return true;
}else{
return false;
}
};
nitobi.lang.boolToStr=function(_12){
if(typeof (_12)=="boolean"){
if(_12){
return "1";
}else{
return "0";
}
}else{
return _12;
}
};
nitobi.lang.close=function(_13,_14,_15){
if(null==_15){
return function(){
return _14.apply(_13,arguments);
};
}else{
return function(){
return _14.apply(_13,_15);
};
}
};
nitobi.lang.after=function(_16,_17,_18,_19){
var _1a=_16[_17];
var _1b=_18[_19];
if(_19 instanceof Function){
_1b=_19;
}
_16[_17]=function(){
_1a.apply(_16,arguments);
_1b.apply(_18,arguments);
};
_16[_17].orig=_1a;
};
nitobi.lang.before=function(_1c,_1d,_1e,_1f){
var _20=_1c[_1d];
var _21=_1e[_1f];
if(_1f instanceof Function){
_21=_1f;
}
_1c[_1d]=function(){
_21.apply(_1e,arguments);
_20.apply(_1c,arguments);
};
_1c[_1d].orig=_20;
};
nitobi.lang.forEach=function(arr,_23){
var len=arr.length;
for(var i=0;i<len;i++){
_23.call(this,arr[i],i);
}
_23=null;
};
nitobi.lang.throwError=function(_26,_27){
var msg=_26;
if(_27!=null){
msg+="\n - because "+nitobi.lang.getErrorDescription(_27);
}
throw msg;
};
nitobi.lang.getErrorDescription=function(_29){
var _2a=(typeof (_29.description)=="undefined")?_29:_29.description;
return _2a;
};
nitobi.lang.newObject=function(_2b,_2c,_2d){
var a=_2c;
if(null==_2d){
_2d=0;
}
var e="new "+_2b+"(";
var _30="";
for(var i=_2d;i<a.length;i++){
e+=_30+"a["+i+"]";
_30=",";
}
e+=")";
return eval(e);
};
nitobi.lang.getLastFunctionArgs=function(_32,_33){
var a=new Array(_32.length-_33);
for(var i=_33;i<_32.length;i++){
a[i-_33]=_32[i];
}
return a;
};
nitobi.lang.getFirstHashKey=function(_36){
for(var x in _36){
return x;
}
};
nitobi.lang.getFirstFunction=function(obj){
for(var x in obj){
if(obj[x]!=null&&typeof (obj[x])=="function"&&typeof (obj[x].prototype)!="undefined"){
return {name:x,value:obj[x]};
}
}
return null;
};
nitobi.lang.dispose=function(_3a,_3b){
try{
var _3c=_3b.length;
for(var i=0;i<_3c;i++){
if(_3b[i].dispose){
_3b[i].dispose();
}
if(typeof (_3b[i])=="function"){
_3b[i].call(_3a);
}
_3b[i]=null;
}
}
catch(e){
}
};
nitobi.lang.parseNumber=function(val){
var num=parseInt(val);
return (isNaN(num)?0:num);
};
nitobi.lang.numToAlpha=function(num){
if(typeof (nitobi.lang.numAlphaCache[num])==="string"){
return nitobi.lang.numAlphaCache[num];
}
var ck1=num%26;
var ck2=Math.floor(num/26);
var _43=(ck2>0?String.fromCharCode(96+ck2):"")+String.fromCharCode(97+ck1);
nitobi.lang.alphaNumCache[_43]=num;
nitobi.lang.numAlphaCache[num]=_43;
return _43;
};
nitobi.lang.alphaToNum=function(_44){
if(typeof (nitobi.lang.alphaNumCache[_44])==="number"){
return nitobi.lang.alphaNumCache[_44];
}
var j=0;
var num=0;
for(var i=_44.length-1;i>=0;i--){
num+=(_44.charCodeAt(i)-96)*Math.pow(26,j++);
}
num=num-1;
nitobi.lang.alphaNumCache[_44]=num;
nitobi.lang.numAlphaCache[num]=_44;
return num;
};
nitobi.lang.alphaNumCache={};
nitobi.lang.numAlphaCache={};
nitobi.lang.toArray=function(obj,_49){
return Array.prototype.splice.call(obj,_49||0);
};
nitobi.lang.merge=function(_4a,_4b){
var r={};
for(var i=0;i<arguments.length;i++){
var a=arguments[i];
for(var x in arguments[i]){
r[x]=a[x];
}
}
return r;
};
nitobi.lang.xor=function(){
var b=false;
for(var j=0;j<arguments.length;j++){
if(arguments[j]&&!b){
b=true;
}else{
if(arguments[j]&&b){
return false;
}
}
}
return b;
};
nitobi.lang.zeros="00000000000000000000000000000000000000000000000000000000000000000000";
nitobi.lang.padZeros=function(num,_53){
_53=_53||2;
num=num+"";
return nitobi.lang.zeros.substr(0,Math.max(_53-num.length,0))+num;
};
nitobi.lang.noop=function(){
};
nitobi.lang.defineNs("nitobi.lang");
nitobi.lang.Math=function(){
};
nitobi.lang.Math.sinTable=Array();
nitobi.lang.Math.cosTable=Array();
nitobi.lang.Math.rotateCoords=function(_54,_55,_56){
var _57=_56*0.01745329277777778;
if(nitobi.lang.Math.sinTable[_57]==null){
nitobi.lang.Math.sinTable[_57]=Math.sin(_57);
nitobi.lang.Math.cosTable[_57]=Math.cos(_57);
}
var cR=nitobi.lang.Math.cosTable[_57];
var sR=nitobi.lang.Math.sinTable[_57];
var x=_54*cR-_55*sR;
var y=_55*cR+_54*sR;
return {x:x,y:y};
};
nitobi.lang.Math.returnAngle=function(_5c,_5d,_5e,_5f){
return Math.atan2(_5f-_5d,_5e-_5c)/0.01745329277777778;
};
nitobi.lang.Math.returnDistance=function(x1,y1,x2,y2){
return Math.sqrt(((x2-x1)*(x2-x1))+((y2-y1)*(y2-y1)));
};
nitobi.lang.defineNs("nitobi.toolkit");
nitobi.toolkit.build="5698";
nitobi.toolkit.version="1.0.5698";
nitobi.lang.defineNs("nitobi");
nitobi.Object=function(){
this.disposal=new Array();
};
nitobi.Object.prototype.setValues=function(_64){
for(var _65 in _64){
if(this[_65]!=null){
if(this[_65].subscribe!=null){
}else{
this[_65]=_64[_65];
}
}else{
if(this[_65] instanceof Function){
this[_65](_64[_65]);
}else{
if(this["set"+_65] instanceof Function){
this["set"+_65](_64[_65]);
}else{
this[_65]=_64[_65];
}
}
}
}
};
nitobi.Object.prototype.dispose=function(){
if(this.disposing){
return;
}
this.disposing=true;
var _66=this.disposal.length;
for(var i=0;i<_66;i++){
if(disposal[i] instanceof Function){
disposal[i].call(context);
}
disposal[i]=null;
}
for(var _68 in this){
if(this[_68].dispose instanceof Function){
this[_68].dispose.call(this[_68]);
}
this[_68]=null;
}
};
if(false){
nitobi.base=function(){
};
}
nitobi.lang.defineNs("nitobi.base");
nitobi.base.uid=1;
nitobi.base.getUid=function(){
return "ntb__"+(nitobi.base.uid++);
};
nitobi.lang.defineNs("nitobi.browser");
if(false){
nitobi.browser=function(){
};
}
nitobi.browser.UNKNOWN=true;
nitobi.browser.IE=false;
nitobi.browser.IE6=false;
nitobi.browser.IE7=false;
nitobi.browser.MOZ=false;
nitobi.browser.SAFARI=false;
nitobi.browser.OPERA=false;
nitobi.browser.XHR_ENABLED;
nitobi.browser.detect=function(){
var _69=[{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}];
var _6a="Unknown";
for(var i=0;i<_69.length;i++){
var _6c=_69[i].string;
var _6d=_69[i].prop;
if(_6c){
if(_6c.indexOf(_69[i].subString)!=-1){
_6a=_69[i].identity;
break;
}
}else{
if(_6d){
_6a=_69[i].identity;
break;
}
}
}
nitobi.browser.IE=(_6a=="Explorer");
nitobi.browser.IE6=(nitobi.browser.IE&&!window.XMLHttpRequest);
nitobi.browser.IE7=(nitobi.browser.IE&&window.XMLHttpRequest);
nitobi.browser.MOZ=(_6a=="Netscape"||_6a=="Firefox");
nitobi.browser.SAFARI=(_6a=="Safari");
nitobi.browser.OPERA=(_6a=="Opera");
nitobi.browser.XHR_ENABLED=nitobi.browser.OPERA||nitobi.browser.SAFARI||nitobi.browser.MOZ||nitobi.browser.IE;
nitobi.browser.UNKNOWN=!(nitobi.browser.IE||nitobi.browser.MOZ||nitobi.browser.SAFARI);
};
nitobi.browser.detect();
if(nitobi.browser.IE6){
try{
document.execCommand("BackgroundImageCache",false,true);
}
catch(e){
}
}
nitobi.lang.defineNs("nitobi.browser");
nitobi.browser.Cookies=function(){
};
nitobi.lang.extend(nitobi.browser.Cookies,nitobi.Object);
nitobi.browser.Cookies.get=function(id){
var _6f,end;
if(document.cookie.length>0){
_6f=document.cookie.indexOf(id+"=");
if(_6f!=-1){
_6f+=id.length+1;
end=document.cookie.indexOf(";",_6f);
if(end==-1){
end=document.cookie.length;
}
return unescape(document.cookie.substring(_6f,end));
}
}
return null;
};
nitobi.browser.Cookies.set=function(id,_72,_73){
var _74=new Date();
_74.setTime(_74.getTime()+(_73*24*3600*1000));
document.cookie=id+"="+escape(_72)+((_73==null)?"":"; expires="+_74.toGMTString());
};
nitobi.browser.Cookies.remove=function(id){
if(nitobi.browser.Cookies.get(id)){
document.cookie=id+"="+"; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
};
nitobi.lang.defineNs("nitobi.xml");
nitobi.xml=function(){
};
nitobi.xml.nsPrefix="ntb:";
nitobi.xml.nsDecl="xmlns:ntb=\"http://www.nitobi.com\"";
if(nitobi.browser.IE){
var inUse=false;
nitobi.xml.XslTemplate=new ActiveXObject("MSXML2.XSLTemplate.3.0");
}
if(nitobi.browser.MOZ){
nitobi.xml.Serializer=new XMLSerializer();
nitobi.xml.DOMParser=new DOMParser();
}
if(!nitobi.browser.IE&&!nitobi.browser.MOZ){
}
nitobi.xml.getChildNodes=function(_76){
if(nitobi.browser.IE){
return _76.childNodes;
}else{
return _76.selectNodes("./*");
}
};
nitobi.xml.indexOfChildNode=function(_77,_78){
var _79=nitobi.xml.getChildNodes(_77);
for(var i=0;i<_79.length;i++){
if(_79[i]==_78){
return i;
}
}
return -1;
};
nitobi.xml.createXmlDoc=function(xml){
if(xml!=null&&xml.documentElement!=null){
return xml;
}
var doc=null;
if(nitobi.browser.IE){
doc=new ActiveXObject("Msxml2.DOMDocument.3.0");
doc.setProperty("SelectionNamespaces","xmlns:ntb='http://www.nitobi.com'");
}else{
if(nitobi.browser.MOZ){
doc=document.implementation.createDocument("","",null);
}
}
if(xml!=null&&typeof xml=="string"){
doc=nitobi.xml.loadXml(doc,xml);
}
return doc;
};
nitobi.xml.loadXml=function(doc,xml,_7f){
doc.async=false;
if(nitobi.browser.IE){
doc.loadXML(xml);
}else{
var _80=nitobi.xml.DOMParser.parseFromString(xml,"text/xml");
if(_7f){
while(doc.hasChildNodes()){
doc.removeChild(doc.firstChild);
}
for(var i=0;i<_80.childNodes.length;i++){
doc.appendChild(doc.importNode(_80.childNodes[i],true));
}
}else{
doc=_80;
}
_80=null;
}
return doc;
};
nitobi.xml.hasParseError=function(_82){
if(nitobi.browser.IE){
return (_82.parseError!=0);
}else{
if(_82==null||_82.documentElement==null){
return true;
}
var _83=_82.documentElement;
if((_83.tagName=="parserError")||(_83.namespaceURI=="http://www.mozilla.org/newlayout/xml/parsererror.xml")){
return true;
}
return false;
}
};
nitobi.xml.getParseErrorReason=function(_84){
if(!nitobi.xml.hasParseError(_84)){
return "";
}
if(nitobi.browser.IE){
return (_84.parseError.reason);
}else{
return (new XMLSerializer().serializeToString(_84));
}
};
nitobi.xml.createXslDoc=function(xsl){
var doc=null;
if(nitobi.browser.IE){
doc=new ActiveXObject("MSXML2.FreeThreadedDOMDocument.3.0");
}else{
if(nitobi.browser.MOZ){
doc=nitobi.xml.createXmlDoc();
}
}
doc=nitobi.xml.loadXml(doc,xsl||"<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:ntb=\"http://www.nitobi.com\" />");
return doc;
};
nitobi.xml.createXslProcessor=function(xsl){
var _88=null;
var xt=null;
if(typeof (xsl)!="string"){
xsl=nitobi.xml.serialize(xsl);
}
if(nitobi.browser.IE){
_88=new ActiveXObject("MSXML2.FreeThreadedDOMDocument.3.0");
xt=new ActiveXObject("MSXML2.XSLTemplate.3.0");
_88.async=false;
_88.loadXML(xsl);
xt.stylesheet=_88;
return xt.createProcessor();
}else{
_88=nitobi.xml.createXmlDoc(xsl);
xt=new XSLTProcessor();
xt.importStylesheet(_88);
xt.stylesheet=_88;
return xt;
}
};
nitobi.xml.parseHtml=function(_8a){
if(typeof (_8a)=="string"){
_8a=document.getElementById(_8a);
}
var _8b=nitobi.html.getOuterHtml(_8a);
var _8c="";
if(nitobi.browser.IE){
var _8d=new RegExp("(\\s+.[^=]*)='(.*?)'","g");
_8b=_8b.replace(_8d,function(m,_1,_2){
return _1+"=\""+_2.replace(/"/g,"&quot;")+"\"";
});
_8c=(_8b.substring(_8b.indexOf("/>")+2).replace(/(\s+.[^\=]*)\=\s*([^\"^\s^\>]+)/g,"$1=\"$2\" ")).replace(/\n/gi,"").replace(/(.*?:.*?\s)/i,"$1  ");
var _91=new RegExp("=\"([^\"]*)(<)(.*?)\"","gi");
var _92=new RegExp("=\"([^\"]*)(>)(.*?)\"","gi");
while(true){
_8c=_8c.replace(_91,"=\"$1&lt;$3\" ");
_8c=_8c.replace(_92,"=\"$1&gt;$3\" ");
var x=(_91.test(_8c));
if(!_91.test(_8c)){
break;
}
}
}else{
if(nitobi.browser.MOZ){
_8c=_8b.replace(/(\s+.[^\=]*)\=\s*([^\"^\s^\>]+)/g,"$1=\"$2\" ").replace(/\n/gi,"").replace(/\>\s*\</gi,"><").replace(/(.*?:.*?\s)/i,"$1  ");
_8c=_8c.replace(/\&/g,"&amp;");
_8c=_8c.replace(/\&amp;gt;/g,"&gt;").replace(/\&amp;lt;/g,"&lt;").replace(/\&amp;apos;/g,"&apos;").replace(/\&amp;quot;/g,"&quot;").replace(/\&amp;amp;/g,"&amp;").replace(/\&amp;eq;/g,"&eq;");
}
}
if(_8c.indexOf("xmlns:ntb=\"http://www.nitobi.com\"")<1){
_8c=_8c.replace(/\<(.*?)(\s|\>|\\)/,"<$1 xmlns:ntb=\"http://www.nitobi.com\"$2");
}
_8c=_8c.replace(/\&nbsp\;/gi," ");
return nitobi.xml.createXmlDoc(_8c);
};
nitobi.xml.transform=function(xml,xsl,_96){
if(xsl.documentElement){
xsl=nitobi.xml.createXslProcessor(xsl);
}
if(nitobi.browser.IE){
xsl.input=xml;
xsl.transform();
return xsl.output;
}else{
var doc=xsl.transformToDocument(xml);
var _98=doc.documentElement;
if(_98&&_98.nodeName.indexOf("ntb:")==0){
_98.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:ntb","http://www.nitobi.com");
}
return doc;
}
};
nitobi.xml.transformToString=function(xml,xsl,_9b){
var _9c=nitobi.xml.transform(xml,xsl,"text");
if(nitobi.browser.MOZ){
if(_9b=="xml"){
_9c=nitobi.xml.Serializer.serializeToString(_9c);
}else{
if(_9c.documentElement.childNodes[0]==null){
nitobi.lang.throwError("The transformToString fn could not find any valid output");
}
if(_9c.documentElement.childNodes[0].data!=null){
_9c=_9c.documentElement.childNodes[0].data;
}else{
if(_9c.documentElement.childNodes[0].textContent!=null){
_9c=_9c.documentElement.childNodes[0].textContent;
}else{
nitobi.lang.throwError("The transformToString fn could not find any valid output");
}
}
}
}
return _9c;
};
nitobi.xml.transformToXml=function(xml,xsl){
var _9f=nitobi.xml.transform(xml,xsl,"xml");
if(nitobi.browser.IE){
_9f=nitobi.xml.createXmlDoc(_9f);
}else{
if(nitobi.browser.MOZ){
if(_9f.documentElement.nodeName=="transformiix:result"){
_9f=nitobi.xml.createXmlDoc(_9f.documentElement.firstChild.data);
}
}
}
return _9f;
};
nitobi.xml.serialize=function(xml){
if(nitobi.browser.IE){
return xml.xml;
}else{
return (new XMLSerializer()).serializeToString(xml);
}
};
nitobi.xml.createXmlHttp=function(){
if(nitobi.browser.IE){
var _a1=null;
try{
_a1=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){
try{
_a1=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(ee){
}
}
return _a1;
}else{
if(nitobi.browser.MOZ){
return new XMLHttpRequest();
}
}
};
nitobi.xml.createElement=function(_a2,_a3,ns){
ns=ns||"http://www.nitobi.com";
var _a5=null;
if(nitobi.browser.IE){
_a5=_a2.createNode(1,nitobi.xml.nsPrefix+_a3,ns);
}else{
if(_a2.createElementNS){
_a5=_a2.createElementNS(ns,nitobi.xml.nsPrefix+_a3);
}
}
return _a5;
};
function nitobiXmlDecodeXslt(xsl){
return xsl.replace(/x:c-/g,"xsl:choose").replace(/x\:wh\-/g,"xsl:when").replace(/x\:o\-/g,"xsl:otherwise").replace(/x\:n\-/g," name=\"").replace(/x\:s\-/g," select=\"").replace(/x\:va\-/g,"xsl:variable").replace(/x\:v\-/g,"xsl:value-of").replace(/x\:ct\-/g,"xsl:call-template").replace(/x\:w\-/g,"xsl:with-param").replace(/x\:p\-/g,"xsl:param").replace(/x\:t\-/g,"xsl:template").replace(/x\:at\-/g,"xsl:apply-templates").replace(/x\:a\-/g,"xsl:attribute");
}
if(nitobi.browser.MOZ){
Document.prototype.__defineGetter__("xml",function(){
return (new XMLSerializer()).serializeToString(this);
});
Node.prototype.__defineGetter__("xml",function(){
return (new XMLSerializer()).serializeToString(this);
});
XPathResult.prototype.__defineGetter__("length",function(){
return this.snapshotLength;
});
XSLTProcessor.prototype.addParameter=function(_a7,_a8,_a9){
if(_a8==null){
this.removeParameter(_a9,_a7);
}else{
this.setParameter(_a9,_a7,_a8);
}
};
XMLDocument.prototype.selectNodes=function(_aa,_ab){
try{
if(this.nsResolver==null){
this.nsResolver=this.createNSResolver(this.documentElement);
}
var _ac=this.evaluate(_aa,(_ab?_ab:this),this.nsResolver,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);
var _ad=new Array(_ac.snapshotLength);
_ad.expr=_aa;
var j=0;
for(i=0;i<_ac.snapshotLength;i++){
var _af=_ac.snapshotItem(i);
if(_af.nodeType!=3){
_ad[j++]=_af;
}
}
return _ad;
}
catch(e){
}
};
XMLDocument.prototype.selectSingleNode=function(_b0,_b1){
var _b2=_b0.match(/\[\d+\]/ig);
if(_b2!=null){
var x=_b2[_b2.length-1];
if(_b0.lastIndexOf(x)+x.length!=_b0.length){
_b0+="[1]";
}
}
var _b4=this.selectNodes(_b0,_b1||null);
return ((_b4!=null&&_b4.length>0)?_b4[0]:null);
};
Element.prototype.selectNodes=function(_b5){
var doc=this.ownerDocument;
return doc.selectNodes(_b5,this);
};
Element.prototype.selectSingleNode=function(_b7){
var doc=this.ownerDocument;
return doc.selectSingleNode(_b7,this);
};
}
nitobi.xml.getLocalName=function(_b9){
var _ba=_b9.indexOf(":");
if(_ba==-1){
return _b9;
}else{
return _b9.substr(_ba+1);
}
};
nitobi.xml.encode=function(str){
str+="";
str=str.replace(/&/g,"&amp;");
str=str.replace(/'/g,"&apos;");
str=str.replace(/\"/g,"&quot;");
str=str.replace(/</g,"&lt;");
str=str.replace(/>/g,"&gt;");
str=str.replace(/\n/g,"&#xa;");
return str;
};
nitobi.xml.constructValidXpathQuery=function(_bc,_bd){
var _be=_bc.match(/(\"|\')/g);
if(_be!=null){
var _bf="concat(";
var _c0="";
var _c1;
for(var i=0;i<_bc.length;i++){
if(_bc.substr(i,1)=="\""){
_c1="&apos;";
}else{
_c1="&quot;";
}
_bf+=_c0+_c1+nitobi.xml.encode(_bc.substr(i,1))+_c1;
_c0=",";
}
_bf+=_c0+"&apos;&apos;";
_bf+=")";
_bc=_bf;
}else{
var _c3=(_bd?"\"":"");
_bc=_c3+nitobi.xml.encode(_bc)+_c3;
}
return _bc;
};
nitobi.lang.defineNs("nitobi.html");
nitobi.html.Url=function(){
};
nitobi.html.Url.setParameter=function(url,key,_c6){
var reg=new RegExp("(\\?|&)("+encodeURIComponent(key)+")=(.*?)(&|$)");
if(url.match(reg)){
return url.replace(reg,"$1$2="+encodeURIComponent(_c6)+"$4");
}
if(url.match(/\?/)){
url=url+"&";
}else{
url=url+"?";
}
return url+encodeURIComponent(key)+"="+encodeURIComponent(_c6);
};
nitobi.html.Url.removeParameter=function(url,key){
var reg=new RegExp("(\\?|&)("+encodeURIComponent(key)+")=(.*?)(&|$)");
return url.replace(reg,function(str,p1,p2,p3,p4,_d0,s){
if(((p1)=="?")&&(p4!="&")){
return "";
}else{
return p1;
}
});
};
nitobi.html.Url.normalize=function(url,_d3){
if(_d3){
if(_d3.indexOf("http://")==0||_d3.indexOf("https://")==0||_d3.indexOf("/")==0){
return _d3;
}
}
var _d4=(url.match(/.*\//)||"")+"";
if(_d3){
return _d4+_d3;
}
return _d4;
};
nitobi.html.Url.randomize=function(url){
return nitobi.html.Url.setParameter(url,"ntb-random",(new Date).getTime());
};
nitobi.lang.defineNs("nitobi.base");
nitobi.base.Event=function(_d6){
this.type=_d6;
this.handlers={};
this.guid=0;
this.setEnabled(true);
};
nitobi.base.Event.prototype.subscribe=function(_d7,_d8,_d9){
if(_d7==null){
return;
}
var _da=_d7;
if(typeof (_d7)=="string"){
var s=_d7;
s=s.replace(/eventArgs/g,"arguments[0]");
_d7=nitobi.lang.close(_d8,function(){
eval(s);
});
}
if(typeof _d8=="object"&&_d7 instanceof Function){
_da=nitobi.lang.close(_d8,_d7);
}
_d9=_d9||_da.observer_guid||_d7.observer_guid||this.guid++;
_da.observer_guid=_d9;
_d7.observer_guid=_d9;
this.handlers[_d9]=_da;
return _d9;
};
nitobi.base.Event.prototype.subscribeOnce=function(_dc,_dd){
var _de=null;
var _df=this;
var _e0=function(){
_dc.apply(_dd||null,arguments);
_df.unSubscribe(_de);
};
_de=this.subscribe(_e0);
return _de;
};
nitobi.base.Event.prototype.unSubscribe=function(_e1){
if(_e1 instanceof Function){
_e1=_e1.observer_guid;
}
this.handlers[_e1]=null;
delete this.handlers[_e1];
};
nitobi.base.Event.prototype.notify=function(_e2){
if(this.enabled){
if(arguments.length==0){
arguments=new Array();
arguments[0]=new nitobi.base.EventArgs(null,this);
arguments[0].event=this;
arguments[0].source=null;
}else{
if(typeof (arguments[0].event)!="undefined"&&arguments[0].event==null){
arguments[0].event=this;
}
}
var _e3=false;
for(var _e4 in this.handlers){
var _e5=this.handlers[_e4];
if(_e5 instanceof Function){
var rv=(_e5.apply(this,arguments)==false);
_e3=_e3||rv;
}
}
return !_e3;
}
return true;
};
nitobi.base.Event.prototype.dispose=function(){
for(var _e7 in this.handlers){
this.handlers[_e7]=null;
}
this.handlers={};
};
nitobi.base.Event.prototype.setEnabled=function(_e8){
this.enabled=_e8;
};
nitobi.base.Event.prototype.isEnabled=function(){
return this.enabled;
};
nitobi.lang.defineNs("nitobi.html");
nitobi.html.Css=function(){
};
nitobi.html.Css.onPrecached=new nitobi.base.Event();
nitobi.html.Css.swapClass=function(_e9,_ea,_eb){
if(_e9.className){
var reg=new RegExp("(\\s|^)"+_ea+"(\\s|$)");
_e9.className=_e9.className.replace(reg,"$1"+_eb+"$2");
}
};
nitobi.html.Css.replaceOrAppend=function(_ed,_ee,_ef){
if(nitobi.html.Css.hasClass(_ed,_ee)){
nitobi.html.Css.swapClass(_ed,_ee,_ef);
}else{
nitobi.html.Css.addClass(_ed,_ef);
}
};
nitobi.html.Css.hasClass=function(_f0,_f1){
if(!_f1||_f1===""){
return false;
}
return (new RegExp("(\\s|^)"+_f1+"(\\s|$)")).test(_f0.className);
};
nitobi.html.Css.addClass=function(_f2,_f3){
if(!nitobi.html.Css.hasClass(_f2,_f3)){
_f2.className=_f2.className?_f2.className+" "+_f3:_f3;
}
};
nitobi.html.Css.removeClass=function(_f4,_f5){
if(nitobi.html.Css.hasClass(_f4,_f5)){
var reg=new RegExp("(\\s|^)"+_f5+"(\\s|$)");
_f4.className=_f4.className.replace(reg,"$2");
}
};
nitobi.html.Css.getRules=function(_f7){
var _f8=null;
if(typeof (_f7)=="number"){
_f8=document.styleSheets[_f7];
}else{
_f8=_f7;
}
if(_f8==null){
return null;
}
try{
if(_f8.cssRules){
return _f8.cssRules;
}
if(_f8.rules){
return _f8.rules;
}
}
catch(e){
}
return null;
};
nitobi.html.Css.getStyleSheetsByName=function(_f9){
var arr=new Array();
var ss=document.styleSheets;
var _fc=new RegExp(_f9.replace(".",".")+"($|\\?)");
for(var i=0;i<ss.length;i++){
arr=nitobi.html.Css._getStyleSheetsByName(_fc,ss[i],arr);
}
return arr;
};
nitobi.html.Css._getStyleSheetsByName=function(_fe,_ff,arr){
if(_fe.test(_ff.href)){
arr=arr.concat([_ff]);
}
var _101=nitobi.html.Css.getRules(_ff);
if(_ff.href!=""&&_ff.imports){
for(var i=0;i<_ff.imports.length;i++){
arr=nitobi.html.Css._getStyleSheetsByName(_fe,_ff.imports[i],arr);
}
}else{
for(var i=0;i<_101.length;i++){
var s=_101[i].styleSheet;
if(s){
arr=nitobi.html.Css._getStyleSheetsByName(_fe,s,arr);
}
}
}
return arr;
};
nitobi.html.Css.imageCache={};
nitobi.html.Css.imageCacheDidNotify=false;
nitobi.html.Css.trackPrecache=function(_104){
nitobi.html.Css.precacheArray[_104]=true;
var _105=false;
for(var i in nitobi.html.Css.precacheArray){
if(!nitobi.html.Css.precacheArray[i]){
_105=true;
}
}
if((!nitobi.html.Css.imageCacheDidNotify)&&(!_105)){
nitobi.html.Css.imageCacheDidNotify=true;
nitobi.html.Css.isPrecaching=false;
nitobi.html.Css.onPrecached.notify();
}
};
nitobi.html.Css.precacheArray={};
nitobi.html.Css.isPrecaching=false;
nitobi.html.Css.precacheImages=function(_107){
nitobi.html.Css.isPrecaching=true;
if(!_107){
var ss=document.styleSheets;
for(var i=0;i<ss.length;i++){
nitobi.html.Css.precacheImages(ss[i]);
}
return;
}
var _10a=/.*?url\((.*?)\).*?/;
var _10b=nitobi.html.Css.getRules(_107);
var url=nitobi.html.Css.getPath(_107);
for(var i=0;i<_10b.length;i++){
var rule=_10b[i];
if(rule.styleSheet){
nitobi.html.Css.precacheImages(rule.styleSheet);
}else{
var s=rule.style;
var _10f=s?s.backgroundImage:null;
if(_10f){
_10f=_10f.replace(_10a,"$1");
_10f=nitobi.html.Url.normalize(url,_10f);
if(!nitobi.html.Css.imageCache[_10f]){
var _110=new Image();
_110.src=_10f;
nitobi.html.Css.precacheArray[_10f]=false;
var _111=nitobi.lang.close({},nitobi.html.Css.trackPrecache,[_10f]);
_110.onload=_111;
_110.onerror=_111;
_110.onabort=_111;
nitobi.html.Css.imageCache[_10f]=_110;
try{
if(_110.width>0){
nitobi.html.Css.precacheArray[_10f]=true;
}
}
catch(e){
}
}
}
}
}
if(_107.href!=""&&_107.imports){
for(var i=0;i<_107.imports.length;i++){
nitobi.html.Css.precacheImages(_107.imports[i]);
}
}
};
nitobi.html.Css.getPath=function(_112){
var href=_112.href;
href=nitobi.html.Url.normalize(href);
if(_112.parentStyleSheet&&href.indexOf("/")!=0&&href.indexOf("http://")!=0&&href.indexOf("https://")!=0){
href=nitobi.html.Css.getPath(_112.parentStyleSheet)+href;
}
return href;
};
nitobi.html.Css.getSheetUrl=nitobi.html.Css.getPath;
nitobi.html.Css.findParentStylesheet=function(_114){
var rule=nitobi.html.Css.getRule(_114);
if(rule){
return rule.parentStyleSheet;
}
return null;
};
nitobi.html.Css.findInSheet=function(_116,_117,_118){
if(nitobi.browser.IE6&&typeof _118=="undefined"){
_118=0;
}else{
if(_118>4){
return null;
}
}
_118++;
var _119=nitobi.html.Css.getRules(_117);
for(var rule=0;rule<_119.length;rule++){
var _11b=_119[rule];
if(_11b.styleSheet){
var _11c=nitobi.html.Css.findInSheet(_116,_11b.styleSheet,_118);
if(_11c){
return _11c;
}
}else{
if(_11b.selectorText!=null&&_11b.selectorText.toLowerCase().indexOf(_116)>-1){
if(nitobi.browser.IE){
_11b={selectorText:_11b.selectorText,style:_11b.style,readOnly:_11b.readOnly,parentStyleSheet:_117};
}
return _11b;
}
}
}
if(_117.href!=""&&_117.imports){
for(var i=0;i<_117.imports.length;i++){
var _11c=nitobi.html.Css.findInSheet(_116,_117.imports[i],_118);
if(_11c){
return _11c;
}
}
}
return null;
};
nitobi.html.Css.getClass=function(_11e){
_11e=_11e.toLowerCase();
if(_11e.indexOf(".")!==0){
_11e="."+_11e;
}
var rule=nitobi.html.Css.getRule(_11e);
if(rule!=null){
return rule.style;
}
return null;
};
nitobi.html.Css.getStyleBySelector=function(_120){
var rule=nitobi.html.Css.getRule(_120);
if(rule!=null){
return rule.style;
}
return null;
};
nitobi.html.Css.getRule=function(_122){
_122=_122.toLowerCase();
if(_122.indexOf(".")!==0){
_122="."+_122;
}
var _123=document.styleSheets;
for(var ss=0;ss<_123.length;ss++){
try{
var _125=nitobi.html.Css.findInSheet(_122,_123[ss]);
if(_125){
return _125;
}
}
catch(err){
}
}
return null;
};
nitobi.html.Css.getClassStyle=function(_126,_127){
var _128=nitobi.html.Css.getClass(_126);
if(_128!=null){
return _128[_127];
}else{
return null;
}
};
nitobi.html.Css.setStyle=function(el,rule,_12b){
rule=rule.replace(/\-(\w)/g,function(_12c,p1){
return p1.toUpperCase();
});
el.style[rule]=_12b;
};
nitobi.html.Css.getStyle=function(oElm,_12f){
var _130="";
if(document.defaultView&&document.defaultView.getComputedStyle){
_12f=_12f.replace(/([A-Z])/g,function($1){
return "-"+$1.toLowerCase();
});
_130=document.defaultView.getComputedStyle(oElm,"").getPropertyValue(_12f);
}else{
if(oElm.currentStyle){
_12f=_12f.replace(/\-(\w)/g,function(_132,p1){
return p1.toUpperCase();
});
_130=oElm.currentStyle[_12f];
}
}
return _130;
};
nitobi.html.Css.setOpacities=function(_134,_135){
if(_134.length){
for(var i=0;i<_134.length;i++){
nitobi.html.Css.setOpacity(_134[i],_135);
}
}else{
nitobi.html.Css.setOpacity(_134,_135);
}
};
nitobi.html.Css.setOpacity=function(_137,_138){
var s=_137.style;
if(_138>100){
_138=100;
}
if(_138<0){
_138=0;
}
if(s.filter!=null){
var _13a=s.filter.match(/alpha\(opacity=[\d\.]*?\)/ig);
if(_13a!=null&&_13a.length>0){
s.filter=s.filter.replace(/alpha\(opacity=[\d\.]*?\)/ig,"alpha(opacity="+_138+")");
}else{
s.filter+="alpha(opacity="+_138+")";
}
}else{
s.opacity=(_138/100);
}
};
nitobi.html.Css.getOpacity=function(_13b){
if(_13b==null){
nitobi.lang.throwError(nitobi.error.ArgExpected+" for nitobi.html.Css.getOpacity");
}
if(nitobi.browser.IE){
if(_13b.style.filter==""){
return 100;
}
var s=_13b.style.filter;
s.match(/opacity=([\d\.]*?)\)/ig);
if(RegExp.$1==""){
return 100;
}
return parseInt(RegExp.$1);
}else{
return Math.abs(_13b.style.opacity?_13b.style.opacity*100:100);
}
};
nitobi.html.Css.getCustomStyle=function(_13d,_13e){
if(nitobi.browser.IE){
return nitobi.html.getClassStyle(_13d,_13e);
}else{
var rule=nitobi.html.Css.getRule(_13d);
var re=new RegExp("(.*?)({)(.*?)(})","gi");
var _141=rule.cssText.match(re);
re=new RegExp("("+_13e+")(:)(.*?)(;)","gi");
_141=re.exec(RegExp.$3);
}
};
if(nitobi.browser.MOZ){
Document.prototype.createStyleSheet=function(){
var _142=this.createElement("style");
this.documentElement.childNodes[0].appendChild(_142);
return _142;
};
HTMLStyleElement.prototype.__defineSetter__("cssText",function(_143){
this.innerHTML=_143;
});
HTMLStyleElement.prototype.__defineGetter__("cssText",function(){
return this.innerHTML;
});
}
nitobi.lang.defineNs("nitobi.drawing");
nitobi.drawing.Point=function(x,y){
this.x=x;
this.y=y;
};
nitobi.drawing.Point.prototype.toString=function(){
return "("+this.x+","+this.y+")";
};
nitobi.drawing.rgb=function(r,g,b){
return "#"+((r*65536)+(g*256)+b).toString(16);
};
nitobi.drawing.align=function(_149,_14a,_14b,oh,ow,oy,ox){
oh=oh||0;
ow=ow||0;
oy=oy||0;
ox=ox||0;
var a=_14b;
var td,sd,tt,tb,tl,tr,th,tw,st,sb,sl,sr,sh,sw;
if(nitobi.browser.IE){
td=_14a.getBoundingClientRect();
sd=_149.getBoundingClientRect();
tt=td.top;
tb=td.bottom;
tl=td.left;
tr=td.right;
th=Math.abs(tb-tt);
tw=Math.abs(tr-tl);
st=sd.top;
sb=sd.bottom;
sl=sd.left;
sr=sd.right;
sh=Math.abs(sb-st);
sw=Math.abs(sr-sl);
}else{
if(nitobi.browser.MOZ){
td=document.getBoxObjectFor(_14a);
sd=document.getBoxObjectFor(_149);
tt=td.y;
tl=td.x;
tw=td.width;
th=td.height;
st=sd.y;
sl=sd.x;
sw=sd.width;
sh=sd.height;
}else{
td=nitobi.html.getCoords(_14a);
sd=nitobi.html.getCoords(_149);
tt=td.y;
tl=td.x;
tw=td.width;
th=td.height;
st=sd.y;
sl=sd.x;
sw=sd.width;
sh=sd.height;
}
}
var s=_149.style;
if(a&268435456){
s.height=(th+oh)+"px";
}
if(a&16777216){
s.width=(tw+ow)+"px";
}
if(a&1048576){
s.top=(nitobi.html.getStyleTop(_149)+tt-st+oy)+"px";
}
if(a&65536){
s.top=(nitobi.html.getStyleTop(_149)+tt-st+th-sh+oy)+"px";
}
if(a&4096){
s.left=(nitobi.html.getStyleLeft(_149)-sl+tl+ox)+"px";
}
if(a&256){
s.left=(nitobi.html.getStyleLeft(_149)-sl+tl+tw-sw+ox)+"px";
}
if(a&16){
s.top=(nitobi.html.getStyleTop(_149)+tt-st+oy+Math.floor((th-sh)/2))+"px";
}
if(a&1){
s.left=(nitobi.html.getStyleLeft(_149)-sl+tl+ox+Math.floor((tw-sw)/2))+"px";
}
};
nitobi.drawing.align.SAMEHEIGHT=268435456;
nitobi.drawing.align.SAMEWIDTH=16777216;
nitobi.drawing.align.ALIGNTOP=1048576;
nitobi.drawing.align.ALIGNBOTTOM=65536;
nitobi.drawing.align.ALIGNLEFT=4096;
nitobi.drawing.align.ALIGNRIGHT=256;
nitobi.drawing.align.ALIGNMIDDLEVERT=16;
nitobi.drawing.align.ALIGNMIDDLEHORIZ=1;
nitobi.drawing.alignOuterBox=function(_160,_161,_162,oh,ow,oy,ox,show){
oh=oh||0;
ow=ow||0;
oy=oy||0;
ox=ox||0;
if(nitobi.browser.moz){
td=document.getBoxObjectFor(_161);
sd=document.getBoxObjectFor(_160);
var _168=parseInt(document.defaultView.getComputedStyle(_161,"").getPropertyValue("border-left-width"));
var _169=parseInt(document.defaultView.getComputedStyle(_161,"").getPropertyValue("border-top-width"));
var _16a=parseInt(document.defaultView.getComputedStyle(_160,"").getPropertyValue("border-top-width"));
var _16b=parseInt(document.defaultView.getComputedStyle(_160,"").getPropertyValue("border-bottom-width"));
var _16c=parseInt(document.defaultView.getComputedStyle(_160,"").getPropertyValue("border-left-width"));
var _16d=parseInt(document.defaultView.getComputedStyle(_160,"").getPropertyValue("border-right-width"));
oy=oy+_16a-_169;
ox=ox+_16c-_168;
}
nitobi.drawing.align(_160,_161,_162,oh,ow,oy,ox,show);
};
nitobi.lang.defineNs("nitobi.html");
if(false){
nitobi.html=function(){
};
}
nitobi.html.createElement=function(_16e,_16f,_170){
var elem=document.createElement(_16e);
for(var attr in _16f){
elem.setAttribute(attr,_16f[attr]);
}
for(var _173 in _170){
elem.style[_173]=_170[_173];
}
return elem;
};
nitobi.html.setBgImage=function(elem,src){
var s=nitobi.html.Css.getStyle(elem,"background-image");
if(s!=""&&nitobi.browser.IE){
s=s.replace(/(^url\(")(.*?)("\))/,"$2");
}
};
nitobi.html.getDomNodeByPath=function(Node,Path){
if(nitobi.browser.IE){
}
var _179=Node;
var _17a=Path.split("/");
var len=_17a.length;
for(var i=0;i<len;i++){
if(_179.childNodes[Number(_17a[i])]!=null){
_179=_179.childNodes[Number(_17a[i])];
}else{
alert("Path expression failed."+Path);
}
var s="";
}
return _179;
};
nitobi.html.indexOfChildNode=function(_17e,_17f){
var _180=_17e.childNodes;
for(var i=0;i<_180.length;i++){
if(_180[i]==_17f){
return i;
}
}
return -1;
};
nitobi.html.evalScriptBlocks=function(node){
for(var i=0;i<node.childNodes.length;i++){
var _184=node.childNodes[i];
if(_184.nodeName.toLowerCase()=="script"){
eval(_184.text);
}else{
nitobi.html.evalScriptBlocks(_184);
}
}
};
nitobi.html.position=function(node){
var pos=nitobi.html.getStyle($(node),"position");
if(pos=="static"){
node.style.position="relative";
}
};
nitobi.html.setOpacity=function(_187,_188){
var _189=_187.style;
_189.opacity=(_188/100);
_189.MozOpacity=(_188/100);
_189.KhtmlOpacity=(_188/100);
_189.filter="alpha(opacity="+_188+")";
};
nitobi.html.highlight=function(o,x){
if(o.createTextRange){
o.focus();
var r=document.selection.createRange().duplicate();
r.move("character",0-o.value.length);
r.move("character",x);
r.moveEnd("textedit",1);
r.select();
}else{
if(o.setSelectionRange){
o.setSelectionRange(x,o.value.length);
}
}
};
nitobi.html.setCursor=function(o,x){
if(o.createTextRange){
o.focus();
var r=document.selection.createRange().duplicate();
r.move("character",0-o.value.length);
r.move("character",x);
r.select();
}else{
if(o.setSelectionRange){
o.setSelectionRange(x,x);
}
}
};
nitobi.html.encode=function(str){
str+="";
str=str.replace(/&/g,"&amp;");
str=str.replace(/\"/g,"&quot;");
str=str.replace(/</g,"&lt;");
str=str.replace(/>/g,"&gt;");
str=str.replace(/\n/g,"<br>");
return str;
};
nitobi.html.getElement=function(_191){
if(typeof (_191)=="string"){
return document.getElementById(_191);
}
return _191;
};
if(typeof ($)=="undefined"){
$=nitobi.html.getElement;
}
if(typeof ($F)=="undefined"){
$F=function(id){
var _193=$(id);
if(_193!=null){
return _193.value;
}
return "";
};
}
nitobi.html.getTagName=function(elem){
if(nitobi.browser.IE&&elem.scopeName!=""){
return (elem.scopeName+":"+elem.nodeName).toLowerCase();
}else{
return elem.nodeName.toLowerCase();
}
};
nitobi.html.getStyleTop=function(elem){
return nitobi.lang.parseNumber(elem.style.top);
};
nitobi.html.getStyleLeft=function(elem){
return nitobi.lang.parseNumber(elem.style.left);
};
nitobi.html.getHeight=function(elem){
return elem.offsetHeight;
};
nitobi.html.getWidth=function(elem){
return elem.offsetWidth;
};
if(nitobi.browser.IE){
nitobi.html.getBox=function(elem){
var _19a=nitobi.lang.parseNumber(nitobi.html.getStyle(document.body,"border-top-width"));
var _19b=nitobi.lang.parseNumber(nitobi.html.getStyle(document.body,"border-left-width"));
var _19c=nitobi.lang.parseNumber(document.body.scrollTop)-(_19a==0?2:_19a);
var _19d=nitobi.lang.parseNumber(document.body.scrollLeft)-(_19b==0?2:_19b);
var rect=elem.getBoundingClientRect();
return {top:rect.top+_19c,left:rect.left+_19d,bottom:rect.bottom,right:rect.right,height:rect.bottom-rect.top,width:rect.right-rect.left};
};
}else{
nitobi.html.getBox=function(elem){
var _1a0=0;
var _1a1=0;
var _1a2=elem.parentNode;
while(_1a2.nodeType==1&&_1a2!=document.body){
_1a0+=nitobi.lang.parseNumber(_1a2.scrollTop)-(nitobi.html.getStyle(_1a2,"overflow")=="auto"?nitobi.lang.parseNumber(nitobi.html.getStyle(_1a2,"border-top-width")):0);
_1a1+=nitobi.lang.parseNumber(_1a2.scrollLeft)-(nitobi.html.getStyle(_1a2,"overflow")=="auto"?nitobi.lang.parseNumber(nitobi.html.getStyle(_1a2,"border-left-width")):0);
_1a2=_1a2.parentNode;
}
var _1a3=elem.ownerDocument.getBoxObjectFor(elem);
var _1a4=nitobi.lang.parseNumber(nitobi.html.getStyle(elem,"border-left-width"));
var _1a5=nitobi.lang.parseNumber(nitobi.html.getStyle(elem,"border-right-width"));
var _1a6=nitobi.lang.parseNumber(nitobi.html.getStyle(elem,"border-top-width"));
var top=nitobi.lang.parseNumber(_1a3.y)-_1a0-_1a6;
var left=nitobi.lang.parseNumber(_1a3.x)-_1a1-_1a4;
var _1a9=left+nitobi.lang.parseNumber(_1a3.width);
var _1aa=top+_1a3.height;
var _1ab=nitobi.lang.parseNumber(_1a3.height);
var _1ac=nitobi.lang.parseNumber(_1a3.width);
return {top:top,left:left,bottom:_1aa,right:_1a9,height:_1ab,width:_1ac};
};
nitobi.html.getBox.cache={};
}
nitobi.html.getBox2=nitobi.html.getBox;
nitobi.html.getUniqueId=function(elem){
if(elem.uniqueID){
return elem.uniqueID;
}else{
var t=(new Date()).getTime();
elem.uniqueID=t;
return t;
}
};
nitobi.html.getChildNodeById=function(elem,_1b0,_1b1){
return nitobi.html.getChildNodeByAttribute(elem,"id",_1b0,_1b1);
};
nitobi.html.getChildNodeByAttribute=function(elem,_1b3,_1b4,_1b5){
for(var i=0;i<elem.childNodes.length;i++){
if(elem.nodeType!=3&&Boolean(elem.childNodes[i].getAttribute)){
if(elem.childNodes[i].getAttribute(_1b3)==_1b4){
return elem.childNodes[i];
}
}
}
if(_1b5){
for(var i=0;i<elem.childNodes.length;i++){
var _1b7=nitobi.html.getChildNodeByAttribute(elem.childNodes[i],_1b3,_1b4,_1b5);
if(_1b7!=null){
return _1b7;
}
}
}
return null;
};
nitobi.html.getParentNodeById=function(elem,_1b9){
return nitobi.html.getParentNodeByAtt(elem,"id",_1b9);
};
nitobi.html.getParentNodeByAtt=function(elem,att,_1bc){
while(elem.parentNode!=null){
if(elem.parentNode.getAttribute(att)==_1bc){
return elem.parentNode;
}
elem=elem.parentNode;
}
return null;
};
if(nitobi.browser.IE){
nitobi.html.getFirstChild=function(node){
return node.firstChild;
};
}else{
if(nitobi.browser.MOZ){
nitobi.html.getFirstChild=function(node){
var i=0;
while(i<node.childNodes.length&&node.childNodes[i].nodeType==3){
i++;
}
return node.childNodes[i];
};
}
}
nitobi.html.getScroll=function(){
var _1c0,_1c1=0;
if((nitobi.browser.OPERA==false)&&(document.documentElement.scrollTop>0)){
_1c0=document.documentElement.scrollTop;
_1c1=document.documentElement.scrollLeft;
}else{
_1c0=document.body.scrollTop;
_1c1=document.body.scrollLeft;
}
if(((_1c0==0)&&(document.documentElement.scrollTop>0))||((_1c1==0)&&(document.documentElement.scrollLeft>0))){
_1c0=document.documentElement.scrollTop;
_1c1=document.documentElement.scrollLeft;
}
return {"left":_1c1,"top":_1c0};
};
nitobi.html.getCoords=function(_1c2){
var ew,eh;
try{
var _1c5=_1c2;
ew=_1c2.offsetWidth;
eh=_1c2.offsetHeight;
for(var lx=0,ly=0;_1c2!=null;lx+=_1c2.offsetLeft,ly+=_1c2.offsetTop,_1c2=_1c2.offsetParent){
}
for(;_1c5!=document.body;lx-=_1c5.scrollLeft,ly-=_1c5.scrollTop,_1c5=_1c5.parentNode){
}
}
catch(e){
}
return {"x":lx,"y":ly,"height":eh,"width":ew};
};
nitobi.html.scrollBarWidth=0;
nitobi.html.getScrollBarWidth=function(_1c8){
if(nitobi.html.scrollBarWidth){
return nitobi.html.scrollBarWidth;
}
try{
if(null==_1c8){
var d=document.getElementById("eba.sb.div");
if(null==d){
d=document.createElement("div");
d.id="eba.sb.div";
d.style.width="100px";
d.style.height="100px";
d.style.overflow="auto";
d.innerHTML="<div style='height:200px;'></div>";
d.style.backgroundColor="black";
d.style.position="absolute";
d.style.top="-200px";
document.body.appendChild(d);
}
_1c8=d;
}
if(nitobi.browser.IE){
nitobi.html.scrollBarWidth=Math.abs(_1c8.offsetWidth-_1c8.clientWidth-(_1c8.clientLeft?_1c8.clientLeft*2:0));
}else{
var b=document.getBoxObjectFor(_1c8);
nitobi.html.scrollBarWidth=Math.abs((b.width-_1c8.clientWidth));
}
}
catch(err){
}
return nitobi.html.scrollBarWidth;
};
nitobi.html.align=nitobi.drawing.align;
nitobi.html.emptyElements={HR:true,BR:true,IMG:true,INPUT:true};
nitobi.html.specialElements={TEXTAREA:true};
nitobi.html.permHeight=0;
nitobi.html.permWidth=0;
nitobi.html.getBodyArea=function(){
var _1cb,_1cc,_1cd,_1ce;
var x,y;
var _1d1=navigator.userAgent.toLowerCase();
var _1d2=false;
var _1d3=false;
var _1d4=false;
var ie=false;
var _1d6=false;
if(_1d1.indexOf("opera")>=0){
_1d2=true;
}
if(_1d1.indexOf("firefox")>=0){
_1d3=true;
}
if(_1d1.indexOf("msie")>=0){
ie=true;
}
if(_1d1.indexOf("safari")>=0){
_1d4=true;
}
if(document.compatMode=="CSS1Compat"){
_1d6=true;
}
var de=document.documentElement;
var db=document.body;
if(self.innerHeight){
x=self.innerWidth;
y=self.innerHeight;
}else{
if(de&&de.clientHeight){
x=de.clientWidth;
y=de.clientHeight;
}else{
if(db){
x=db.clientWidth;
y=db.clientHeight;
}
}
}
_1cd=x;
_1ce=y;
if(self.pageYOffset){
x=self.pageXOffset;
y=self.pageYOffset;
}else{
if(de&&de.scrollTop){
x=de.scrollLeft;
y=de.scrollTop;
}else{
if(db){
x=db.scrollLeft;
y=db.scrollTop;
}
}
}
_1cb=x;
_1cc=y;
var _1d9=db.scrollHeight;
var _1da=db.offsetHeight;
if(_1d9>_1da){
x=db.scrollWidth;
y=db.scrollHeight;
}else{
x=db.offsetWidth;
y=db.offsetHeight;
}
nitobi.html.permHeight=y;
nitobi.html.permWidth=x;
if(nitobi.html.permHeight<_1ce){
nitobi.html.permHeight=_1ce;
if(ie&&_1d6){
_1cd+=20;
}
}
if(_1cd<nitobi.html.permWidth){
_1cd=nitobi.html.permWidth;
}
if(nitobi.html.permHeight>_1ce){
_1cd+=20;
}
var _1db,_1dc;
_1db=de.scrollHeight;
_1dc=de.scrollWidth;
return {scrollWidth:_1dc,scrollHeight:_1db,scrollLeft:_1cb,scrollTop:_1cc,clientWidth:_1cd,clientHeight:_1ce,bodyWidth:nitobi.html.permWidth,bodyHeight:nitobi.html.rrPermHeight};
};
nitobi.html.getOuterHtml=function(node){
if(nitobi.browser.IE){
return node.outerHTML;
}else{
var html="";
switch(node.nodeType){
case Node.ELEMENT_NODE:
html+="<";
html+=node.nodeName.toLowerCase();
if(!nitobi.html.specialElements[node.nodeName]){
for(var a=0;a<node.attributes.length;a++){
if(node.attributes[a].nodeName.toLowerCase()!="_moz-userdefined"){
html+=" "+node.attributes[a].nodeName.toLowerCase()+"=\""+node.attributes[a].nodeValue+"\"";
}
}
html+=">";
if(!nitobi.html.emptyElements[node.nodeName]){
html+=node.innerHTML;
html+="</"+node.nodeName.toLowerCase()+">";
}
}else{
switch(node.nodeName){
case "TEXTAREA":
for(var a=0;a<node.attributes.length;a++){
if(node.attributes[a].nodeName.toLowerCase()!="value"){
html+=" "+node.attributes[a].nodeName.toUpperCase()+"=\""+node.attributes[a].nodeValue+"\"";
}else{
var _1e0=node.attributes[a].nodeValue;
}
}
html+=">";
html+=_1e0;
html+="</"+node.nodeName+">";
break;
}
}
break;
case Node.TEXT_NODE:
html+=node.nodeValue;
break;
case Node.COMMENT_NODE:
html+="<!"+"--"+node.nodeValue+"--"+">";
break;
}
return html;
}
};
try{
Node.prototype.swapNode=function(node){
var _1e2=this.nextSibling;
var _1e3=this.parentNode;
node.parentNode.replaceChild(this,node);
_1e3.insertBefore(node,_1e2);
};
HTMLElement.prototype.getBoundingClientRect=function(_1e4,_1e5){
_1e4=_1e4||0;
_1e5=_1e5||0;
var td=document.getBoxObjectFor(this);
var top=td.y-_1e4;
var left=td.x-_1e5;
return {top:top,left:left,bottom:(top+td.height),right:(left+td.width)};
};
HTMLElement.prototype.getClientRects=function(_1e9,_1ea){
_1e9=_1e9||0;
_1ea=_1ea||0;
var td=document.getBoxObjectFor(this);
return new Array({top:(td.y-_1e9),left:(td.x-_1ea),bottom:(td.y+td.height-_1e9),right:(td.x+td.width-_1ea)});
};
HTMLElement.prototype.insertAdjacentElement=function(pos,node){
switch(pos){
case "beforeBegin":
this.parentNode.insertBefore(node,this);
break;
case "afterBegin":
this.insertBefore(node,this.firstChild);
break;
case "beforeEnd":
this.appendChild(node);
break;
case "afterEnd":
if(this.nextSibling){
this.parentNode.insertBefore(node,this.nextSibling);
}else{
this.parentNode.appendChild(node);
}
break;
}
};
HTMLElement.prototype.insertAdjacentHTML=function(_1ee,_1ef,_1f0){
var df;
var r=this.ownerDocument.createRange();
switch(String(_1ee).toLowerCase()){
case "beforebegin":
r.setStartBefore(this);
df=r.createContextualFragment(_1ef);
this.parentNode.insertBefore(df,this);
break;
case "afterbegin":
r.selectNodeContents(this);
r.collapse(true);
df=r.createContextualFragment(_1ef);
this.insertBefore(df,this.firstChild);
break;
case "beforeend":
if(_1f0==true){
this.innerHTML=this.innerHTML+_1ef;
}else{
r.selectNodeContents(this);
r.collapse(false);
df=r.createContextualFragment(_1ef);
this.appendChild(df);
}
break;
case "afterend":
r.setStartAfter(this);
df=r.createContextualFragment(_1ef);
this.parentNode.insertBefore(df,this.nextSibling);
break;
}
};
HTMLElement.prototype.insertAdjacentText=function(pos,s){
var node=document.createTextNode(s);
this.insertAdjacentElement(pos,node);
};
}
catch(e){
}
nitobi.html.Event=function(){
};
nitobi.html.handlerId=0;
nitobi.html.elementId=0;
nitobi.html.elements=[];
nitobi.html.unload=[];
nitobi.html.unloadCalled=false;
nitobi.html.attachEvents=function(_1f6,_1f7,_1f8){
var _1f9=[];
for(var i=0;i<_1f7.length;i++){
var e=_1f7[i];
_1f9.push(nitobi.html.attachEvent(_1f6,e.type,e.handler,_1f8,e.capture||false));
}
return _1f9;
};
nitobi.html.attachEvent=function(_1fc,type,_1fe,_1ff,_200,_201){
if(type=="anyclick"){
if(nitobi.browser.IE){
nitobi.html.attachEvent(_1fc,"dblclick",_1fe,_1ff,_200,_201);
}
type="click";
}
if(!(_1fe instanceof Function)){
nitobi.lang.throwError("Event handler needs to be a Function");
}
_1fc=$(_1fc);
if(type.toLowerCase()=="unload"&&_201!=true){
var _202=_1fe;
if(_1ff!=null){
_202=function(){
_1fe.call(_1ff);
};
}
return this.addUnload(_202);
}
var _203=this.handlerId++;
var _204=this.elementId++;
if(typeof (_1fe.ebaguid)!="undefined"){
_203=_1fe.ebaguid;
}else{
_1fe.ebaguid=_203;
}
if(typeof (_1fc.ebaguid)=="undefined"){
_1fc.ebaguid=_204;
nitobi.html.elements[_204]=_1fc;
}
if(typeof (_1fc.eba_events)=="undefined"){
_1fc.eba_events={};
}
if(_1fc.eba_events[type]==null){
_1fc.eba_events[type]={};
if(_1fc.attachEvent){
_1fc["eba_event_"+type]=function(){
nitobi.html.notify.call(_1fc,window.event);
};
_1fc.attachEvent("on"+type,_1fc["eba_event_"+type]);
if(_200&&_1fc.setCapture!=null){
_1fc.setCapture(true);
}
}else{
if(_1fc.addEventListener){
_1fc["eba_event_"+type]=function(){
nitobi.html.notify.call(_1fc,arguments[0]);
};
_1fc.addEventListener(type,_1fc["eba_event_"+type],_200);
}
}
}
_1fc.eba_events[type][_203]={handler:_1fe,context:_1ff};
return _203;
};
nitobi.html.notify=function(e){
if(!nitobi.browser.IE){
e.srcElement=e.target;
e.fromElement=e.relatedTarget;
e.toElement=e.relatedTarget;
}
e.eventSrc=_206;
nitobi.html.Event=e;
var _206=this;
for(var _207 in _206.eba_events[e.type]){
var _208=_206.eba_events[e.type][_207];
if(typeof (_208.context)=="object"){
_208.handler.call(_208.context,e,_206);
}else{
_208.handler.call(_206,e,_206);
}
}
};
nitobi.html.detachEvents=function(_209,_20a){
for(var i=0;i<_20a.length;i++){
var e=_20a[i];
nitobi.html.detachEvent(_209,e.type,e.handler);
}
};
nitobi.html.detachEvent=function(_20d,type,_20f){
_20d=$(_20d);
var _210=_20f;
if(_20f instanceof Function){
_210=_20f.ebaguid;
}
if(type=="unload"){
this.unload.splice(ebaguid,1);
}
if(_20d.eba_events!=null&&_20d.eba_events[type]!=null&&_20d.eba_events[type][_210]!=null){
var _211=_20d.eba_events[type];
_211[_210]=null;
delete _211[_210];
if(nitobi.collections.isHashEmpty(_211)){
this.m_detach(_20d,type,_20d["eba_event_"+type]);
_20d["eba_event_"+type]=null;
_20d.eba_events[type]=null;
_211=null;
if(_20d.nodeType==1){
_20d.removeAttribute("eba_event_"+type);
}
}
}
return true;
};
nitobi.html.m_detach=function(_212,type,_214){
if(_214!=null&&_214 instanceof Function){
if(_212.detachEvent){
_212.detachEvent("on"+type,_214);
}else{
if(_212.removeEventListener){
_212.removeEventListener(type,_214,false);
}
}
_212["on"+type]=null;
if(type=="unload"){
for(var i=0;i<this.unload.length;i++){
this.unload[i].call(this);
this.unload[i]=null;
}
}
}
};
nitobi.html.detachAllEvents=function(){
for(var i=0;i<nitobi.html.elements.length;i++){
if(typeof (nitobi.html.elements[i])!="undefined"){
for(var _217 in nitobi.html.elements[i].eba_events){
nitobi.html.m_detach(nitobi.html.elements[i],_217,nitobi.html.elements[i]["eba_event_"+_217]);
if(typeof (nitobi.html.elements[i])!="undefined"&&nitobi.html.elements[i].eba_events[_217]!=null){
for(var j=0;j<nitobi.html.elements[i].eba_events[_217].length;j++){
nitobi.html.elements[i].eba_events[_217][j]=null;
}
}
nitobi.html.elements[i]["eba_event_"+_217]=null;
}
}
}
nitobi.html.elements=null;
};
nitobi.html.addUnload=function(_219){
this.unload.push(_219);
return this.unload.length-1;
};
nitobi.html.cancelEvent=function(evt,v){
nitobi.html.stopPropagation(evt);
nitobi.html.preventDefault(evt);
};
nitobi.html.stopPropagation=function(evt){
if(evt==null){
return;
}
if(nitobi.browser.MOZ){
evt.stopPropagation();
}else{
if(nitobi.browser.IE){
evt.cancelBubble=true;
}
}
};
nitobi.html.preventDefault=function(evt,v){
if(evt==null){
return;
}
if(nitobi.browser.MOZ){
evt.preventDefault();
}else{
if(nitobi.browser.IE){
evt.returnValue=false;
}
}
if(v!=null){
e.keyCode=v;
}
};
nitobi.html.getEventCoords=function(evt){
var _220={"x":evt.clientX,"y":evt.clientY};
if(nitobi.browser.IE){
_220.x+=document.documentElement.scrollLeft+document.body.scrollLeft;
_220.y+=document.documentElement.scrollTop+document.body.scrollTop;
}else{
_220.x+=window.scrollX;
_220.y+=window.scrollY;
}
return _220;
};
nitobi.html.getEvent=function(_221){
if(nitobi.browser.IE){
return window.event;
}else{
_221.srcElement=_221.target;
_221.fromElement=_221.relatedTarget;
_221.toElement=_221.relatedTarget;
return _221;
}
};
nitobi.html.createEvent=function(_222,_223,_224,_225){
if(nitobi.browser.IE){
_224.target.fireEvent("on"+_223);
}else{
var _226=document.createEvent(_222);
_226.initKeyEvent(_223,true,true,document.defaultView,_224.ctrlKey,_224.altKey,_224.shiftKey,_224.metaKey,_225.keyCode,_225.charCode);
_224.target.dispatchEvent(_226);
}
};
nitobi.html.unloadEventId=nitobi.html.attachEvent(window,"unload",nitobi.html.detachAllEvents,nitobi.html,false,true);
nitobi.lang.defineNs("nitobi.event");
nitobi.event=function(){
};
nitobi.event.keys={};
nitobi.event.guid=0;
nitobi.event.subscribe=function(key,_228){
nitobi.event.publish(key);
var guid=this.guid++;
this.keys[key].add(_228,guid);
return guid;
};
nitobi.event.unsubscribe=function(key,guid){
if(this.keys[key]==null){
return true;
}
this.keys[key].remove(guid);
};
nitobi.event.evaluate=function(func,_22d){
var _22e=true;
if(typeof func=="string"){
func=func.replace(/eventArgs/gi,"arguments[1]");
var _22f=eval(func);
_22e=(typeof (_22f)=="undefined"?true:_22f);
}
return _22e;
};
nitobi.event.publish=function(key){
if(this.keys[key]==null){
this.keys[key]=new nitobi.event.Key();
}
};
nitobi.event.notify=function(key,_232){
if(this.keys[key]!=null){
return this.keys[key].notify(_232);
}else{
return true;
}
};
nitobi.event.dispose=function(){
for(var key in this.keys){
if(typeof (this.keys[key])=="function"){
this.keys[key].dispose();
}
}
this.keys=null;
};
nitobi.event.Key=function(){
this.handlers={};
};
nitobi.event.Key.prototype.add=function(_234,guid){
this.handlers[guid]=_234;
};
nitobi.event.Key.prototype.remove=function(guid){
this.handlers[guid]=null;
delete this.handlers[guid];
};
nitobi.event.Key.prototype.notify=function(_237){
var fail=false;
for(var item in this.handlers){
var _23a=this.handlers[item];
if(_23a instanceof Function){
var rv=(_23a.apply(this,arguments)==false);
fail=fail||rv;
}else{
}
}
return !fail;
};
nitobi.event.Key.prototype.dispose=function(){
for(var _23c in this.handlers){
this.handlers[_23c]=null;
}
};
nitobi.event.Args=function(src){
this.source=src;
};
nitobi.event.Args.prototype.callback=function(){
};
nitobi.html.cancelBubble=nitobi.html.cancelEvent;
nitobi.html.getCssRules=nitobi.html.Css.getRules;
nitobi.html.findParentStylesheet=nitobi.html.Css.findParentStylesheet;
nitobi.html.getClass=nitobi.html.Css.getClass;
nitobi.html.getStyle=nitobi.html.Css.getStyle;
nitobi.html.addClass=nitobi.html.Css.addClass;
nitobi.html.removeClass=nitobi.html.Css.removeClass;
nitobi.html.getClassStyle=nitobi.html.Css.getClassStyle;
nitobi.html.normalizeUrl=nitobi.html.Url.normalize;
nitobi.html.setUrlParameter=nitobi.html.Url.setParameter;
nitobi.lang.defineNs("nitobi.base.XmlNamespace");
nitobi.base.XmlNamespace.prefix="ntb";
nitobi.base.XmlNamespace.uri="http://www.nitobi.com";
nitobi.lang.defineNs("nitobi.collections");
if(false){
nitobi.collections=function(){
};
}
nitobi.collections.IEnumerable=function(){
this.list=new Array();
this.length=0;
};
nitobi.collections.IEnumerable.prototype.add=function(obj){
this.list[this.getLength()]=obj;
this.length++;
};
nitobi.collections.IEnumerable.prototype.insert=function(_23f,obj){
this.list.splice(_23f,0,obj);
this.length++;
};
nitobi.collections.IEnumerable.createNewArray=function(obj,_242){
var _243;
_242=_242||0;
if(obj.count){
_243=obj.count;
}
if(obj.length){
_243=obj.length;
}
var x=new Array(_243-_242);
for(var i=_242;i<_243;i++){
x[i-_242]=obj[i];
}
return x;
};
nitobi.collections.IEnumerable.prototype.get=function(_246){
if(_246<0||_246>=this.getLength()){
nitobi.lang.throwError(nitobi.error.OutOfBounds);
}
return this.list[_246];
};
nitobi.collections.IEnumerable.prototype.set=function(_247,_248){
if(_247<0||_247>=this.getLength()){
nitobi.lang.throwError(nitobi.error.OutOfBounds);
}
this.list[_247]=_248;
};
nitobi.collections.IEnumerable.prototype.indexOf=function(obj){
for(var i=0;i<this.getLength();i++){
if(this.list[i]===obj){
return i;
}
}
return -1;
};
nitobi.collections.IEnumerable.prototype.remove=function(_24b){
var i;
if(typeof (_24b)!="number"){
i=this.indexOf(_24b);
}else{
i=_24b;
}
if(-1==i||i<0||i>=this.getLength()){
nitobi.lang.throwError(nitobi.error.OutOfBounds);
}
this.list[i]=null;
this.list.splice(i,1);
this.length--;
};
nitobi.collections.IEnumerable.prototype.getLength=function(){
return this.length;
};
nitobi.collections.IEnumerable.prototype.each=function(func){
var l=this.length;
var list=this.list;
for(var i=0;i<l;i++){
func(list[i]);
}
};
nitobi.lang.defineNs("nitobi.base");
nitobi.base.ISerializable=function(_251,id,xml,_254){
nitobi.Object.call(this);
if(typeof (this.ISerializableInitialized)=="undefined"){
this.ISerializableInitialized=true;
}else{
return;
}
this.xmlNode=null;
this.setXmlNode(_251);
if(_251!=null){
this.profile=nitobi.base.Registry.getInstance().getCompleteProfile({idField:null,tagName:_251.nodeName});
}else{
this.profile=nitobi.base.Registry.getInstance().getProfileByInstance(this);
}
this.onDeserialize=new nitobi.base.Event();
this.onSetParentObject=new nitobi.base.Event();
this.factory=nitobi.base.Factory.getInstance();
this.objectHash={};
this.onCreateObject=new nitobi.base.Event();
if(_251!=null){
this.deserializeFromXmlNode(this.getXmlNode());
}else{
if(this.factory!=null&&this.profile.tagName!=null){
this.createByProfile(this.profile,this.getXmlNode());
}else{
if(xml!=null&&_251!=null){
this.createByXml(xml);
}
}
}
this.disposal.push(this.xmlNode);
};
nitobi.lang.extend(nitobi.base.ISerializable,nitobi.Object);
nitobi.base.ISerializable.guidMap={};
nitobi.base.ISerializable.prototype.ISerializableImplemented=true;
nitobi.base.ISerializable.prototype.getProfile=function(){
return this.profile;
};
nitobi.base.ISerializable.prototype.createByProfile=function(_255,_256){
if(_256==null){
var xml="<"+_255.tagName+" xmlns:"+nitobi.base.XmlNamespace.prefix+"=\""+nitobi.base.XmlNamespace.uri+"\" />";
var _258=nitobi.xml.createXmlDoc(xml);
this.setXmlNode(_258.firstChild);
this.deserializeFromXmlNode(this.xmlNode);
}else{
this.deserializeFromXmlNode(_256);
this.setXmlNode(_256);
}
};
nitobi.base.ISerializable.prototype.createByXml=function(xml){
this.deserializeFromXml(xml);
};
nitobi.base.ISerializable.prototype.getParentObject=function(){
return this.parentObj;
};
nitobi.base.ISerializable.prototype.setParentObject=function(_25a){
this.parentObj=_25a;
this.onSetParentObject.notify();
};
nitobi.base.ISerializable.prototype.addChildObject=function(_25b){
this.addToCache(_25b);
_25b.setParentObject(this);
var _25c=_25b.getXmlNode();
if(!this.areGuidsGenerated(_25c)){
_25c=this.generateGuids(_25c);
_25b.setXmlNode(_25c);
}
this.xmlNode.appendChild(_25c);
};
nitobi.base.ISerializable.prototype.insertBeforeChildObject=function(obj,_25e){
_25e=_25e?_25e.getXmlNode():null;
this.addToCache(obj);
obj.setParentObject(this);
var _25f=obj.getXmlNode();
if(!this.areGuidsGenerated(_25f)){
_25f=this.generateGuids(_25f);
obj.setXmlNode(_25f);
}
this.xmlNode.insertBefore(_25f,_25e);
};
nitobi.base.ISerializable.prototype.createElement=function(name){
var _261;
if(this.xmlNode==null||this.xmlNode.ownerDocument==null){
_261=nitobi.xml.createXmlDoc();
}else{
_261=this.xmlNode.ownerDocument;
}
if(nitobi.browser.IE){
return _261.createNode(1,name,nitobi.base.XmlNamespace.uri);
}else{
if(_261.createElementNS){
return _261.createElementNS(nitobi.base.XmlNamespace.uri,name);
}else{
nitobi.lang.throwError("Unable to create a new xml node on this browser.");
}
}
};
nitobi.base.ISerializable.prototype.deleteChildObject=function(id){
this.removeFromCache(id);
var e=this.getElement(id);
if(e!=null){
e.parentNode.removeChild(e);
}
};
nitobi.base.ISerializable.prototype.addToCache=function(obj){
this.objectHash[obj.getId()]=obj;
};
nitobi.base.ISerializable.prototype.removeFromCache=function(id){
this.objectHash[id]=null;
};
nitobi.base.ISerializable.prototype.inCache=function(id){
return (this.objectHash[id]!=null);
};
nitobi.base.ISerializable.prototype.flushCache=function(){
this.objectHash={};
};
nitobi.base.ISerializable.prototype.areGuidsGenerated=function(_267){
if(_267==null||_267.ownerDocument==null){
return false;
}
if(nitobi.browser.IE){
var node=_267.ownerDocument.documentElement;
if(node==null){
return false;
}else{
var id=node.getAttribute("id");
if(id==null||id==""){
return false;
}else{
return (nitobi.base.ISerializable.guidMap[id]!=null);
}
}
}else{
return (_267.ownerDocument.generatedGuids==true);
}
};
nitobi.base.ISerializable.prototype.setGuidsGenerated=function(_26a,_26b){
if(_26a==null||_26a.ownerDocument==null){
return;
}
if(nitobi.browser.IE){
var node=_26a.ownerDocument.documentElement;
if(node!=null){
var id=node.getAttribute("id");
if(id!=null&&id!=""){
nitobi.base.ISerializable.guidMap[id]=true;
}
}
}else{
_26a.ownerDocument.generatedGuids=true;
}
};
nitobi.base.ISerializable.prototype.generateGuids=function(_26e){
nitobi.base.uniqueIdGeneratorProc.addParameter("guid",nitobi.component.getUniqueId(),"");
var doc=nitobi.xml.transformToXml(_26e,nitobi.base.uniqueIdGeneratorProc);
this.saveDocument=doc;
this.setGuidsGenerated(doc.documentElement,true);
return doc.documentElement;
};
nitobi.base.ISerializable.prototype.deserializeFromXmlNode=function(_270){
if(!this.areGuidsGenerated(_270)){
_270=this.generateGuids(_270);
}
this.setXmlNode(_270);
this.flushCache();
if(this.profile==null){
this.profile=nitobi.base.Registry.getInstance().getCompleteProfile({idField:null,tagName:_270.nodeName});
}
this.onDeserialize.notify();
};
nitobi.base.ISerializable.prototype.deserializeFromXml=function(xml){
var doc=nitobi.xml.createXmlDoc(xml);
var node=this.generateGuids(doc.firstChild);
this.setXmlNode(node);
this.onDeserialize.notify();
};
nitobi.base.ISerializable.prototype.getChildObject=function(id){
var obj=null;
obj=this.objectHash[id];
if(obj==null){
var _276=this.getElement(id);
if(_276==null){
return null;
}else{
obj=this.factory.createByNode(_276);
this.onCreateObject.notify(obj);
this.addToCache(obj);
}
obj.setParentObject(this);
}
return obj;
};
nitobi.base.ISerializable.prototype.getChildObjectById=function(id){
return this.getChildObject(id);
};
nitobi.base.ISerializable.prototype.getElement=function(id){
try{
var node=this.xmlNode.selectSingleNode("*[@id='"+id+"']");
return node;
}
catch(err){
nitobi.lang.throwError(nitobi.error.Unexpected,err);
}
};
nitobi.base.ISerializable.prototype.getFactory=function(){
return this.factory;
};
nitobi.base.ISerializable.prototype.setFactory=function(_27a){
this.factory=factory;
};
nitobi.base.ISerializable.prototype.getXmlNode=function(){
return this.xmlNode;
};
nitobi.base.ISerializable.prototype.setXmlNode=function(_27b){
if(nitobi.lang.typeOf(_27b)==nitobi.lang.type.XMLDOC&&_27b!=null){
this.ownerDocument=_27b;
_27b=nitobi.html.getFirstChild(_27b);
}else{
if(_27b!=null){
this.ownerDocument=_27b.ownerDocument;
}
}
if(_27b!=null&&nitobi.browser.MOZ&&_27b.ownerDocument==null){
nitobi.lang.throwError(nitobi.error.OrphanXmlNode+" ISerializable.setXmlNode");
}
this.xmlNode=_27b;
};
nitobi.base.ISerializable.prototype.serializeToXml=function(){
return nitobi.xml.serialize(this.xmlNode);
};
nitobi.base.ISerializable.prototype.getAttribute=function(name,_27d){
if(this[name]!=null){
return this[name];
}
var _27e=this.xmlNode.getAttribute(name);
return _27e===null?_27d:_27e;
};
nitobi.base.ISerializable.prototype.setAttribute=function(name,_280){
this[name]=_280;
this.xmlNode.setAttribute(name.toLowerCase(),_280!=null?_280.toString():"");
};
nitobi.base.ISerializable.prototype.setIntAttribute=function(name,_282){
var n=parseInt(_282);
if(_282!=null&&(typeof (n)!="number"||isNaN(n))){
nitobi.lang.throwError(name+" is not an integer and therefore cannot be set. It's value was "+_282);
}
this.setAttribute(name,_282);
};
nitobi.base.ISerializable.prototype.getIntAttribute=function(name,_285){
var x=this.getAttribute(name,_285);
if(x==null||x==""){
return 0;
}
var tx=parseInt(x);
if(isNaN(tx)){
nitobi.lang.throwError("ISerializable attempting to get "+name+" which was supposed to be an int but was actually NaN");
}
return tx;
};
nitobi.base.ISerializable.prototype.setBoolAttribute=function(name,_289){
_289=nitobi.lang.getBool(_289);
if(_289!=null&&typeof (_289)!="boolean"){
nitobi.lang.throwError(name+" is not an boolean and therefore cannot be set. It's value was "+_289);
}
this.setAttribute(name,(_289?"true":"false"));
};
nitobi.base.ISerializable.prototype.getBoolAttribute=function(name,_28b){
var x=this.getAttribute(name,_28b);
if(typeof (x)=="string"&&x==""){
return null;
}
var tx=nitobi.lang.getBool(x);
if(tx==null){
nitobi.lang.throwError("ISerializable attempting to get "+name+" which was supposed to be a bool but was actually "+x);
}
return tx;
};
nitobi.base.ISerializable.prototype.setDateAttribute=function(name,_28f){
this.setAttribute(name,_28f);
};
nitobi.base.ISerializable.prototype.getDateAttribute=function(name,_291){
if(this[name]){
return this[name];
}
var _292=this.getAttribute(name,_291);
return _292?new Date(_292):null;
};
nitobi.base.ISerializable.prototype.getId=function(){
return this.getAttribute("id");
};
nitobi.base.ISerializable.prototype.getChildObjectId=function(_293,_294){
var _295=(typeof (_293.className)=="string"?_293.tagName:_293.getXmlNode().nodeName);
var _296=_295;
if(_294){
_296+="[@instancename='"+_294+"']";
}
var node=this.getXmlNode().selectSingleNode(_296);
if(null==node){
return null;
}else{
return node.getAttribute("id");
}
};
nitobi.base.ISerializable.prototype.setObject=function(_298,_299){
if(_298.ISerializableImplemented!=true){
nitobi.lang.throwError(nitobi.error.ExpectedInterfaceNotFound+" ISerializable");
}
var id=this.getChildObjectId(_298,_299);
if(null!=id){
this.deleteChildObject(id);
}
if(_299){
_298.setAttribute("instancename",_299);
}
this.addChildObject(_298);
};
nitobi.base.ISerializable.prototype.getObject=function(_29b,_29c){
var id=this.getChildObjectId(_29b,_29c);
if(null==id){
return id;
}
return this.getChildObject(id);
};
nitobi.base.ISerializable.prototype.getObjectById=function(id){
return this.getChildObject(id);
};
nitobi.base.ISerializable.prototype.isDescendantExists=function(id){
var node=this.getXmlNode();
var _2a1=node.selectSingleNode("//*[@id='"+id+"']");
return (_2a1!=null);
};
nitobi.base.ISerializable.prototype.getPathToLeaf=function(id){
var node=this.getXmlNode();
var _2a4=node.selectSingleNode("//*[@id='"+id+"']");
if(nitobi.browser.IE){
_2a4.ownerDocument.setProperty("SelectionLanguage","XPath");
}
var _2a5=_2a4.selectNodes("./ancestor-or-self::*");
var _2a6=this.getId();
var _2a7=0;
for(var i=0;i<_2a5.length;i++){
if(_2a5[i].getAttribute("id")==_2a6){
_2a7=i+1;
break;
}
}
var arr=nitobi.collections.IEnumerable.createNewArray(_2a5,_2a7);
return arr.reverse();
};
nitobi.base.ISerializable.prototype.isDescendantInstantiated=function(id){
var node=this.getXmlNode();
var _2ac=node.selectSingleNode("//*[@id='"+id+"']");
if(nitobi.browser.IE){
_2ac.ownerDocument.setProperty("SelectionLanguage","XPath");
}
var _2ad=_2ac.selectNodes("ancestor::*");
var _2ae=false;
var obj=this;
for(var i=0;i<_2ad.length;i++){
if(_2ae){
var _2b1=_2ad[i].getAttribute("id");
instantiated=obj.inCache(_2b1);
if(!instantiated){
return false;
}
obj=this.getObjectById(_2b1);
}
if(_2ad[i].getAttribute("id")==this.getId()){
_2ae=true;
}
}
return obj.inCache(id);
};
nitobi.lang.defineNs("nitobi.base");
nitobi.base.Registry=function(){
this.classMap={};
this.tagMap={};
};
nitobi.base.Registry.instance=null;
nitobi.base.Registry.getInstance=function(){
if(nitobi.base.Registry.instance==null){
nitobi.base.Registry.instance=new nitobi.base.Registry();
}
return nitobi.base.Registry.instance;
};
nitobi.base.Registry.prototype.getProfileByClass=function(_2b2){
return this.classMap[_2b2];
};
nitobi.base.Registry.prototype.getProfileByInstance=function(_2b3){
var _2b4=nitobi.lang.getFirstFunction(_2b3);
var p=_2b4.value.prototype;
var _2b6=null;
var _2b7=0;
for(var _2b8 in this.classMap){
var _2b9=this.classMap[_2b8].classObject;
var _2ba=0;
while(_2b9&&_2b3 instanceof _2b9){
_2b9=_2b9.baseConstructor;
_2ba++;
}
if(_2ba>_2b7){
_2b7=_2ba;
_2b6=_2b8;
}
}
if(_2b6){
return this.getProfileByClass(_2b6);
}else{
return null;
}
};
nitobi.base.Registry.prototype.getProfileByTag=function(_2bb){
return this.tagMap[_2bb];
};
nitobi.base.Registry.prototype.getCompleteProfile=function(_2bc){
if(nitobi.lang.isDefined(_2bc.className)&&_2bc.className!=null){
return this.classMap[_2bc.className];
}
if(nitobi.lang.isDefined(_2bc.tagName)&&_2bc.tagName!=null){
return this.tagMap[_2bc.tagName];
}
nitobi.lang.throwError("A complete class profile could not be found. Insufficient information was provided.");
};
nitobi.base.Registry.prototype.register=function(_2bd){
if(!nitobi.lang.isDefined(_2bd.tagName)||null==_2bd.tagName){
nitobi.lang.throwError("Illegal to register a class without a tagName.");
}
if(!nitobi.lang.isDefined(_2bd.className)||null==_2bd.className){
nitobi.lang.throwError("Illegal to register a class without a className.");
}
this.tagMap[_2bd.tagName]=_2bd;
this.classMap[_2bd.className]=_2bd;
};
nitobi.lang.defineNs("nitobi.base");
nitobi.base.Factory=function(){
this.registry=nitobi.base.Registry.getInstance();
};
nitobi.lang.extend(nitobi.base.Factory,nitobi.Object);
nitobi.base.Factory.instance=null;
nitobi.base.Factory.prototype.createByClass=function(_2be){
try{
return nitobi.lang.newObject(_2be,arguments,1);
}
catch(err){
nitobi.lang.throwError("The Factory (createByClass) could not create the class "+_2be+".",err);
}
};
nitobi.base.Factory.prototype.createByNode=function(_2bf){
try{
if(null==_2bf){
nitobi.lang.throwError(nitobi.error.ArgExpected);
}
if(nitobi.lang.typeOf(_2bf)==nitobi.lang.type.XMLDOC){
_2bf=nitobi.xml.getChildNodes(_2bf)[0];
}
var _2c0=this.registry.getProfileByTag(_2bf.nodeName).className;
var _2c1=_2bf.ownerDocument;
var _2c2=Array.prototype.slice.call(arguments,0);
var obj=nitobi.lang.newObject(_2c0,_2c2,0);
return obj;
}
catch(err){
nitobi.lang.throwError("The Factory (createByNode) could not create the class "+_2c0+".",err);
}
};
nitobi.base.Factory.prototype.createByProfile=function(_2c4){
try{
return nitobi.lang.newObject(_2c4.className,arguments,1);
}
catch(err){
nitobi.lang.throwError("The Factory (createByProfile) could not create the class "+_2c4.className+".",err);
}
};
nitobi.base.Factory.prototype.createByTag=function(_2c5){
try{
var _2c6=this.registry.getProfileByTag(_2c5).className;
var _2c7=Array.prototype.slice.call(arguments,0);
return nitobi.lang.newObject(_2c6,_2c7,1);
}
catch(err){
nitobi.lang.throwError("The Factory (createByTag) could not create the class "+_2c6+".",err);
}
};
nitobi.base.Factory.getInstance=function(){
if(nitobi.base.Factory.instance==null){
nitobi.base.Factory.instance=new nitobi.base.Factory();
}
return nitobi.base.Factory.instance;
};
nitobi.lang.defineNs("nitobi.base");
nitobi.base.Profile=function(_2c8,_2c9,_2ca,_2cb,_2cc){
this.className=_2c8;
this.classObject=eval(_2c8);
this.schema=_2c9;
this.singleton=_2ca;
this.tagName=_2cb;
this.idField=_2cc||"id";
};
nitobi.lang.defineNs("nitobi.base");
if(false){
nitobi.base=function(){
};
}
nitobi.base.Declaration=function(){
nitobi.base.Declaration.baseConstructor.call(this);
this.xmlDoc=null;
};
nitobi.lang.extend(nitobi.base.Declaration,nitobi.Object);
nitobi.base.Declaration.prototype.loadHtml=function(_2cd){
try{
_2cd=$(_2cd);
this.xmlDoc=nitobi.xml.parseHtml(_2cd);
return this.xmlDoc;
}
catch(err){
nitobi.lang.throwError(nitobi.error.DeclarationParseError,err);
}
};
nitobi.base.Declaration.prototype.getXmlDoc=function(){
return this.xmlDoc;
};
nitobi.base.Declaration.prototype.serializeToXml=function(){
return nitobi.xml.serialize(this.xmlDoc);
};
nitobi.lang.defineNs("nitobi.base");
nitobi.base.DateMath={DAY:"d",WEEK:"w",MONTH:"m",YEAR:"y",ONE_DAY_MS:86400000};
nitobi.base.DateMath._add=function(date,unit,_2d0){
if(unit==this.DAY){
date.setDate(date.getDate()+_2d0);
}else{
if(unit==this.WEEK){
date.setDate(date.getDate()+7*_2d0);
}else{
if(unit==this.MONTH){
date.setMonth(date.getMonth()+_2d0);
}else{
if(unit==this.YEAR){
date.setFullYear(date.getFullYear()+_2d0);
}
}
}
}
return date;
};
nitobi.base.DateMath.add=function(date,unit,_2d3){
return this._add(date,unit,_2d3);
};
nitobi.base.DateMath.subtract=function(date,unit,_2d6){
return this._add(date,unit,-1*_2d6);
};
nitobi.base.DateMath.after=function(date,_2d8){
return (date-_2d8)>0;
};
nitobi.base.DateMath.between=function(date,_2da,end){
return (date-_2da)>=0&&(end-date)>0;
};
nitobi.base.DateMath.before=function(date,_2dd){
return (date-_2dd)<0;
};
nitobi.base.DateMath.clone=function(date){
var n=new Date(date.toString());
return n;
};
nitobi.base.DateMath.isLeapYear=function(date){
var y=date.getFullYear();
var _1=String(y/4).indexOf(".")==-1;
var _2=String(y/100).indexOf(".")==-1;
var _3=String(y/400).indexOf(".")==-1;
return (_3)?true:(_1&&!_2)?true:false;
};
nitobi.base.DateMath.getMonthDays=function(date){
return [31,(this.isLeapYear(date))?29:28,31,30,31,30,31,31,30,31,30,31][date.getMonth()];
};
nitobi.base.DateMath.getMonthEnd=function(date){
return new Date(date.getFullYear(),date.getMonth(),this.getMonthDays(date));
};
nitobi.base.DateMath.getMonthStart=function(date){
return new Date(date.getFullYear(),date.getMonth(),1);
};
nitobi.base.DateMath.isToday=function(date){
var _2e9=this.resetTime(new Date());
var end=this.add(this.clone(_2e9),this.DAY,1);
return this.between(date,_2e9,end);
};
nitobi.base.DateMath.parse=function(str){
};
nitobi.base.DateMath.getWeekNumber=function(date){
var _2ed=this.getJanuary1st(date);
return Math.ceil(this.getNumberOfDays(_2ed,date)/7);
};
nitobi.base.DateMath.getNumberOfDays=function(_2ee,end){
var _2f0=this.resetTime(this.clone(end)).getTime()-this.resetTime(this.clone(_2ee)).getTime();
return Math.round(_2f0/this.ONE_DAY_MS)+1;
};
nitobi.base.DateMath.getJanuary1st=function(date){
return new Date(date.getFullYear(),0,1);
};
nitobi.base.DateMath.resetTime=function(date){
date.setHours(0);
date.setMinutes(0);
date.setSeconds(0);
date.setMilliseconds(0);
return date;
};
nitobi.base.DateMath.parseIso8601=function(date){
return new Date(date.replace(/^(....).(..).(..).(.*)$/,"$1/$2/$3 $4"));
};
nitobi.base.DateMath.toIso8601=function(date){
if(nitobi.base.DateMath.invalid(date)){
return "";
}
var pz=nitobi.lang.padZeros;
return date.getFullYear()+"-"+pz(date.getMonth()+1)+"-"+pz(date.getDate())+" "+pz(date.getHours())+":"+pz(date.getMinutes())+":"+pz(date.getSeconds());
};
nitobi.base.DateMath.invalid=function(date){
return (!date)||(date.toString()=="Invalid Date");
};
nitobi.lang.defineNs("nitobi.base");
nitobi.base.EventArgs=function(_2f7,_2f8){
this.source=_2f7;
this.event=_2f8||null;
};
nitobi.lang.defineNs("nitobi.collections");
nitobi.collections.IList=function(){
nitobi.base.ISerializable.call(this);
nitobi.collections.IEnumerable.call(this);
};
nitobi.lang.implement(nitobi.collections.IList,nitobi.base.ISerializable);
nitobi.lang.implement(nitobi.collections.IList,nitobi.collections.IEnumerable);
nitobi.collections.IList.prototype.IListImplemented=true;
nitobi.collections.IList.prototype.add=function(obj){
nitobi.collections.IEnumerable.prototype.add.call(this,obj);
if(obj.ISerializableImplemented==true&&obj.profile!=null){
this.addChildObject(obj);
}
};
nitobi.collections.IList.prototype.insert=function(_2fa,obj){
var _2fc=this.get(_2fa);
nitobi.collections.IEnumerable.prototype.insert.call(this,_2fa,obj);
if(obj.ISerializableImplemented==true&&obj.profile!=null){
this.insertBeforeChildObject(obj,_2fc);
}
};
nitobi.collections.IList.prototype.addToCache=function(obj,_2fe){
nitobi.base.ISerializable.prototype.addToCache.call(this,obj);
this.list[_2fe]=obj;
};
nitobi.collections.IList.prototype.removeFromCache=function(_2ff){
nitobi.base.ISerializable.prototype.removeFromCache.call(this,this.list[_2ff].getId());
};
nitobi.collections.IList.prototype.flushCache=function(){
nitobi.base.ISerializable.prototype.flushCache.call(this);
this.list=new Array();
};
nitobi.collections.IList.prototype.get=function(_300){
if(typeof (_300)=="object"){
return _300;
}
if(_300<0||_300>=this.getLength()){
nitobi.lang.throwError(nitobi.error.OutOfBounds);
}
var obj=null;
if(this.list[_300]!=null){
obj=this.list[_300];
}
if(obj==null){
var _302=nitobi.xml.getChildNodes(this.xmlNode)[_300];
if(_302==null){
return null;
}else{
obj=this.factory.createByNode(_302);
this.onCreateObject.notify(obj);
nitobi.collections.IList.prototype.addToCache.call(this,obj,_300);
}
obj.setParentObject(this);
}
return obj;
};
nitobi.collections.IList.prototype.getById=function(id){
var node=this.xmlNode.selectSingleNode("*[@id='"+id+"']");
var _305=nitobi.xml.indexOfChildNode(node.parentNode,node);
return this.get(_305);
};
nitobi.collections.IList.prototype.set=function(_306,_307){
if(_306<0||_306>=this.getLength()){
nitobi.lang.throwError(nitobi.error.OutOfBounds);
}
try{
if(_307.ISerializableImplemented==true){
var obj=this.get(_306);
if(obj.getXmlNode()!=_307.getXmlNode()){
var _309=this.xmlNode.insertBefore(_307.getXmlNode(),obj.getXmlNode());
this.xmlNode.removeChild(obj.getXmlNode());
obj.setXmlNode(_309);
}
}
_307.setParentObject(this);
nitobi.collections.IList.prototype.addToCache.call(this,_307,_306);
}
catch(err){
nitobi.lang.throwError(nitobi.error.Unexpected,err);
}
};
nitobi.collections.IList.prototype.remove=function(_30a){
var i;
if(typeof (_30a)!="number"){
i=this.indexOf(_30a);
}else{
i=_30a;
}
var obj=this.get(i);
nitobi.collections.IEnumerable.prototype.remove.call(this,_30a);
this.xmlNode.removeChild(obj.getXmlNode());
};
nitobi.collections.IList.prototype.getLength=function(){
return nitobi.xml.getChildNodes(this.xmlNode).length;
};
nitobi.lang.defineNs("nitobi.collections");
nitobi.collections.List=function(_30d){
nitobi.collections.List.baseConstructor.call(this);
nitobi.collections.IList.call(this);
};
nitobi.lang.extend(nitobi.collections.List,nitobi.Object);
nitobi.lang.implement(nitobi.collections.List,nitobi.collections.IList);
nitobi.base.Registry.getInstance().register(new nitobi.base.Profile("nitobi.collections.List",null,false,"ntb:list"));
nitobi.lang.defineNs("nitobi.collections");
nitobi.collections.isHashEmpty=function(hash){
var _30f=true;
for(var item in hash){
if(hash[item]!=null&&hash[item]!=""){
_30f=false;
break;
}
}
return _30f;
};
nitobi.collections.hashLength=function(hash){
var _312=0;
for(var item in hash){
_312++;
}
return _312;
};
nitobi.collections.serialize=function(hash){
var s="";
for(var item in hash){
var _317=hash[item];
var type=typeof (_317);
if(type=="string"||type=="number"){
s+="'"+item+"':'"+_317+"',";
}
}
s=s.substring(0,s.length-1);
return "{"+s+"}";
};
nitobi.lang.defineNs("nitobi.ui");
if(false){
nitobi.ui=function(){
};
}
nitobi.ui.setWaitScreen=function(_319){
if(_319){
var sc=nitobi.html.getBodyArea();
var me=nitobi.html.createElement("div",{"id":"NTB_waitDiv"},{"verticalAlign":"middle","color":"#000000","font":"12px Trebuchet MS, Georgia, Verdana","textAlign":"center","background":"#ffffff","border":"1px solid #000000","padding":"0px","position":"absolute","top":(sc.clientHeight/2)+sc.scrollTop-30+"px","left":(sc.clientWidth/2)+sc.scrollLeft-100+"px","width":"200px","height":"60px"});
me.innerHTML="<table height=60 width=200><tr><td valign=center height=60 align=center>Please wait..</td></tr></table>";
document.getElementsByTagName("body").item(0).appendChild(me);
}else{
var me=$("NTB_waitDiv");
try{
document.getElementsByTagName("body").item(0).removeChild(me);
}
catch(e){
}
}
};
nitobi.lang.defineNs("nitobi.ui");
nitobi.ui.IStyleable=function(_31c){
this.htmlNode=_31c||null;
this.onBeforeSetStyle=new nitobi.base.Event();
this.onSetStyle=new nitobi.base.Event();
};
nitobi.ui.IStyleable.prototype.getHtmlNode=function(){
return this.htmlNode;
};
nitobi.ui.IStyleable.prototype.setHtmlNode=function(node){
this.htmlNode=node;
};
nitobi.ui.IStyleable.prototype.setStyle=function(name,_31f){
if(this.onBeforeSetStyle.notify(new nitobi.ui.StyleEventArgs(this,this.onBeforeSetStyle,name,_31f))&&this.getHtmlNode()!=null){
nitobi.html.Css.setStyle(this.getHtmlNode(),name,_31f);
this.onSetStyle.notify(new nitobi.ui.StyleEventArgs(this,this.onSetStyle,name,_31f));
}
};
nitobi.ui.IStyleable.prototype.getStyle=function(name){
return nitobi.html.Css.getStyle(this.getHtmlNode(),name);
};
nitobi.lang.defineNs("nitobi.ui");
nitobi.ui.StyleEventArgs=function(_321,_322,_323,_324){
nitobi.ui.ElementEventArgs.baseConstructor.apply(this,arguments);
this.property=_323||null;
this.value=_324||null;
};
nitobi.lang.extend(nitobi.ui.StyleEventArgs,nitobi.base.EventArgs);
nitobi.lang.defineNs("nitobi.ui");
nitobi.ui.IScrollable=function(_325){
this.scrollableElement=_325;
};
nitobi.ui.IScrollable.prototype.setScrollableElement=function(el){
this.scrollableElement=el;
};
nitobi.ui.IScrollable.prototype.getScrollableElement=function(){
return this.scrollableElement;
};
nitobi.ui.IScrollable.prototype.getScrollLeft=function(){
return this.scrollableElement.scrollLeft;
};
nitobi.ui.IScrollable.prototype.setScrollLeft=function(left){
this.scrollableElement.scrollLeft=left;
};
nitobi.ui.IScrollable.prototype.scrollLeft=function(_328){
_328=_328||25;
this.scrollableElement.scrollLeft-=_328;
};
nitobi.ui.IScrollable.prototype.scrollRight=function(_329){
_329=_329||25;
this.scrollableElement.scrollLeft+=_329;
};
nitobi.ui.IScrollable.prototype.isOverflowed=function(_32a){
_32a=_32a||this.scrollableElement.childNodes[0];
return !(parseInt(nitobi.html.getBox(this.scrollableElement).width)>=parseInt(nitobi.html.getBox(_32a).width));
};
nitobi.lang.defineNs("nitobi.ui");
if(false){
nitobi.ui=function(){
};
}
nitobi.ui.startDragOperation=function(_32b,_32c,_32d,_32e,_32f,_330){
var ddo=new nitobi.ui.DragDrop(_32b,_32d,_32e);
ddo.onDragStop.subscribe(_330,_32f);
ddo.startDrag(_32c);
};
nitobi.ui.DragDrop=function(_332,_333,_334){
this.allowVertDrag=(_333!=null?_333:true);
this.allowHorizDrag=(_334!=null?_334:true);
if(nitobi.browser.IE){
this.surface=document.getElementById("ebadragdropsurface_");
if(this.surface==null){
this.surface=nitobi.html.createElement("div",{"id":"ebadragdropsurface_"},{"filter":"alpha(opacity=1)","backgroundColor":"white","position":"absolute","display":"none","top":"0px","left":"0px","width":"100px","height":"100px","zIndex":"899"});
document.body.appendChild(this.surface);
}
}
if(_332.nodeType==3){
alert("Text node not supported. Use parent element");
}
this.element=_332;
this.zIndex=this.element.style.zIndex;
this.element.style.zIndex=900;
this.onMouseMove=new nitobi.base.Event();
this.onDragStart=new nitobi.base.Event();
this.onDragStop=new nitobi.base.Event();
this.events=[{"type":"mouseup","handler":this.handleMouseUp,"capture":true},{"type":"mousemove","handler":this.handleMouseMove,"capture":true}];
};
nitobi.ui.DragDrop.prototype.startDrag=function(_335){
this.elementOriginTop=parseInt(this.element.style.top,10);
this.elementOriginLeft=parseInt(this.element.style.left,10);
if(isNaN(this.elementOriginLeft)){
this.elementOriginLeft=0;
}
if(isNaN(this.elementOriginTop)){
this.elementOriginTop=0;
}
var _336=nitobi.html.getEventCoords(_335);
x=_336.x;
y=_336.y;
this.originX=x;
this.originY=y;
nitobi.html.attachEvents(document,this.events,this);
nitobi.html.cancelEvent(_335);
this.onDragStart.notify();
};
nitobi.ui.DragDrop.prototype.handleMouseMove=function(_337){
var x,y;
var _33a=nitobi.html.getEventCoords(_337);
x=_33a.x;
y=_33a.y;
if(nitobi.browser.IE){
this.surface.style.display="block";
if(document.compat=="CSS1Compat"){
var _33b=nitobi.html.getBodyArea();
var _33c=0;
if(document.compatMode=="CSS1Compat"){
_33c=25;
}
this.surface.style.width=(_33b.clientWidth-_33c)+"px";
this.surface.style.height=(_33b.clientHeight)+"px";
}else{
this.surface.style.width=document.body.clientWidth;
this.surface.style.height=document.body.clientHeight;
}
}
if(this.allowHorizDrag){
this.element.style.left=(this.elementOriginLeft+x-this.originX)+"px";
}
if(this.allowVertDrag){
this.element.style.top=(this.elementOriginTop+y-this.originY)+"px";
}
this.x=x;
this.y=y;
this.onMouseMove.notify(this);
nitobi.html.cancelEvent(_337);
};
nitobi.ui.DragDrop.prototype.handleMouseUp=function(_33d){
this.onDragStop.notify({"event":_33d,"x":this.x,"y":this.y});
nitobi.html.detachEvents(document,this.events);
if(nitobi.browser.IE){
this.surface.style.display="none";
}
this.element.style.zIndex=this.zIndex;
this.element.object=null;
this.element=null;
};
if(typeof (nitobi.ajax)=="undefined"){
nitobi.ajax=function(){
};
}
nitobi.ajax.createXmlHttp=function(){
if(nitobi.browser.IE){
var _33e=null;
try{
_33e=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){
try{
_33e=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(ee){
}
}
return _33e;
}else{
if(nitobi.browser.XHR_ENABLED){
return new XMLHttpRequest();
}
}
};
nitobi.lang.defineNs("nitobi.ajax");
nitobi.ajax.HttpRequest=function(){
this.handler="";
this.async=true;
this.responseType=null;
this.httpObj=nitobi.ajax.createXmlHttp();
this.onPostComplete=new nitobi.base.Event();
this.onGetComplete=new nitobi.base.Event();
this.onError=new nitobi.base.Event();
this.timeout=0;
this.timeoutId=null;
this.params=null;
this.data="";
this.completeCallback=null;
this.errorCallback=null;
this.status="complete";
this.preventCache=true;
};
nitobi.lang.extend(nitobi.ajax.HttpRequest,nitobi.Object);
nitobi.ajax.HttpRequestPool_MAXCONNECTIONS=64;
nitobi.ajax.HttpRequest.prototype.handleResponse=function(){
var _33f=null;
var _340=null;
if((this.httpObj.responseXML!=null&&this.httpObj.responseXML.documentElement!=null)&&this.responseType!="text"){
_33f=this.httpObj.responseXML;
}else{
if(this.responseType=="xml"){
_33f=nitobi.xml.createXmlDoc(this.httpObj.responseText);
}else{
_33f=this.httpObj.responseText;
}
}
if(this.httpObj.status!=200){
this.onError.notify({"source":this,"status":this.httpObj.status,"message":"An error occured retrieving the data from the server. "+"Expected response type was '"+this.responseType+"'."});
}
return _33f;
};
nitobi.ajax.HttpRequest.prototype.post=function(data){
this.data=data;
this.status="pending";
this.httpObj.open("POST",this.handler,this.async,"","");
if(this.async){
this.httpObj.onreadystatechange=nitobi.lang.close(this,this.postComplete);
}
if(this.responseType=="xml"){
this.httpObj.setRequestHeader("Content-Type","text/xml");
}else{
this.httpObj.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
}
this.httpObj.send(data);
if(!this.async){
return this.handleResponse();
}
};
nitobi.ajax.HttpRequest.prototype.postComplete=function(){
if(this.httpObj.readyState==4){
this.status="complete";
var _342={"response":this.handleResponse(),"params":this.params};
this.onPostComplete.notify(_342);
if(this.completeCallback){
this.completeCallback.call(this,_342);
}
}
};
nitobi.ajax.HttpRequest.prototype.postXml=function(_343){
this.setTimeout();
if(("undefined"==typeof (_343.documentElement))||(null==_343.documentElement)||("undefined"==typeof (_343.documentElement.childNodes))||(1>_343.documentElement.childNodes.length)){
ebaErrorReport("updategram is empty. No request sent. xmlData["+_343+"]\nxmlData.xml["+_343.xml+"]");
return;
}
if(null==_343.xml){
var _344=new XMLSerializer();
_343.xml=_344.serializeToString(_343);
}
var sync=this.post(_343.xml);
if(!this.async){
return sync;
}
};
nitobi.ajax.HttpRequest.prototype.get=function(){
this.setTimeout();
this.status="pending";
try{
this.httpObj.open("GET",(this.preventCache?this.cacheBust(this.handler):this.handler),this.async);
}
catch(e){
throw (e);
return;
}
if(this.async){
this.httpObj.onreadystatechange=nitobi.lang.close(this,this.getComplete);
}
if(this.responseType=="xml"){
this.httpObj.setRequestHeader("Content-Type","text/xml");
}
this.httpObj.send(null);
if(!this.async){
return this.handleResponse();
}
};
nitobi.ajax.HttpRequest.prototype.setTimeout=function(){
if(this.timeout>0){
this.timeoutId=window.setTimeout(nitobi.lang.close(this,this.abort),this.timeout);
}
};
nitobi.ajax.HttpRequest.prototype.getComplete=function(){
if(this.httpObj.readyState==4){
this.status="complete";
var _346={"response":this.handleResponse(),"params":this.params,"status":this.httpObj.status,"statusText":this.httpObj.statusText};
this.onGetComplete.notify(_346);
if(this.completeCallback){
this.completeCallback.call(this,_346);
}
}
};
nitobi.ajax.HttpRequest.isError=function(code){
return (code>=400&&code<600);
};
nitobi.ajax.HttpRequest.prototype.abort=function(){
this.httpObj.onreadystatechange=function(){
};
this.httpObj.abort();
};
nitobi.ajax.HttpRequest.prototype.clear=function(){
this.handler="";
this.async=true;
this.onPostComplete.dispose();
this.onGetComplete.dispose();
this.params=null;
};
nitobi.ajax.HttpRequest.prototype.cacheBust=function(url){
var _349=url.split("?");
var _34a="nitobi_cachebust="+(new Date().getTime());
if(_349.length==1){
url+="?"+_34a;
}else{
url+="&"+_34a;
}
return url;
};
nitobi.ajax.HttpRequestPool=function(_34b){
this.inUse=new Array();
this.free=new Array();
this.max=_34b||nitobi.ajax.HttpRequestPool_MAXCONNECTIONS;
this.locked=false;
this.context=null;
};
nitobi.ajax.HttpRequestPool.prototype.reserve=function(){
this.locked=true;
var _34c;
if(this.free.length){
_34c=this.free.pop();
_34c.clear();
this.inUse.push(_34c);
}else{
if(this.inUse.length<this.max){
try{
_34c=new nitobi.ajax.HttpRequest();
}
catch(e){
_34c=null;
}
this.inUse.push(_34c);
}else{
throw "No request objects available";
}
}
this.locked=false;
return _34c;
};
nitobi.ajax.HttpRequestPool.prototype.release=function(_34d){
var _34e=false;
this.locked=true;
if(null!=_34d){
for(var i=0;i<this.inUse.length;i++){
if(_34d==this.inUse[i]){
this.free.push(this.inUse[i]);
this.inUse.splice(i,1);
_34e=true;
break;
}
}
}
this.locked=false;
return null;
};
nitobi.ajax.HttpRequestPool.prototype.dispose=function(){
for(var i=0;i<this.inUse.length;i++){
this.inUse[i].dispose();
}
this.inUse=null;
for(var j=0;j<this.free.length;j++){
this.free[i].dispose();
}
this.free=null;
};
nitobi.ajax.HttpRequestPool.instance=null;
nitobi.ajax.HttpRequestPool.getInstance=function(){
if(nitobi.ajax.HttpRequestPool.instance==null){
nitobi.ajax.HttpRequestPool.instance=new nitobi.ajax.HttpRequestPool();
}
return nitobi.ajax.HttpRequestPool.instance;
};
nitobi.lang.defineNs("nitobi.data");
nitobi.data.UrlConnector=function(url,_353){
this.url=url||null;
this.transformer=_353||null;
this.async=true;
};
nitobi.data.UrlConnector.prototype.get=function(_354,_355){
var _356=nitobi.data.UrlConnector.requestPool.reserve();
var _357=this.url;
for(var p in _354){
_357=nitobi.html.Url.setParameter(_357,p,_354[p]);
}
_356.handler=_357;
_356.async=this.async;
_356.responseType="xml";
_356.params={dataReadyCallback:_355};
_356.completeCallback=nitobi.lang.close(this,this.getComplete);
_356.get();
};
nitobi.data.UrlConnector.prototype.getComplete=function(_359){
if(_359.params.dataReadyCallback){
var _35a=_359.response;
var _35b=_359.params.dataReadyCallback;
var _35c=_35a;
if(this.transformer){
if(typeof (this.transformer)==="function"){
_35c=this.transformer.call(null,_35a);
}else{
_35c=nitobi.xml.transform(_35a,this.transformer,"xml");
}
}
if(_35b){
_35b.call(null,{result:_35c,response:_359.response});
}
}
};
nitobi.data.UrlConnector.requestPool=new nitobi.ajax.HttpRequestPool();
function ntbAssert(_35d,_35e,_35f,_360){
}
nitobi.lang.defineNs("console");
nitobi.lang.defineNs("nitobi.debug");
if(typeof (console.log)=="undefined"){
console.log=function(s){
nitobi.debug.addDebugTools();
var t=$("nitobi.log");
t.value=s+"\n"+t.value;
};
console.evalCode=function(){
var _363=(eval($("nitobi.consoleEntry").value));
};
}
nitobi.debug.addDebugTools=function(){
var sId="nitobi_debug_panel";
var div=document.getElementById(sId);
var html="<table width=100%><tr><td width=50%><textarea style='width:100%' cols=125 rows=25 id='nitobi.log'></textarea></td><td width=50%><textarea style='width:100%' cols=125 rows=25 id='nitobi.consoleEntry'></textarea><br/><button onclick='console.evalCode()'>Eval</button></td></tr></table>";
if(div==null){
var div=document.createElement("div");
div.setAttribute("id",sId);
div.innerHTML=html;
document.body.appendChild(div);
}else{
if(div.innerHTML==""){
div.innerHTML=html;
}
}
};
nitobi.debug.assert=function(){
};
EBA_EM_ATTRIBUTE_ERROR=1;
EBA_XHR_RESPONSE_ERROR=2;
EBA_DEBUG="debug";
EBA_WARN="warn";
EBA_ERROR="error";
EBA_THROW="throw";
EBA_DEBUG_MODE=false;
EBA_ON_ERROR="";
EBA_LAST_ERROR="";
_ebaDebug=false;
NTB_EM_ATTRIBUTE_ERROR=1;
NTB_XHR_RESPONSE_ERROR=2;
NTB_DEBUG="debug";
NTB_WARN="warn";
NTB_ERROR="error";
NTB_THROW="throw";
NTB_DEBUG_MODE=false;
NTB_ON_ERROR="";
NTB_LAST_ERROR="";
_ebaDebug=false;
function _ntbAssert(_367,_368){
}
function ebaSetOnErrorEvent(_369){
nitobi.debug.setOnErrorEvent.apply(this,arguments);
}
nitobi.debug.setOnErrorEvent=function(_36a){
NTB_ON_ERROR=_36a;
};
function ebaReportError(_36b,_36c,_36d){
nitobi.debug.errorReport("dude stop calling this method it is now called nitobi.debug.errorReport","");
nitobi.debug.errorReport(_36b,_36c,_36d);
}
function ebaErrorReport(_36e,_36f,_370){
nitobi.debug.errorReport.apply(this,arguments);
}
nitobi.debug.errorReport=function(_371,_372,_373){
_373=(_373)?_373:NTB_DEBUG;
if(NTB_DEBUG==_373&&!NTB_DEBUG_MODE){
return;
}
var _374=_371+"\nerror code    ["+_372+"]\nerror Severity["+_373+"]";
LastError=_374;
if(eval(NTB_ON_ERROR||"true")){
switch(_372){
case NTB_EM_ATTRIBUTE_ERROR:
confirm(_371);
break;
case NTB_XHR_RESPONSE_ERROR:
confirm(_371);
break;
default:
window.status=_371;
break;
}
}
if(NTB_THROW==_373){
throw (_374);
}
};
if(false){
nitobi.error=function(){
};
}
nitobi.lang.defineNs("nitobi.error");
nitobi.error.onError=new nitobi.base.Event();
if(nitobi){
if(nitobi.testframework){
if(nitobi.testframework.initEventError){
nitobi.testframework.initEventError();
}
}
}
nitobi.error.ErrorEventArgs=function(_375,_376,type){
nitobi.error.ErrorEventArgs.baseConstructor.call(this,_375);
this.description=_376;
this.type=type;
};
nitobi.lang.extend(nitobi.error.ErrorEventArgs,nitobi.base.EventArgs);
nitobi.error.isError=function(err,_379){
return (err.indexOf(_379)>-1);
};
nitobi.error.OutOfBounds="Array index out of bounds.";
nitobi.error.Unexpected="An unexpected error occurred.";
nitobi.error.ArgExpected="The argument is null and not optional.";
nitobi.error.BadArgType="The argument is not of the correct type.";
nitobi.error.BadArg="The argument is not a valid value.";
nitobi.error.XmlParseError="The XML did not parse correctly.";
nitobi.error.DeclarationParseError="The HTML declaration could not be parsed.";
nitobi.error.ExpectedInterfaceNotFound="The object does not support the properties or methods of the expected interface. Its class must implement the required interface.";
nitobi.error.NoHtmlNode="No HTML node found with id.";
nitobi.error.OrphanXmlNode="The XML node has no owner document.";
nitobi.error.HttpRequestError="The HTML page could not be loaded.";
nitobi.lang.defineNs("nitobi.html");
nitobi.html.IRenderer=function(_37a){
this.setTemplate(_37a);
this.parameters={};
};
nitobi.html.IRenderer.prototype.renderAfter=function(_37b,data){
_37b=$(_37b);
var _37d=_37b.parentNode;
_37b=_37b.nextSibling;
return this._renderBefore(_37d,_37b,data);
};
nitobi.html.IRenderer.prototype.renderBefore=function(_37e,data){
_37e=$(_37e);
return this._renderBefore(_37e.parentNode,_37e,data);
};
nitobi.html.IRenderer.prototype._renderBefore=function(_380,_381,data){
var s=this.renderToString(data);
var _384=document.createElement("div");
_384.innerHTML=s;
var _385=new Array();
if(_384.childNodes){
var i=0;
while(_384.childNodes.length){
_385[i++]=_384.firstChild;
_380.insertBefore(_384.firstChild,_381);
}
}else{
}
return _385;
};
nitobi.html.IRenderer.prototype.renderIn=function(_387,data){
_387=$(_387);
var s=this.renderToString(data);
_387.innerHTML=s;
return _387.childNodes;
};
nitobi.html.IRenderer.prototype.renderToString=function(data){
};
nitobi.html.IRenderer.prototype.setTemplate=function(_38b){
this.template=_38b;
};
nitobi.html.IRenderer.prototype.getTemplate=function(){
return this.template;
};
nitobi.html.IRenderer.prototype.setParameters=function(_38c){
for(var p in _38c){
this.parameters[p]=_38c[p];
}
};
nitobi.html.IRenderer.prototype.getParameters=function(){
return this.parameters;
};
nitobi.lang.defineNs("nitobi.html");
nitobi.html.XslRenderer=function(_38e){
nitobi.html.IRenderer.call(this,_38e);
};
nitobi.lang.implement(nitobi.html.XslRenderer,nitobi.html.IRenderer);
nitobi.html.XslRenderer.prototype.setTemplate=function(_38f){
if(typeof (_38f)==="string"){
_38f=nitobi.xml.createXslProcessor(_38f);
}
this.template=_38f;
};
nitobi.html.XslRenderer.prototype.renderToString=function(data){
if(typeof (data)==="string"){
data=nitobi.xml.createXmlDoc(data);
}
if(nitobi.lang.typeOf(data)===nitobi.lang.type.XMLNODE){
data=nitobi.xml.createXmlDoc(nitobi.xml.serialize(data));
}
var _391=this.getTemplate();
var _392=this.getParameters();
for(var p in _392){
_391.addParameter(p,_392[p],"");
}
var s=nitobi.xml.transformToString(data,_391,"xml");
for(var p in _392){
_391.addParameter(p,"","");
}
return s;
};
nitobi.lang.defineNs("nitobi.ui");
NTB_CSS_HIDE="nitobi-hide";
nitobi.ui.Element=function(id){
nitobi.ui.Element.baseConstructor.call(this);
nitobi.ui.IStyleable.call(this);
if(id!=null){
if(nitobi.lang.typeOf(id)==nitobi.lang.type.XMLNODE){
nitobi.base.ISerializable.call(this,id);
}else{
if($(id)!=null){
var decl=new nitobi.base.Declaration();
var _397=decl.loadHtml($(id));
var _398=$(id);
var _399=_398.parentNode;
var _39a=_399.ownerDocument.createElement("ntb:component");
_399.insertBefore(_39a,_398);
_399.removeChild(_398);
this.setContainer(_39a);
nitobi.base.ISerializable.call(this,_397);
}else{
nitobi.base.ISerializable.call(this);
this.setId(id);
}
}
}else{
nitobi.base.ISerializable.call(this);
}
this.eventMap={};
this.onCreated=new nitobi.base.Event("created");
this.eventMap["created"]=this.onCreated;
this.onBeforeRender=new nitobi.base.Event("beforerender");
this.eventMap["beforerender"]=this.onBeforeRender;
this.onRender=new nitobi.base.Event("render");
this.eventMap["render"]=this.onRender;
this.onBeforeSetVisible=new nitobi.base.Event("beforesetvisible");
this.eventMap["beforesetvisible"]=this.onBeforeSetVisible;
this.onSetVisible=new nitobi.base.Event("setvisible");
this.eventMap["setvisible"]=this.onSetVisible;
this.onBeforePropagate=new nitobi.base.Event("beforepropagate");
this.onEventNotify=new nitobi.base.Event("eventnotify");
this.onBeforeEventNotify=new nitobi.base.Event("beforeeventnotify");
this.onBeforePropagateToChild=new nitobi.base.Event("beforepropogatetochild");
this.subscribeDeclarationEvents();
this.setEnabled(true);
this.renderer=new nitobi.html.XslRenderer();
};
nitobi.lang.extend(nitobi.ui.Element,nitobi.Object);
nitobi.lang.implement(nitobi.ui.Element,nitobi.base.ISerializable);
nitobi.lang.implement(nitobi.ui.Element,nitobi.ui.IStyleable);
nitobi.ui.Element.htmlNodeCache={};
nitobi.ui.Element.prototype.setHtmlNode=function(_39b){
var node=$(_39b);
this.htmlNode=node;
};
nitobi.ui.Element.prototype.getRootId=function(){
var _39d=this.getParentObject();
if(_39d==null){
return this.getId();
}else{
return _39d.getRootId();
}
};
nitobi.ui.Element.prototype.getId=function(){
return this.getAttribute("id");
};
nitobi.ui.Element.parseId=function(id){
var ids=id.split(".");
return {localName:ids[1],id:ids[0]};
};
nitobi.ui.Element.prototype.setId=function(id){
this.setAttribute("id",id);
};
nitobi.ui.Element.prototype.notify=function(_3a1,id,_3a3,_3a4){
try{
_3a1=nitobi.html.getEvent(_3a1);
if(_3a4!==false){
nitobi.html.cancelEvent(_3a1);
}
var _3a5=nitobi.ui.Element.parseId(id).id;
if(!this.isDescendantExists(_3a5)){
return false;
}
var _3a6=!(_3a5==this.getId());
var _3a7=new nitobi.ui.ElementEventArgs(this,null,id);
var _3a8=new nitobi.ui.EventNotificationEventArgs(this,null,id,_3a1);
_3a6=_3a6&&this.onBeforePropagate.notify(_3a8);
var _3a9=true;
if(_3a6){
if(_3a3==null){
_3a3=this.getPathToLeaf(_3a5);
}
var _3aa=this.onBeforeEventNotify.notify(_3a8);
var _3ab=(_3aa?this.onEventNotify.notify(_3a8):true);
var _3ac=_3a3.pop().getAttribute("id");
var _3ad=this.getObjectById(_3ac);
var _3a9=this.onBeforePropagateToChild.notify(_3a8);
if(_3ad.notify&&_3a9&&_3ab){
_3a9=_3ad.notify(_3a1,id,_3a3,_3a4);
}
}else{
_3a9=this.onEventNotify.notify(_3a8);
}
var _3ae=this.eventMap[_3a1.type];
if(_3ae!=null&&_3a9){
_3ae.notify(this.getEventArgs(_3a1,id));
}
return _3a9;
}
catch(err){
nitobi.lang.throwError(nitobi.error.Unexpected+" Element.notify encountered a problem.",err);
}
};
nitobi.ui.Element.prototype.getEventArgs=function(_3af,_3b0){
var _3b1=new nitobi.ui.ElementEventArgs(this,null,_3b0);
return _3b1;
};
nitobi.ui.Element.prototype.subscribeDeclarationEvents=function(){
for(var name in this.eventMap){
var ev=this.getAttribute("on"+name);
if(ev!=null&&ev!=""){
this.eventMap[name].subscribe(ev,this,name);
}
}
};
nitobi.ui.Element.prototype.getHtmlNode=function(name){
var id=this.getId();
id=(name!=null?id+"."+name:id);
var node=nitobi.ui.Element.htmlNodeCache[name];
if(node==null){
node=$(id);
nitobi.ui.Element.htmlNodeCache[id]=node;
}
return node;
};
nitobi.ui.Element.prototype.flushHtmlNodeCache=function(){
nitobi.ui.Element.htmlNodeCache={};
};
nitobi.ui.Element.prototype.hide=function(_3b7,_3b8){
this.setVisible(false,_3b7,_3b8);
};
nitobi.ui.Element.prototype.show=function(_3b9,_3ba){
this.setVisible(true,_3b9,_3ba);
};
nitobi.ui.Element.prototype.isVisible=function(){
var node=this.getHtmlNode();
return node&&!nitobi.html.Css.hasClass(node,NTB_CSS_HIDE);
};
nitobi.ui.Element.prototype.setVisible=function(_3bc,_3bd,_3be){
var _3bf=this.getHtmlNode();
if(_3bf&&this.isVisible()!=_3bc&&this.onBeforeSetVisible.notify({source:this,event:this.onBeforeSetVisible,args:arguments})!==false){
if(this.effect){
this.effect.end();
}
if(_3bc){
if(_3bd){
var _3c0=new _3bd(_3bf);
_3c0.callback=nitobi.lang.close(this,this.handleSetVisible,[_3be]);
this.effect=_3c0;
_3c0.onFinish.subscribeOnce(nitobi.lang.close(this,function(){
this.effect=null;
}));
_3c0.start();
}else{
nitobi.html.Css.removeClass(_3bf,NTB_CSS_HIDE);
this.handleSetVisible(_3be);
}
}else{
if(_3bd){
var _3c0=new _3bd(_3bf);
_3c0.callback=nitobi.lang.close(this,this.handleSetVisible,[_3be]);
this.effect=_3c0;
_3c0.onFinish.subscribeOnce(nitobi.lang.close(this,function(){
this.effect=null;
}));
_3c0.start();
}else{
nitobi.html.Css.addClass(this.getHtmlNode(),NTB_CSS_HIDE);
this.handleSetVisible(_3be);
}
}
}
};
nitobi.ui.Element.prototype.handleSetVisible=function(_3c1){
if(_3c1){
_3c1();
}
this.onSetVisible.notify(new nitobi.ui.ElementEventArgs(this,this.onSetVisible));
};
nitobi.ui.Element.prototype.setEnabled=function(_3c2){
this.enabled=_3c2;
};
nitobi.ui.Element.prototype.isEnabled=function(){
return this.enabled;
};
nitobi.ui.Element.prototype.render=function(_3c3,_3c4){
this.flushHtmlNodeCache();
_3c4=_3c4||this.getState();
_3c3=$(_3c3)||this.getContainer();
if(_3c3==null){
var _3c3=document.createElement("span");
document.body.appendChild(_3c3);
this.setContainer(_3c3);
}
this.htmlNode=this.renderer.renderIn(_3c3,_3c4)[0];
this.htmlNode.jsObject=this;
};
nitobi.ui.Element.prototype.getContainer=function(){
return this.container;
};
nitobi.ui.Element.prototype.setContainer=function(_3c5){
this.container=$(_3c5);
};
nitobi.ui.Element.prototype.getState=function(){
return this.getXmlNode();
};
nitobi.lang.defineNs("nitobi.ui");
nitobi.ui.ElementEventArgs=function(_3c6,_3c7,_3c8){
nitobi.ui.ElementEventArgs.baseConstructor.apply(this,arguments);
this.targetId=_3c8||null;
};
nitobi.lang.extend(nitobi.ui.ElementEventArgs,nitobi.base.EventArgs);
nitobi.lang.defineNs("nitobi.ui");
nitobi.ui.EventNotificationEventArgs=function(_3c9,_3ca,_3cb,_3cc){
nitobi.ui.EventNotificationEventArgs.baseConstructor.apply(this,arguments);
this.htmlEvent=_3cc||null;
};
nitobi.lang.extend(nitobi.ui.EventNotificationEventArgs,nitobi.ui.ElementEventArgs);
nitobi.lang.defineNs("nitobi.ui");
nitobi.ui.Container=function(id){
nitobi.ui.Container.baseConstructor.call(this,id);
nitobi.collections.IList.call(this);
};
nitobi.lang.extend(nitobi.ui.Container,nitobi.ui.Element);
nitobi.lang.implement(nitobi.ui.Container,nitobi.collections.IList);
nitobi.base.Registry.getInstance().register(new nitobi.base.Profile("nitobi.ui.Container",null,false,"ntb:container"));
nitobi.lang.defineNs("nitobi.ui");
NTB_CSS_SMALL="ntb-effects-small";
NTB_CSS_HIDE="nitobi-hide";
if(false){
nitobi.ui.Effects=function(){
};
}
nitobi.ui.Effects={};
nitobi.ui.Effects.setVisible=function(_3ce,_3cf,_3d0,_3d1,_3d2){
_3d1=(_3d2?nitobi.lang.close(_3d2,_3d1):_3d1)||nitobi.lang.noop;
_3ce=$(_3ce);
if(typeof _3d0=="string"){
_3d0=nitobi.effects.families[_3d0];
}
if(!_3d0){
_3d0=nitobi.effects.families["none"];
}
if(_3cf){
var _3d3=_3d0.show;
}else{
var _3d3=_3d0.hide;
}
if(_3d3){
var _3d4=new _3d3(_3ce);
_3d4.callback=_3d1;
_3d4.start();
}else{
if(_3cf){
nitobi.html.Css.removeClass(_3ce,NTB_CSS_HIDE);
}else{
nitobi.html.Css.addClass(_3ce,NTB_CSS_HIDE);
}
_3d1();
}
};
nitobi.ui.Effects.shrink=function(_3d5,_3d6,_3d7,_3d8){
var rect=_3d6.getClientRects()[0];
_3d5.deltaHeight_Doctype=0-parseInt("0"+nitobi.html.getStyle(_3d6,"border-top-width"))-parseInt("0"+nitobi.html.getStyle(_3d6,"border-bottom-width"))-parseInt("0"+nitobi.html.getStyle(_3d6,"padding-top"))-parseInt("0"+nitobi.html.getStyle(_3d6,"padding-bottom"));
_3d5.deltaWidth_Doctype=0-parseInt("0"+nitobi.html.getStyle(_3d6,"border-left-width"))-parseInt("0"+nitobi.html.getStyle(_3d6,"border-right-width"))-parseInt("0"+nitobi.html.getStyle(_3d6,"padding-left"))-parseInt("0"+nitobi.html.getStyle(_3d6,"padding-right"));
_3d5.oldHeight=Math.abs(rect.top-rect.bottom)+_3d5.deltaHeight_Doctype;
_3d5.oldWidth=Math.abs(rect.right-rect.left)+_3d5.deltaWidth_Doctype;
if(!(typeof (_3d5.width)=="undefined")){
_3d5.deltaWidth=Math.floor(Math.ceil(_3d5.width-_3d5.oldWidth)/(_3d7/nitobi.ui.Effects.ANIMATION_INTERVAL));
}else{
_3d5.width=_3d5.oldWidth;
_3d5.deltaWidth=0;
}
if(!(typeof (_3d5.height)=="undefined")){
_3d5.deltaHeight=Math.floor(Math.ceil(_3d5.height-_3d5.oldHeight)/(_3d7/nitobi.ui.Effects.ANIMATION_INTERVAL));
}else{
_3d5.height=_3d5.oldHeight;
_3d5.deltaHeight=0;
}
nitobi.ui.Effects.resize(_3d5,_3d6,_3d7,_3d8);
};
nitobi.ui.Effects.resize=function(_3da,_3db,_3dc,_3dd){
var rect=_3db.getClientRects()[0];
var _3df=Math.abs(rect.top-rect.bottom);
var _3e0=Math.max(_3df+_3da.deltaHeight+_3da.deltaHeight_Doctype,0);
if(Math.abs(_3df-_3da.height)<Math.abs(_3da.deltaHeight)){
_3e0=_3da.height;
_3da.deltaHeight=0;
}
var _3e1=Math.abs(rect.right-rect.left);
var _3e2=Math.max(_3e1+_3da.deltaWidth+_3da.deltaWidth_Doctype,0);
_3e2=(_3e2>=0)?_3e2:0;
if(Math.abs(_3e1-_3da.width)<Math.abs(_3da.deltaWidth)){
_3e2=_3da.width;
_3da.deltaWidth=0;
}
_3dc-=nitobi.ui.Effects.ANIMATION_INTERVAL;
if(_3dc>0){
window.setTimeout(nitobi.lang.closeLater(this,nitobi.ui.Effects.resize,[_3da,_3db,_3dc,_3dd]),nitobi.ui.Effects.ANIMATION_INTERVAL);
}
var _3e3=function(){
_3db.height=_3e0+"px";
_3db.style.height=_3e0+"px";
_3db.width=_3e2+"px";
_3db.style.width=_3e2+"px";
if(_3dc<=0){
if(_3dd){
window.setTimeout(_3dd,0);
}
}
};
nitobi.ui.Effects.executeNextPulse.push(_3e3);
};
nitobi.ui.Effects.executeNextPulse=new Array();
nitobi.ui.Effects.pulse=function(){
var p;
while(p=nitobi.ui.Effects.executeNextPulse.pop()){
p.call();
}
};
nitobi.ui.Effects.PULSE_INTERVAL=20;
nitobi.ui.Effects.ANIMATION_INTERVAL=40;
window.setInterval(nitobi.ui.Effects.pulse,nitobi.ui.Effects.PULSE_INTERVAL);
window.setTimeout(nitobi.ui.Effects.pulse,nitobi.ui.Effects.PULSE_INTERVAL);
nitobi.ui.Effects.fadeIntervalId={};
nitobi.ui.Effects.fadeIntervalTime=10;
nitobi.ui.Effects.cube=function(_3e5){
return _3e5*_3e5*_3e5;
};
nitobi.ui.Effects.cubeRoot=function(_3e6){
var T=0;
var N=parseFloat(_3e6);
if(N<0){
N=-N;
T=1;
}
var M=Math.sqrt(N);
var ctr=1;
while(ctr<101){
var M=M*N;
var M=Math.sqrt(Math.sqrt(M));
ctr++;
}
return M;
};
nitobi.ui.Effects.linear=function(_3eb){
return _3eb;
};
nitobi.ui.Effects.fade=function(_3ec,_3ed,time,_3ef,_3f0){
_3f0=_3f0||nitobi.ui.Effects.linear;
var _3f1=(new Date()).getTime()+time;
var id=nitobi.component.getUniqueId();
var _3f3=(new Date()).getTime();
var el=_3ec;
if(_3ec.length){
el=_3ec[0];
}
var _3f5=nitobi.html.Css.getOpacity(el);
var _3f6=(_3ed-_3f5<0?-1:0);
nitobi.ui.Effects.fadeIntervalId[id]=window.setInterval(function(){
nitobi.ui.Effects.stepFade(_3ec,_3ed,_3f3,_3f1,id,_3ef,_3f0,_3f6);
},nitobi.ui.Effects.fadeIntervalTime);
};
nitobi.ui.Effects.stepFade=function(_3f7,_3f8,_3f9,_3fa,id,_3fc,_3fd,_3fe){
var ct=(new Date()).getTime();
var _400=_3fa-_3f9;
var nct=((ct-_3f9)/(_3fa-_3f9));
if(nct<=0||nct>=1){
nitobi.html.Css.setOpacities(_3f7,_3f8);
window.clearInterval(nitobi.ui.Effects.fadeIntervalId[id]);
_3fc();
return;
}else{
nct=Math.abs(nct+_3fe);
}
var no=_3fd(nct);
nitobi.html.Css.setOpacities(_3f7,no*100);
};
nitobi.lang.defineNs("nitobi.component");
if(false){
nitobi.component=function(){
};
}
nitobi.loadComponent=function(el){
var id=el;
try{
el=$(el);
if(el==null){
nitobi.lang.throwError("nitobi.loadComponent could not load the component because it could not be found on the page. The component may not have a declaration, node, or it may have a duplicated id. Id: "+id);
}
if(el.jsObject!=null){
return el.jsObject;
}
var _405;
var _406=nitobi.html.getTagName(el);
if(_406=="ntb:grid"){
_405=nitobi.initGrid(el.id);
}else{
if(_406==="ntb:combo"){
_405=nitobi.initCombo(el.id);
}else{
if(el.jsObject==null){
_405=nitobi.base.Factory.getInstance().createByTag(_406,el.id,nitobi.component.renderComponent);
if(_405.render&&!_405.onLoadCallback){
_405.render();
}
}else{
_405=el.jsObject;
}
}
}
return _405;
}
catch(err){
nitobi.lang.throwError(nitobi.error.Unexpected,err);
}
};
nitobi.component.renderComponent=function(_407){
_407.source.render();
};
nitobi.getComponent=function(id){
var el=$(id);
if(el==null){
return null;
}
return el.jsObject;
};
nitobi.component.uniqueId=0;
nitobi.component.getUniqueId=function(){
return "ntbcmp_"+(nitobi.component.uniqueId++);
};
nitobi.component.findNitobiComponents=function(_40a,_40b){
if(nitobi.component.isNitobiElement(_40a)){
_40b.push(_40a);
return;
}
var _40c=_40a.childNodes;
for(var i=0;i<_40c.length;i++){
nitobi.component.findNitobiComponents(_40c[i],_40b);
}
return;
};
nitobi.component.isNitobiElement=function(_40e){
var _40f=nitobi.html.getTagName(_40e);
if(_40f.substr(0,3)=="ntb"){
return true;
}else{
return false;
}
};
nitobi.component.loadComponentsFromNode=function(_410){
var _411=new Array();
nitobi.component.findNitobiComponents(_410,_411);
for(var i=0;i<_411.length;i++){
nitobi.loadComponent(_411[i].getAttribute("id"));
}
};
nitobi.lang.defineNs("nitobi.effects");
if(false){
nitobi.effects=function(){
};
}
nitobi.effects.Effect=function(_413,_414){
this.element=$(_413);
this.transition=_414.transition||nitobi.effects.Transition.sinoidal;
this.duration=_414.duration||1;
this.fps=_414.fps||50;
this.from=typeof (_414.from)==="number"?_414.from:0;
this.to=typeof (_414.from)==="number"?_414.to:1;
this.delay=_414.delay||0;
this.callback=typeof (_414.callback)==="function"?_414.callback:nitobi.lang.noop;
this.queue=_414.queue||nitobi.effects.EffectQueue.globalQueue;
this.onBeforeFinish=new nitobi.base.Event();
this.onFinish=new nitobi.base.Event();
this.onBeforeStart=new nitobi.base.Event();
};
nitobi.effects.Effect.prototype.start=function(){
var now=new Date().getTime();
this.startOn=now+this.delay*1000;
this.finishOn=this.startOn+this.duration*1000;
this.deltaTime=this.duration*1000;
this.totalFrames=this.duration*this.fps;
this.frame=0;
this.delta=this.from-this.to;
this.queue.add(this);
};
nitobi.effects.Effect.prototype.render=function(pos){
if(!this.running){
this.onBeforeStart.notify(new nitobi.base.EventArgs(this,this.onBeforeStart));
this.setup();
this.running=true;
}
this.update(this.transition(pos*this.delta+this.from));
};
nitobi.effects.Effect.prototype.step=function(now){
if(this.startOn<=now){
if(now>=this.finishOn){
this.end();
return;
}
var pos=(now-this.startOn)/(this.deltaTime);
var _419=Math.floor(pos*this.totalFrames);
if(this.frame<_419){
this.render(pos);
this.frame=_419;
}
}
};
nitobi.effects.Effect.prototype.setup=function(){
};
nitobi.effects.Effect.prototype.update=function(pos){
};
nitobi.effects.Effect.prototype.finish=function(){
};
nitobi.effects.Effect.prototype.end=function(){
this.onBeforeFinish.notify(new nitobi.base.EventArgs(this,this.onBeforeFinish));
this.cancel();
this.render(1);
this.running=false;
this.finish();
this.callback();
this.onFinish.notify(new nitobi.base.EventArgs(this,this.onAfterFinish));
};
nitobi.effects.Effect.prototype.cancel=function(){
this.queue.remove(this);
};
nitobi.effects.factory=function(_41b,_41c,etc){
var args=nitobi.lang.toArray(arguments,2);
return function(_41f){
var f=function(){
_41b.apply(this,[_41f,_41c].concat(args));
};
nitobi.lang.extend(f,_41b);
return new f();
};
};
nitobi.effects.families={none:{show:null,hide:null}};
nitobi.lang.defineNs("nitobi.effects");
if(false){
nitobi.effects.Transition=function(){
};
}
nitobi.effects.Transition={};
nitobi.effects.Transition.sinoidal=function(x){
return (-Math.cos(x*Math.PI)/2)+0.5;
};
nitobi.effects.Transition.linear=function(x){
return x;
};
nitobi.effects.Transition.reverse=function(x){
return 1-x;
};
nitobi.lang.defineNs("nitobi.effects");
nitobi.effects.Scale=function(_424,_425,_426){
nitobi.effects.Scale.baseConstructor.call(this,_424,_425);
this.scaleX=typeof (_425.scaleX)=="boolean"?_425.scaleX:true;
this.scaleY=typeof (_425.scaleY)=="boolean"?_425.scaleY:true;
this.scaleFrom=typeof (_425.scaleFrom)=="number"?_425.scaleFrom:100;
this.scaleTo=_426;
};
nitobi.lang.extend(nitobi.effects.Scale,nitobi.effects.Effect);
nitobi.effects.Scale.prototype.setup=function(){
var _427=this.element.style;
this.originalStyle={"top":_427.top,"left":_427.left,"width":_427.width,"height":_427.height,"overflow":_427.overflow};
this.factor=(this.scaleTo-this.scaleFrom)/100;
this.dims=[this.element.scrollWidth,this.element.scrollHeight];
_427.width=this.dims[0]+"px";
_427.height=this.dims[1]+"px";
_427.overflow="hidden";
};
nitobi.effects.Scale.prototype.finish=function(){
for(var s in this.originalStyle){
this.element.style[s]=this.originalStyle[s];
}
};
nitobi.effects.Scale.prototype.update=function(pos){
var _42a=(this.scaleFrom/100)+(this.factor*pos);
this.setDimensions(Math.floor(_42a*this.dims[0])||1,Math.floor(_42a*this.dims[1])||1);
};
nitobi.effects.Scale.prototype.setDimensions=function(x,y){
if(this.scaleX){
this.element.style.width=x+"px";
}
if(this.scaleY){
this.element.style.height=y+"px";
}
};
nitobi.lang.defineNs("nitobi.effects");
nitobi.effects.EffectQueue=function(){
nitobi.effects.EffectQueue.baseConstructor.call(this);
nitobi.collections.IEnumerable.call(this);
this.intervalId=0;
};
nitobi.lang.extend(nitobi.effects.EffectQueue,nitobi.Object);
nitobi.lang.implement(nitobi.effects.EffectQueue,nitobi.collections.IEnumerable);
nitobi.effects.EffectQueue.prototype.add=function(_42d){
nitobi.collections.IEnumerable.prototype.add.call(this,_42d);
if(!this.intervalId){
this.intervalId=window.setInterval(nitobi.lang.close(this,this.step),15);
}
};
nitobi.effects.EffectQueue.prototype.step=function(){
var now=new Date().getTime();
this.each(function(e){
e.step(now);
});
};
nitobi.effects.EffectQueue.globalQueue=new nitobi.effects.EffectQueue();
nitobi.lang.defineNs("nitobi.effects");
nitobi.effects.BlindUp=function(_430,_431){
_431=nitobi.lang.merge({scaleX:false,duration:Math.min(0.2*(_430.scrollHeight/100),0.5)},_431||{});
nitobi.effects.BlindUp.baseConstructor.call(this,_430,_431,0);
};
nitobi.lang.extend(nitobi.effects.BlindUp,nitobi.effects.Scale);
nitobi.effects.BlindUp.prototype.setup=function(){
nitobi.effects.BlindUp.base.setup.call(this);
};
nitobi.effects.BlindUp.prototype.finish=function(){
nitobi.html.Css.addClass(this.element,NTB_CSS_HIDE);
nitobi.effects.BlindUp.base.finish.call(this);
this.element.style.height="";
};
nitobi.effects.BlindDown=function(_432,_433){
nitobi.html.Css.swapClass(_432,NTB_CSS_HIDE,NTB_CSS_SMALL);
_433=nitobi.lang.merge({scaleX:false,scaleFrom:0,duration:Math.min(0.2*(_432.scrollHeight/100),0.5)},_433||{});
nitobi.effects.BlindDown.baseConstructor.call(this,_432,_433,100);
};
nitobi.lang.extend(nitobi.effects.BlindDown,nitobi.effects.Scale);
nitobi.effects.BlindDown.prototype.setup=function(){
nitobi.effects.BlindDown.base.setup.call(this);
this.element.style.height="1px";
nitobi.html.Css.removeClass(this.element,NTB_CSS_SMALL);
};
nitobi.effects.BlindDown.prototype.finish=function(){
nitobi.effects.BlindDown.base.finish.call(this);
this.element.style.height="";
};
nitobi.effects.families.blind={show:nitobi.effects.BlindDown,hide:nitobi.effects.BlindUp};
nitobi.lang.defineNs("nitobi.effects");
nitobi.effects.ShadeUp=function(_434,_435){
_435=nitobi.lang.merge({scaleX:false,duration:Math.min(0.2*(_434.scrollHeight/100),0.3)},_435||{});
nitobi.effects.ShadeUp.baseConstructor.call(this,_434,_435,0);
};
nitobi.lang.extend(nitobi.effects.ShadeUp,nitobi.effects.Scale);
nitobi.effects.ShadeUp.prototype.setup=function(){
nitobi.effects.ShadeUp.base.setup.call(this);
var _436=nitobi.html.getFirstChild(this.element);
this.originalStyle.position=this.element.style.position;
nitobi.html.position(this.element);
if(_436){
var _437=_436.style;
this.fnodeStyle={position:_437.position,bottom:_437.bottom,left:_437.left};
this.fnode=_436;
_437.position="absolute";
_437.bottom="0px";
_437.left="0px";
}
};
nitobi.effects.ShadeUp.prototype.finish=function(){
nitobi.effects.ShadeUp.base.finish.call(this);
nitobi.html.Css.addClass(this.element,NTB_CSS_HIDE);
this.element.style.height="";
this.element.style.position=this.originalStyle.position;
this.element.style.overflow=this.originalStyle.overflow;
for(var x in this.fnodeStyle){
this.fnode.style[x]=this.fnodeStyle[x];
}
};
nitobi.effects.ShadeDown=function(_439,_43a){
nitobi.html.Css.swapClass(_439,NTB_CSS_HIDE,NTB_CSS_SMALL);
_43a=nitobi.lang.merge({scaleX:false,scaleFrom:0,duration:Math.min(0.2*(_439.scrollHeight/100),0.3)},_43a||{});
nitobi.effects.ShadeDown.baseConstructor.call(this,_439,_43a,100);
};
nitobi.lang.extend(nitobi.effects.ShadeDown,nitobi.effects.Scale);
nitobi.effects.ShadeDown.prototype.setup=function(){
nitobi.effects.ShadeDown.base.setup.call(this);
this.element.style.height="1px";
nitobi.html.Css.removeClass(this.element,NTB_CSS_SMALL);
var _43b=nitobi.html.getFirstChild(this.element);
this.originalStyle.position=this.element.style.position;
nitobi.html.position(this.element);
if(_43b){
var _43c=_43b.style;
this.fnodeStyle={position:_43c.position,bottom:_43c.bottom,left:_43c.left,right:_43c.right,top:_43c.top};
this.fnode=_43b;
_43c.position="absolute";
_43c.top="";
_43c.right="";
_43c.bottom="0px";
_43c.left="0px";
}
};
nitobi.effects.ShadeDown.prototype.finish=function(){
nitobi.effects.ShadeDown.base.finish.call(this);
this.element.style.height="";
this.element.style.position=this.originalStyle.position;
this.element.style.overflow=this.originalStyle.overflow;
for(var x in this.fnodeStyle){
this.fnode.style[x]=this.fnodeStyle[x];
}
this.fnode.style.top="0px";
this.fnode.style.left="0px";
this.fnode.style.bottom="";
this.fnode.style.right="";
return;
this.fnode.style["position"]="";
};
nitobi.effects.families.shade={show:nitobi.effects.ShadeDown,hide:nitobi.effects.ShadeUp};
nitobi.lang.defineNs("nitobi.lang");
nitobi.lang.StringBuilder=function(_43e){
if(_43e){
if(typeof (_43e)==="string"){
this.strings=[_43e];
}else{
this.strings=_43e;
}
}else{
this.strings=new Array();
}
};
nitobi.lang.StringBuilder.prototype.append=function(_43f){
if(_43f){
this.strings.push(_43f);
}
return this;
};
nitobi.lang.StringBuilder.prototype.clear=function(){
this.strings.length=0;
};
nitobi.lang.StringBuilder.prototype.toString=function(){
return this.strings.join("");
};


var temp_ntb_uniqueIdGeneratorProc='<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ntb="http://www.nitobi.com"> <xsl:output method="xml" /> <x:p-x:n-guid"x:s-0"/><x:t- match="/"> <x:at-/></x:t-><x:t- match="node()|@*"> <xsl:copy> <xsl:if test="not(@id)"> <x:a-x:n-id" ><x:v-x:s-generate-id(.)"/><x:v-x:s-position()"/><x:v-x:s-$guid"/></x:a-> </xsl:if> <x:at-x:s-./* | text() | @*"> </x:at-> </xsl:copy></x:t-> <x:t- match="text()"> <x:v-x:s-."/></x:t-></xsl:stylesheet>';
nitobi.lang.defineNs("nitobi.base");
nitobi.base.uniqueIdGeneratorProc = nitobi.xml.createXslProcessor(nitobiXmlDecodeXslt(temp_ntb_uniqueIdGeneratorProc));


