// JavaScript Document

function planpopup()
{
	open('modules/contact/plan.php','','location=no,toolbar=no,scrollbar=no,height=680,width=480');
}

function PopupImage(img) {
	titre="AUTOPIECESDUGENIE";
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=yes,resizable=yes');	
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE>");
	w.document.write("<SC"+"RIPT language=java"+"script> function checksize()  { if (document.images['img'].complete) {  window.resizeTo(document.images[0].width+30,document.images[0].height+61); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT></HEAD>");
	w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' alt='Cliquer sur la photo pour fermer' border=0 name='img' onclick=window.close()>");
	w.document.write("");
	w.document.write("<SC"+"RIPT language=Java"+"Script1.1>function right(e) {if (navigator.appName == 'Netscape' &&(e.which == 3 || e.which == 2))return false;else if (navigator.appName == 'Microsoft Internet Explorer' &&(event.button == 2 || event.button == 3)) {alert('Le clic droit a été désactivé.');return false;}return true;}document.onmousedown=right;if (document.layers) window.captureEvents(Event.MOUSEDOWN);window.onmousedown=right;document.onmousedown=right;</"+"SCRIPT>");
	w.document.write("<SC"+"RIPT language=Java"+"Script1.2>function ejs_nodroit(){alert('Clic droit interdit');return(false);}</"+"SCRIPT>");
	w.document.write("</BODY></HTML>");
	w.document.close();
}

function checkIndex()
{
	typeIndex = window.document.getElementById('type').value;
	if ((typeIndex == "pieces") || (typeIndex == "lots") || (typeIndex == ""))
	{
		window.document.getElementById('parent').disabled = false;
		window.document.getElementById('categorierow').style.display = "block";
		window.document.getElementById('marquesrow').style.display = "none";
	}else{
		window.document.getElementById('parent').disabled = true;
		window.document.getElementById('categorierow').style.display = "none";
		window.document.getElementById('marquesrow').style.display = "block";
	}
}