var countShowContent = 1;

function contentVisible( ID ){
  if( $( ID ).style.display == 'none' ){
    countShowContent++;
    new Effect.SlideDown( ID );
  } else {
    if( countShowContent > 1 ){
      new Effect.SlideUp( ID );
      countShowContent--;
    } // if
  } // if
} // function contentVisible

function IPAddressShow( ID ){
  visibleIP = 'visibleIPSpanID' + ID;
  
  if( $( visibleIP ).style.display == 'none' ){
    new Effect.SlideDown( visibleIP );
  } else {
      new Effect.SlideUp( visibleIP );
  } // if
} // function IPAddressShow

function IPAddressBlocked( IPAddress, letterID, userID ){
  var partDivID = 'blockIPDivID';
  var dst = partDivID + letterID + IPAddress;
  var self = this;
    var url  = '/online_reception/blockIP?IPAddress=' + IPAddress + '&userID=' + userID;
    var requestOptions = {
      method : 'GET',
      evalScripts : true,
      onComplete: function( response ) {
        list = $$( 'div[id^=' + partDivID + '][id$=' + IPAddress + ']' );
        list.each( function( item ){
          $( item ).update( response.responseText );
        } );
      } // onComplete
    }
    
    new Ajax.Updater( dst, url, requestOptions );
} // function IPAddressBlocked