function setFavorite(url){
   if(window.sidebar){ // Mozilla Firefox Bookmark
      window.sidebar.addPanel(document.title, url,"");
   }else if(window.external){ // IE Favorite
      window.external.AddFavorite(url, document.title); 
   }else if(window.opera && window.print){ // Opera Hotlist
      return true; 
   }
}
 function setHomepage(page)
 {
   if (document.all){
      document.body.style.behavior='url(#default#homepage)';
      document.body.setHomePage(page);

   }else if (window.sidebar){
      if(window.netscape){
         try{  
            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
         }catch(e){  
            alert("this action was aviod by your browser，if you want to enable，please enter about:config in your address line,and change the value of signed.applets.codebase_principal_support to true");  
         }
      } 
      var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
      prefs.setCharPref('browser.startup.homepage',page);
   }
 }
function goSearch() {
   var s_url = $('span#s_url').text();
   document.location.href = s_url;
}
/* NEW MENU */
$(document).ready(function(){
   $('tr.navbar td.hover_cell_left,'+
     'tr.navbar td.hover_cell_right,'+
     'tr.navbar td.hover_cell,'+
     'tr.navbar1 td.hover_cell_left,'+
     'tr.navbar1 td.hover_cell_right,'+
     'tr.navbar1 td.hover_cell,').mouseenter(function(){
      $(this).find('ul.first_grade').css('display', 'block');
      $(this).find('a.topmenu-link').css('color', '#E22C25');
      $(this).find('a.topmenu-link1').css('color', '#FFF600');
   }).mouseleave(function(){  
      $(this).find('a.topmenu-link').css('color', '#333333');
      $(this).find('a.topmenu-link1').css('color', 'white');
      $(this).find('ul.first_grade').css('display', 'none');
   });
   $('td.active_menu_l_cell, td.active_menu_r_cell, td.active_menu_cell,').mouseenter(function(){
      $(this).find('ul.first_grade').css('display', 'block');
   }).mouseleave(function(){  
      $(this).find('ul.first_grade').css('display', 'none');
   });   
      $('li.second_grade_hover').mouseenter(function(){
         $(this).find('ul.second_grade').css('display', 'block');
      }).mouseleave(function(){  
         $(this).find('ul.second_grade').css('display', 'none');
      });
   $('tr.navbar1 ul.second_grade').mouseenter(function(){
      $(this).prev().removeClass().addClass('sg_arrow_active').css('color', '#FFF600');
   }).mouseleave(function(){
      $(this).prev().removeClass('sg_arrow_active').addClass('sg_arrow').attr('style', '');
   });               
   $('tr.navbar ul.second_grade').mouseenter(function(){
      $(this).prev().removeClass().addClass('sg_arrow_active').css('color', '#333333');
   }).mouseleave(function(){
      $(this).prev().removeClass('sg_arrow_active').addClass('sg_arrow').attr('style', '');
   });      
})
/* END */
