function blink(id) {
    var e = document.getElementById(id);
    e.style.backgroundColor = "red";

    setTimeout(function(){e.style.backgroundColor = '';}, 500);
}