function NewWindow(mypage, myname, w, h, scroll,toolb)
	{
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',toolbar='+toolb+',resizable'
		win = window.open(mypage, myname, winprops)
		if (parseInt(navigator.appversion) >= 4)
		{
			win.window.focus();
		}
}

function doEnterKey(e)
{
    whichASC = (NS) ? e.which : event.keyCode;
    if (whichASC == 13)
	{
		document.acces.submit();
	}
}

function activer_item(id,num_page) {
    var frm = document.forms.liste;
    frm.action_form.value = 'activer';
    frm.id.value = id;
	frm.num_page.value = num_page;
    frm.submit();
  return false;
}


function desactiver_item(id,num_page) {
    var frm = document.forms.liste;
    frm.action_form.value = 'desactiver';
    frm.id.value = id;
	frm.num_page.value = num_page;
    frm.submit();
  return false;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function ajouter(num_produit_achat) 
{
    var frm = document.forms.panier;
    frm.action_form.value = 'ajout';
    frm.num_produit_achat.value = num_produit_achat;
    frm.submit();
  	return false;
}

function supprimer(num_produit_achat) 
{
    var frm = document.forms.panier;
    frm.action_form.value = 'supprimer';
    frm.num_produit_achat.value = num_produit_achat;
    frm.submit();
  	return false;
}

function suppr_cmd(num_produit_achat) 
{
    var frm = document.forms.panier;
    frm.action_form.value = 'supprimer';
    frm.num_produit_achat.value = num_produit_achat;
    frm.submit();
  	return false;
}

function favoris(url,lib_url){
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (browserName == "Microsoft Internet Explorer" & browserVer >= 4) {
window.external.AddFavorite(url, lib_url);
}
}