/* MailTUX JS Functions */

function setCheckboxes(the_form, do_check)
{
	if (e = document.forms[the_form].elements["group[]"])
	{
		c = e.length;
		for (i = 0; i < c; i++) 
		{
			e[i].checked = do_check;
		}
		if (! c)
		{
		alert ('Используйте эту возможность, когда есть 2 и более результатов');
		}
	}
	else
	{
		alert ('Внимание! Объектов для отметки не найдено!');
		return false;
	}

return true;
}

function setSelectAll(the_form, the_obj, do_select)
{
	if (s = document.forms[the_form].elements[the_obj])
	{
		d = s.length;
		for (i = 0; i < d; i++) 
		{
			s.options[i].selected = do_select;
		}
		
	}
	else
	{
	alert ('Внимание! Не найдено строчек для выделения!');
	return false;
	}
return true;
}

function SetValue(the_form, the_obj, val)
{
	if (s = document.forms[the_form].elements[the_obj])
		{
			s.value = val;
		}
		else
		{
			alert ('Внимание! Не найдено объекта!');
			return false;
		}
		return true;
}

function contexthelp(codename) 
{ 
	var pname = 'contexthelp.php?&codename=' + codename;
	ph(pname, 250, 300)
}   
