Cjuibutton Click Event

Do any body has any idea why a onclick event on a CJuiButton is triggering twice?


<?php

                echo $this->widget('zii.widgets.jui.CJuiButton',array(

                'name'=>'nuevo',

                'caption'  =>"Agregar",

                'onclick'=> new CJavaScriptExpression("function(){agregarNuevo('local'); return false;}"),

                ),TRUE);

                ?>

here is my JScript

[html]<script>

function agregarNuevo(type){

    if(type &#33;== &quot;local&quot; &amp;&amp; type &#33;== &quot;visitante&quot;)


        return;


    debugger;


    


    //few lines of code that add an autocompleter


},

</script>[/html]

Thanks in advanced for any advice on how to figure out what the problem is.

Copied and pasted in my project it works only triggers once, you probably have a duplicate widget call somewhere