Need help! Coockie and resize div

Need help! Coockie and resize div

  1. <div class="right_clm_fix" id="rcf">
  2.       <div class="right_top_block" id="rt">Default height 50%</div>
  3.       <div class="btn_sl" id="btn_sl">move top or bottom</div>
  4.       <div class="right_bottom_block" id="rb">Default height 50%</div>
  5. </div>
  6. <style>
  7. .right_clm_fix {
  8.       position:fixed;
  9.       width:300px;
  10.       height:100%;
  11.        top:0;
  12.       right:0;
  13. }
  14. .right_top_block {
  15.       width:300px;
  16.       height:50%; /* default */
  17.       background: rgba(0,0,0,0.8);
  18. }
  19. .btn_sl {
  20. height:30px;
  21. width:300px;
  22. background: red;
  23. color:#fff;
  24. }
  25. .right_bottom_block {
  26. width:300px;
  27.       height:50%; /* default */
  28.       background: rgba(0,0,0,0.8);
  29. }
  30. </style>
if you move btn_sl, the size rt and rb changes. and height this divs mast saved in coockie.
for example http://jsfiddle.net