function dd_menus_nav(imgPath,imgType)
{
	ddNav = this;

	this.imgPath = imgPath;
	this.imgType = imgType;

	this.timer = '';
	this.menus = new Array();
	this.activeMenu = '';
	this.locked = false;

	this.add = function(menu)
	{
		ddNav.menus.push(menu);
	}

	this.buttonToggle = function(active,nav_id,overOut)
	{
		if( overOut == 'over' )
		{
			$(nav_id).src = this.imgPath + 'over_'+ nav_id + this.imgType;
		}
		else
		{
			if( active == 'active' )
			{
				$(nav_id).src = this.imgPath + 'active_'+ nav_id + this.imgType;
			}
			else
			{
				$(nav_id).src = this.imgPath + 'inactive_'+ nav_id + this.imgType;
			}
		}
	}
	
	this.show = function(active,nav_id,overOut,dd)
	{
		this.clear_timer();
		this.hide_all();

		this.buttonToggle(active,nav_id,overOut);

		if( dd )
		{
			dd = nav_id + '_dd';
			$(dd).style.display = '';
		}
	}

	this.start_hide = function(active,nav_id,overOut,dd)
	{
		if( dd )
		{
			dd = nav_id + '_dd';
			try { this.timer = setTimeout("try { ddNav.hide('"+nav_id+"','"+active+"'); } catch(e) {}",500); } catch(e) {}
		}
		else
		{
			this.buttonToggle(active,nav_id);
		}
	}

	this.dd_hide = function(nav_id)
	{
		active = $(nav_id+'_a').className;

		this.start_hide(active,nav_id,'',true);
	}

	this.clear_timer = function()
	{
		clearTimeout(ddNav.timer);
	}

	this.stop_hide = function()
	{
		if( this.timer )
		{
			this.clear_timer()
		}
	}

	this.hide = function(nav_id,active)
	{		
		dd = nav_id + '_dd';
		this.buttonToggle(active,nav_id);
		$(dd).style.display = 'none';
		ddNav.activeMenu = '';
	}

	this.hide_all = function()
	{
		ddNav.menus.each(
			function(menu) {
				
				if( $(menu+'_dd') )
				{
					$(menu+'_dd').style.display = 'none';
				}

				ddNav.buttonToggle($(menu+'_a').className,menu);
			}
		);
		ddNav.activeMenu = '';
	}
}