 function xGetElementById(e) {  if(typeof(e)!='string') return e;  if(document.getElementById) e=document.getElementById(e);  else if(document.all) e=document.all[e];  else e=null;  return e;}function DisplayControl(rootEl, useParent, useSelect, multi) {this.rootEl = rootEl;this.useParent = useParent;this.useSelect = useSelect;this.multi = multi;this.root;this.els;this.baseEls;this.cont;this.activeEl;this.selector;this.id;this.controllers = new Array();this.getEls = getEls;this.selectorChange = selectorChange;this.controlEl = controlEl;this.actionDisplay = actionDisplay;var fakeThis = this;this._selectorChange = function (e) {fakeThis.selectorChange(e);};this._controlEl = function (e) {fakeThis.controlEl(e);};if(this.root = xGetElementById(this.rootEl)) {this.getEls();for(i = 0; i < this.els.length; i++) {this.cont = new ElDspControl(this.els[i], this.useParent, this.useSelect);this.controllers[this.cont.id] = this.cont;if(!this.multi && this.cont.status) this.activeEl = this.cont.id;if(this.useSelect.length) { this.selector = document.getElementById(useSelect);if(!addEvent(this.selector, 'change', this._selectorChange, false)) this.selector.onchange = this._selectorChange;} else {if(!addEvent(this.cont.control, 'click', this._controlEl, false)) this.cont.control.onclick = this._controlEl;}}}}function getEls() {var hiddenEls, shownEls;if(document.all) this.baseEls = this.root.all;else if(document.getElementsByTagName && !document.all) this.baseEls = this.root.getElementsByTagName("*");hiddenEls = document.getElementsByClassName(this.baseEls, 'hideEl');shownEls = document.getElementsByClassName(this.baseEls, 'showEl');this.els = hiddenEls.concat(shownEls);}function selectorChange(e) {var targ;if (!e) var e = window.event;if (e.target) targ = e.target;else if (e.srcElement) targ = e.srcElement;if(targ.nodeType == 3) targ = targ.parentNode; this.id = targ.options[targ.options.selectedIndex].value;this.actionDisplay();}function controlEl(e) {var targ;if (!e) var e = window.event;if (e.target) targ = e.target;else if (e.srcElement) targ = e.srcElement;if(targ.nodeType == 3) targ = targ.parentNode; this.id = targ.getAttribute('id');if(this.id == null || this.id.length == 0) {this.root = targ;this.getEls();this.id = this.els[0].getAttribute('id');}this.actionDisplay();}function actionDisplay() {if(!this.multi) {this.controllers[this.activeEl].swapEl();this.activeEl = this.id;}this.controllers[this.id].swapEl();}function ElDspControl(el, useParent, useSelect) {this.el = el;this.useParent = useParent;this.control;this.status;this.id;this.useSelect = useSelect; this.hideEl = hideEl;this.showEl = showEl;this.swapEl = swapEl;if(this.useParent) this.control = el.parentNode;else this.control = el;if(!this.useSelect) this.control.className += ' pointerCursor';this.id = el.id;if(el.className.match(/hideEl/)) this.hideEl();else this.status = 1;}function hideEl() {this.el.style.display = 'none';this.status = 0;}function showEl() {this.el.style.display = 'block';this.status = 1;}function swapEl() {if(this.status) this.hideEl();else this.showEl();}
