

            // funkce se stara o skryvani / zobrazovani (podle show) selectu ze search, tak aby bylo videt menicko.
            function display_search_select(el_this, show){

              if (el_this.id != "")
              {
                if (tge(el_this.id))
                {
                  li_hl_menu = ge(el_this.id);
                  if (li_hl_menu)
                  {                         
                    licka = li_hl_menu.getElementsByTagName("LI");  // menu
                    
                    licka_height = 0;
                    licka_weight = 0;
                    for (var k=0; k<licka.length; k++) 
                    {  
                      licka_height += getElementHeight(licka[k]);
                      licka_weight = getElementWidth(licka[k]);
                    } // end for

                    
                    
                    menu_pos = findPos(li_hl_menu);
                    menu_x1 = menu_pos[0];
                    menu_y1 = menu_pos[1] + getElementHeight(li_hl_menu); // musi se pripocitat i vyska hlavniho menu
                    menu_x2 = menu_x1 + licka_weight;
                    menu_y2 = menu_y1 + licka_height;
                                        
                    /*
                    ge("menu_div").style.left = menu_x1 + "px";
                    ge("menu_div").style.top = menu_y1  + "px";
                    ge("menu_div").style.width = menu_x2 - menu_x1 + "px";
                    ge("menu_div").style.height = menu_y2 - menu_y1 + "px";
                    */
                    
                    //alert(menu_x1+","+ menu_y1+","+ menu_x2+","+ menu_y2);
                                        
                    search_form_el = "reality_form";                      
                    
                    if (search_form_el != "" && document.forms[search_form_el] != null) // 0803261257pf-1 FIX "doplneni kontroly"  
                    { 
                      std_form = document.forms[search_form_el];
                      std_form_el_cnt = std_form.elements.length;
                      if (show)
                      {
                        for (var j=0; j<std_form_el_cnt; j++) 
                        {                 
                          cur_el = std_form.elements[j];
                          if (cur_el.nodeName && cur_el.nodeName == "SELECT")
                          {
                            ge(cur_el.id + "_label").style.visibility = "visible";                                                    
                            ge("title_" + cur_el.id).style.visibility = "visible";
                          } // end if 
                        } // end for 
                      } // end if 
                        
                      for (var j=0; j<std_form_el_cnt; j++) 
                      {                 
                        cur_el = std_form.elements[j];
                        if (cur_el.nodeName && cur_el.nodeName == "SELECT")
                        {
                          cur_el = cur_el;
                          sel_pos = findPos(cur_el);
                          sel_x1 = sel_pos[0];
                          sel_y1 = sel_pos[1];
                          sel_x2 = sel_x1 + getElementWidth(cur_el);
                          sel_y2 = sel_y1 + getElementHeight(cur_el);
                         
                          //alert(cur_el.id + " - " + menu_y2 + ", " + sel_y2);
                          //alert(cur_el.id + " - " + sel_x1 + " > " + menu_x1 + " && " + sel_x1 + " < " + menu_x2 + " || " + sel_x2 + " > " + menu_x1 + " && " + sel_x2 + " < " + menu_x2 );
                                                  
                          // Y - staci, pokud presahuje && X - zasahuje levym rohem || zasahuje pravym rohem
                          if ( menu_y2 > sel_y1 && ((sel_x1 > menu_x1 && sel_x1 < menu_x2) || (sel_x2 > menu_x1 && sel_x2 < menu_x2)) )
                          {
                            if (!show)                          
                            {   
                              ge(cur_el.id + "_label").style.visibility = "hidden";                                                    
                              ge("title_" + cur_el.id).style.visibility = "hidden";
                            } // end if 
                           
                            //alert(cur_el.id);
                          } // end if                                                              
                          
                          // alert(menu_x1+","+ menu_y1+","+ menu_x2+","+ menu_y2 + " --- " + sel_x1+","+ sel_y1+","+ sel_x2+","+ sel_y2);
                          
                        } // end if                              
                      } // end for                                                      
                    } // end if                          
                  } // end if 
                } // end if                    
              } // end if 
             
            } // end function 
             
 /* * * * * * * * * * * * * * * * * * * * 
  *  Nahrazuje .htc a sfhover skripty   *
  * * * * * * * * * * * * * * * * * * * */
  hover = function()
  {
   
    matice = new Array();
                         //id, tag
    //matice.push(new Array("topmenu", "li"));
    matice.push(new Array("pseudoselect", "li"));
    
    add    = "hover";
    remove = "hover\\b";
     
    for ( var j=0; j<matice.length; j++ )
    {
      ids     = matice[j][0];
      tags    = matice[j][1];
      
      if (document.getElementById(ids) != null)
      {
        pole = document.getElementById(ids).getElementsByTagName(tags);
        
        for ( var i=0; i<pole.length; i++ )
        {
          pole[i].onmouseover = function() { this.className += " " + add; }
          pole[i].onmouseout  = function() { this.className = this.className.replace(new RegExp(" " + remove), ""); }
          
          
        } // end for
        
        
      } // end if 
      
    } // end for
    
  } // end function
  
  if (window.attachEvent) window.attachEvent("onload", hover);
