Cjuibutton Click Event

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


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


                'caption'  =>"Agregar",

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



here is my JScript


function agregarNuevo(type){

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




    //few lines of code that add an autocompleter



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