function show(id)
{
	$('#'+id).show();
	return false;
}

function show_mid_photo(id)
{
	now_photo = id;
	$('#midphoto').attr('src', '/img/catalog/'+id+'.jpg');
	$('#photos > a > img').removeClass('sel');
	$('#sphoto'+id).addClass('sel');
}

function show_big_photo()
{
	$('#al'+now_photo).click();
	return false;
}

function open_menu(id)
{
	$('#menu'+id+':not(:animated)').css({'opacity':1, 'width':'1px'}).animate({'width':'438px'}, 400);
	return false;
}

function close_menu(id)
{
	$('#menu'+id).animate({'opacity':0}, 400, function(){ $(this).hide(); });
	return false;
}

function set_where(id)
{
	$('#where').val(id);
	$('#wheres > a').addClass('search').removeClass('search_on');
	$('#where'+id).addClass('search_on');
	return false;
}

function go(url)
{
	window.location=url;
	return false;
}

function checkform()
{
	var error = '';
	if(document.getElementById('fio').value.length<4) error += 'Укажите ФИО!\n';
	if(document.getElementById('uphone').value.length<6) error += 'Укажите свой телефон!\n';
	if(document.getElementById('umail').value.length<6) error += 'Укажите свой e-mail адрес!\n';
	if(document.getElementById('quest').value==0) error += 'Сформулируйте свой вопрос!';
	if(error != ''){ alert(error); return false; } else return true;
}

function get_kurses()
{
	$('#kurses').load('/services/get_kurses.php', function(){ $(this).append('<br><strong>Обновление выполнено.</strong>'); });
	return false;
}
