function C_Menu(){
      // Делает пункт меню выделенным
  addMethod(this, "itemToSel", function(in_num){
    document.getElementById('item-'+in_num).style.backgroundImage='url(/img/menu/selected_bg.gif)';
    document.getElementById('item-'+in_num+'_r').style.backgroundImage='url(/img/menu/arr_sel_left.gif)';
    document.getElementById('item-'+in_num+'_l').style.backgroundImage='url(/img/menu/arr_sel_right.gif)';
  });
      // Делает пункт меню невыделенным
  addMethod(this, "itemToNorm", function(in_num){
    document.getElementById('item-'+in_num).style.backgroundImage='url(/img/menu/normal_bg.gif)';
    document.getElementById('item-'+in_num+'_l').style.backgroundImage='url(/img/menu/arr_norm_right.gif)';
    document.getElementById('item-'+in_num+'_r').style.backgroundImage='url(/img/menu/arr_norm_left.gif)';
  });
  addMethod(this, "itemToNorm", function(in_num, in_par){
    if (in_par == 'first') {
      document.getElementById('item-'+in_num).style.backgroundImage='url(/img/menu/normal_bg.gif)';
      document.getElementById('item-'+in_num+'_l').style.backgroundImage='url(/img/menu/normal_bg.gif)';
      document.getElementById('item-'+in_num+'_r').style.backgroundImage='url(/img/menu/arr_norm_left.gif)';
    } else if ((in_par == 'last')) {
      document.getElementById('item-'+in_num).style.backgroundImage='url(/img/menu/normal_bg.gif)';
      document.getElementById('item-'+in_num+'_l').style.backgroundImage='url(/img/menu/arr_norm_right.gif)';
      document.getElementById('item-'+in_num+'_r').style.backgroundImage='url(/img/menu/normal_bg.gif)';
    }
  });
}
var menu = new C_Menu();