function check_form(form){
    return true;
//    if(form.cl_fio.value.length < 5){
//        alert('Заполните поле ФИО');
//        form.cl_fio.focus();
//        return false;
//    }
//    if(form.cl_phone.value.length < 5){
//        alert('Заполните поле Телефон');
//        form.cl_phone.focus();
//        return false;
//    }
//    if(form.cl_email.value.length < 5){
//        alert('Заполните поле E-mail');
//        form.cl_email.focus();
//        return false;
//    }
//
//    return true;
}

function createCookie(name,value,days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires="+date.toGMTString();
    }
    else var expires = "";
    document.cookie = name+"="+value+expires+"; path=/";
}

function actualDropDown(curMonce){
    var monces =new Array(12);
    monces[1]=31;
    monces[2]=28;
    monces[3]=31;
    monces[4]=30;
    monces[5]=31;
    monces[6]=30;
    monces[7]=31;
    monces[8]=31;
    monces[9]=30;
    monces[10]=31;
    monces[11]=30;
    monces[12]=31;

    $('#day').html('');
    for (i=0; i<monces[curMonce]; i++)
        $('#day').append('<option value="'+(i+1)+'">'+(i+1)+'</option>');
}

function ActiveClients(chbox){
    chbox.checked?flag=1:flag=0;
    createCookie('active_cl',flag,9999);
    window.location.reload();
}

function changeClActive(id, obj){
    obj.checked?state=1:state=0;
    $.post('../ajax', {'id':id,'state':state, 'action':'changeClActive'}, function(obj){}, 'json');
}

function confirmDelete(){
    if (confirm('Удалить?')) return true;
    else return false;
}
