var DropDownInternal = Class.create({

	openDropDowns: new Array(),
	
	timeOuts: new Array(),
	
	initialize: function() {

	},

	/**
  	 * toggle open/close for dropdown
  	 */
	toggle: function (id) {
		if(this.openDropDowns[id] == true)
			this.close(id, true);
		else
			this.pop(id);
	},	
	
	/**
  	 * pops open the dropdown
  	 */
	pop: function (id) {
		//Effect.BlindDown(id);
		$(id).show();
		this.openDropDowns[id] = true;
	},	
	
	/**
  	 * closes DropDown
  	 */
	close: function (id, noTimeout) {
		if(noTimeout == true){
			$(id).hide();
			this.openDropDowns[id] = false;
		}
		else
			this.timeOuts[id] = setTimeout("DropDown.close('"+id+"', true);", 500);
	},
	
	/**
  	 * cancels the close timeout
  	 */
	cancelClose: function (id) {
		if(this.timeOuts[id] != undefined)
			clearTimeout(this.timeOuts[id]);
	}
});

var DropDown = new DropDownInternal();