
Type.registerNamespace('Monster.Client.Behavior');Monster.Client.Behavior.TabCollectionAdapter=function(element)
{Monster.Client.Behavior.TabCollectionAdapter.initializeBase(this,[element]);this._tabs=[];this._links=new Array();this._closeIcons=new Array();for(var i=0;i<tabCnt;i++)
{this.createProperty("tab"+(i+1));}}
Monster.Client.Behavior.TabCollectionAdapter.prototype={initialize:function()
{Monster.Client.Behavior.TabCollectionAdapter.callBaseMethod(this,'initialize');for(var i=0;i<tabCnt;i++)
{this._tabs[i]=this["tab"+(i+1)];}
if(!MonsPageManager.enableInitOnDemand)
{this.initOnDemand();}
else
{MonsPageManager.registerInitState(this._id,false,null);}
this._links=$(this._element).find(".toggle-anchor");this._closeIcons=$(this._element).find(".close-icon");var lnkCnt=this._links.length;var self=this;for(var i=0;i<lnkCnt;i++){$(this._links[i]).bind("click",self.toggleInnerLyr);$(this._closeIcons[i]).bind("click",self.closeLyr);}},initOnDemand:function()
{},initHandlers:function(element,event,context)
{$addHandlers(element,{click:this.toggleTab},{anchor:element,tabs:this._tabs,adapter:this});if(Sys.Browser.agent!=Sys.Browser.InternetExplorer)
{this.toggleTab.call({anchor:element,tabs:this._tabs,adapter:this},event);}},dispose:function()
{for(var i=0;i<tabCnt;i++)
{this.clearHandlers(this._tabs[i]);}},clearHandlers:function(element)
{if(element)
{$clearHandlers(element);}},onDataStoreEvent:function(sender,args)
{},toggleTab:function(event)
{for(var i=0;i<tabCnt;i++)
{var tab=this.tabs[i];if(tab.getAttribute("anchor")==event.target.id)
{this.anchor.parentNode.parentNode.className="tabLI current";tab.className="tabPanel current";this.adapter._dataStore.set_property("TabCollectionAdapter_TabChange",i);}
else
{$get(tab.getAttribute("li")).className="tabLI";tab.className="tabPanel";}}},toggleInnerLyr:function()
{id=this.id.replace("Anchor","Details");lyr=$("#"+id);if($(lyr).is(":hidden")){$(lyr).slideDown("slow");}else{$(lyr).slideUp("slow");}
return false;},closeLyr:function()
{$(this).parent().slideUp("slow");}}
Monster.Client.Behavior.TabCollectionAdapter.registerClass('Monster.Client.Behavior.TabCollectionAdapter',Monster.Client.Behavior.DataAdapterBase);if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();
;
