// JavaScript Document
function Page(p)
{
	document.forms[0].page_directe.value=p;
	document.forms[0].action.value='recherche';
	document.forms[0].affichage.value='page_directe';
	document.forms[0].submit();
	return;
}

function montre(id)
{
		var element_style=null
		if (document.getElementById)
		{element_style=document.getElementById(id).style;}
		else if (document.all)
		{element_style=document.all[id].style;} 
		if(element_style)  {element_style.display="block";}
}
function cache(id)
{
		var element_style=null
		if (document.getElementById)
		{element_style=document.getElementById(id).style;}
		else if (document.all)
		{element_style=document.all[id].style;} 
		if(element_style)  {element_style.display="none";}
}
function TestPlus()
{
	var chaine=document.forms[0].typan_cat.value;
	if(chaine=="")
	{
		document.forms[0].marque.value="";
		document.forms[0].cylindree.value="";
		document.forms[0].opann.value="";
		document.forms[0].opann2.value="";
	}
	if (chaine.substring(0,3)=="1_1" || chaine.substring(0,3)=="1_7" || chaine.substring(0,3)=="1_2" || chaine.substring(0,3)=="1_3" || chaine.substring(0,5)=="1_5_2" || chaine.substring(0,5)=="1_5_3" || chaine.substring(0,5)=="1_5_4" || chaine.substring(0,5)=="1_6_1" || chaine.substring(0,5)=="1_6_2" || chaine.substring(0,5)=="1_6_3"){montre('marquecylindree');}else{cache('marquecylindree');}
	if (chaine.substring(0,1)=="1")
	{
		if (chaine.substring(0,3)=="1_5" || chaine.substring(0,3)=="1_6")
		{
			montre('operationreduit');
			cache('operation');
			document.forms[0].opann.value="";
		}
		else
		{
			montre('operation');
			cache('operationreduit');
			document.forms[0].opann2.value="";
		}
	}
	else
	{
		cache('operation');
		cache('operationreduit');
		document.forms[0].opann.value="";
		document.forms[0].opann2.value="";
	}
	if (chaine.substring(0,4)=="1_5_"){montre('accessoires');}else{cache('accessoires');}
	if (chaine.substring(0,4)=="1_6_"){montre('pieces');}else{cache('pieces');}
	return;
}
