function s(id) {$('#fld'+id).show();}
function h(id) {$('#fld'+id).hide();}
function show(id) {$('#fld'+id).toggle(); return false;}

function show1(id)
{
	$('.dir').hide('fast');
	$('#fld'+id).show('fast');
	return false;
}

function openMenu(js_menu) {
 ids = js_menu.split('-');
 if(ids.length > 1)for(i=1;i<ids.length;i++) show(ids[i]);
}
function checkForm(field)
{
	ok = 1;
	$("."+field).each(function () {
		if($(this).val() == '') { $(this).css("border-color", "red"); $(this).css("background-color", "#ffd2d2"); ok = 0; }
		else { $(this).css("border-color", "#7bba2d");  $(this).css("background-color", "#fff");  }
    });
	if(!ok)
	{
		alert("Ошибка! Не заполены необходимые поля формы.");
		return false;
	}
	return true;
}

function logout_conf(){ if (confirm("Вы действительно хотите покинуть выйти?")) return true; else return false; }
function del_conf(){ if (confirm("Вы действительно хотите удалить этот элемент?")) return true; else return false; }

$(document).ready(function() {
	$("#topMenuContainer ul li").mouseover(function() {
		$(this).children('ul').css('display', 'block');
	});
	$("#topMenuContainer ul li").mouseout(function() {
		$(this).children('ul').css('display', 'none');
	});
});
