

                 var redraw_select; // pouziva se pro odstraneni setTimeout.
                 
                 sfHover = function() {
                   // 0705031740pf-1 FIX "doplneni podminky"
                   if (document.getElementById("topmenu") != null)
                   {
                     var sfEls = document.getElementById("topmenu").getElementsByTagName("LI");
                                         
                     for (var i=0; i<sfEls.length; i++) 
                     {                 
                      
                       // IE < 7
                       if (sfEls[i] && document.all && window.XMLHttpRequest == null)
                       {     
                         sfEls[i].onmouseleave = function() 
                         {  
                           // skryti menu             
                           display_search_select(this, true);
                         } // end if 
                                      
                         sfEls[i].onmouseenter = function() 
                         {  
                           // skryti menu                                 
                           display_search_select(this, true);
                           display_search_select(this, false);                       
                         } // end if 
                       
                         sfEls[i].onmouseover = function() 
                         {                                                                     
                           if (redraw_select)
                           {
                             clearTimeout(redraw_select);
                           } // end if 
                           this.className+=" hover";                              
                         } // end function 
                        

                         // udalost na zobrazeni vsech selectu v podmenu se musi povesit na Acko, nebo na LI, protoze to uz v sobe zahrnuje i to ostatni.
                         if (sfEls[i].id != "")
                         {    
                           // poveseni na Acko, aby to nebylo pro cely prvek
                           if (sfEls[i].childNodes[0] && sfEls[i].childNodes[0].onmouseout != null)
                           {
                             acko = sfEls[i].childNodes[0];
                             acko.onmouseenter=function()  
                             {                                                              
                               if (document.all && document.getElementById) //  && window.XMLHttpRequest == null // pouze pro IE < 7
                               {
                                 parnod = this.parentNode;
                                 // display_search_select(parnod, true); // puvodni reseni, kdy bohuzel dochazelo k probliknuti (akce zobraz a schovej pro search)

                                 redraw_select = setTimeout("display_search_select(parnod, false);",0); // nula staci, aby mezitim doslo k udalosti onmouseover na podmenicku, kde se akce zrusi.
                               } // end if                    
                             } // end function                  
                           } // end if                    
                         } // end if                                                 
                       } // end if   
                       // ---
                        
                       // pouze pro IE
                       // standardni osetreni udalosti.                 
                       sfEls[i].onmouseout=function()  
                       {                                            
                         if (document.all && document.getElementById)
                         {                         
                           this.className=this.className.replace(new RegExp(" hover\\b"), "");                                   
                         } // end if                    
                       } // end function                  
                         
                     } // end for
                   } // end if 
                 } // end function 
                 
                 function onload_before_ajax_handler_0(){               
                   sfHover();               
                 }
                 
                 onload = function(){
                   sfHover();
                 } // end if 
				 
				 
				 // prekryvani selectu v IE
				 
				 $(document).ready(function(){
					   var browser = navigator.appName;
					   var b_version = navigator.appVersion;
					   var version = parseFloat(b_version);
				   if ((browser == "Microsoft Internet Explorer") && (version >= 4)) {           
					   $('#top_menu_1,#top_menu_2,#top_menu_3,#top_menu_4,#top_menu_6, #content ').bind('mouseover', function(event){
						   $('#advert_type').show();
						   $('td #advert_type').show();
						   $('td #advert_function').show();
						   $('td #region_id').show();
					   });
					   $('#top_menu_1,#top_menu_5,#top_menu_3,#top_menu_4,#top_menu_6, #content ').bind('mouseover', function(event){
						   $('#advert_function').show();
					   });
					   
					   
					   $('#top_menu_2').bind('mouseover', function(event){
						   $('#advert_function').hide();
					   });
					   
					   $('#top_menu_5').bind('mouseover', function(event){
						   if ($('#advert_type').css('display') != 'none') {
							   $('#advert_type').hide();
							   $('td #advert_type').hide();
							   $('td #advert_function').hide();
							   $('td #region_id').hide();
						   }
					   });
				   }
			   });
                 
