  function VisibilitySwitch(IDName)
  {
    //Get the element from the document with the specified ID
    var Element = document.getElementById(IDName);
    
    //Check if an element is found
    if(Element)
    {
     //Switch the display state
     if(Element.style.display=="none")
       Element.style.display="inline";
     else
       Element.style.display="none";
       
     //Element was found
     return true;
    }
    else
     //Element was not found
     return false;
  };
  
  function VisibilitySwitchWithFocus(IDName, FocusName)
  {
    //Get the element from the document with the specified ID
    var Element = document.getElementById(IDName);
    
    //Check if an element is found
    if(Element)
    {
     //Switch the display state
     if(Element.style.display=="none")
     {
       Element.style.display="inline";
       var FocusElement = document.getElementById(FocusName);
       if(FocusElement != null)
       {
            FocusElement.focus();
       }
     }
     else
       Element.style.display="none";
       
     //Element was found
     return true;
    }
    else
     //Element was not found
     return false;
  };
  
  function SetVisibility(IDName, DisplayMode)
  {
    //Get the element from the document with the specified ID
    var Element = document.getElementById(IDName);
    
    //Check if an element is found then set the displaymode
    if(Element)
    {
     Element.style.display=DisplayMode;
     return true;
    }
    else
     //Element was not found
     return false;
  };
  
  function GetVisibilityState(IDName)
  {
    //Get the element from the document with the specified ID
    var Element = document.getElementById(IDName);
    
    //Check if an element is found and return the displaymode
    if(Element)
    {
     return Element.style.display;
    }
    else
     //Element was not found return false
     return false;
  };