/**
 * showFadeBox 
 * 
 * @param string element 
 * @access public
 * @return void
 */
function showFadeBox(element, hideClass) {
    element = $(element);
    
    if (typeof(hideClass) != "undefined") {
        var elements = document.getElementsByClassName(hideClass);
        for (i = 0; i < elements.length; i++) {
            if (elements[i].id != element.id && elements[i].style.display != "none") {
                Effect.BlindUp(elements[i], {duration: .18}); 
            }
        }
    }

    if(element.getStyle("display") == "none") { 
//        element.style.display = "none";
        Effect.BlindDown(element, {duration: .18}); 
    } else { 
        Effect.BlindUp(element, {duration: .18}); 
    }
}


/**
 * getElement 
 * 
 * @param element $element 
 * @access public
 * @return void
 */
function getElement(element) {
    if ($(element)) {
        return $(element);
    }
    return false;
}

/**
 * doDGSort 
 * 
 * @param id $id 
 * @param orderIn $orderIn 
 * @access public
 * @return void
 */
function doDGSort(id, orderIn) {
    $('logout-a').focus();
    
    if ($("dgFrame")) {
        $("sort"+id+"OrderIn").value = orderIn;
        frames["dgFrame"].doSort($("sort"+id).value, orderIn, id);
    }

    return false;
}

/**
 * switchPassw 
 * 
 * @param passwSwitch $passwSwitch 
 * @access public
 * @return void
 */
function switchPassw(passwSwitch) {
    display = (!passwSwitch.checked) 
        ?  (xtmotion.core.ExpYes) 
            ? "block"
            : "table-row"
        : "none";
    $("trpassw1").style.display = display;
    $("trpassw2").style.display = display;
}
