/*
+--------------------------------------------------------------------------
| Get element by id
+--------------------------------------------------------------------------
*/

	function getbyid(id)
	{
		itm = null;
	
		if (document.getElementById)
		{
			itm = document.getElementById(id);
		}
		else if (document.all)
		{
			itm = document.all[id];
		}
		else if (document.layers)
		{
			itm = document.layers[id];
		}
	
		return itm;
	}

	function view( speed, file)
	{
		window.open( site_address+"view.php?speed="+speed+"&file="+file, 'NewWindow', 'toolbar=no,menubar=no,directories=no,status=no,scrollbars=yes,resizable=no,width=450,height=350');
	}

	function interviews( speed )
	{
		window.open( site_address+"interviews.php?speed="+speed, 'NewWindow', 'toolbar=no,menubar=no,directories=no,status=no,scrollbars=yes,resizable=no,width=450,height=350');
	}

	function teaching( speed )
	{
		window.open( site_address+"teaching.php?speed="+speed, 'NewWindow', 'toolbar=no,menubar=no,directories=no,status=no,scrollbars=yes,resizable=no,width=450,height=350');
	}

//==========================================
// Hide / Unhide menu elements
//==========================================

function showhide(id1, id2)
{

}
	


function toggleview(id)
{
	if ( ! id ) return;
	
	if ( itm = getbyid(id) )
	{
		if (itm.style.display == "none")
		{
			show(itm);
		}
		else
		{
			hide(itm);
		}
	}
}

//==========================================
// Set DIV ID to hide
//==========================================

function hide(itm)
{
	if ( ! itm ) return;
	
	itm.style.display = "none";
}

//==========================================
// Set DIV ID to show
//==========================================

function show(itm)
{
	if ( ! itm ) return;
	
	itm.style.display = "block";
}
