// ****************************************************************
// *** Code Javascript pour la gestion des filtres de produits	***
// *** Fiche produit - CVOMarket V3.00.00						***
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// *** Version script	1.00.00									***
// *** Date				13/08/2008								***
// ****************************************************************

// ****************************************************
// *** Visualisation liste produit:					***
// *** Mettre à jour la liste des sous-categories	***
// ****************************************************
function doChangeSubCatDatasFilter(TLibVar_BoxName,TLibVar_IdCat){
	// *** Afficher un message d'attente ***
	document.getElementById(TLibVar_BoxName).innerHTML = '<font color=\'red\'>Actualizare subcategorii...</font>';
	// *** Appel ajax - enregistrement nouveau client ***
	CVRSAjaxQueryURL('POST','/lib/include/modules/CVRSTBox_ContentFiltersManagement.php','BoxToInclude=doUpdateSubCatList&IdCat='+TLibVar_IdCat,TLibVar_BoxName);
}

// ***************************************************
// *** Appliquer le filtre à la liste des produits ***
// ***************************************************
function doApplyFilterToProductList(){
	var TLibVar_URL = new String();
	// *** Construire le script PHP ***
	TLibVar_POSTValues = '/filtru/produse-';
	TLibVar_POSTValues+= parseInt(document.getElementById('filter_brand').options[document.getElementById('filter_brand').selectedIndex].value)+'-';
	TLibVar_POSTValues+= parseInt(document.getElementById('filter_cat').options[document.getElementById('filter_cat').selectedIndex].value)+'-';
	TLibVar_POSTValues+= parseInt(document.getElementById('filter_subcat').options[document.getElementById('filter_subcat').selectedIndex].value)+'-';
	TLibVar_POSTValues+= '0.htm'
	CVOM_GoWebDirect(TLibVar_POSTValues);
}

// *****************************************************
// *** Appliquer le filtre aux produits en promotion ***
// *****************************************************
function doApplyFilterToOfferList(){
	var TLibVar_URL = new String();
	// *** Construire le script PHP ***
	TLibVar_POSTValues = '/promotii/produse-';
	TLibVar_POSTValues+= parseInt(document.getElementById('filter_brand').options[document.getElementById('filter_brand').selectedIndex].value)+'-';
	TLibVar_POSTValues+= parseInt(document.getElementById('filter_cat').options[document.getElementById('filter_cat').selectedIndex].value)+'-';
	TLibVar_POSTValues+= parseInt(document.getElementById('filter_subcat').options[document.getElementById('filter_subcat').selectedIndex].value)+'-';
	TLibVar_POSTValues+= '0.htm'
	CVOM_GoWebDirect(TLibVar_POSTValues);
}

// *****************************************************
// *** Appliquer le filtre aux produits en promotion ***
// *****************************************************
function doApplyFilterToSearchList(){
	var TLibVar_URL = new String();
	// *** Construire le script PHP ***
	TLibVar_POSTValues = '/cautare/produse-';
	TLibVar_POSTValues+= parseInt(document.getElementById('filter_brand').options[document.getElementById('filter_brand').selectedIndex].value)+'-';
	TLibVar_POSTValues+= parseInt(document.getElementById('filter_cat').options[document.getElementById('filter_cat').selectedIndex].value)+'-';
	TLibVar_POSTValues+= parseInt(document.getElementById('filter_subcat').options[document.getElementById('filter_subcat').selectedIndex].value)+'-';
	TLibVar_POSTValues+= '0.htm'
	CVOM_GoWebDirect(TLibVar_POSTValues);
}
