/*
Author: jf
Update: 2009/08/03
Author URI: http://www.treemotion.at
*/

if( typeof at == "undefined" )
   at = {};
if( typeof at.treemotion == "undefined" )
   at.treemotion = {};
if( typeof at.treemotion.Select == "undefined" )
	   at.treemotion.Select = {};

at.treemotion.Select = Class.create({
	unselClass : '',
	selClass : 'current_page_item',
	//selObject : undefined,
	
	initialize : function(unselClass,selClass){
		this.unselClass = unselClass;
		this.selClass = selClass;
	},
	
	select : function(selObject){
		this.unselect();
		this.selObject = selObject;
		this.selObject.addClassName(this.selClass);
	},
	
	unselect : function(){
		if(typeof(this.selObject) != 'undefined'){
			this.selObject.removeClassName(this.selClass);
		}
	}
});

