onfocus and onfocusout for <div> inside gridcell

Hi,
I have created a custom excell type that shows a small div below the gridcell, on click.
The div toggles on click of the grid cell.
I have used the template used in dhtmlxgrid_excell_acheck, for the same. As follows.
Inside the excell_acheck constructor:

this.drawCurrentState=function(){ if (this.cell.chstate==1) return "<div id='ss' onclick='(new eXcell_acheck(this.parentNode)).changeState(); (arguments[0]||event).cancelBubble=true;' style='cursor:pointer; font-weight:bold; text-align:center; '><img height='13px' src='"+this.grid.imgURL+"green.gif'>&nbsp;Yes</div>"; else return "<div id='ss' onclick='(new eXcell_acheck(this.parentNode)).changeState(); (arguments[0]||event).cancelBubble=true;' style='cursor:pointer; text-align:center; '><img height='13px' src='"+this.grid.imgURL+"red.gif'>&nbsp;No</div>"; }

Now, i need to be able to modify this, to toggle the div based on focus of the gridCell.
Meaning, if the gridCell is in focus, the div should be shown. If the focus is released, the div should be hidded.
How may i achieve this.
I assume, replacing onclick , by onfocus/ onfocusout wouldnt work , as the element is a div.

Thanks.