
function getFCKVal( field_name, removeLineBreaks )
{
   removeLineBreaks = typeof removeLineBreaks == "undefined" ? true : removeLineBreaks;

   var value = FCKeditorAPI.GetInstance( field_name ).GetXHTML();

   // Removing leading and tailing linebreaks
   if ( removeLineBreaks )
   {
      value = value.replace( new RegExp( "^(<br />)+", "g"), '' );
      value = value.replace( new RegExp( "(<br />)+$", "g"), '' );
   }
   
   return value;
}

function showContentLoadingSign()
{
   $( '#content_loading_sign' ).show();
}

function hideContentLoadingSign()
{
   $( '#content_loading_sign' ).hide();
}




function toggleSubmenu( menu_group_id )
{
   var set = $('#' + menu_group_id ).css('display') == 'none'; 

   $('#' + menu_group_id ).toggle();

   $('.container-left-box1 div.menu_block').each(
      function( index )
      {
         if (  typeof $(this) != 'undefined'
            && $(this)[0].id != menu_group_id )
         {
            $(this).hide();
         }
      }
   );

	jqh.call( '/page/menu/' + menu_group_id, 'selectMenuBlock', { 'set': ( set ? 1 : 0 ) } );
}

