function ManageModalFeedback(e){
    var ar = new Array();
    ar['checked'] = byID('chk_modal_dialog').checked;
    ar['help_id'] = e;
    
    if(ar['checked']){
        xajax_RunFunction(44,ar);
    }
}

function ClearTip(e,v){
    $(document).ready(function(){
        if(isEmpty(v)){
            $('#' + e).val('');
        }
    })
}

function myTooltip(e,i){
    $("#" + e).wTooltip({ 
     content: false,
     ajax: "xajax_tooltip.php?id=" + i
}); 
}

function show_image(e,i,f){
     $(document).ready(function(){
        SetImage(e,i,'',f);
     });
}

function show_status(e,v,auto_hide,callback_id,h){
   $(document).ready(function(){
        if(v){
           $('#' + e).hide('fast');
           $('#' + e).show();
           $('#' + e).animate({height : (isUndefined(h)?'55px': h + 'px')},1000);
           if(auto_hide){
            setTimeout("show_status('" + e + "',0,0," + (!isUndefined(callback_id) ? callback_id : 0) + ");",4000);
           }
           return false;       
        }else{
           $('#' + e).fadeOut(2000,(callback_id == 0 ? '' : message_callback(callback_id)));
           return false;
        }
    })
}
function hide_status(e){
    $('#' + e).hide('fast');
}
function message_callback(id){
    if(id == -1){
        HideSimpleModal();
    }else{
        xajax_RunFunction(43,id);
    }
}
function toggleHelp(e,p){
    var o = byID(e).src.indexOf('_on');
    if(o > 0){
        SetImage(e,byID(e).src.replace('_on','_off'));
        xajax_RunFunction(45,0,p);
    }else{
        SetImage(e,byID(e).src.replace('_off','_on'));
        xajax_RunFunction(45,1,p);
    }
}

function BlockElement(e){
$(document).ready(function() {
$(e).block({ message: null }); 
});
}

function UnBlockElement(e){
    $(e).unblock();
}

function show_cluetip(){
    $('img.vir').cluetip({sticky: false, arrows: true,showTitle:false,cluetipClass: 'jtip'});
}
function block_hide(){
    $.unblockUI();
}

