// get property of element

function $style(ElementId, CssProperty)
{
  function $(stringId)
  {
    return document.getElementById(stringId);
  }   
  if($(ElementId).currentStyle)
  {
    var convertToCamelCase = CssProperty.replace(/\-(.)/g, function(m, l){return l.toUpperCase()});
    return $(ElementId).currentStyle[convertToCamelCase];
  }
  else if (window.getComputedStyle)
  {
    var elementStyle = window.getComputedStyle($(ElementId), "");
    return elementStyle.getPropertyValue(CssProperty);
  }
}

// showhide specified id

function showBox(id)
{
  var display = $style(id,'display');
  if (display=="block"){
    document.getElementById(id).style.display="none";
  }
  if (display=="none"){
    document.getElementById(id).style.display="block";
  }
}

