//#####################################################################
var Currency = '0123456789.'; 
var Numeric = '0123456789';
var Alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
var AlphaNumeric = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';

/*****************************
* Format Currency à la frappe
*****************************/
function ToKeyPress(e, Type) 
{

var keychar, key;

  if (document.layers)
     key = e.which;
  else
     key = window.event.keyCode;

  keychar = String.fromCharCode(key);	
  Type += String.fromCharCode(8);
  
  if (Type.indexOf(keychar) < 0)
    return false;
  else
    return true;
}
//#####################################################################
function Search()
{
  document.l_produits.hPage.value = 1;
  document.l_produits.submit();
}
//#####################################################################
function Sort()
{
  if (document.l_produits.hSort.value == 'asc')
    document.l_produits.hSort.value = 'desc';  
  else
    document.l_produits.hSort.value = 'asc'; 
	
  document.l_produits.submit();
}
//#####################################################################
function Goto(LaPage)
{
  document.l_produits.hPage.value = LaPage;
  document.l_produits.submit();
}
//#####################################################################
function checkAll(){
 	for (var i=0;i<document.forms[0].elements.length;i++)
 	{
 		var e=document.forms[0].elements[i];
 		if ((e.name != 'allbox') && (e.type=='checkbox'))
 		{
 			e.checked=document.forms[0].allbox.checked;
 		}
 	}
 }
//#####################################################################
function DeleteItem(position)
{
  document.forms[0].pos.value = position;
  document.forms[0].method.value = 'delete';
  document.forms[0].submit();
}
//#####################################################################

