.chk1:focus{
background-color:Blue;
}
.chk2:focus{
background-color:Yellow;
}
text feilds
<input class=chk1 type=text id="a">
<input class=chk2 type=text id="b">
This one will work fine with FireFox but might have issues with IE6
See CSS Issue Focus For IE6
If you want this to work with IE, you might want to use javascript!!
Hope this helps
RDJ