<%@language = "javascript"%>
<% /*
     $Revision$
     $Id$

    File:           shared/userlike.asp
    Description:    Toon een userlike frame
    Parameters:
    Context:
    Note:           LET OP: we openen de button in de parent(!)

*/ %>

<!-- #include file="../Shared/common.inc" -->
<!-- #include file="../Shared/iface.inc" -->
<%

 var secret = getQParam("likesecret");
 FCLTHeader.Requires();
%>

<html lang="en-us">
    <head>
        <meta charset="utf-8">
        <title>Userlike</title>
    </head>
<body>
</body>

<script>
    // LET OP: we openen de button in de parent(!)
    var userlikeData = {};
    userlikeData.user = {};
    userlikeData.user.name= '<%=safe.jsstring(user.naam())%>';
    userlikeData.user.email = '<%=safe.jsstring(user.prs_perslid_email())%>';
    userlikeData.user.additional01 = '<%=safe.jsstring(user.prs_perslid_telefoonnr())%>';
    userlikeData.user.additional02 = '<%=safe.jsstring(user.afdeling().naam())%>';
    parent.userlikeData = userlikeData;

      (function() {
        var ul = parent.document.createElement('script'); ul.type = 'text/javascript'; ul.async = true;
        ul.src = ('https:' == parent.document.location.protocol ? 'https://' : 'http://') + 'userlike-cdn-widgets.s3-eu-west-1.amazonaws.com/<%=safe.htmlattr(secret)%>.js';
        (parent.document.getElementsByTagName('head')[0] || parent.document.getElementsByTagName('body')[0]).appendChild(ul);
      })();
</script>
</html>
