<?
@session_start();
if(!$_SESSION['ID_Glob']) exit();
require_once('../connect/connect.php');

if($_POST['f_'])
	{
	foreach($_POST['f_'] as $index=>$po)
		{
		$id_field = intval($index);
		}
	}

if($_POST['id_catalog'])
$id_catalog=intval($_POST['id_catalog']);

if($id_catalog)
	{
	mysql_query("UPDATE field SET field_param_search='0' WHERE id_catalog='".$id_catalog."' AND field_typ IN (5,7)");
	if($id_field)
		{
		mysql_query("UPDATE field SET field_param_search='1' WHERE id_field='".$id_field."' ");
		}
	}

include_once('_svod_catalog.php');
?>
	<script type="text/javascript">
		var elements = document.getElementById('form_param').elements;
  		for (var i = 0; i < elements.length; i ++) 
  			{
			elements[i].disabled = 0;
			}
	</script>
