function wop(url, wnd_name, width, height)
{
	w = window.open(
			url, 
			wnd_name, 
			'width=' + width + ', height = ' + height + ', status = no, menubar = no, resizable = no, scrollbars = yes, left = ' + String((screen.width - width)/2) + ', top = ' + String((screen.height - height)/2)
		);
	w.focus();
	return w;
}

function wop2(url, wnd_name, width, height)
{
	w = window.open(
			url, 
			wnd_name, 
			'width=' + width + ', height = ' + height + ', status = no, menubar = no, resizable = yes, scrollbars = yes, left = ' + String((screen.width - width)/2) + ', top = ' + String((screen.height - height)/2)
		);
	w.focus();
	return w;
}

function fieldview(id, pict, store) {
	if (document.getElementById(id).style.display == 'none') 
	{
	document.getElementById(id).style.display = 'block';
	document.getElementById(pict).src = '/i/ico_minus'+ store +'.gif';
	document.getElementById(pict).title = 'Скрыть вложенные разделы';
	} 
	else if (document.getElementById(id).style.display == 'block') 
	{
	document.getElementById(id).style.display = 'none';
	document.getElementById(pict).src = '/i/ico_plus'+ store +'.gif';
	document.getElementById(pict).title = 'Показать вложенные разделы';
	}
}

function imgview(src, alt, id, width, height) {
window.open('/view.php?src='+ src +'&alt='+ alt +'', ''+ id +'', 'width='+ width +',height='+ height +',status=0,scrollbars=no')
}