var menu_c = function()
{
	//
};

/**/

menu_c.prototype.setClassNameSwitch = function(element_o, from_s, to_s)
{
	if(element_o)
	{
    	element_o.className = element_o.className.replace(from_s, to_s);
    }
};

menu_c.prototype.setImageSwitch = function(element_o, from_s, to_s)
{
	if(element_o)
	{
    	img_a = element_o.getElementsByTagName('img');

		if (typeof img_a[0] != 'undefined')
    		img_a[0].src = img_a[0].src.replace(from_s, to_s);
    }
};

/**/

menu_c.prototype.setOver = function(current_o)
{
	this.setClassNameSwitch(current_o, 'out', 'over');
	this.setImageSwitch(current_o, 'out', 'over');
};

menu_c.prototype.setOut = function(current_o)
{
	if(current_o.id != active_s)
	{
		if(current_o.id != active_sub_s)
		{
			this.setClassNameSwitch(current_o, 'over', 'out');
			this.setImageSwitch(current_o, 'over', 'out');
		}
	}
};

menu_c.prototype.setImageOver = function(current_o)
{
	this.setImageSwitch(current_o, 'out', 'over');
};

menu_c.prototype.setImageOut = function(current_o)
{
	this.setImageSwitch(current_o, 'over', 'out');
};

menu_c.prototype.setActive = function(current_o)
{
	this.setClassNameSwitch(current_o, 'out', 'active');
	this.setImageSwitch(current_o, 'out', 'active');

	var link_a = current_o.getElementsByTagName('a');

	if (link_a)
	{
    	link_a[0].style.background = '#fff url(/ENGINE/IMAGES/KOOKPUNT/WEBSITE/shared/bg_main_menu_over.jpg) repeat-x top';
    }
};

menu_c.prototype.setSubActive = function(current_o)
{
	this.setClassNameSwitch(current_o, 'out', 'over');
	this.setImageSwitch(current_o, 'out', 'over');
};

menu_c.prototype.setLocation = function(current_o)
{
	var link_a = current_o.getElementsByTagName('a');

	if (link_a)
	{
    	document.location.href = link_a[0].href;
    }
};

menu_c.prototype.setMapSwitch = function(element_o)
{
	if(document.getElementById(element_o).src.match('kaart_en_route_1.gif'))
	{
		document.getElementById(element_o).src = '/ENGINE/FILES/KOOKPUNT/ADMIN/UPLOAD/IMAGE/submenu/streamer/.kaart_en_route_2_gif/605_450_80_1__kaart_en_route_2.gif';
    }
    else
    {
    	document.getElementById(element_o).src = '/ENGINE/FILES/KOOKPUNT/ADMIN/UPLOAD/IMAGE/submenu/streamer/.kaart_en_route_1_gif/605_450_80_1__kaart_en_route_1.gif';
    }
};