/* Thanks O'Reilly.  The following function come from:
http://www.oreillynet.com/pub/a/javascript/excerpt/JSDHTMLCkbk_chap5/index5.html
*/

function getElementStyle(elemID, IEStyleProp, CSSStyleProp) {
    var elem = document.getElementById(elemID);
    if (elem.currentStyle) {
        return elem.currentStyle[IEStyleProp];
    } else if (window.getComputedStyle) {
        var compStyle = window.getComputedStyle(elem, "");
        return compStyle.getPropertyValue(CSSStyleProp);
    }
    return "";
}

function toggle_visibility(element_id){
  var my_element = document.getElementById(element_id);
  if(getElementStyle(element_id, 'display', 'display') == 'none'){
    my_element.style.display = 'block';
  }
  else {
    my_element.style.display = 'none';  
  }
}
