// lootSubmit.js custom object for loot processing tab
// requires jsmx (engine.js), prototype.js, god knows what else...

function extendLootSubmitTab()  {

	var xo={
	
		open:function() {
			if(this.parentObject.activeTab !== undefined) {this.parentObject.activeTab.close()};	
			this.isOpen=true;
			this.show();
			this.parentObject.activeTab=this;	
						
			Event.observe(document.body,'keypress',this.keyPressObserver,true);
			Event.observe(window,'keypress',this.keyPressObserver,true);							
			
			setPanelHeight();	
			
			this.compSub.setServer(this.compSub.getDefaultServer());			
		},		
		
		close:function() {
			this.isOpen=false;	
			this.hide();

			delete global.deepLink;
			Event.stopObserving(window,'keypress',this.keyPressObserver,false);			
		}	
	}
	
	tabLootSubmit=pnlLoot.tabs['submit'];
	Object.extend(tabLootSubmit,xo);			
	tabLootSubmit.compSub=new CompSub(tabLootSubmit,'tab_lootSubmission',"loot");
	tabLootSubmit.keyPressObserver=tabLootSubmit.compSub.onKeyPress.bindAsEventListener(tabLootSubmit.compSub);
}