  function buscar() {
    document.forma.action='productos.php';
    document.forma.submit();
  }

  function categoria(cat) {
    document.forma.categoria.value = cat;
    document.forma.action='productos.php';
	document.forma.submit();
  }

	function number_format( number, decimals, dec_point, thousands_sep ) {
		var n = number, prec = decimals;
		n = !isFinite(+n) ? 0 : +n;
		prec = !isFinite(+prec) ? 0 : Math.abs(prec);
		var sep = (typeof thousands_sep == "undefined") ? ',' : thousands_sep;
		var dec = (typeof dec_point == "undefined") ? '.' : dec_point;
		var s = (prec > 0) ? n.toFixed(prec) : Math.round(n).toFixed(prec); //fix for IE parseFloat(0.55).toFixed(0) = 0;
		var abs = Math.abs(n).toFixed(prec);
		var _, i;
		if (abs >= 1000) {
			_ = abs.split(/\D/);
			i = _[0].length % 3 || 3;
			_[0] = s.slice(0,i + (n < 0)) +
				  _[0].slice(i).replace(/(\d{3})/g, sep+'$1');
			s = _.join(dec);
		} else {
			s = s.replace('.', dec);
		}
		return s;
	}

  function num(string) {
    if (!string) return false;
    var Chars = "0123456789";
    for (var i = 0; i < string.length; i++) {
      if (Chars.indexOf(string.charAt(i)) == -1)
        return false;
    }
    return true;
  }
