function d(id){	return (document.getElementById(id));}// Incrémente une champ textefunction add_command(id, add){	var v = parseInt(document.getElementById(id).value);	v += add;	if (v < 0)	{		v = 0;	}	document.getElementById(id).value = v;}// Envoie la commande via la classe ajax, a la gestion du panier pour ajout / suppression de donnéesfunction valid_command(id, total){	var ajax = new DataRequestor();		if (!total)	{		len = valid_command_ary.length;		for (var i = 0; i < len; i++)		{			ajax.addArg(_POST, "add[" + valid_command_ary[i] + "]", document.getElementById(id + valid_command_ary[i]).value);			document.getElementById(id + valid_command_ary[i]).value = '0';		}	}	else	{		ajax.addArg(_POST, "add[" + id + "]", total);	}		ajax.addArg(_GET, "p", "panier");	ajax.addArg(_GET, "mode", "add");	ajax.setObjToReplace('panier_content');	ajax.getURL('index.php');}function trim(str){	while (str.substr(0, 1) == ' ')	{		str = str.substr(1);	}	return (str);}function show_menu(menu_number, top_position){	content = '<table cellpadding="0" cellspacing="0" width="260" style="z-index: 18632">';	content += '<tr><td style="padding: 0px"><img src="tpl/classic/img/cercle_haut_gauche_' + menu_id[menu_number] + '.gif" /></td>';	content += '<td width="200" style="border-top: 1px solid #000000; background-color: ' + menu_color[menu_number][0] + '; text-align: center; font-weight: bold; font-size: 14px">' + menu_name[menu_number] + '</td>';	content += '<td style="padding: 0px"><img src="tpl/classic/img/cercle_haut_droite_' + menu_id[menu_number] + '.gif" /></td></tr>';	if (menu[menu_number].length)	{		content += '<tr><td colspan="3" width="260">';		for (var i = 0; i < menu[menu_number].length; i++)		{			content += '<a href="' + menu[menu_number][i][1] + '" onmouseover="this.style.cursor=\'pointer\';this.style.textDecoration=\'underline\'" onmouseout="this.style.textDecoration=\'none\'" style="background-color: ' + menu_color[menu_number][1] + '; display: block; ' + ((menu[menu_number].length == 1) ? 'padding: 8px 5px 8px 15px' : '') + '" class="dynamic_submenu" ' + ((i == menu[menu_number].length - 1) ? 'id="dynamic_submenu"' : '') + ' >' + menu[menu_number][i][0] + '</a>';		}		content += '</td></tr>';	}	content += '<tr><td style="padding: 0px"><img src="tpl/classic/img/cercle_bas_gauche_' + menu_id[menu_number] + '.gif" /></td>';	content += '<td width="200" style="border-bottom: 1px solid #000000; background-color: ' + menu_color[menu_number][0] + '; text-align: center; font-weight: bold; font-size: 14px">&nbsp;</td>';	content += '<td style="padding: 0px"><img src="tpl/classic/img/cercle_bas_droite_' + menu_id[menu_number] + '.gif" /></td>';	content += '</tr></table>';	document.getElementById('popup').innerHTML = content;	document.getElementById('popup').style.visibility = 'visible';	document.getElementById('popup').style.top = top_position + "px";	document.getElementById('popup').style.left = 165 + "px";}function hide_menu(){	document.getElementById('popup').style.visibility = 'hidden';	document.getElementById('quicksearch_div').style.display = 'none';}function panier(width){	if (navigator.appName=="Microsoft Internet Explorer") 	{		get_top = document.body.scrollTop;	}	else	{		get_top = window.pageYOffset;	}	if (get_top < 300)	{		get_top = 0;	}	else	{		get_top -= 300;	}	document.getElementById("panier_id").style.top = get_top + width + "px";	setTimeout("panier(" + width + ")", 1);}function menu_over(cur, img, selected){	if (!selected)	{		cur.src = 'tpl/classic/img/menu_' + img + '_over.jpg';	}}function menu_out(cur, img, selected){	if (!selected)	{		cur.src = 'tpl/classic/img/menu_' + img + '.jpg';	}}function get_mouse_position(e){	x = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.clientX + document.body.scrollLeft;	if (x > 440 && d('popup').style.visibility != 'hidden')	{		d('popup').style.visibility = 'hidden';	}}function quicksearch_ajax(value){		var ajax = new DataRequestor();		ajax.addArg(_POST, "search_all", document.getElementById('search_all_quicksearch').value);		ajax.addArg(_POST, "ajax_quicksearch", true);		ajax.addArg(_GET, "p", "quicksearch");		ajax.onload = function(data, obj)		{			document.getElementById('quicksearch_div').innerHTML = data;			document.getElementById('quicksearch_div').style.display = (data) ? 'block' : 'none';		}		ajax.getURL('index.php');}quicksearch_empt = false;function quicksearch_empty(){	if (!quicksearch_empt)	{		quicksearch_empt = true;		document.getElementById('search_all_quicksearch').value = '';	}}quicksearch_empt2 = false;function quicksearch_empty2(){	if (!quicksearch_empt2)	{		quicksearch_empt2 = true;		document.getElementById('search_pro_quicksearch').value = '';	}}document.onmousemove = get_mouse_position;document.onclick = hide_menu;