Code:
function toogle_the_panel(){
  toggle(test_panel,SHOW);
}


or

Code:
function toogle_the_panel(){
  if(is(test_panel,SHOW))
  {
     reset(test_panel,SHOW);
  }
  else{
     set(test_panel,SHOW); 
  }
}


and in your main fucniton before the while:

on_k = toggle_the_panel;

OR

in your main while

if(key_k) toggle_the_panel();


3333333333