Hello, im tyring to change an icon for a button based on a condition

<ext:Button ID="NotifLogo" runat="server" Text="Notification">
               <Click Handler="#{NotificationsWindow}.show(); ReloadMe(); " />

and my JS code:

<script type="text/javascript">
        if (1 != 2) {
            if (1 < 2) {
                Ext.Net.ResourceManager.RegisterIcon(["BellStop"]); //if an icon has not been registered yet
            } else {
                Ext.Net.ResourceManager.RegisterIcon(["Bell"]); //if an icon has not been registered yet

Any help would be appreciated as my JS code does not work