function showArticle()
{
  var ePopup;
  var eDisplay;
  var eText;
  var eNext;
  var ePrev;
  var ePage;
  var el;
  var iNum;
  var sHtmlLinks;
  var sHtmlText;
  var ch;
  var cw;
  var h;
  var w;
  var x;
  var y;
  var iStyle;
  var eNavigator;
  var sHtml;
  var cx;
  var mw;
  var mh;
  
  undoWait();
  if ( bConfiguration )
    return;
//  doCloseVisible( 'article' );
  cx = 0;
  if ( ie && bNavProtect )
  {
    el = getElement( 'navigator' );
    cx = getWidth( el );
  }  
  ch = getClientHeight();
  cw = getClientWidth();
  if ( ch < 200 || cw < 200 )
  {
    hideArticle();
    return;
  }  
  mw = bArticleScrollFixed ? ww : cw;
  mh = bArticleScrollFixed ? wh : ch;
  ePopup = getElement( 'article' );
  iNum = aLinks.length;
  iNum = ( iNum == 0 ) ? 1 : ( iNum > iMaxLinks ) ? iMaxLinks : iNum;
  iStyle = getStyle();
  if ( iStyle == 1 )
  {
    w = iImageArticleWidth + ( ie ? 4 : 0 ) + 34 + iArticleMarginWidth;
    h = iImageArticleHeight + ( getHeight( 'idArticleHeader' ) + getHeight( 'idArticleFooter' ) ) + ( ie || mozilla5 ? 8 : 4 ) + iArticleMarginHeight;
    if ( h < iArticleHeight )
    {
      h += iLinkHeight;
      if ( h > iArticleHeight )
        h = iArticleHeight;
    }    
  }
  else
  {
    w = iArticleWidth;
    h = iArticleHeight;
  }  
  if ( h >= mh - ( ie || mozilla5 ? 2 : iArticleMarginHeight ) )
    h = mh - ( ie || mozilla5 ? 2 : iArticleMarginHeight );
  if ( w > mw - cx - ( mozilla5 ? 2 : 0 ) )
    w = mw - cx - ( mozilla5 ? 2 : 0 );
  if ( w < iArticleMinWidth )
    w = iArticleMinWidth;
  if ( h < iArticleMinHeight )
    h = iArticleMinHeight;
  setWidth( ePopup, w );
  setHeight( ePopup, h );
  if ( bReposition && !bArticleFixed )
  {
    x = mouseX - w / 2 - ( bArticleScrollFixed ? 0 : poX );
    y = mouseY - h / 3 - ( bArticleScrollFixed ? 0 : poY );
  }
  else if ( iArticleLeft != -1 )
  {
    x = iArticleLeft + ( bArticleScrollFixed ? 0 : poX );
    y = iArticleTop + ( bArticleScrollFixed ? 0 : poY );
  }
  else
  {
    x = ( bNavMinimized ? iNavMinWidth : iNavMaxWidth ) + 10;
    y = 10;
  }
  if ( x + w > mw )
    x = mw - w - ( ie ? 0 : 2 );
  if ( x < cx )
    x = cx;
  if ( y + h > mh )
    y = mh - h - ( ie ? 0 : 2 );
  if ( y < 0 )
    y = 0;
  setLeft( ePopup, x + ( bArticleScrollFixed ? 0 : poX ) );
  setTop( ePopup, y + ( bArticleScrollFixed ? 0 : poY ) );
  iArticleLeft = x;
  iArticleTop = y;
  eDisplay = getElement( 'display' );
  sHtml = '<div id="textPage" name="textPage" class="textPage"></div>';
  deleteCode( 'display' );
  insertCode( 'display', sHtml );
  eText = getElement( 'textPage' );
  eNext = getElement( 'nextArticle' );
  ePrev = getElement( 'prevArticle' );
  setWidth( eDisplay, getWidth( ePopup ) - ( ie || opera ? 0 : 0 ) );
  setHeight( eDisplay, getHeight( ePopup ) - ( getHeight( 'idArticleHeader' ) + getHeight( 'idArticleFooter' ) ) - ( ie || opera ? 0 : 0 ) );
  setBackground( eText, sArticleColor );
  if ( iStyle > 0 )
  {
    sHtmlText = '<center><img src="' + sRoot + sImageArticle + '" width="' + iImageArticleWidth + '"></center>';
    deleteCode( 'textPage' );
    insertCode( 'textPage', sHtmlText );
    setWidth( eText, getWidth( eDisplay ) - ( ie || opera ? 2 : 2 + iArticleMarginWidth ) );
    setPadding( eText, Math.round( iArticleMarginWidth / 2 ), Math.round( iArticleMarginHeight / 2 ), Math.round( iArticleMarginWidth / 2 ), Math.round( iArticleMarginHeight / 2 ) );
  }
  else
  {
    setWidth( eText, getWidth( eDisplay ) - ( ie || opera ? 2 : 2 + iArticleMarginWidth ) );
    setPadding( eText, Math.round( iArticleMarginWidth / 2 ), Math.round( iArticleMarginHeight / 2 ), Math.round( iArticleMarginWidth / 2 ), Math.round( iArticleMarginHeight / 2 ) );
    sHtmlText = "";
    for ( i=0; i<aHtmlArticleImages.length; i++ )
    {
      w = getWidth( eText ) - iArticleMarginWidth - 2;
      if ( aHtmlArticleImagesWidth[i] > 0 )
      {
        if ( w > aHtmlArticleImagesWidth[i] )
          w = aHtmlArticleImagesWidth[i];
        w -= 18;  
        h = Math.round( aHtmlArticleImagesHeight[i] * w / aHtmlArticleImagesWidth[i] );
        sHtmlText += '<center><img src="' + sRoot + aHtmlArticleImages[i] + '" width="' + w + '" height="' + h + '"></center><p>';
      }
      else
        sHtmlText += '<center><img src="' + sRoot + aHtmlArticleImages[i] + '" width="' + w + '"></center><p>';
    }
    sHtmlText += sHtmlArticle;
    deleteCode( 'textPage' );
    insertCode( 'textPage', sHtmlText );
  }
  if ( sNextArticle == '' )
  {
    aImagesDisabled[12] = true;
    setTitle( eNext, '' );
  }
  else
  {
    aImagesDisabled[12] = false;
    setTitle( eNext, sNextArticleTitle );
  }
  setButton( eNext, 12, 1 );
  if ( sPrevArticle == '' )
  {
    aImagesDisabled[11] = true;
    setTitle( ePrev, '' );
  }
  else
  {
    aImagesDisabled[11] = false;
    setTitle( ePrev, sPrevArticleTitle );
  }
  setButton( ePrev, 11, 1 );
  setHeight( eText, getHeight( eDisplay ) - ( ie || opera ? 0 : 0 + iArticleMarginHeight ) );
  if ( !ie )
    setVisible( ePopup, false );
  setVisible( ePopup, true );
  if ( bArticleFollowPage && iArticlePage > 0 && iArticlePage - ( iArticlePage % iUsedPages ) != iNumPage  - ( iNumPage % iUsedPages ) )
  {
    if ( iUsedPages == 2 )
      bPageLoad = true;
    bPageNext = false;
    bPageCount = true;
    parent.load.location.href = sRoot + getDirectPageLink( iArticlePage );
  }  
  else
    parent.load.location.replace( getUrl( sBlankUrl ) );
  bArticleFollowPage = false;
  if ( ie )
  {
    ePopup.focus();
    eDisplay.focus();
    eText.focus();
  }  
  if ( bArticleScrollFixed )
    window.scrollTo( 0, y );
}

function hideArticle()
{
  displayElement( 'article', false );
}


