// Gaia Ajax Widgets Copyright (C) 2007 - 2008 Gaiaware AS. details at http://ajaxwidgets.com/
Gaia.Panel=Class.create();Object.extend(Gaia.Panel.prototype,Gaia.WebControl.prototype);Object.extend(Gaia.Panel.prototype,Gaia.Container.prototype);Object.extend(Gaia.Panel.prototype,{initialize:function(element,options){this.initializePanel(element,options);},initializePanel:function(element,options){this.initializeWebControl(element,options);},setDirection:function(value){if(value=='LeftToRight')
this.element.setAttribute('dir','ltr');else if(value=='RightToLeft')
this.element.setAttribute('dir','rtl');else if(this.element.hasAttribute('dir'))
this.element.removeAttribute('dir');return this;},setGroupingText:function(value){if(value&&value.length>0){var legends=this.element.select('legend');if(legends!=null){legends[0].innerHTML=value;return this;}
var legend=document.createElement('legend');legend.innerHTML=value;var fieldSet=new Element('fieldset');fieldSet.appendChild(legend);while(this.element.childNodes.length>0){fieldSet.appendChild(this.element.childNodes[0]);}
this.element.appendChild(fieldSet);}
else{var fieldsets=this.element.select('fieldset');if(fieldsets!=null){var fieldSet=fieldsets[0];fieldSet.removeChild(fieldSet.select('legend')[0]);while(fieldSet.childNodes.length>0){this.element.appendChild(fieldSet.childNodes[0]);}
this.element.removeChild(fieldSet);}}
return this;},setTabIndex:function(value){this.element.tabIndex=value;return this;},setFocus:function(){try{this.element.focus();}
catch(err){}
return this;},setVisible:function(value){value?Element.show(this.element):Element.hide(this.element);if(value!=true){this.destroy();}
return this;},destroy:function(){this._panelDestroy();},_panelDestroy:function(){this.destroyContainer();this._destroyImpl();},_getElementPostValue:function(){return'';}});Gaia.Panel.browserFinishedLoading=true;