// JavaScript Document
function refresh_inv_piece(formulaire){
	// Déclaration des variables
	str_vehicule = "";
	if (formulaire.lst_constructeur.selectedIndex != 0){
		str_vehicule = formulaire.lst_constructeur.options[formulaire.lst_constructeur.selectedIndex].value;
	}
	// On recharge la page avec les nouveaux paramètres
	location.href = "pieces_detachees.php?id_bdd_constructeur=" + str_vehicule;
}

function refresh_inv_vehicule(formulaire){
	// Déclaration des variables
	str_vehicule = "";
	if (formulaire.lst_constructeur.selectedIndex != 0){
		str_vehicule = formulaire.lst_constructeur.options[formulaire.lst_constructeur.selectedIndex].value;
		location.href = "vehicules.php?id_bdd_constructeur=" + str_vehicule;
	}
	else{
		location.href = "vehicules.php";
	}
}

function PopupImage(img1,img2) { 
titre="Agrandissement"; 
w=open("",'image','width=1000,height=400,toolbar=no,scrollbars=no,resizable=yes,left='+((screen.width - 460)/2)+',top='+((screen.height - 150)/2)); 
w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>"); 
w.document.write("<SCRIPT language=javascript>function checksize() { if (document.images[0].complete) { window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>"); 
w.document.write("<BODY onload='checksize()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
w.document.write("<BR /><TABLE border='0' cellspacing='0' cellpadding='0' align='center'>");
w.document.write("<TR><TD width='480' height='360' valign='middle'><div align='center'><IMG src='"+img1+"' border=0 alt='no image' width='480' height='360'></DIV></TD>"); 
w.document.write("<TD width='480' height='360' valign='middle'><div align='center'><IMG src='"+img2+"' border=0 alt='no image' width='480' height='360'></DIV></TD></TR>"); 
w.document.write("</TABLE>");
w.document.write("</BODY></HTML>"); 
w.document.close(); 
}
