function fancyAlert(msg) {
    jQuery.fancybox({
        'modal' : true,
        'content' : "<div style=\"margin:1px;width:240px;\">"+msg+"<div style=\"text-align:right;margin-top:10px;\"><button class=\"button\" onclick=\"jQuery.fancybox.close();\"><span><span><span>Ok</span></span></span></button></div></div>"
    });
    
}

function fancyConfirm(msg,callback) {
    var ret;
    jQuery.fancybox({
        modal : true,
        content : "<div style=\"margin:1px;width:240px;\">"+msg+"<div style=\"text-align:right;margin-top:10px;\"><button class=\"button\" id=\"fancyConfirm_ok\"><span><span><span>Ok</span></span></span></button>&nbsp;&nbsp;<a id=\"fancyConfirm_cancel\" href=\"#\">Cancel</a></div></div>",
        onComplete : function() {
            jQuery("#fancyConfirm_cancel").click(function() {
                ret = false; 
                jQuery.fancybox.close();
                return false;
            })
            jQuery("#fancyConfirm_ok").click(function() {
                ret = true; 
                jQuery.fancybox.close();
            })
        },
        onClosed : function() {
            callback.call(this, ret);
        }
    });   
    
}
