// JavaScript Document

/*****  AUTHOR: Alexander Pavlov /Sondata/            *****/
/***    action: Values can be just "CLOSE" or "SHOW"   ***/
/***            the case doesn't matter                ***/
/***    id: This is the id of show/hidden element    ***/

function actionMenu(action, id){
 
 action  = action.toString().toLowerCase();
 id   = id.toString();
 
 var obj = document.getElementById(id);
 
 if(action == "show"){
  obj.style.display = "block";
 }
 if(action == "close"){
  obj.style.display = "none";
 }
 if(action != "show" && action != "close"){
  alert("Wrong parameter!\n\nThe parameter can be only \"show\" or \"close\".");
  return false;
 }
 
 return;
 
}
