// Gaia Ajax Widgets Copyright (C) 2007 - 2008 Gaiaware AS. details at http://ajaxwidgets.com/
Gaia.Container=function(){}
Gaia.Container.prototype={forceAnUpdate:function(){this.destroyContainer();},appendHtml:function(html){var el=Builder.node('div');el.innerHTML=html;var ar=new Array();for(var idx=0;idx<el.childNodes.length;idx++){ar.push(el.childNodes[idx]);}
for(var idx=0;idx<ar.length;idx++){this.element.appendChild(ar[idx]);}
return this;},destroyContainer:function(){this._destroyChildrenControls();this._destroyInVisibleChildControls();},reInit:function(){this.element=$(this.element.id);},_destroyChildrenControls:function(){var elId=this.getControlId()+'_';var allElements=Gaia.Control._itsRegisteredControls.values();for(var idxNo=0;idxNo<allElements.length;idxNo++){var idx=allElements[idxNo];if(idx!=this){if(idx.getControlId().indexOf(elId)==0){idx.destroy();}}}},_destroyInVisibleChildControls:function(){var elId=this.getControlId()+'_';var arrayToBeRemoved=new Array();Gaia.Control._itsRegisteredInvisibleControls.each(function(idx){if(idx.element.id.indexOf(elId)==0){arrayToBeRemoved.push(idx);}}.bind(this));arrayToBeRemoved.each(function(idx){var idxNo=0;Gaia.Control._itsRegisteredInvisibleControls.each(function(idxInner){if(idxInner.element.id==idx.element.id)
throw $break;idxNo+=1;});Gaia.Control._itsRegisteredInvisibleControls.splice(idxNo,1)[0];idx.destroy();});}};Gaia.Container.browserFinishedLoading=true;