function setBackgroundColor( color ) {  
    document.getElementById( color ).style.background="#FFF2B6"; 
}  

function setDefaultBackgroundColor( color )  {  
    document.getElementById( color ).style.background="#FFFFFF";
    document.getElementById( color ).style.backgroundImage="url(templates/tuksi/images/input_bg.png)";

}

function setColorToInput(id) {
    var val = document.getElementById(id).value;
    
    if ((val == "") || (val == null)) {
        blinkit(id);
        document.getElementById(id).focus();
        return false;
    }
    else {
        return true;
    }
}

function blinkit(id){
    intrvl=0;
    for(nTimes=0;nTimes<3;nTimes++){
        intrvl += 200;
        setTimeout(function () { setBackgroundColor(id); },intrvl);
        intrvl += 200;
        setTimeout(function () { setDefaultBackgroundColor(id); },intrvl);
    }
}
