
function goTo(id) 
{
	open('doc.php?d='+id, '_self');
}

function Dwnl(id, opcl) 
{
	if (opcl == '0')
		open('file.php?fr='+id+'&op='+opcl, '_self');
	else
		open('file.php?fr='+id+'&op='+opcl, '_blank');
}

function Ext(adr, win) 
{
	open(adr, win);
}


function mLay(id)
{
	if (document.getElementById)
		return document.getElementById(id);

	if (document.all)
		return document.all[id];

	if (document.layers)
		return document.layers[id];
}


function MenuExpand(mid)
{
	ex = mLay('mctable_'+mid);
	
	if (ex.style.display != 'table-row')
	{
		if (ex.style.display.tableRow)
			ex.style.display = 'table-row';
		else
			ex.style.display = 'block';
	}
	else
		ex.style.display = 'none';
}

function goSubmit(val)
{
	var e, f;
	e = document.getElementById('commandField');
    f = document.forms['mainForm'];
	if (e && f)
	{
		e.value = val;
		f.submit();
	}
}