Simple Modal

Simple Modal

I am using Simple Modal Confirm Overide ( http://www.ericmmartin.com/projects/simplemodal-demos/#) for my site, I have made minimal modifications to it and call it this way now:
  1. onclick="runconfirm('Are you sure you wish to continue?', '', 'global_site_status');"
Now the old confirm.js is now

  1. function runconfirm(message, callbacky, callbackn){
        confirm(message, callbacky, callbackn);
    }
    function confirm(message, callbacky, callbackn) {
        $('#confirm').modal({
            position: ["20.8%",],
            overlayId:'confirm-overlay',
            containerId:'confirm-container',
            onShow: function (dialog) {
                $('.message', dialog.data[0]).append(message);

                // if the user clicks "yes"
                $('.yes', dialog.data[0]).click(function () {
                    // call the callback
                    if ($.isFunction(callbacky)) {
                        callbacky.apply();
                    }
                    // close the dialog
                    $.modal.close();
                });
                // if the user clicks "no"
                $('.no', dialog.data[0]).click(function () {
                    // call the callback
                    if ($.isFunction(callbackn)) {
                        callbackn.apply();
                    }
                    // close the dialog
                    $.modal.close();
                });
            }
        });
    }






























Now global_site_status is a real JavaScript function so I can not understand why it will not run when it is set from the variable when being called through onclick.

If anyone can help in anyway it would be much appreciated.