function MainPeopleBlock(td_id,new_link_id,menu_block_id,container_id,type, black_top_id) {
   this.td = $(td_id);
   this.new_link_id = new_link_id;
   this.menu_block_id = menu_block_id;
   this.block = $(menu_block_id);
   this.container_id = container_id;
   this.black_top_id = black_top_id;
   this.link = this.block.getElementsByTagName("a");
   this.element = $(this.menu_block_id,1);
   this.type=type;
   this.ApplyHandlers();
}


MainPeopleBlock.prototype = {
   timerRunning: false,
   timerID: 0,

   // Old-school, not ajax block rollover
   ChangeBlock : function(obj){
      var target_div_id = obj.name;
      var items=getElementsByClass("sub_div");
      for (i = 0; i < items.length; i++) {
         if(items[i].id!==target_div_id){
            items[i].style.display='none';
         }
         else{
            items[i].style.display='block';
         }
      }
      $(this.new_link_id).innerHTML = obj.innerHTML;
      this.Menu_Close();
   },

   Menu_Open : function(){
   	$(this.black_top_id,1).backgroundImage="url('/img/ajax_block/black_top_left.gif')";
      with(this){
         if(timerRunning = true){
            clearTimeout(timerID);
            timerRunning = false;
         }
         element.visibility='visible';
      }
   },

   Menu_Close : function (){
   	$(this.black_top_id,1).backgroundImage="url('/img/ajax_block/black_top_left2.gif')";
      this.element.visibility='hidden';
   },

   Timer_Menu_Close : function (){
      with(this){
         if(timerRunning = true)clearTimeout(timerID);timerRunning = false;
         timerID = setTimeout(function(){this.Menu_Close(this)}.bind(this),600);
         timerRunning = true;
      }
   },

   ApplyHandlers : function(){
      //Creating copy of object, to attach event handler throw the hyperlink context (to have access own properties)
      var This = this;
      for(i=0; i<This.link.length; i++){
         lin = $(This.link[i].id);
         addHandler(lin,"click",function() {This.SendRequest(this)}.bind(lin));
      }
      addHandler(this.td,'mouseover',function(){this.Menu_Open(this)}.bind(this));
      addHandler(this.block,'mouseover',function(){this.Menu_Open(this)}.bind(this));
      addHandler(this.td,'mouseout',function(){this.Timer_Menu_Close(this)}.bind(this));
   },

   SendRequest : function(obj){
      var req = new Subsys_JsHttpRequest_Js();
      var id = obj.name;
      var type = (typeof this.type != 'undefined') ? this.type : 0;
      var This = this;
      req.onreadystatechange = function(){
         if (req.readyState == 4){
            if (req.responseJS){
               $(This.container_id).innerHTML= (req.responseJS.state||'no response');
               EnableRollOver(); // Reparse DOM tree to highlight dynamicly created elements
               removeHandler(window,'resize',BuildIndex);
            }
         }
         else $(This.container_id).innerHTML= ('<center><div class="numbers" style="vertical-align:middle;height:30px;">Загружаются данные...</div></center>');
      }
      req.caching = true;
      req.open('POST', '/xmlhttp/', true);
      req.send({rubric_id:id,type:type});
      $(this.new_link_id).innerHTML = obj.innerHTML;
      this.Menu_Close();
   },

   Dummy : function(object){
      alert(object.innerHTML+' - > '+this.new_link_id);
   },

   DisplayPropertyNames : function(){     // 4 debug only
      var names="";
      for(var name in this) names += name + "\n";
      alert(names);
   }
}