var nomMeses = ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"];

function formatoNum(val)
{
	num = new NumberFormat(val);
	num.setPlaces(0);
	num.setSeparators(true,'.');
	return num.toFormatted();
}

function serializar(grid)
{
	var s = "";
	with(grid)
	{
		forEachRow(function(id){
			forEachCell(id,function(cellObj,ind){
		    	s += cellObj.getValue() + "@@";
			});
		    s += id + "@@||"; 
		});
	}
	return s;
}

function isNumber(n)
{
	if (!isNaN(parseFloat(n)) && isFinite(n))
  	{
  		if(n.indexOf(',')!=-1 || n.indexOf(',')!=-1)
  		{
			dhtmlx.alert('Ingrese un n&uacute;mero sin decimales');
			return false;
  		}
  		return true;
  	}
	dhtmlx.alert('El valor ingresado debe ser un n&uacute;mero');
	return false;
}

function revisaNum(val)
{
	if (val)
		return val;
	else
		return 0;
}

function acumulaError(input)
{
	err += input + ",";
}

function imprimeError(status)
{
	if(status==false)
		dhtmlx.alert("Revise los datos del formulario. Existen campos sin rellenar.(" + err + ")");
}
