function ArrangeElements()
{
  document.title_layer.pageX = document.background_img.width +
     document.background_img.x - 
     document.title_layer.document.title_img.width - 30;
  document.title_layer.visibility = "inherit";

  if (document.menu_layer == null)
  {
    document.doc_layer.document.signature_back.visibility = "inherit";

    document.to_up_layer.pageX = document.doc_layer.document.signature_back.pageX - 8;
    document.to_up_layer.pageY = document.doc_layer.document.signature_back.pageY - 3; 
    document.to_up_layer.visibility = "inherit";

    return;
  }

  expand = document.menu_layer.clip.height;

  if (expand < document.doc_layer.clip.height)
  {
    expand = document.doc_layer.clip.height - 12;
    document.menu_layer.clip.height = document.doc_layer.clip.height - 12;
  }

  with (document.menu_layer.layers)
  {
    expand -= back_bottom.clip.height + back_top.clip.height +
      back_tile.clip.height;

    if (expand > 0)
    {
      back_tile.resize(141, expand + 9);
      back_bottom.y += expand - 10;

      vline_tile.resize(141, expand + 9);
      vline_bottom.y += expand;
    }

    vline_top.visibility = "inherit";
    vline_tile.visibility = "inherit";
    vline_bottom.visibility = "inherit";

    back_top.visibility = "inherit";
    back_tile.visibility = "inherit";
    back_bottom.visibility = "inherit";
  }

  document.to_up_layer.pageX = document.menu_layer.clip.width + 
    document.menu_layer.pageX - 18;
  document.to_up_layer.pageY = document.menu_layer.clip.height + 
    document.menu_layer.pageY - 20;
  document.to_up_layer.visibility = "inherit";

  document.doc_layer.document.signature_back.pageX = 
      document.to_up_layer.pageX + 30;
  document.doc_layer.document.signature_back.pageY = 
      document.to_up_layer.pageY + 5;
  document.doc_layer.document.signature_back.visibility = "inherit";

  document.doc_layer.clip.height = document.menu_layer.clip.height + 10; 
}

