
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=0.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 C=dnn.dom.getById("__dnnVariable");if(C!=null){if(C.value.indexOf("__scdoff")!=-1){COL_DELIMITER="~|~";ROW_DELIMITER="~`~";QUOTE_REPLACEMENT="~!~"}var D=C.value.split(ROW_DELIMITER);for(var B=0;B<D.length;B++){var A=D[B].split(COL_DELIMITER);if(A.length==2){this.vars[A[0]]=A[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(B,A){return function(){A.apply(B,arguments)}},doDelay:function(D,C,B,A){if(this.delay[D]==null){this.delay[D]=new dnn.delayObject(B,A,D);this.delay[D].num=window.setTimeout(dnn.createDelegate(this.delay[D],this.delay[D].complete),C)}},cancelDelay:function(A){if(this.delay[A]!=null){window.clearTimeout(this.delay[A].num);this.delay[A]=null}},decodeHTML:function(A){return A.toString().replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"')},encode:function(A){if(encodeURIComponent){return encodeURIComponent(A)}else{return escape(A)}},encodeHTML:function(A){return A.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/\"/g,"&quot;")},evalJSON:function(s){return eval("("+s+")")},escapeForEval:function(A){return A.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\r/g,"").replace(/\n/g,"\\n").replace(/\./,"\\.")},extend:function(A,B){for(s in B){A[s]=B[s]}return A},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(A,D){for(var B=0;B<__dnn_m_aNamespaces.length;B++){for(var C=0;C<__dnn_m_aNamespaces[B].dependencies.length;C++){if(__dnn_m_aNamespaces[B].dependencies[C]==A+(A.length>0?".":"")+D){__dnn_m_aNamespaces[B].loadNamespace()}}}}};__dnn.prototype.delayObject=function(B,A,C){this.num=null;this.pfunc=B;this.context=A;this.type=C};__dnn.prototype.delayObject.prototype={complete:function(){dnn.delay[this.type]=null;this.pfunc(this.context)}};__dnn.prototype.ScriptRequest=function(A,B,C){this.ctl=null;this.xmlhttp=null;this.src=null;this.text=null;if(A!=null&&A.length>0){this.src=A}if(B!=null&&B.length>0){this.text=B}this.callBack=C;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 A=dnn.dom.getByTagName("HEAD");if(A){if(dnn.dom.browser.isType(dnn.dom.browser.Opera)==false||this.src!=null){A[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(B,A){if(B.appendChild){return B.appendChild(A)}else{return null}},attachEvent:function(A,D,B){if(dnn.dom.browser.isType(dnn.dom.browser.InternetExplorer)==false){var C=D.substring(2);A.addEventListener(C,function(E){dnn.dom.event=new dnn.dom.eventObject(E,E.target);return B()},false)}else{A.attachEvent(D,function(){dnn.dom.event=new dnn.dom.eventObject(window.event,window.event.srcElement);return B()})}return true},createElement:function(A){if(document.createElement){return document.createElement(A.toLowerCase())}else{return null}},cursorPos:function(F){if(F.value.length==0){return 0}var H=-1;if(F.selectionStart){H=F.selectionStart}else{if(F.createTextRange){var A=window.document.selection.createRange();var G=F.createTextRange();if(G==null||A==null||((A.text!="")&&G.inRange(A)==false)){return -1}if(A.text==""){if(G.boundingLeft==A.boundingLeft){H=0}else{var B=F.tagName.toLowerCase();if(B=="input"){var C=G.text;var D=1;while(D<C.length){G.findText(C.substring(D));if(G.boundingLeft==A.boundingLeft){break}D++}}else{if(B=="textarea"){var D=F.value.length+1;var E=document.selection.createRange().duplicate();while(E.parentElement()==F&&E.move("character",1)==1){--D}if(D==F.value.length+1){D=-1}}}H=D}}else{H=G.text.indexOf(A.text)}}}return H},cancelCollapseElement:function(A){dnn.cancelDelay(A.id+"col");A.style.display="none"},collapseElement:function(C,A,D){if(A==null){A=10}C.style.overflow="hidden";var B=new Object();B.num=A;B.ctl=C;B.pfunc=D;C.origHeight=C.offsetHeight;dnn.dom.__collapseElement(B)},__collapseElement:function(B){var A=B.num;var D=B.ctl;var C=D.origHeight/A;if(D.offsetHeight-(C*2)>0){D.style.height=(D.offsetHeight-C).toString()+"px";dnn.doDelay(D.id+"col",10,dnn.dom.__collapseElement,B)}else{D.style.display="none";if(B.pfunc!=null){B.pfunc()}}},cancelExpandElement:function(A){dnn.cancelDelay(A.id+"exp");A.style.overflow="";A.style.height=""},expandElement:function(C,A,D){if(A==null){A=10}if(C.style.display=="none"&&C.origHeight==null){C.style.display="";C.style.overflow="";C.origHeight=C.offsetHeight;C.style.overflow="hidden";C.style.height="1px"}C.style.display="";var B=new Object();B.num=A;B.ctl=C;B.pfunc=D;dnn.dom.__expandElement(B)},__expandElement:function(B){var A=B.num;var D=B.ctl;var C=D.origHeight/A;if(D.offsetHeight+C<D.origHeight){D.style.height=(D.offsetHeight+C).toString()+"px";dnn.doDelay(D.id+"exp",10,dnn.dom.__expandElement,B)}else{D.style.overflow="";D.style.height="";if(B.pfunc!=null){B.pfunc()}}},deleteCookie:function(C,B,A){if(this.getCookie(C)){this.setCookie(C,"",-1,B,A);return true}return false},getAttr:function(C,B,D){if(C.getAttribute==null){return D}var A=C.getAttribute(B);if(A==null||A==""){return D}else{return A}},getById:function(A,B){if(B==null){B=document}if(B.getElementById){return B.getElementById(A)}else{if(B.all){return B.all(A)}else{return null}}},getByTagName:function(A,B){if(B==null){B=document}if(B.getElementsByTagName){return B.getElementsByTagName(A)}else{if(B.all&&B.all.tags){return B.all.tags(A)}else{return null}}},getParentByTagName:function(B,A){var C=B.parentNode;A=A.toLowerCase();while(C!=null){if(C.tagName&&C.tagName.toLowerCase()==A){return C}C=C.parentNode}return null},getCookie:function(F){var E=" "+document.cookie;var D=" "+F+"=";var B=null;var C=0;var A=0;if(E.length>0){C=E.indexOf(D);if(C!=-1){C+=D.length;A=E.indexOf(";",C);if(A==-1){A=E.length}B=unescape(E.substring(C,A))}}return(B)},getNonTextNode:function(A){if(this.isNonTextNode(A)){return A}while(A!=null&&this.isNonTextNode(A)){A=this.getSibling(A,1)}return A},__leakEvt:function(C,B,A){this.name=C;this.ctl=B;this.ptr=A},addSafeHandler:function(C,D,A,B){C[D]=this.getObjMethRef(A,B);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(D,C,C[D])}},destroyHandlers:function(){var C=dnn.dom.__leakEvts.length-1;for(var A=C;A>=0;A--){var B=dnn.dom.__leakEvts[A];B.ctl.detachEvent(B.name,B.ptr);B.ctl[B.name]=null;dnn.dom.__leakEvts.length=dnn.dom.__leakEvts.length-1}},getObjMethRef:function(B,A){return(function(C){C=C||window.event;return B[A](C,this)})},getScript:function(B){if(this.scriptElements[B]){return this.scriptElements[B]}var A=dnn.dom.getByTagName("SCRIPT");for(var C=0;C<A.length;C++){if(A[C].src!=null&&A[C].src.indexOf(B)>-1){this.scriptElements[B]=A[C];return A[C]}}},getScriptPath:function(){var A=dnn.dom.getScript("dnn.js");if(A){return A.src.replace("dnn.js","")}return""},getSibling:function(B,C){if(B!=null&&B.parentNode!=null){for(var A=0;A<B.parentNode.childNodes.length;A++){if(B.parentNode.childNodes[A].id==B.id){if(B.parentNode.childNodes[A+C]!=null){return B.parentNode.childNodes[A+C]}}}}return null},isNonTextNode:function(A){return(A.nodeType!=3&&A.nodeType!=8)},scriptFile:function(A){var B=A.split("/");return B[B.length-1]},loadScript:function(A,C,D){var E;if(A!=null&&A.length>0){E=this.scriptFile(A);if(this.scripts[E]!=null){return}}var B=new dnn.ScriptRequest(A,C,D);if(E){this.scripts[E]=B}B.load();return B},loadScripts:function(A,B,C){if(dnn.scripts==null){var E=function(F,G,H){return(function(){dnn.dom.loadScripts(F,G,H)})};dnn.dom.loadScript(dnn.dom.getScriptPath()+"dnn.scripts.js",null,E(A,B,C));return}var D=new dnn.scripts.ScriptBatchRequest(A,B,C);D.load()},scriptStatus:function(A){var C=this.scriptFile(A);if(this.scripts[C]){return this.scripts[C].status}var B=this.getScript(A);if(B!=null){return"complete"}else{return""}},setScriptLoaded:function(A){var B=this.scriptFile(A);if(this.scripts[B]&&dnn.dom.scripts[B].status!="complete"){dnn.dom.scripts[B].complete()}},navigate:function(B,A){if(A!=null&&A.length>0){if(A=="_blank"){window.open(B)}else{document.frames[A].location.href=B}}else{window.location.href=B}return false},removeChild:function(A){if(A.parentNode.removeChild){return A.parentNode.removeChild(A)}else{return null}},setCookie:function(E,B,G,C,A,D){var F;if(G){F=new Date();F.setTime(F.getTime()+(G*24*60*60*1000))}document.cookie=E+"="+escape(B)+((F)?"; expires="+F.toGMTString():"")+((C)?"; path="+C:"")+((A)?"; domain="+A:"")+((D)?"; secure":"");if(document.cookie.length>0){return true}},getCurrentStyle:function(A,B){if(document.defaultView){if(A.nodeType!=A.ELEMENT_NODE){return null}return document.defaultView.getComputedStyle(A,"").getPropertyValue(B.split("-").join(""))}if(A.currentStyle){return A.currentStyle[B.split("-").join("")]}if(A.style){return A.style.getAttribute(B.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(C){var B="";if(C!=null){if(C.tagName&&C.tagName.toLowerCase()=="form"){for(var A=0;A<C.elements.length;A++){B+=this.getElementPostString(C.elements[A])}}else{B=this.getElementPostString(C);for(var A=0;A<C.childNodes.length;A++){B+=this.getFormPostString(C.childNodes[A])}}}return B},getElementPostString:function(C){var A;if(C.tagName){A=C.tagName.toLowerCase()}if(A=="input"){var D=C.type.toLowerCase();if(D=="text"||D=="password"||D=="hidden"||((D=="checkbox"||D=="radio")&&C.checked)){return C.name+"="+dnn.encode(C.value)+"&"}}else{if(A=="select"){for(var B=0;B<C.options.length;B++){if(C.options[B].selected){return C.name+"="+dnn.encode(C.options[B].value)+"&"}}}else{if(A=="textarea"){return C.name+"="+dnn.encode(C.value)+"&"}}}return""}};dnn_dom.prototype.eventObject=function(B,A){this.object=B;this.srcElement=A};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 D;var C=navigator.userAgent.toLowerCase();if(C.indexOf("konqueror")!=-1){D=this.Konqueror}else{if(C.indexOf("opera")!=-1){D=this.Opera}else{if(C.indexOf("netscape")!=-1){D=this.Netscape}else{if(C.indexOf("msie")!=-1){if(C.indexOf("mac")!=-1){D=this.MacIE}else{D=this.InternetExplorer}}else{if(C.indexOf("safari")!=-1){D="safari"}}}}}if(D==null){D=this.Mozilla}this.type=D;this.version=parseFloat(navigator.appVersion);var B=navigator.userAgent.toLowerCase();if(this.type==this.InternetExplorer){var A=navigator.appVersion.split("MSIE");this.version=parseFloat(A[1])}if(this.type==this.Netscape){var A=B.split("netscape");this.version=parseFloat(A[1].split("/")[1])}};dnn_dom.prototype.browserObject.prototype={toString:function(){return this.type+" "+this.version},isType:function(){for(var A=0;A<arguments.length;A++){if(dnn.dom.browser.type==arguments[A]){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(A){if(A!=null){this.node=A;this.id=A.getAttribute("id","");this.key=A.getAttribute("key","");this.text=A.getAttribute("txt","");this.url=A.getAttribute("url","");this.js=A.getAttribute("js","");this.target=A.getAttribute("tar","");this.toolTip=A.getAttribute("tTip","");this.enabled=A.getAttribute("enabled","1")!="0";this.css=A.getAttribute("css","");this.cssSel=A.getAttribute("cssSel","");this.cssHover=A.getAttribute("cssHover","");this.cssIcon=A.getAttribute("cssIcon","");this.hasNodes=A.childNodeCount()>0;this.hasPendingNodes=(A.getAttribute("hasNodes","0")=="1"&&this.hasNodes==false);this.imageIndex=new Number(A.getAttribute("imgIdx","-1"));this.image=A.getAttribute("img","");this.level=this.getNodeLevel()}};dnn_controls.prototype.DNNNode.prototype={childNodeCount:function(){return this.node.childNodes.length},getNodeLevel:function(){var A=0;var B=this.node;while(B!=null){B=B.parentNode();if(B==null||B.nodeName()=="root"){break}A++}return A},update:function(A){if(A!=null){var B=typeof(this[A]);if(B=="string"||B=="number"||this[A]==null){this.node.setAttribute(A,this[A])}else{if(B=="boolean"){this.node.setAttribute(A,new Number(this[A]))}}}else{for(A in this){this.update(A)}}}};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 D=new Array();for(var C=0;C<arguments.length;C++){var A=arguments[C];var B;if(typeof A=="string"){B=dnn.dom.getById(A)}else{B=A}if(B!=null&&typeof(Element)!="undefined"&&typeof(Element.extend)!="undefined"){Element.extend(B)}if(arguments.length==1){return B}D[D.length]=B}return D}__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()};
