/********************************************************************
Descript: custom function.
Note: Must include prototype.js before include this file.
********************************************************************/

/*
* div is showing or hiding.
*/
function isDivShow(_1)
{
    if(document.layers)        
        if (document.layers[_1].visibility == 'show')
            return true;
    else
        if ($(_1).style.visibility == 'visible')
            return true;

    return false;
}

/*
* Show div object
*/
function showDiv(_1)
{
    if(document.layers){
        document.layers[_1].visibility="show";
    }else{
        $(_1).style.visibility="visible";
    }
}

/*
* Hide div object
*/
function hideDiv(_1)
{
    if(document.layers){
        document.layers[_1].visibility="hide";
    }else{
        $(_1).style.visibility="hidden";
    }
}

/*
* Show or hide HTML object by using id object.
*/
function showHideId(status, id)
{
    if (status)
        id.style.display = '';
    else
        id.style.display = 'none';

    return;
}

/*
* Show or hide HTML object by using id object.
* if id object is show, now will be hide. And
* if id object is hide, now will be show
*/
function showHideIdAuto(id) {
    if (id.style.display =='')
        id.style.display = 'none';
    else 
        id.style.display = '';

    return;
}