
function toggleUtil(id) {
    $(id).toggle();
}

function toggleWithImgUtil(id, imageId, openImgUrl, closedImgUrl) {

    $(id).toggle();

    if( $(id).visible() ) {
        $(imageId).src= openImgUrl;
    }
    else {
        $(imageId).src= closedImgUrl;
    }
}

function showUtil(id) {
    Effect.Appear(id,{duration:0.4,queue:'end'});
}

function hideUtil(id) {
    Effect.Fade(id,{duration:0.4,queue:'end'});
}

function toggleWithEffectUtil(id) {
    if( $(id).visible() ) {
        Effect.Fade(id,{duration:0.4,queue:'end'});
    }
    else {
        Effect.Appear(id,{duration:0.4,queue:'end'});
    }
}

function toggleWithImgAndEffectUtil(id, imageId, openImgUrl, closedImgUrl) {

    if( $(id).visible() ) {
        Effect.Fade(id,{duration:0.4,queue:'end'});
        $(imageId).src= closedImgUrl;
    }
    else {
        Effect.Appear(id,{duration:0.4,queue:'end'});
        $(imageId).src= openImgUrl;
    }
}

function textAreaScrollBottom(id) {
    $(id).scrollTop = $(id).scrollHeight;
}

function focusUtil(id) {
    $(id).focus();
}