function checkform() {

if(document.form.name.value.length<3 ) {
        alert ("Введите, пожалуйста, Ваше имя");
        document.form.name.focus();
        document.form.name.style.background="#ff0000"; 
        return false;
    }   
    
document.form.name.style.background="#ffffff";
    
if(document.form.tel.value.length<3 ) {
        alert ("Введите, пожалуйста, Ваш контактный телефон");
        document.form.tel.focus();
        document.form.tel.style.background="#ff0000"; 
        return false;
    }   
    
document.form.reg_telefon.style.background="#ffffff";    
    
return true;

}
