What if you got rid of the THIS_SCRIPT?
PHP Code:
<if condition="$bbuserinfo[field15] == 'YES'">
<if condition="is_member_of($vbulletin->userinfo, 5, 7, 6, 16, 12, 11, 17, 10, 13, 9)">
<!-- CometChat Footer Code Start -->
<link type="text/css" rel="stylesheet" media="all" href="/cometchat/cometchatcss.php" charset="utf-8" />
<script type="text/javascript" src="/cometchat/cometchatjs.php" charset="utf-8"></script>
<!-- CometChat Footer Code End -->
</if></if>
hmmm