function showHideSubmenu (menu)
{
	$(menu).toggle();
}


/*

function showHideSubmenu (menu)
{
	if (menu == 'submenu_registration')
	{
		document.getElementById('submenu_part').style.display = 'none';
	}
	else if (menu == 'submenu_part')
	{
		document.getElementById('submenu_registration').style.display = 'none';
	}
	
	
	if ( document.getElementById(menu).style.display == 'block' )
	{
		document.getElementById(menu).style.display = 'none';
	}
	else
	{
		document.getElementById(menu).style.display = 'block'
	}
}


var is_submenu_part;
var is_submenu_registration;

window.onload = function()
{
	if (is_submenu_registration)
	{
		showHideSubmenu ('submenu_registration')
	}
	else if (is_submenu_part)
	{
		showHideSubmenu ('submenu_part')
	}
}

*/

function showHideSubContent (total, i)
{
	// alert ($('content_sub_' + i));
	// return;
	for (var j=1; j<=total; j++)
	{
		if (i != j)
		{
			$('content_sub_' + j).hide();
		}
	}
	$('content_sub_' + i).toggle(); // show()
}


/*



*/

function openWindowDisciplina(url)
{
	win = new Window('disciplina',
					{className: "arco_window",
					title: '',
					width: 395,
					height: 450,
					destroyOnClose: true,
					recenterAuto: false,
					maximizable: false,
					minimizable: false,
					resizable: false
					});

	win.setAjaxContent(url);
	win.showCenter(true);
	
	var winObs = new Object();
	Windows.addObserver(winObs);
	winObs.onClose = function(eventName, win)
	{
		if (win.getId() == 'disciplina')
		{
			Windows.closeAll();
		}
		Windows.removeObserver(this);
	}
}

function openWindowProfessor (url)
{
	win2 = new Window(
					{className: "arco_window",
					title: '',
					width: 305,
					height: 250,
					destroyOnClose: true,
					recenterAuto: false,
					maximizable: false,
					resizable: false
					});
	
	win2.setAjaxContent(url);
	win2.showCenter(true);
}


function openWindowTexto(txt)
{
	win3 = new Window('xpto', 
					{className: "arco_window",
					title: '',
					width: 395,
					height: 450,
					destroyOnClose: true,
					recenterAuto: false,
					maximizable: false,
					minimizable: false,
					resizable: false
					});

	win3.getContent().update(txt);
	win3.showCenter(true);
}