function CD_coockiesBlocks(  ) {
	this.CD_prefixName     = "popup_";
	this.CD_DataObject     = getElement ( this.CD_prefixName + "info_block" ); // Блок для скрытия/показа
	this.CD_DataContainer  = getElement (this.CD_prefixName + "info_content"); // Информационный блок
	this.CD_ShowHideButton = getElement (this.CD_prefixName + "info_button");	 // Кнопка скрыть/показать
	this.CD_ShowHideButtonImgHideSrc = ( typeof adress_short != "undefined" ? adress_short : "" ) + "img/arrow_popup_hide.gif";	 // Имаж для скрытия
	this.CD_ShowHideButtonImgShowSrc = adress_short + "img/arrow_popup_show.gif";	 // Имаж для паказа
	this.CD_startHideStyle = "block";	// Первичное состояние отображения
	this.CD_coockieDefaultValue = "show";	// Первичное состояние отображения
	this.CD_coockieName = "popup_show"; // Название кукиса для запоминания состояния
	this.CD_coockieValue = null;
	this.CD_coockieExpDate = new Date ();
	this.CD_coockieHost = COOCK_getHost();
	}

CD_coockiesBlocks.prototype.getValue = function( param ) {
	return this[ param ];
	}

CD_coockiesBlocks.prototype.setValue = function( param , value) {
	this[ param ] = value;
	}

//инициализируем кукисы для работы
CD_coockiesBlocks.prototype.initCoockie = function( ) {
	this.CD_coockieValue = COOCK_get(this.CD_coockieName);
	if (this.CD_coockieValue == null) {
		this.CD_coockieValue = this.CD_coockieDefaultValue;
		this.CD_coockieExpDate.setTime(this.CD_coockieExpDate.getTime() + (365 * 24 * 3600 * 1000));
		COOCK_set(this.CD_coockieName,this.CD_coockieValue,this.CD_coockieExpDate,"/",this.CD_coockieHost,"");
		}
	}

//первый раз запускаем отобажение/скрытие попапа
CD_coockiesBlocks.prototype.blockStart = function ( modeId )
	{
	var AllModeShowHide = new Array ("showhide", "show", "hide")
	
	this.CD_DataObject     = getElement ( this.CD_prefixName + "info_block" ); // Блок для скрытия/показа
	this.CD_DataContainer  = getElement (this.CD_prefixName + "info_content"); // Информационный блок
	this.CD_ShowHideButton = getElement (this.CD_prefixName + "info_button");	 // Кнопка скрыть/показать
	
	if ( AllModeShowHide[modeId] == "showhide" )
		{
		this.CD_coockieValue = COOCK_get(this.CD_coockieName);
		if (this.CD_coockieValue == null) {
			this.CD_coockieValue = this.CD_coockieDefaultValue;
			this.CD_coockieExpDate.setTime(this.CD_coockieExpDate.getTime() + (365 * 24 * 3600 * 1000));
			COOCK_set(this.CD_coockieName,this.CD_coockieValue,this.CD_coockieExpDate,"/",this.CD_coockieHost,"");
			}
		}
	else if (AllModeShowHide[modeId] == "show")
		{
		this.CD_coockieValue = COOCK_get(this.CD_coockieName);
		if (this.CD_coockieValue == null) {
			this.CD_coockieValue = "show";
			}
		}
	else if (AllModeShowHide[modeId] == "hide")
		{
		this.CD_coockieValue = COOCK_get(this.CD_coockieName);
		if (this.CD_coockieValue == null) {
			this.CD_coockieValue = "hide";
			}
		}

	if ( this.CD_DataObject && this.CD_ShowHideButton && this.CD_DataContainer)
		{
		if (this.CD_coockieValue == 'show')
			{
			this.CD_ShowHideButton.src = this.CD_ShowHideButtonImgHideSrc;
			this.CD_DataContainer.style.display = "block";
			}
		else
			{
			this.CD_ShowHideButton.src = this.CD_ShowHideButtonImgShowSrc;
			}
		}
	}

//Скрыть/показать инфу для попап, запись статуса в кукис
CD_coockiesBlocks.prototype.blockShowHide = function  ()
	{
	if ( this.CD_DataContainer && this.CD_ShowHideButton )
		{
		var popup_show_new = "";
		if ( this.CD_DataContainer.style.display != "block" )
			{
			this.CD_ShowHideButton.src = this.CD_ShowHideButtonImgHideSrc;
			this.CD_DataContainer.style.display = "block";
			popup_show_new = "show";
			document.location.hash = "searchForm";
			}
		else
			{
			this.CD_ShowHideButton.src = this.CD_ShowHideButtonImgShowSrc;
			this.CD_DataContainer.style.display = "none";
			popup_show_new = "hide";
			//document.location.hash = "";
			}
		this.CD_coockieValue = popup_show_new;
		this.CD_coockieExpDate.setTime(this.CD_coockieExpDate.getTime() + (365 * 24 * 3600 * 1000));
		COOCK_set(this.CD_coockieName,this.CD_coockieValue,this.CD_coockieExpDate,"/",this.CD_coockieHost,"");
		}
	}
