function updateHome(section)
{
	tv_on = new Image();
	tv_off = new Image();
	inc_on = new Image();
	inc_off = new Image();
	
	tv_on.src = 'img/generic/topvente_actif.jpg';
	tv_off.src = 'img/generic/topvente_inactif.jpg';
	inc_on.src = 'img/generic/incontournable_actif.jpg';
	inc_off.src = 'img/generic/incontournable_inactif.jpg';
	
	
	if(section == 'tv')
	{
		document.img_tv.src = tv_on.src;
		document.img_inc.src = inc_off.src;
		$X('home_top_ventes').style.display = 'block';
		$X('home_incontournables').style.display = 'none';
	}
	if(section == 'inc')
	{
		document.img_tv.src = tv_off.src;
		document.img_inc.src = inc_on.src;
		$X('home_top_ventes').style.display = 'none';
		$X('home_incontournables').style.display = 'block';
	}
		
}


function trtSearchTop()
{		

	if(empty($X('topArticle').value))
	{
		alert("Vous devez sélectionner un univers");	
		return;
	}
	
	// avec univers ?
	art = $X('topArticle').value;
	t = art.split('||');
	
	uri = '';
	if(t.length == 1)
	{
		art = t[0];		
	}
	else
	{
		univ = t[0];
		uri = "&Univers="+urlencode(univ);
		art = t[1];
	}	
	
	
	uri += "&Marque="+urlencode($X('topMarque').value);
	uri += "&Taille="+urlencode($X('topTaille').value);


	//uri = "fr/tous/index.html?Article="+urlencode(art)+uri;
	uri = "/fr/"+univ.toLowerCase()+"/index.html?Article="+urlencode(art)+uri;


	// on rediridge vers la page tous
	document.location.href= uri;	
}


function updateSelects(from)
{
	uri = '/_custom_ajax_selects.srv.php?';
	uri += 'from='+from;
	
	uri += '&Article='+urlencode($X(from+'Article').value);
	uri += '&Marque='+urlencode($X(from+'Marque').value);
	uri += '&Taille='+urlencode($X(from+'Taille').value);
	
	ajaxIt('GET', uri, true);

}




