<!--
var state = false;

function SelectAll(name)
{
	state = !state;

	if (document.getElementById) 
	{
		if (document.getElementById(name)) 
		{
			var obj = document.getElementById(name);
			var inputList = obj.getElementsByTagName('input');

			for (var i=0; i < inputList.length; i++ ) 
			{
				if (inputList[i].name == "ch[]")
				{
					inputList[i].checked = state;					
				}
			}
		}
	}
}

function Action(name, actionName, ident, page)
{
	var url = new String;

	if (document.getElementById) 
	{
		if (document.getElementById(name)) 
		{
			var obj = document.getElementById(name);
			var inputList = obj.getElementsByTagName('input');

			for (var i=0; i < inputList.length; i++ ) 
			{
				if (inputList[i].name == "ch[]" && inputList[i].checked)
				{
					url += "id[]=" + inputList[i].value + "&";
				}
			}
		}
	}

	if (url.length > 0)
	{
		url = './?' + url + "action=" + actionName + "&ident=" + ident + "&page=" + page;
		document.location = url;
	}
}

//popup
function popup(url, wnd_name, width, height, scrollbars)
{
   var stScrollBar = (scrollbars ? 'yes' : 'no');
   window.open(url, '', 'width='+width+', height='+height+', status=yes, menubar=no, resizable=yes, scrollbars='+stScrollBar+', left='+String((screen.width-width)/2)+', top='+String((screen.height-height)/2));
}

function SubmitDelete(type)
{
	var txt = '';
	if (type == 'folder') txt = 'Вы действительно хотите удалить раздел и все его содержимое?';
	else if (type == 'page') txt = 'Вы действительно хотите удалить запись?';

	if (confirm(txt))
		return true;
	else
		return false;
}

//-->