	function TabView(tabNameList, openTab){
		var images = new Array();
		
		this.hideAllTabs = function(){
			tabNameList.each(function(tabName, index) {	
				$("tab"+tabName+"Content").hide();
				$("tab"+tabName).getElementsByTagName("img")[0].src="/images/tab"+tabName+"Off.gif";
			});
		}
		
		this.showTab = function(tabName){
			this.hideAllTabs();
			$("tab"+tabName+"Content").show();
			$("tab"+tabName).getElementsByTagName("img")[0].src="/images/tab"+tabName+"On.gif";
		}
		
		var instance=this;		
		// For each tab
		tabNameList.each(function(tabName, index) {							
		
			// Preload images
			var image = new Image();
			image.src="/images/tab"+tabName+"On.gif";
			images.push(image);
			
			// Set click handler

			$("tab"+tabName).observe('click', function(event){
				instance.showTab(tabName);
			});
		
		});
		
		if (openTab != undefined){
			this.showTab(openTab);
		} else {
			this.showTab(tabNameList[0]);
		}
		
	}
	
	
	function PopupPanel( panelContainer){
	
		panelContainer.openPanel = function(){
			this.panel.render();
			this.panel.show();
		};
		
		panelContainer.closePanel = function(){
			this.panel.hide();
		};
		
		panelContainer.setPopupParameters = function( parameters ){
			this.popupParameters=parameters;
		};
		
		panelContainer.init = function ( panelId, parameters ){
			this.style.display="block";		
			this.panel = new YAHOO.widget.Panel( panelId, parameters);
			this.openPanel( );
		};
				
		
	}
		
	
	
	
	
	
	
	