﻿$.limpalalong = function(coord) {
    var tmp = "";
    if (coord != null) {
        for (i = 0; i < coord.length; i++) {
            if ((coord.charAt(i) != " ") && (coord.charAt(i) != "(") && (coord.charAt(i) != ")"))
                tmp += coord.charAt(i);
            else if (tmp.length > 0) {
                if (((coord.charAt(i) != " ") && (coord.charAt(i) != "(") && (coord.charAt(i) != ")")) && i != coord.length - 1)
                    tmp += coord.charAt(i);
            }
        }
    }
    return tmp;
}
$.somentenumeros = function(valor) {
    var tmp = "";
    if (valor != null) {
        for (i = 0; i < valor.length; i++) {
            if ((valor.charAt(i) != ".") && (valor.charAt(i) != "-") && (valor.charAt(i) != ","))
                tmp += valor.charAt(i);
            else if (tmp.length > 0) {
            if (((valor.charAt(i) != ".") && (valor.charAt(i) != "-") && (valor.charAt(i) != ",")) && i != valor.length - 1)
                    tmp += valor.charAt(i);
            }
        }
    }
    return tmp;
}
$.retornadataatual = function(){
	var currentTime = new Date();
	var month = currentTime.getMonth() + 1;
	var day = currentTime.getDate();
	var year = currentTime.getFullYear();

	return day + "/" + month + "/" + year;
}
