function CheckOnEmpty(id,container,BorderWidth,BorderStyle,BorderColor,IsSend)
{
    if (BorderWidth == null) {BorderWidth = '1px';}
    if (BorderStyle == null) {BorderStyle = 'solid';}
    if (BorderColor == null) {BorderColor = '#000000';}
    if (IsSend == null) {IsSend = true;}
    chForm = document.getElementById(id);
    containers = chForm.getElementsByTagName(container);
    notEmty = true;
    for (i=0; i<containers.length; i++)
    {
        thisEmpty = true;
        var tagsSearch = new Array('input','textarea');
        for (k=0; k<tagsSearch.length; k++)
        {
            tmInputs = containers[i].getElementsByTagName(tagsSearch[k]);
            for (j=0; j<tmInputs.length; j++)
            {
                if (tmInputs[j].className == 'notEmpty' || tmInputs[j].getAttribute('check') == 'notEmpty')
                {
                        if (tmInputs[j].value == '')
                        {
                            containers[i].style.borderWidth = '1px';
                            containers[i].style.borderStyle = 'solid';
                            containers[i].style.borderColor = '#ff0000';
                            notEmty = false;
                            thisEmpty = false;
                        }
                        else
                        {
                            if (thisEmpty)
                            {
                                containers[i].style.borderWidth = BorderWidth;
                                containers[i].style.borderStyle = BorderStyle;
                                containers[i].style.borderColor = BorderColor;
                            }
                        }
                }
            }
        }
    }
    if (notEmty == true)
    {    
        if (IsSend == false) return notEmty;
        chForm.submit()
    }
    else
    {   
    	if (IsSend == false) return notEmty;
        alert('Поля ввода обведенные красным квадратом не заполнены. Заполните и повторите!');
    }
}