
var dnn;
var DNN_HIGHLIGHT_COLOR='#9999FF';
var COL_DELIMITER=String.fromCharCode(18);
var ROW_DELIMITER=String.fromCharCode(17);
var QUOTE_REPLACEMENT=String.fromCharCode(19);
var KEY_LEFT_ARROW=37;
var KEY_UP_ARROW=38;
var KEY_RIGHT_ARROW=39;
var KEY_DOWN_ARROW=40;
var KEY_RETURN=13;
var KEY_ESCAPE=27;
if(typeof(__dnn_m_aNamespaces)=='undefined')
var __dnn_m_aNamespaces=new Array();
function __dnn()
{
this.apiversion=.4;
this.pns='';
this.ns='dnn';
this.diagnostics=null;
this.vars=null;
this.dependencies=new Array();
this.isLoaded=false;
this.delay=new Array();}
__dnn.prototype=
{
getVars:function()
{
if(this.vars==null)
{
this.vars=new Array();
var oCtl=dnn.dom.getById('__dnnVariable');
if(oCtl!=null)
{
if(oCtl.value.indexOf('__scdoff')!=-1)
{
COL_DELIMITER='~|~';
ROW_DELIMITER='~`~';
QUOTE_REPLACEMENT='~!~';}
var aryItems=oCtl.value.split(ROW_DELIMITER);
for(var i=0;i<aryItems.length;i++)
{
var aryItem=aryItems[i].split(COL_DELIMITER);
if(aryItem.length==2)
this.vars[aryItem[0]]=aryItem[1];}}}
return this.vars;},
getVar:function(sKey)
{
if(this.getVars()[sKey]!=null)
{
var re=eval('/'+ QUOTE_REPLACEMENT +'/g');
return this.getVars()[sKey].replace(re,'"');}},
setVar:function(sKey,sVal)
{
if(this.vars==null)
this.getVars();
this.vars[sKey]=sVal;
var oCtl=dnn.dom.getById('__dnnVariable');
if(oCtl==null)
{
oCtl=dnn.dom.createElement('INPUT');
oCtl.type='hidden';
oCtl.id='__dnnVariable';
dnn.dom.appendChild(dnn.dom.getByTagName("body")[0],oCtl);}
var sVals='';
var s;
var re=eval('/"/g');
for(s in this.vars)
sVals +=ROW_DELIMITER + s + COL_DELIMITER + this.vars[s].toString().replace(re,QUOTE_REPLACEMENT);
oCtl.value=sVals;
return true;},
callPostBack:function(sAction)
{
var sPostBack=dnn.getVar('__dnn_postBack');
var sData='';
if(sPostBack.length>0)
{
sData +=sAction;
for(var i=1;i<arguments.length;i++)
{
var aryParam=arguments[i].split('=');
sData +=COL_DELIMITER + aryParam[0]+ COL_DELIMITER + aryParam[1];}
eval(sPostBack.replace('[DATA]',sData));
return true;}
return false;},
createDelegate:function(oThis,pFunc)
{
return function(){pFunc.apply(oThis,arguments);};},
doDelay:function(sType,iTime,pFunc,oContext)
{
if(this.delay[sType]==null)
{
this.delay[sType]=new dnn.delayObject(pFunc,oContext,sType);
this.delay[sType].num=window.setTimeout(dnn.createDelegate(this.delay[sType],this.delay[sType].complete),iTime);}},
cancelDelay:function(sType)
{
if(this.delay[sType]!=null)
{
window.clearTimeout(this.delay[sType].num);
this.delay[sType]=null;}},
decodeHTML:function(s)
{
return s.toString().replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"');},
encode:function(sArg)
{
if(encodeURIComponent)
return encodeURIComponent(sArg);
else
return escape(sArg);},
encodeHTML:function(s)
{
return s.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/\"/g,"&quot;");},
evalJSON:function(s)
{
return eval("("+s+")");},
escapeForEval:function(s)
{
return s.replace(/\\/g,'\\\\').replace(/\'/g,"\\'").replace(/\r/g,'').replace(/\n/g,'\\n').replace(/\./,'\\.');},
extend:function(dest,src)
{
for(s in src)
dest[s]=src[s];
return dest;},
dependenciesLoaded:function()
{
return true;},
loadNamespace:function()
{
if(this.isLoaded==false)
{
if(this.dependenciesLoaded())
{
dnn=this;
this.isLoaded=true;
this.loadDependencies(this.pns,this.ns);}}},
loadDependencies:function(sPNS,sNS)
{
for(var i=0;i<__dnn_m_aNamespaces.length;i++)
{
for(var iDep=0;iDep<__dnn_m_aNamespaces[i].dependencies.length;iDep++)
{
if(__dnn_m_aNamespaces[i].dependencies[iDep]==sPNS +(sPNS.length>0?'.':'')+ sNS)
__dnn_m_aNamespaces[i].loadNamespace();}}}}
__dnn.prototype.delayObject=function(pFunc,oContext,sType)
{
this.num=null;
this.pfunc=pFunc;
this.context=oContext;
this.type=sType;}
__dnn.prototype.delayObject.prototype=
{
complete:function()
{
dnn.delay[this.type]=null;
this.pfunc(this.context);}}
__dnn.prototype.ScriptRequest=function(sSrc,sText,fCallBack)
{
this.ctl=null;
this.xmlhttp=null;
this.src=null;
this.text=null;
if(sSrc!=null&&sSrc.length>0)
this.src=sSrc;
if(sText!=null&&sText.length>0)
this.text=sText;
this.callBack=fCallBack;
this.status='init';
this.timeOut=5000;}
__dnn.prototype.ScriptRequest.prototype=
{
load:function()
{
this.status='loading';
this.ctl=document.createElement('script');
this.ctl.type='text/javascript';
if(this.src!=null)
{
if(dnn.dom.browser.isType(dnn.dom.browser.Safari))
{
this.xmlhttp=new XMLHttpRequest();
this.xmlhttp.open('GET',this.src,true);
this.xmlhttp.onreadystatechange=dnn.createDelegate(this,this.xmlhttpStatusChange);
this.xmlhttp.send(null);
return;}
else
{
if(dnn.dom.browser.isType(dnn.dom.browser.InternetExplorer))
this.ctl.onreadystatechange=dnn.createDelegate(this,this.statusChange);
else if(dnn.dom.browser.isType(dnn.dom.browser.Opera)==false)
this.ctl.onload=dnn.createDelegate(this,this.complete);
this.ctl.src=this.src;}}
else
{
if(dnn.dom.browser.isType(dnn.dom.browser.Safari))
this.ctl.innerHTML=dnn.encodeHTML(this.text);
else
this.ctl.text=this.text;}
var oHeads=dnn.dom.getByTagName('HEAD');
if(oHeads)
{
if(dnn.dom.browser.isType(dnn.dom.browser.Opera)==false||this.src!=null)
oHeads[0].appendChild(this.ctl);}
else
alert('Cannot load dynamic script, no HEAD tag present.');
if(this.src==null||dnn.dom.browser.isType(dnn.dom.browser.Opera))
this.complete();
else if(this.timeOut)
dnn.doDelay('loadScript_'+ this.src,this.timeOut,dnn.createDelegate(this,this.reload),null);},
xmlhttpStatusChange:function()
{
if(this.xmlhttp.readyState!=4)
return;
this.src=null;
this.text=this.xmlhttp.responseText;
this.load();},
statusChange:function()
{
if((this.ctl.readyState=='loaded'||this.ctl.readyState=='complete')&&this.status!='complete')
this.complete();},
reload:function()
{
if(dnn.dom.scriptStatus(this.src)=='complete')
{
this.complete();}
else
{
this.load();}},
complete:function()
{
dnn.cancelDelay('loadScript_'+ this.src);
this.status='complete';
if(typeof(this.callBack)!='undefined')
this.callBack(this);
this.dispose();},
dispose:function()
{
this.callBack=null;
if(this.ctl)
{
if(this.ctl.onreadystatechange)
this.ctl.onreadystatechange=new function(){};
else if(this.ctl.onload)
this.ctl.onload=null;
this.ctl=null;}
this.xmlhttp=null;}}
function dnn_dom()
{
this.pns='dnn';
this.ns='dom';
this.dependencies='dnn'.split(',');
this.isLoaded=false;
this.browser=new this.browserObject();
this.__leakEvts=new Array();
this.scripts=[];
this.scriptElements=[];}
dnn_dom.prototype=
{
appendChild:function(oParent,oChild)
{
if(oParent.appendChild)
return oParent.appendChild(oChild);
else
return null;},
attachEvent:function(oCtl,sType,fHandler)
{
if(dnn.dom.browser.isType(dnn.dom.browser.InternetExplorer)==false)
{
var sName=sType.substring(2);
oCtl.addEventListener(sName,function(evt){dnn.dom.event=new dnn.dom.eventObject(evt,evt.target);return fHandler();},false);}
else
oCtl.attachEvent(sType,function(){dnn.dom.event=new dnn.dom.eventObject(window.event,window.event.srcElement);return fHandler();});
return true;},
createElement:function(sTagName)
{
if(document.createElement)
return document.createElement(sTagName.toLowerCase());
else
return null;},
cursorPos:function(oCtl)
{
if(oCtl.value.length==0)
return 0;
var iPos=-1;
if(oCtl.selectionStart)
iPos=oCtl.selectionStart;
else if(oCtl.createTextRange)
{
var oSel=window.document.selection.createRange();
var oRange=oCtl.createTextRange();
if(oRange==null||oSel==null||((oSel.text!="")&&oRange.inRange(oSel)==false))
return -1;
if(oSel.text=="")
{
if(oRange.boundingLeft==oSel.boundingLeft)
iPos=0;
else
{
var sTagName=oCtl.tagName.toLowerCase();
if(sTagName=="input")
{
var sText=oRange.text;
var i=1;
while(i<sText.length)
{
oRange.findText(sText.substring(i));
if(oRange.boundingLeft==oSel.boundingLeft)
break;
i++;}}
else if(sTagName=="textarea")
{
var i=oCtl.value.length + 1;
var oCaret=document.selection.createRange().duplicate();
while(oCaret.parentElement()==oCtl&&oCaret.move("character",1)==1)
--i;
if(i==oCtl.value.length + 1)
i=-1;}
iPos=i;}}
else
iPos=oRange.text.indexOf(oSel.text);}
return iPos;},
cancelCollapseElement:function(oCtl)
{
dnn.cancelDelay(oCtl.id +'col');
oCtl.style.display='none';},
collapseElement:function(oCtl,iNum,pCallBack)
{
if(iNum==null)
iNum=10;
oCtl.style.overflow='hidden';
var oContext=new Object();
oContext.num=iNum;
oContext.ctl=oCtl;
oContext.pfunc=pCallBack;
oCtl.origHeight=oCtl.offsetHeight;
dnn.dom.__collapseElement(oContext);},
__collapseElement:function(oContext)
{
var iNum=oContext.num;
var oCtl=oContext.ctl;
var iStep=oCtl.origHeight/iNum;
if(oCtl.offsetHeight -(iStep*2)>0)
{
oCtl.style.height=(oCtl.offsetHeight - iStep).toString()+'px';
dnn.doDelay(oCtl.id +'col',10,dnn.dom.__collapseElement,oContext);}
else
{
oCtl.style.display='none';
if(oContext.pfunc!=null)
oContext.pfunc();}},
cancelExpandElement:function(oCtl)
{
dnn.cancelDelay(oCtl.id +'exp');
oCtl.style.overflow='';
oCtl.style.height='';},
expandElement:function(oCtl,iNum,pCallBack)
{
if(iNum==null)
iNum=10;
if(oCtl.style.display=='none'&&oCtl.origHeight==null)
{
oCtl.style.display='';
oCtl.style.overflow='';
oCtl.origHeight=oCtl.offsetHeight;
oCtl.style.overflow='hidden';
oCtl.style.height='1px';}
oCtl.style.display='';
var oContext=new Object();
oContext.num=iNum;
oContext.ctl=oCtl;
oContext.pfunc=pCallBack;
dnn.dom.__expandElement(oContext);},
__expandElement:function(oContext)
{
var iNum=oContext.num;
var oCtl=oContext.ctl;
var iStep=oCtl.origHeight/iNum;
if(oCtl.offsetHeight + iStep<oCtl.origHeight)
{
oCtl.style.height=(oCtl.offsetHeight + iStep).toString()+'px';
dnn.doDelay(oCtl.id +'exp',10,dnn.dom.__expandElement,oContext);}
else
{
oCtl.style.overflow='';
oCtl.style.height='';
if(oContext.pfunc!=null)
oContext.pfunc();}},
deleteCookie:function(sName,sPath,sDomain)
{
if(this.getCookie(sName))
{
this.setCookie(sName,'',-1,sPath,sDomain);
return true;}
return false;},
getAttr:function(oNode,sAttr,sDef)
{
if(oNode.getAttribute==null)
return sDef;
var sVal=oNode.getAttribute(sAttr);
if(sVal==null||sVal=='')
return sDef;
else
return sVal;},
getById:function(sID,oCtl)
{
if(oCtl==null)
oCtl=document;
if(oCtl.getElementById)
return oCtl.getElementById(sID);
else if(oCtl.all)
return oCtl.all(sID);
else
return null;},
getByTagName:function(sTag,oCtl)
{
if(oCtl==null)
oCtl=document;
if(oCtl.getElementsByTagName)
return oCtl.getElementsByTagName(sTag);
else if(oCtl.all&&oCtl.all.tags)
return oCtl.all.tags(sTag);
else
return null;},
getParentByTagName:function(oCtl,sTag)
{
var oP=oCtl.parentNode;
sTag=sTag.toLowerCase();
while(oP!=null)
{
if(oP.tagName&&oP.tagName.toLowerCase()==sTag)
return oP;
oP=oP.parentNode;}
return null;},
getCookie:function(sName)
{
var sCookie=" "+ document.cookie;
var sSearch=" "+ sName +"=";
var sStr=null;
var iOffset=0;
var iEnd=0;
if(sCookie.length>0)
{
iOffset=sCookie.indexOf(sSearch);
if(iOffset!=-1)
{
iOffset +=sSearch.length;
iEnd=sCookie.indexOf(";",iOffset)
if(iEnd==-1)
iEnd=sCookie.length;
sStr=unescape(sCookie.substring(iOffset,iEnd));}}
return(sStr);},
getNonTextNode:function(oNode)
{
if(this.isNonTextNode(oNode))
return oNode;
while(oNode!=null&&this.isNonTextNode(oNode))
{
oNode=this.getSibling(oNode,1);}
return oNode;},
__leakEvt:function(sName,oCtl,oPtr)
{
this.name=sName;
this.ctl=oCtl;
this.ptr=oPtr;},
addSafeHandler:function(oDOM,sEvent,oObj,sMethod)
{
oDOM[sEvent]=this.getObjMethRef(oObj,sMethod);
if(dnn.dom.browser.isType(dnn.dom.browser.InternetExplorer))
{
if(this.__leakEvts.length==0)
dnn.dom.attachEvent(window,'onunload',dnn.dom.destroyHandlers);
this.__leakEvts[this.__leakEvts.length]=new dnn.dom.__leakEvt(sEvent,oDOM,oDOM[sEvent]);}},
destroyHandlers:function()
{
var iCount=dnn.dom.__leakEvts.length-1;
for(var i=iCount;i>=0;i--)
{
var oEvt=dnn.dom.__leakEvts[i];
oEvt.ctl.detachEvent(oEvt.name,oEvt.ptr);
oEvt.ctl[oEvt.name]=null;
dnn.dom.__leakEvts.length=dnn.dom.__leakEvts.length - 1;}},
getObjMethRef:function(obj,methodName)
{
return(function(e){e=e||window.event;return obj[methodName](e,this);});},
getScript:function(sSrc)
{
if(this.scriptElements[sSrc])
return this.scriptElements[sSrc];
var oScripts=dnn.dom.getByTagName('SCRIPT');
for(var s=0;s<oScripts.length;s++)
{
if(oScripts[s].src!=null&&oScripts[s].src.indexOf(sSrc)>-1)
{
this.scriptElements[sSrc]=oScripts[s];
return oScripts[s];}}},
getScriptPath:function()
{
var oThisScript=dnn.dom.getScript('dnn.js');
if(oThisScript)
return oThisScript.src.replace('dnn.js','');
return'';},
getSibling:function(oCtl,iOffset)
{
if(oCtl!=null&&oCtl.parentNode!=null)
{
for(var i=0;i<oCtl.parentNode.childNodes.length;i++)
{
if(oCtl.parentNode.childNodes[i].id==oCtl.id)
{
if(oCtl.parentNode.childNodes[i + iOffset]!=null)
return oCtl.parentNode.childNodes[i + iOffset];}}}
return null;},
isNonTextNode:function(oNode)
{
return(oNode.nodeType!=3&&oNode.nodeType!=8);},
scriptFile:function(sSrc)
{
var ary=sSrc.split('/');
return ary[ary.length-1];},
loadScript:function(sSrc,sText,callBack)
{
var sFile;
if(sSrc!=null&&sSrc.length>0)
{
sFile=this.scriptFile(sSrc);
if(this.scripts[sFile]!=null)
return;}
var oSR=new dnn.ScriptRequest(sSrc,sText,callBack);
if(sFile)
this.scripts[sFile]=oSR;
oSR.load();
return oSR;},
loadScripts:function(aSrc,aText,callBack)
{
if(dnn.scripts==null)
{
var oRef=function(aSrc,aText,callBack)
{return(function(){dnn.dom.loadScripts(aSrc,aText,callBack);});};
dnn.dom.loadScript(dnn.dom.getScriptPath()+'dnn.scripts.js',null,oRef(aSrc,aText,callBack));
return;}
var oBatch=new dnn.scripts.ScriptBatchRequest(aSrc,aText,callBack);
oBatch.load();},
scriptStatus:function(sSrc)
{
var sFile=this.scriptFile(sSrc);
if(this.scripts[sFile])
return this.scripts[sFile].status;
var oScript=this.getScript(sSrc);
if(oScript!=null)
return'complete';
else
return'';},
setScriptLoaded:function(sSrc)
{
var sFile=this.scriptFile(sSrc);
if(this.scripts[sFile]&&dnn.dom.scripts[sFile].status!='complete')
dnn.dom.scripts[sFile].complete();},
navigate:function(sURL,sTarget)
{
if(sTarget!=null&&sTarget.length>0)
{
if(sTarget=='_blank')
window.open(sURL);
else
document.frames[sTarget].location.href=sURL;}
else
window.location.href=sURL;
return false;},
removeChild:function(oChild)
{
if(oChild.parentNode.removeChild)
return oChild.parentNode.removeChild(oChild);
else
return null;},
setCookie:function(sName,sVal,iDays,sPath,sDomain,bSecure)
{
var sExpires;
if(iDays)
{
sExpires=new Date();
sExpires.setTime(sExpires.getTime()+(iDays*24*60*60*1000));}
document.cookie=sName +"="+ escape(sVal)+((sExpires)?"; expires="+ sExpires.toGMTString():"")+
((sPath)?"; path="+ sPath:"")+((sDomain)?"; domain="+ sDomain:"")+((bSecure)?"; secure":"");
if(document.cookie.length>0)
return true;},
getCurrentStyle:function(oNode,prop)
{
if(document.defaultView)
{
if(oNode.nodeType!=oNode.ELEMENT_NODE)return null;
return document.defaultView.getComputedStyle(oNode,'').getPropertyValue(prop.split('-').join(''));}
if(oNode.currentStyle)
return oNode.currentStyle[prop.split('-').join('')];
if(oNode.style)
return oNode.style.getAttribute(prop.split('-').join(''));
return null;},
dependenciesLoaded:function()
{
return(typeof(dnn)!='undefined');},
loadNamespace:function()
{
if(this.isLoaded==false)
{
if(this.dependenciesLoaded())
{
dnn.dom=this;
this.isLoaded=true;
dnn.loadDependencies(this.pns,this.ns);}}},
getFormPostString:function(oCtl)
{
var sRet='';
if(oCtl!=null)
{
if(oCtl.tagName&&oCtl.tagName.toLowerCase()=='form')
{
for(var i=0;i<oCtl.elements.length;i++)
sRet +=this.getElementPostString(oCtl.elements[i]);}
else
{
sRet=this.getElementPostString(oCtl);
for(var i=0;i<oCtl.childNodes.length;i++)
sRet +=this.getFormPostString(oCtl.childNodes[i]);}}
return sRet;},
getElementPostString:function(oCtl)
{
var sTagName;
if(oCtl.tagName)
sTagName=oCtl.tagName.toLowerCase();
if(sTagName=='input')
{
var sType=oCtl.type.toLowerCase();
if(sType=='text'||sType=='password'||sType=='hidden'||((sType=='checkbox'||sType=='radio')&&oCtl.checked))
return oCtl.name +'='+ dnn.encode(oCtl.value)+'&';}
else if(sTagName=='select')
{
for(var i=0;i<oCtl.options.length;i++)
{
if(oCtl.options[i].selected)
return oCtl.name +'='+ dnn.encode(oCtl.options[i].value)+'&';}}
else if(sTagName=='textarea')
return oCtl.name +'='+ dnn.encode(oCtl.value)+'&';
return'';}}
dnn_dom.prototype.eventObject=function(e,srcElement)
{
this.object=e;
this.srcElement=srcElement;}
dnn_dom.prototype.browserObject=function()
{
this.InternetExplorer='ie';
this.Netscape='ns';
this.Mozilla='mo';
this.Opera='op';
this.Safari='safari';
this.Konqueror='kq';
this.MacIE='macie';
var sType;
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf('konqueror')!=-1)
sType=this.Konqueror;
else if(agt.indexOf('opera')!=-1)
sType=this.Opera;
else if(agt.indexOf('netscape')!=-1)
sType=this.Netscape;
else if(agt.indexOf('msie')!=-1)
{
if(agt.indexOf('mac')!=-1)
sType=this.MacIE;
else
sType=this.InternetExplorer;}
else if(agt.indexOf('safari')!=-1)
sType='safari';
if(sType==null)
sType=this.Mozilla;
this.type=sType;
this.version=parseFloat(navigator.appVersion);
var sAgent=navigator.userAgent.toLowerCase();
if(this.type==this.InternetExplorer)
{
var temp=navigator.appVersion.split("MSIE");
this.version=parseFloat(temp[1]);}
if(this.type==this.Netscape)
{
var temp=sAgent.split("netscape");
this.version=parseFloat(temp[1].split("/")[1]);}}
dnn_dom.prototype.browserObject.prototype=
{
toString:function()
{
return this.type +' '+ this.version;},
isType:function()
{
for(var i=0;i<arguments.length;i++)
{
if(dnn.dom.browser.type==arguments[i])
return true;}
return false;}}
function dnn_controls()
{
this.pns='dnn';
this.ns='controls';
this.dependencies='dnn,dnn.dom'.split(',');
this.isLoaded=false;
this.controls=new Array();
this.toolbars=[];
this.orient=new Object();
this.orient.horizontal=0;
this.orient.vertical=1;
this.action=new Object();
this.action.postback=0;
this.action.expand=1;
this.action.none=2;
this.action.nav=3;}
dnn_controls.prototype=
{
dependenciesLoaded:function()
{
return(typeof(dnn)!='undefined'&&typeof(dnn.dom)!='undefined');},
loadNamespace:function()
{
if(this.isLoaded==false)
{
if(this.dependenciesLoaded())
{
if(typeof(dnn_control)!='undefined')
dnn.extend(dnn_controls.prototype,new dnn_control);
dnn.controls=new dnn_controls();
this.isLoaded=true;
dnn.loadDependencies(this.pns,this.ns);}}}}
dnn_controls.prototype.DNNNode=function(oNode)
{
if(oNode!=null)
{
this.node=oNode;
this.id=oNode.getAttribute('id','');
this.key=oNode.getAttribute('key','');
this.text=oNode.getAttribute('txt','');
this.url=oNode.getAttribute('url','');
this.js=oNode.getAttribute('js','');
this.target=oNode.getAttribute('tar','');
this.toolTip=oNode.getAttribute('tTip','');
this.enabled=oNode.getAttribute('enabled','1')!='0';
this.css=oNode.getAttribute('css','');
this.cssSel=oNode.getAttribute('cssSel','');
this.cssHover=oNode.getAttribute('cssHover','');
this.cssIcon=oNode.getAttribute('cssIcon','');
this.hasNodes=oNode.childNodeCount()>0;
this.hasPendingNodes=(oNode.getAttribute('hasNodes','0')=='1'&&this.hasNodes==false);
this.imageIndex=new Number(oNode.getAttribute('imgIdx','-1'));
this.image=oNode.getAttribute('img','');
this.level=this.getNodeLevel();}}
dnn_controls.prototype.DNNNode.prototype=
{
childNodeCount:function()
{
return this.node.childNodes.length;},
getNodeLevel:function()
{
var i=0;
var oNode=this.node;
while(oNode!=null)
{
oNode=oNode.parentNode();
if(oNode==null||oNode.nodeName()=='root')
break;
i++;}
return i;},
update:function(sProp)
{
if(sProp!=null)
{
var sType=typeof(this[sProp]);
if(sType=='string'||sType=='number'||this[sProp]==null)
this.node.setAttribute(sProp,this[sProp]);
else if(sType=='boolean')
this.node.setAttribute(sProp,new Number(this[sProp]));}
else
{
for(sProp in this)
this.update(sProp);}}}
function dnn_util()
{
this.pns='dnn';
this.ns='utilities';
this.dependencies='dnn,dnn.dom'.split(',');
this.isLoaded=false;}
dnn_util.prototype.dependenciesLoaded=function()
{
return(typeof(dnn)!='undefined'&&typeof(dnn.dom)!='undefined');}
dnn_util.prototype.loadNamespace=function()
{
if(this.isLoaded==false)
{
if(this.dependenciesLoaded())
{
if(typeof(dnn_utility)!='undefined')
dnn.extend(dnn_util.prototype,new dnn_utility);
dnn.util=new dnn_util();
this.isLoaded=true;
dnn.loadDependencies(this.pns,this.ns);}}}
function $()
{
var ary=new Array();
for(var i=0;i<arguments.length;i++)
{
var arg=arguments[i];
var ctl;
if(typeof arg=='string')
ctl=dnn.dom.getById(arg);
else
ctl=arg;
if(ctl!=null&&typeof(Element)!='undefined'&&typeof(Element.extend)!='undefined')
Element.extend(ctl);
if(arguments.length==1)
return ctl;
ary[ary.length]=ctl;}
return ary;}
__dnn_m_aNamespaces[__dnn_m_aNamespaces.length]=new dnn_util();
__dnn_m_aNamespaces[__dnn_m_aNamespaces.length]=new dnn_controls();
__dnn_m_aNamespaces[__dnn_m_aNamespaces.length]=new dnn_dom();
__dnn_m_aNamespaces[__dnn_m_aNamespaces.length]=new __dnn();
for(var i=__dnn_m_aNamespaces.length-1;i>=0;i--)
__dnn_m_aNamespaces[i].loadNamespace();