function getkey(e)
{
	if (window.event)
		return window.event.keyCode;
	else if (e.which)
		return e.which;
	else
		return null;
}

function limitchar(e,goods)
{
	var key, keychar;
	key = getkey(e);

	if (key == null) return true;
	keychar = String.fromCharCode(key);
	keychar = keychar.toLowerCase();
	goods = goods.toLowerCase();

	if (goods.indexOf(keychar) != -1)
		return true;
	if ( key==null || key==0 || key==8 || key==9 || key==13 || key==27 )
		return true;
	return false;
}

/* MOD: ACS 11/29/2010 Adding functionality for the discount table popup */
$('.discountTablePopup').click(function() {
  $('#discountTable').dialog({
    modal:      false,
    title:      $('#discountTable').attr('rel') + ' <br/>Discount Table',
    resizable:  false,
    buttons:  {
      'Close': function() {
        $(this).dialog('close');
      }
    }
  });
  return false;
});



