	function showFiz(){
			show_fields = Array('div_name', 'div_email', 'div_password', 'div_city', 'div_oblast', 'div_krai', 'div_street', 'div_house', 'div_office', 'div_doorway', 'div_metro', 'div_tel1', 'div_tel2', 'div_tel3', 'div_fax', 'div_icq', 'div_typecard', 'div_numbercard', 'div_comments', 'div_submit', 'div_attentions');
			hide_fields = Array('div_organization', 'div_appointment', 'div_uaddress', 'div_inn', 'div_kpp', 'div_rs', 'div_ks', 'div_bank', 'div_bik', 'div_okonh', 'div_okpo');
			for (field in show_fields){
				$('#' + show_fields[field]).css('display', '');
			}
			for (field in hide_fields){
				$('#' + hide_fields[field]).css('display', 'none');
			}
		}
		
		function showUr(){
			show_fields = Array('div_name', 'div_email', 'div_organization', 'div_password', 'div_appointment', 'div_uaddress', 'div_inn', 'div_kpp', 'div_rs', 'div_ks', 'div_bank', 'div_bik', 'div_okonh', 'div_okpo', 'div_city', 'div_oblast', 'div_krai', 'div_street', 'div_house', 'div_office', 'div_doorway', 'div_metro', 'div_tel1', 'div_tel2', 'div_tel3', 'div_fax', 'div_icq', 'div_typecard', 'div_numbercard', 'div_comments', 'div_attentions', 'div_submit');
			for (field in show_fields){
				$('#' + show_fields[field]).css('display', '');
			}
		}

$(document).ready(
	function(){
		$('.sub_item').each(
			function(){
				$(this).parent().find('.parent_menu').attr('src', '/images/str_li_2.gif');
				$(this).css('display', 'none');
			}
		);
		$('.parent_menu').click(
			function(){
				
				display_value = $(this).parent().find('.sub_item').css('display');
			    if(display_value == 'block'){
				    $(this).parent().find('.sub_item').css('display', 'none');
				    $(this).attr('src', '/images/str_li_2.gif');
			    }
			    else if(display_value == 'none'){
			    	$(this).parent().find('.sub_item').css('display', '');
			    	$(this).attr('src', '/images/str_li_2_o.gif');
			    }
				
			}
		);
		$('.selected .parent_menu').first().attr('src', '/images/str_li.gif');
		$('.selected a').first().css({'color':'#0D1961', 'font': 'bold 9pt Arial,Tahoma'});
		$('.selected .sub_item').css('display', '');
		$('.sub_selected').parent().css('display', '');
		$('.sub_selected').parent().parent().find('.parent_menu').first().attr('src', '/images/str_li_2_o.gif');
		$('.sub_selected a').css({'color':'#0D1961', 'font': 'bold 9pt Arial,Tahoma'});
		$('.sub_selected img').attr('src', '/images/str_li.gif');
		$('.add-list').live('click', function(){
				val = $(this).attr("id") + "_val";
				$(this).find('img').attr('src', '/images/kauf_in.gif');//('В корзине');
				//$(this).css('background-image', 'url(/images/kauf_in.gif)');
				newarr = {};
                newarr["type"] = "single";
                newarr["seid"] = seid;
                newarr["uid"] = uid;
                newarr['kodtov'] = $(this).attr('id');
                newarr['count'] = $("#" + val).attr("value");
                $.post("/price/qbasket.php", newarr, 
                	function(data){
                        newdata  = jQuery.parseJSON(data);
                        count = $("#cartcount").html();
                        cost = $("#cartcost").html();
                        if((!count) && (!cost))
                        {
                            htmldata = "Выбрано товаров: <b><span id='cartcount'>" + parseInt(newdata['count']) + "</span></b><br>на сумму <b><span id='cartcost'>" + parseInt(newdata['cost']) + "</span> руб.</b>";
                            $(".basket_bl p").html(htmldata);
                        }
                        else
                        {
                            $("#cartcount").html(parseInt(newdata['count']));
                            $("#cartcost").html(parseInt(newdata['cost']));
                        }
                    }
                );
                return false;
            }

		);
		$('.add_block').click(
			function(){
				val = $(this).attr("id") + "_val";
				$(this).html('В корзине');
				$(this).css('background-image', 'url(/images/big_f_input_in.gif)');
				newarr = {};
                newarr["type"] = "single";
                newarr["seid"] = seid;
                newarr["uid"] = uid;
                newarr['kodtov'] = $(this).attr('id');
                newarr['count'] = $("#" + val).attr("value");
                $.post("/price/qbasket.php", newarr, function(data){
                        newdata  = jQuery.parseJSON(data);
                        count = $("#cartcount").html();
                        cost = $("#cartcost").html();
                        if((!count) && (!cost))
                        {
                            htmldata = "Выбрано товаров: <b><span id='cartcount'>" + parseInt(newdata['count']) + "</span></b><br>на сумму <b><span id='cartcost'>" + parseInt(newdata['cost']) + "</span> руб.</b>";
                            $(".basket_bl p").html(htmldata);
                        }
                        else
                        {
                            $("#cartcount").html(parseInt(newdata['count']));
                            $("#cartcost").html(parseInt(newdata['cost']));
                        }
                    }
                );
                return false;
                
            }

		);
		$('#clear_basket').click(
			function(){
				user_answer = confirm("Вы действительно хотите очистить корзину?");
				if(user_answer === true){
					$('#b_form').submit();
				}
				else{
					return false;
				}
			}
		);
		$('#search_field').focus(
			function(){
				$(this).attr('value', '');
			}
		);
	
	}
);

