public static function embeddedMenu($url, $profile_email, $user_email) {
        global $CFG;
        if ( ! $CFG->unify ) return '';
        if ( isset($_COOKIE['TSUGILINKDISMISS']) ) return '';
        $message = htmlentities($profile_email);
return <<< EOF
<div id="tsugi-link-dialog" title="Read Only Dialog" style="display: none;">
<p>{$CFG->servicename} Message: You already have an account on this web site.  Your current
system-wide login is:
<pre>
$message
</pre>
Would you like to link these two accounts? </p><p>
<button type="button" class="btn btn-primary"
onclick="
$.getJSON('$url', function(retval) {
    tsugiSetCookie('TSUGILINKDISMISS', 'true', 30);
    $('#tsugi-link-dialog').dialog( 'close' );
    $('#tsugi-embed-menu').hide();
}).error(function() {
    alert('Error in JSON call');
});
return false;
">Link Accounts</button>
<button type="button" class="btn btn-secondary"
onclick="
tsugiSetCookie('TSUGILINKDISMISS', 'true', 30);
$('#tsugi-link-dialog').dialog( 'close' );
$('#tsugi-embed-menu').hide();
return false
;">Dismiss this notification</button>
</p>
</div>
<div id="tsugi-embed-menu" style="display:none; position: fixed; top: 100px; right: 5px; width: 150px; ">
<button
style="float: right"  class="btn btn-default"
onclick="tsugiEmbedKeep();showModal('Link Accounts','tsugi-link-dialog'); return false;"
>
<span class="fa-stack fa-2x has-badge" data-count="1">
  <i class="fa fa-square fa-stack-2x"></i>
  <i class="fa fa-paper-plane fa-stack-1x fa-inverse"></i>
</span>
</button></div>
EOF;
    }