// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
function removeDotFromField(field) {
    //field.style.background_color = "#FF0000";
    v = field.value;
    if (v.indexOf(".") != -1 ) {
        oldBackground = field.style.backgroundColor;
        field.style.backgroundColor = "#FF8080";
        field.value = v.gsub(/\./, "");
        setTimeout(function(){return function(){field.style.backgroundColor = oldBackground}}(field, oldBackground),100);
    }
}