function sethidecolumn()
        {
//var artgroupssizespos = document.getElementById( 'artgroupssize' ).value;
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
//  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");

  xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById('txtHint').innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","/hidecol.php",false);
xmlhttp.send();
history.go(0);
}


function getArtGroupSizesPos() 
	{
var artgroupssizespos = document.getElementById( 'artgroupssize' ).value;
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
//  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");

  xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById('txtHint').innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","getartgrppos.php?q="+artgroupssizespos,true);
xmlhttp.send();
}

	function setArtGroups()
	{
		document.getElementById( 'article_groups' ).value = tree.getCheckedNodes().join( ',' );
		document.getElementById( 'expanded' ).value = tree.getExpandedNodes().join( ',' );
	}

	function setDependencies( e )
	{
/*
		manId = document.getElementById( 'manufacturers' ).value;
		aoModifications.startRequest( e.value );

		modification = document.getElementById( 'modifications' ).value;
		setExtraOptionsDropdowns( manId, e.value, modification);
*/
		parms = getParams();

		if ( e.id == 'manufacturers' )
		{
			if ( parms.manufacturer_id )
			{
				setModelValues(params);
			}
			else
			{
				emptySelect( document.getElementById( 'models' ) );
			}
		}

		if ( parms.manufacturer_id && params.model_id )
		{
			if ( e.id != 'modifications' )
			{
				setModificationValues(params);
			}

			if ( e.id != 'year' )
			{
				setYearValues(params);
			}

			if ( e.id != 'engine_code_filter' )
			{
				setEngineCodeValues(params);
			}

			if ( e.id != 'engine_volume_filter' )
			{
				setEngineVolumeValues(params);
			}

			if ( e.id != 'engine_power_filter' )
			{
				setEnginePowerValues(params);
			}

			if ( e.id != 'automobile_coupe_descr_filter' )
			{
				setCoupeDescrValues(params);
			}

			if ( e.id != 'engine_id' )
			{
				setEngineIdValues(params);
			}

			if ( e.id != 'traction_id' )
			{
				setTractionIdValues(params);
			}

			if ( e.id != 'coupe_id' )
			{
				setCoupeIdValues(params);
			}
		}
		else
		{
			emptySelect( document.getElementById( 'modifications' ) );
			emptySelect( document.getElementById( 'year' ) );
			emptySelect( document.getElementById( 'engine_code_filter' ) );
			emptySelect( document.getElementById( 'engine_volume_filter' ) );
			emptySelect( document.getElementById( 'engine_power_filter' ) );
			emptySelect( document.getElementById( 'engine_id_filter' ) );
			emptySelect( document.getElementById( 'traction_id_filter' ) );
			emptySelect( document.getElementById( 'coupe_id_filter' ) );
			emptySelect( document.getElementById( 'automobile_coupe_descr_filter' ) );
		}
	}

	function setDependenciesForModification( e )
	{
		manId = document.getElementById( 'manufacturers' ).value;
		modelId = document.getElementById( 'models' ).value;
		setExtraOptionsDropdowns( manId, modelId, e.value);
	}

	function setExtraOptionsDropdowns( manId, modelId, modification)
	{
		aoEngineCodes.startRequest( manId, modelId, modification, '' );
		aoEngineVolumes.startRequest( manId, modelId, modification, '' );
		aoEnginePowers.startRequest( manId, modelId, modification, '' );
		aoEngines.startRequest( manId, modelId, modification, '' );
		aoTractions.startRequest( manId, modelId, modification, '' );
		aoCoupes.startRequest( manId, modelId, modification, '' );
		aoCoupeDescrs.startRequest( manId, modelId, modification, '' );
	}

	function getParams()
	{
		params = {
			manufacturer_id : document.getElementById( 'manufacturers' ).value,
			model_id : document.getElementById( 'models' ).value,
			automobile_modification : document.getElementById( 'modifications' ).value,
			year : document.getElementById( 'year' ).value,
			automobile_engine_code : document.getElementById( 'engine_code_filter' ).value,
			automobile_engine_volume : document.getElementById( 'engine_volume_filter' ).value,
			automobile_engine_power : document.getElementById( 'engine_power_filter' ).value,
			engine_id : document.getElementById( 'engine_id_filter' ).value,
			traction_id : document.getElementById( 'traction_id_filter' ).value,
			coupe_id : document.getElementById( 'coupe_id_filter' ).value,
			automobile_coupe_descr : document.getElementById( 'automobile_coupe_descr_filter' ).value,
			air_condition : document.getElementById( 'air_condition_filter' ).checked,
			abs : document.getElementById( 'abs_filter' ).checked
		};

		return params;
	}

	function setModelValues(params)
	{
		if (params.manufacturer_id)
		{
			aoModels.startRequest(params.manufacturer_id, '' )
		}
	}

	function setModificationValues(params)
	{
		if (params.model_id)
		{
			aoModifications.startRequest( params, params.automobile_modification );
		}
	}

	function setEngineCodeValues(params)
	{
		aoEngineCodes.startRequest( params, params.automobile_engine_code );
	}

	function setEngineVolumeValues(params)
	{
		aoEngineVolumes.startRequest( params, params.automobile_engine_volume );
	}

	function setEnginePowerValues(params)
	{
		aoEnginePowers.startRequest( params, params.automobile_engine_power );
	}

	function setCoupeDescrValues(params)
	{
		aoCoupeDescrs.startRequest( params, params.automobile_coupe_descr );
	}

	function setYearValues(params)
	{
		aoAutomobileYears.startRequest( params, params.year );
	}

	function setEngineIdValues(params)
	{
		aoEngines.startRequest( params, params.engine_id );
	}

	function setTractionIdValues(params)
	{
		aoTractions.startRequest( params, params.traction_id );
	}

	function setCoupeIdValues(params)
	{
		aoCoupes.startRequest( params, params.coupe_id );
	}

	function filterGroups( e )
	{
		aoFilterArticleGroups.startRequest();
	}

	function clearfilterGroups()
	{
		/*document.getElementById( 'treeDiv' ).style.display = 'none';
        document.getElementById( 'loadingDiv' ).style.display = 'block';

		tree.collapseAll();document.getElementById( 'filter_by' ).value='';

		document.getElementById( 'loadingDiv' ).style.display = 'none';
        document.getElementById( 'treeDiv' ).style.display = 'block';
        */
//		tree = null;
		document.getElementById( 'treeDiv' ).style.display = 'none';
        document.getElementById( 'loadingDiv' ).style.display = 'block';

		document.getElementById('filter_by').value = '';
		aoArticleGroups.startRequest();

		document.getElementById( 'loadingDiv' ).style.display = 'none';
        document.getElementById( 'treeDiv' ).style.display = 'block';
	}

