////
////    THIS FILE IS DEPRECATED
////    USE /javascript/utils/showhide.js INSTEAD
////

/**
 * Takes an element id. This function does nothing if the element
 * does not exist or if the browser does not support JS:DOM. 
 * 
 * Notes:
 *    1. Use on block elements (inline elments will get converted to
 *       blocks if you call show on them)
 *    2. Hiding an element will recalculate document flow to account
 *       for the removal of the element from the rendering pipeline.
 *    3. This script replaces an older version which was using
 *       deprecated JS browser detects.
 *
 * --Josh K
 *
 */


/* 
 * shows an element
 *
 * elem - id of element to show
 */

function show(elem) {
    if (!document.getElementById) return;
    
    var e = document.getElementById(elem);

    if (!e) return;

    e.style.display = 'block';
}

/* 
 * hides an element
 *
 * elem - id of element to show
 */

function hide(elem) {
    if (!document.getElementById) return;

    var e = document.getElementById(elem);

    if (!e) return;

    e.style.display = 'none';
}
