In javascript, '0 == false', '1 == true' and even '"1" == true'. Either use variables directly in a boolean context, or use type-strict equality (===) to ensure the variable is an actual boolean, not some other type coerced to a boolean bzr revid: xmo@openerp.com-20110617092436-s8b5v4v5ytbonvi1