var menu_state = 'shown';

function switch_menu()
{
	var menu = document.getElementById('int_navigation');
	var main = document.getElementById('cp_content');

	var cpKeyBoard = document.getElementById('cpKeyBoard');
	var cpText = document.getElementById('cpText');

	var adminKeyBoard = document.getElementById('adminKeyBoard');
	var adminText = document.getElementById('adminText');

	var toggle = document.getElementById('toggle');
	var toggle_int = document.getElementById('toggle_int');

	switch (menu_state)
	{
		// hide
		case 'shown':
			main.style.width = '93%';
			main.style.padding = '15px';
			menu_state = 'hidden';
			menu.style.display = 'none';

			if (cpKeyBoard)
			{
				cpKeyBoard.style.width = '480px';

				cpText.style.width = '474px';
				cpText.style.height = '250px';
			}

			if (adminKeyBoard)
			{
				adminKeyBoard.style.width = '640px';

				adminText.style.width = '634px';
				adminText.style.height = '350px';
			}

			toggle.style.width = '18px';
			toggle.style.margin = '10px 0px 0px 2px';
			toggle_int.style.backgroundImage = 'url(images/dx.jpg)';
			toggle_int.style.backgroundRepeat = 'no-repeat';

			break;

		// show
		case 'hidden':
			main.style.width = 'auto';
			main.style.padding = '5px 5px 5px 150px';
			menu_state = 'shown';
			menu.style.display = 'block';

			if (cpKeyBoard)
			{
				cpKeyBoard.style.width = '320px';
	
				cpText.style.width = '314px';
				cpText.style.height = '160px';
			}

			if (adminKeyBoard)
			{
				adminKeyBoard.style.width = '450px';
	
				adminText.style.width = '444px';
				adminText.style.height = '200px';
			}

			toggle.style.margin = '42px 0px 0px 116px';
			toggle.style.padding = '0 0 0 0';

			toggle.style.width = '16px';
			toggle_int.style.backgroundImage = 'url(images/sx.jpg)';
			toggle_int.style.backgroundRepeat = 'no-repeat';

			break;
	}
}