// JavaScript Document
function loadimages()
{
i1 = new Image;
i1.src = "header/head07on.gif";
i2 = new Image;
i2.src = "header/head08on.gif";
i3 = new Image;
i3.src = "header/head09on.gif";
i4 = new Image;
i4.src = "header/head10on.gif";
i5 = new Image;
i5.src = "header/head11on.gif";
i6 = new Image;
i6.src = "header/head12on.gif";
i7 = new Image;
i7.src = "header/head13on.gif";
i8 = new Image;
i8.src = "header/head14on.gif";
}

function msover(img,ref)
{
document.images[img].src = ref;
}
function msout(img,ref)
{
document.images[img].src = ref;
}
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;
}
